[Rt-commit] r6857 - in rt/branches/3.7-EXPERIMENTAL-RTIR-2.2: .
ruz at bestpractical.com
ruz at bestpractical.com
Fri Jan 26 14:05:53 EST 2007
Author: ruz
Date: Fri Jan 26 14:05:53 2007
New Revision: 6857
Modified:
rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/ (props changed)
rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/html/SelfService/Elements/MyRequests
Log:
r4427 at cubic-pc (orig r6794): ruz | 2007-01-23 13:48:07 +0300
SelfService/Elements/MyRequests
* backport refactoring from 3.7
Modified: rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/html/SelfService/Elements/MyRequests
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/html/SelfService/Elements/MyRequests (original)
+++ rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/html/SelfService/Elements/MyRequests Fri Jan 26 14:05:53 2007
@@ -54,19 +54,14 @@
</&>
<%INIT>
-$title ||= loc("My [_1] tickets", $friendly_status);
-my $EmailAddress = $session{'CurrentUser'}->EmailAddress;
-my $Role = shift @roles;
-my $Query = "( ";
-$Query .= $Role . " = '" . $EmailAddress . "'";
-foreach $Role (@roles) {
- $Query .= " OR " . $Role . " = '" . $EmailAddress . "'";
-}
-$Query .= " )";
-if (@status) {
- $Query .= " AND ( Status = '";
- $Query .= join "' OR Status = '", @status;
- $Query .= "' )";
+my $id = $session{'CurrentUser'}->id;
+my $Query = "( "
+ . join( ' OR ', map "$_.id = $id", @roles )
+ . ")";
+if ( @status ) {
+ $Query .= " AND ( "
+ . join( ' OR ', map "Status = '$_'", @status )
+ . " )";
}
my $Order = "ASC";
my $OrderBy = "Created";
@@ -78,8 +73,8 @@
OwnerName};
</%INIT>
<%ARGS>
-$title => undef
$friendly_status => loc('open')
+$title => loc("My [_1] tickets", $friendly_status)
@roles => ('Requestor', 'Cc', 'AdminCc')
@status => ('open', 'new', 'stalled')
$BaseURL => undef
More information about the Rt-commit
mailing list