projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rt 4.2.16
[freeside.git]
/
rt
/
share
/
html
/
Articles
/
Elements
/
UpdatedArticles
diff --git
a/rt/share/html/Articles/Elements/UpdatedArticles
b/rt/share/html/Articles/Elements/UpdatedArticles
index
1a1ec52
..
ec5ba1a
100644
(file)
--- a/
rt/share/html/Articles/Elements/UpdatedArticles
+++ b/
rt/share/html/Articles/Elements/UpdatedArticles
@@
-2,7
+2,7
@@
%#
%# COPYRIGHT:
%#
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-201
5
Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-201
9
Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@
-72,10
+72,20
@@
<%INIT>
my $rows = 10;
my $i;
<%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'});
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->Limit(FIELD => 'Created', OPERATOR => '!=', VALUE => 'LastUpdated', QUOTEVALUE => 0 );
+$MyArticles->RowsPerPage($rows);
$MyArticles->OrderBy(FIELD => 'Created', ORDER => 'DESC');
</%INIT>
$MyArticles->OrderBy(FIELD => 'Created', ORDER => 'DESC');
</%INIT>