diff options
Diffstat (limited to 'rt/share/html/Articles/Elements')
-rw-r--r-- | rt/share/html/Articles/Elements/BeforeMessageBox | 4 | ||||
-rw-r--r-- | rt/share/html/Articles/Elements/CheckSkipCreate | 2 | ||||
-rw-r--r-- | rt/share/html/Articles/Elements/CreateArticle | 2 | ||||
-rw-r--r-- | rt/share/html/Articles/Elements/GotoArticle | 2 | ||||
-rw-r--r-- | rt/share/html/Articles/Elements/IncludeArticle | 2 | ||||
-rw-r--r-- | rt/share/html/Articles/Elements/MaybeNeedsSetup | 2 | ||||
-rw-r--r-- | rt/share/html/Articles/Elements/NeedsSetup | 2 | ||||
-rw-r--r-- | rt/share/html/Articles/Elements/NewestArticles | 13 | ||||
-rw-r--r-- | rt/share/html/Articles/Elements/QuickSearch | 2 | ||||
-rw-r--r-- | rt/share/html/Articles/Elements/SelectClass | 2 | ||||
-rw-r--r-- | rt/share/html/Articles/Elements/ShowTopic | 2 | ||||
-rw-r--r-- | rt/share/html/Articles/Elements/ShowTopicLink | 2 | ||||
-rw-r--r-- | rt/share/html/Articles/Elements/SubjectOverride | 2 | ||||
-rw-r--r-- | rt/share/html/Articles/Elements/UpdatedArticles | 14 |
14 files changed, 36 insertions, 17 deletions
diff --git a/rt/share/html/Articles/Elements/BeforeMessageBox b/rt/share/html/Articles/Elements/BeforeMessageBox index dc428a3ac..972688d19 100644 --- a/rt/share/html/Articles/Elements/BeforeMessageBox +++ b/rt/share/html/Articles/Elements/BeforeMessageBox @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -45,7 +45,7 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -% if ( $ARGS{id} && $ARGS{id} ne 'new' ) { +% if ( $ARGS{id} && $ARGS{id} ne 'new' && RT->Config->Get('LinkArticlesOnInclude') ) { <input type="hidden" name="<%$ARGS{'id'}%>-RefersTo" value="<% join(' ',grep {$_} sort keys %uri) %>" /> % } diff --git a/rt/share/html/Articles/Elements/CheckSkipCreate b/rt/share/html/Articles/Elements/CheckSkipCreate index cb5ff9f5f..f97ad7535 100644 --- a/rt/share/html/Articles/Elements/CheckSkipCreate +++ b/rt/share/html/Articles/Elements/CheckSkipCreate @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Elements/CreateArticle b/rt/share/html/Articles/Elements/CreateArticle index 417eff0fc..07913d652 100644 --- a/rt/share/html/Articles/Elements/CreateArticle +++ b/rt/share/html/Articles/Elements/CreateArticle @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Elements/GotoArticle b/rt/share/html/Articles/Elements/GotoArticle index 5756c04e2..48bef75d9 100644 --- a/rt/share/html/Articles/Elements/GotoArticle +++ b/rt/share/html/Articles/Elements/GotoArticle @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Elements/IncludeArticle b/rt/share/html/Articles/Elements/IncludeArticle index d48957071..5307875cf 100644 --- a/rt/share/html/Articles/Elements/IncludeArticle +++ b/rt/share/html/Articles/Elements/IncludeArticle @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Elements/MaybeNeedsSetup b/rt/share/html/Articles/Elements/MaybeNeedsSetup index d3c23c411..78b69dc4c 100644 --- a/rt/share/html/Articles/Elements/MaybeNeedsSetup +++ b/rt/share/html/Articles/Elements/MaybeNeedsSetup @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Elements/NeedsSetup b/rt/share/html/Articles/Elements/NeedsSetup index 40e0af21d..61b8b2461 100644 --- a/rt/share/html/Articles/Elements/NeedsSetup +++ b/rt/share/html/Articles/Elements/NeedsSetup @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Elements/NewestArticles b/rt/share/html/Articles/Elements/NewestArticles index e73dbbd40..066656f8a 100644 --- a/rt/share/html/Articles/Elements/NewestArticles +++ b/rt/share/html/Articles/Elements/NewestArticles @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -71,9 +71,18 @@ <%INIT> my $rows = 10; my $i; + +my $Classes = RT::Classes->new($session{'CurrentUser'}); +$Classes->LimitToEnabled; +my @classes; +while (my $Class = $Classes->Next) { + push @classes, $Class->id if $Class->CurrentUserHasRight('ShowArticle'); +} + my $MyArticles; $MyArticles = RT::Articles->new($session{'CurrentUser'}); -$MyArticles->UnLimit; +$MyArticles->Limit(FIELD => 'Class', OPERATOR => 'IN', VALUE => \@classes) + if @classes; $MyArticles->RowsPerPage($rows); $MyArticles->OrderBy(FIELD => 'LastUpdated', ORDER => 'DESC'); diff --git a/rt/share/html/Articles/Elements/QuickSearch b/rt/share/html/Articles/Elements/QuickSearch index a9a214cfd..34f7c3c4c 100644 --- a/rt/share/html/Articles/Elements/QuickSearch +++ b/rt/share/html/Articles/Elements/QuickSearch @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Elements/SelectClass b/rt/share/html/Articles/Elements/SelectClass index 3c342b969..84547200e 100644 --- a/rt/share/html/Articles/Elements/SelectClass +++ b/rt/share/html/Articles/Elements/SelectClass @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Elements/ShowTopic b/rt/share/html/Articles/Elements/ShowTopic index a7b3ff0ff..16aee19dc 100644 --- a/rt/share/html/Articles/Elements/ShowTopic +++ b/rt/share/html/Articles/Elements/ShowTopic @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Elements/ShowTopicLink b/rt/share/html/Articles/Elements/ShowTopicLink index a7033b6fc..b16e24322 100644 --- a/rt/share/html/Articles/Elements/ShowTopicLink +++ b/rt/share/html/Articles/Elements/ShowTopicLink @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Elements/SubjectOverride b/rt/share/html/Articles/Elements/SubjectOverride index b44772fcc..11240f37d 100644 --- a/rt/share/html/Articles/Elements/SubjectOverride +++ b/rt/share/html/Articles/Elements/SubjectOverride @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Articles/Elements/UpdatedArticles b/rt/share/html/Articles/Elements/UpdatedArticles index 1a365eeef..4c640a234 100644 --- a/rt/share/html/Articles/Elements/UpdatedArticles +++ b/rt/share/html/Articles/Elements/UpdatedArticles @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -72,10 +72,20 @@ <%INIT> my $rows = 10; my $i; + +my $Classes = RT::Classes->new($session{'CurrentUser'}); +$Classes->LimitToEnabled; +my @classes; +while (my $Class = $Classes->Next) { + push @classes, $Class->id if $Class->CurrentUserHasRight('ShowArticle'); +} + my $MyArticles; $MyArticles = RT::Articles->new($session{'CurrentUser'}); -$MyArticles->RowsPerPage($rows); +$MyArticles->Limit(FIELD => 'Class', OPERATOR => 'IN', VALUE => \@classes) + if @classes; $MyArticles->Limit(FIELD => 'Created', OPERATOR => '!=', VALUE => 'LastUpdated', QUOTEVALUE => 0 ); +$MyArticles->RowsPerPage($rows); $MyArticles->OrderBy(FIELD => 'Created', ORDER => 'DESC'); </%INIT> |