[Rt-commit] [svn] r1156 - in rt/branches/rt-3.1: . bin etc html
html/Admin/Elements html/Admin/Global html/Admin/Groups
html/Admin/Queues html/Admin/Users html/Approvals html/Search
html/SelfService html/Ticket html/Ticket/Elements html/User
html/User/Groups lib/RT lib/RT/Interface
jesse at pallas.eruditorum.org
jesse at pallas.eruditorum.org
Sun Jun 27 19:05:18 EDT 2004
Author: jesse
Date: Sun Jun 27 19:05:17 2004
New Revision: 1156
Modified:
rt/branches/rt-3.1/ (props changed)
rt/branches/rt-3.1/bin/rt.in
rt/branches/rt-3.1/etc/RT_Config.pm.in
rt/branches/rt-3.1/html/Admin/Elements/EditCustomField
rt/branches/rt-3.1/html/Admin/Elements/EditScrip
rt/branches/rt-3.1/html/Admin/Elements/EditTemplates
rt/branches/rt-3.1/html/Admin/Global/GroupRights.html
rt/branches/rt-3.1/html/Admin/Global/Template.html
rt/branches/rt-3.1/html/Admin/Global/UserRights.html
rt/branches/rt-3.1/html/Admin/Groups/GroupRights.html
rt/branches/rt-3.1/html/Admin/Groups/Members.html
rt/branches/rt-3.1/html/Admin/Groups/Modify.html
rt/branches/rt-3.1/html/Admin/Groups/UserRights.html
rt/branches/rt-3.1/html/Admin/Queues/GroupRights.html
rt/branches/rt-3.1/html/Admin/Queues/Modify.html
rt/branches/rt-3.1/html/Admin/Queues/Template.html
rt/branches/rt-3.1/html/Admin/Queues/UserRights.html
rt/branches/rt-3.1/html/Admin/Users/Modify.html
rt/branches/rt-3.1/html/Approvals/index.html
rt/branches/rt-3.1/html/Search/Bulk.html
rt/branches/rt-3.1/html/SelfService/Prefs.html
rt/branches/rt-3.1/html/Ticket/Display.html
rt/branches/rt-3.1/html/Ticket/Elements/ShowAttachments
rt/branches/rt-3.1/html/Ticket/ModifyAll.html
rt/branches/rt-3.1/html/Ticket/ModifyDates.html
rt/branches/rt-3.1/html/Ticket/ModifyLinks.html
rt/branches/rt-3.1/html/Ticket/Update.html
rt/branches/rt-3.1/html/User/Delegation.html
rt/branches/rt-3.1/html/User/Groups/Members.html
rt/branches/rt-3.1/html/User/Groups/Modify.html
rt/branches/rt-3.1/html/User/Prefs.html
rt/branches/rt-3.1/html/autohandler
rt/branches/rt-3.1/lib/RT/Interface/Web.pm
rt/branches/rt-3.1/lib/RT/Templates_Overlay.pm
Log:
----------------------------------------------------------------------
r1989 at tinbook: jesse | 2004-06-27T22:59:41.380683Z
Pulling forward post-3.0.11 fixes from RT 3.0 branch
----------------------------------------------------------------------
Modified: rt/branches/rt-3.1/bin/rt.in
==============================================================================
--- rt/branches/rt-3.1/bin/rt.in (original)
+++ rt/branches/rt-3.1/bin/rt.in Sun Jun 27 19:05:17 2004
@@ -777,10 +777,10 @@
my ($head, $text) = split /\n\n/, $res->content, 2;
my ($status, @headers) = split /\n/, $head;
- $text =~ s/\n*$/\n/;
+ $text =~ s/\n*$/\n/ if ($text);
# "RT/3.0.1 401 Credentials required"
- if ($status !~ m#^RT/\d+(?:\.\d+)+(?:-?\w+)? (\d+) ([\w\s]+)$#) {
+ if ($status !~ m#^RT/\d+(?:\S+) (\d+) ([\w\s]+)$#) {
warn "rt: Malformed RT response from $config{server}.\n";
warn "(Rerun with RTDEBUG=3 for details.)\n" if $config{debug} < 3;
exit -1;
Modified: rt/branches/rt-3.1/etc/RT_Config.pm.in
==============================================================================
--- rt/branches/rt-3.1/etc/RT_Config.pm.in (original)
+++ rt/branches/rt-3.1/etc/RT_Config.pm.in Sun Jun 27 19:05:17 2004
@@ -249,11 +249,11 @@
Set($LogDir, '@RT_LOG_PATH@');
Set($LogToFileNamed , "rt.log"); #log to rt.log
-# On Solaris, set to ( socket => 'inet' ). Options here override any
-# other options RT passes to Log::Dispatch::Syslog. Other interesting
-# flags include facility and logopt. (See the Log::Dispatch::Syslog
-# documentation for more information.) (Maybe ident too, if you have
-# multiple RT installations.)
+# On Solaris or UnixWare, set to ( socket => 'inet' ). Options here
+# override any other options RT passes to Log::Dispatch::Syslog.
+# Other interesting flags include facility and logopt. (See the
+# Log::Dispatch::Syslog documentation for more information.) (Maybe
+# ident too, if you have multiple RT installations.)
@LogToSyslogConf = () unless (@LogToSyslogConf);
Modified: rt/branches/rt-3.1/html/Admin/Elements/EditCustomField
==============================================================================
--- rt/branches/rt-3.1/html/Admin/Elements/EditCustomField (original)
+++ rt/branches/rt-3.1/html/Admin/Elements/EditCustomField Sun Jun 27 19:05:17 2004
@@ -59,7 +59,7 @@
<& /Admin/Elements/AddCustomFieldValue, CustomField => $CustomFieldObj &>
</font>
% }
-<&/Elements/Submit&>
+<&/Elements/Submit, Label => loc('Create') &>
</FORM>
Modified: rt/branches/rt-3.1/html/Admin/Elements/EditScrip
==============================================================================
--- rt/branches/rt-3.1/html/Admin/Elements/EditScrip (original)
+++ rt/branches/rt-3.1/html/Admin/Elements/EditScrip Sun Jun 27 19:05:17 2004
@@ -107,7 +107,7 @@
</table>
<& /Elements/TitleBoxEnd &>
-<& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
+<& /Elements/Submit, Label => loc('Create'), Reset => 1 &>
</FORM>
<%init>
@@ -130,6 +130,7 @@
);
if ( defined $retval ) {
push @actions, $msg;
+ $id = $scrip->id;
}
else {
Abort( $msg);
Modified: rt/branches/rt-3.1/html/Admin/Elements/EditTemplates
==============================================================================
--- rt/branches/rt-3.1/html/Admin/Elements/EditTemplates (original)
+++ rt/branches/rt-3.1/html/Admin/Elements/EditTemplates Sun Jun 27 19:05:17 2004
@@ -54,7 +54,7 @@
</TABLE>
% }
-<& /Elements/Submit &>
+<& /Elements/Submit, Label => loc('Delete Template') &>
</FORM>
<%INIT>
Modified: rt/branches/rt-3.1/html/Admin/Global/GroupRights.html
==============================================================================
--- rt/branches/rt-3.1/html/Admin/Global/GroupRights.html (original)
+++ rt/branches/rt-3.1/html/Admin/Global/GroupRights.html Sun Jun 27 19:05:17 2004
@@ -81,7 +81,7 @@
</TABLE>
<& /Elements/TitleBoxEnd &>
- <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
+ <& /Elements/Submit, Label => loc('Modify Group Rights'), Reset => 1 &>
</FORM>
Modified: rt/branches/rt-3.1/html/Admin/Global/Template.html
==============================================================================
--- rt/branches/rt-3.1/html/Admin/Global/Template.html (original)
+++ rt/branches/rt-3.1/html/Admin/Global/Template.html Sun Jun 27 19:05:17 2004
@@ -42,7 +42,7 @@
<& /Admin/Elements/ModifyTemplate, Name => $TemplateObj->Name, Description => $TemplateObj->Description, Content => $TemplateObj->Content &>
-<& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
+<& /Elements/Submit, Label => loc('Save Changes'), Reset => 1 &>
</FORM>
Modified: rt/branches/rt-3.1/html/Admin/Global/UserRights.html
==============================================================================
--- rt/branches/rt-3.1/html/Admin/Global/UserRights.html (original)
+++ rt/branches/rt-3.1/html/Admin/Global/UserRights.html Sun Jun 27 19:05:17 2004
@@ -50,7 +50,7 @@
</TABLE>
<& /Elements/TitleBoxEnd &>
- <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
+ <& /Elements/Submit, Label => loc('Modify User Rights'), Reset => 1 &>
</FORM>
Modified: rt/branches/rt-3.1/html/Admin/Groups/GroupRights.html
==============================================================================
--- rt/branches/rt-3.1/html/Admin/Groups/GroupRights.html (original)
+++ rt/branches/rt-3.1/html/Admin/Groups/GroupRights.html Sun Jun 27 19:05:17 2004
@@ -69,7 +69,7 @@
</TABLE>
<& /Elements/TitleBoxEnd &>
- <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
+ <& /Elements/Submit, Label => loc('Modify Group Rights'), Reset => 1 &>
</FORM>
Modified: rt/branches/rt-3.1/html/Admin/Groups/Members.html
==============================================================================
--- rt/branches/rt-3.1/html/Admin/Groups/Members.html (original)
+++ rt/branches/rt-3.1/html/Admin/Groups/Members.html Sun Jun 27 19:05:17 2004
@@ -77,7 +77,7 @@
</TR>
</TABLE>
<& /Elements/TitleBoxEnd &>
-<& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
+<& /Elements/Submit, Label => loc('Modify Members'), Reset => 1 &>
</form>
Modified: rt/branches/rt-3.1/html/Admin/Groups/Modify.html
==============================================================================
--- rt/branches/rt-3.1/html/Admin/Groups/Modify.html (original)
+++ rt/branches/rt-3.1/html/Admin/Groups/Modify.html Sun Jun 27 19:05:17 2004
@@ -52,7 +52,7 @@
<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>> <&|/l&>Enabled (Unchecking this box disables this group)</&><BR>
</TR>
</TABLE>
-<& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
+<& /Elements/Submit, Label => loc('Create'), Reset => 1 &>
</form>
<%INIT>
Modified: rt/branches/rt-3.1/html/Admin/Groups/UserRights.html
==============================================================================
--- rt/branches/rt-3.1/html/Admin/Groups/UserRights.html (original)
+++ rt/branches/rt-3.1/html/Admin/Groups/UserRights.html Sun Jun 27 19:05:17 2004
@@ -51,7 +51,7 @@
</TABLE>
<& /Elements/TitleBoxEnd &>
- <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
+ <& /Elements/Submit, Label => loc('Modify User Rights'), Reset => 1 &>
</FORM>
Modified: rt/branches/rt-3.1/html/Admin/Queues/GroupRights.html
==============================================================================
--- rt/branches/rt-3.1/html/Admin/Queues/GroupRights.html (original)
+++ rt/branches/rt-3.1/html/Admin/Queues/GroupRights.html Sun Jun 27 19:05:17 2004
@@ -82,7 +82,7 @@
% }
</TABLE>
- <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
+ <& /Elements/Submit, Label => loc('Modify Group Rights'), Reset => 1 &>
</FORM>
Modified: rt/branches/rt-3.1/html/Admin/Queues/Modify.html
==============================================================================
--- rt/branches/rt-3.1/html/Admin/Queues/Modify.html (original)
+++ rt/branches/rt-3.1/html/Admin/Queues/Modify.html Sun Jun 27 19:05:17 2004
@@ -86,7 +86,7 @@
</TR>
</TABLE>
-<& /Elements/Submit &>
+<& /Elements/Submit, Label => loc('Save Changes') &>
</form>
Modified: rt/branches/rt-3.1/html/Admin/Queues/Template.html
==============================================================================
--- rt/branches/rt-3.1/html/Admin/Queues/Template.html (original)
+++ rt/branches/rt-3.1/html/Admin/Queues/Template.html Sun Jun 27 19:05:17 2004
@@ -41,7 +41,7 @@
<INPUT TYPE=HIDDEN name="Queue" value="<%$Queue%>">
<& /Admin/Elements/ModifyTemplate, Name => $TemplateObj->Name, Description =>
$TemplateObj->Description, Content => $TemplateObj->Content &>
-<& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
+<& /Elements/Submit, Label => loc('Create'), Reset => 1 &>
</FORM>
Modified: rt/branches/rt-3.1/html/Admin/Queues/UserRights.html
==============================================================================
--- rt/branches/rt-3.1/html/Admin/Queues/UserRights.html (original)
+++ rt/branches/rt-3.1/html/Admin/Queues/UserRights.html Sun Jun 27 19:05:17 2004
@@ -50,7 +50,7 @@
% }
</TABLE>
- <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
+ <& /Elements/Submit, Label => loc('Modify User Rights'), Reset => 1 &>
</FORM>
Modified: rt/branches/rt-3.1/html/Admin/Users/Modify.html
==============================================================================
--- rt/branches/rt-3.1/html/Admin/Users/Modify.html (original)
+++ rt/branches/rt-3.1/html/Admin/Users/Modify.html Sun Jun 27 19:05:17 2004
@@ -195,7 +195,7 @@
</TR>
</TABLE>
-<& /Elements/Submit &>
+<& /Elements/Submit, Label => loc('Save Changes') &>
</form>
<%INIT>
Modified: rt/branches/rt-3.1/html/Approvals/index.html
==============================================================================
--- rt/branches/rt-3.1/html/Approvals/index.html (original)
+++ rt/branches/rt-3.1/html/Approvals/index.html Sun Jun 27 19:05:17 2004
@@ -27,7 +27,7 @@
<& /Elements/ListActions, actions => \@actions &>
<form method="post">
<& Elements/PendingMyApproval, %ARGS &>
-<& /Elements/Submit &>
+<& /Elements/Submit, Label => loc('Show Approvals') &>
</form>
<%init>
Modified: rt/branches/rt-3.1/html/Search/Bulk.html
==============================================================================
--- rt/branches/rt-3.1/html/Search/Bulk.html (original)
+++ rt/branches/rt-3.1/html/Search/Bulk.html Sun Jun 27 19:05:17 2004
@@ -143,7 +143,7 @@
<& /Ticket/Elements/BulkLinks &>
<& /Elements/TitleBoxEnd &>
-<& /Elements/Submit &>
+<& /Elements/Submit, Label => loc('Update All') &>
</FORM>
Modified: rt/branches/rt-3.1/html/SelfService/Prefs.html
==============================================================================
--- rt/branches/rt-3.1/html/SelfService/Prefs.html (original)
+++ rt/branches/rt-3.1/html/SelfService/Prefs.html Sun Jun 27 19:05:17 2004
@@ -33,7 +33,7 @@
<& /Elements/TitleBoxEnd &>
<BR>
% }
-<& /Elements/Submit &>
+<& /Elements/Submit, Label => loc('Save Changes') &>
</form>
Modified: rt/branches/rt-3.1/html/Ticket/Display.html
==============================================================================
--- rt/branches/rt-3.1/html/Ticket/Display.html (original)
+++ rt/branches/rt-3.1/html/Ticket/Display.html Sun Jun 27 19:05:17 2004
@@ -99,18 +99,17 @@
}
}
- if ( $ARGS{'UpdateContent'} || $session{'Attachments'}) {
- $ARGS{'UpdateContent'} =~ s/\r\n/\n/g;
- if ( $session{'Attachments'} ||
- ( $ARGS{'UpdateContent'} ne ''
- && $ARGS{'UpdateContent'} ne "-- \n"
- . $session{'CurrentUser'}->UserObj->Signature )) {
- $ARGS{UpdateAttachments} = $session{'Attachments'};
- ProcessUpdateMessage( ARGSRef => \%ARGS,
- Actions => \@Actions,
- TicketObj => $TicketObj );
- delete $session{'Attachments'};
- }
+ $ARGS{'UpdateContent'} =~ s/\r\n/\n/g;
+ if ( $ARGS{'UpdateTimeWorked'} ||
+ $session{'Attachments'} ||
+ ( $ARGS{'UpdateContent'} ne ''
+ && $ARGS{'UpdateContent'} ne "-- \n"
+ . $session{'CurrentUser'}->UserObj->Signature )) {
+ $ARGS{UpdateAttachments} = $session{'Attachments'};
+ ProcessUpdateMessage( ARGSRef => \%ARGS,
+ Actions => \@Actions,
+ TicketObj => $TicketObj );
+ delete $session{'Attachments'};
}
#Process status updates
my @BasicActions = ProcessTicketBasics(ARGSRef => \%ARGS, TicketObj=>$TicketObj);
Modified: rt/branches/rt-3.1/html/Ticket/Elements/ShowAttachments
==============================================================================
--- rt/branches/rt-3.1/html/Ticket/Elements/ShowAttachments (original)
+++ rt/branches/rt-3.1/html/Ticket/Elements/ShowAttachments Sun Jun 27 19:05:17 2004
@@ -47,7 +47,10 @@
</%PERL>
<li><font <%$fontsize%>>
- <A HREF="<%$RT::WebPath%>/Ticket/Attachment/<%$rev->TransactionId%>/<%$rev->Id%>/<%$rev->Filename | u%>"><%$rev->CreatedAsString%> (<% $size %>)</a></font></li>
+<A HREF="<%$RT::WebPath%>/Ticket/Attachment/<%$rev->TransactionId%>/<%$rev->Id%>/<%$rev->Filename | u%>">
+<&|/l, $rev->CreatedAsString, $size, $rev->CreatorObj->Name &>[_1] ([_2]) by [_3]</&>
+</a>
+</font></li>
% }
% $fontsize='size="-2"';
% }
Modified: rt/branches/rt-3.1/html/Ticket/ModifyAll.html
==============================================================================
--- rt/branches/rt-3.1/html/Ticket/ModifyAll.html (original)
+++ rt/branches/rt-3.1/html/Ticket/ModifyAll.html Sun Jun 27 19:05:17 2004
@@ -76,7 +76,7 @@
</tr>
<tr>
<td class="label"><&|/l&>Subject</&>:</td>
- <td class="entry"><input name="UpdateSubject" size=60 value=""></td>
+ <td class="entry"><input name="UpdateSubject" size=60 value="<%$Ticket->Subject%>"></td>
</tr>
<tr>
<td class="label"><&|/l&>Attach</&>:</td>
Modified: rt/branches/rt-3.1/html/Ticket/ModifyDates.html
==============================================================================
--- rt/branches/rt-3.1/html/Ticket/ModifyDates.html (original)
+++ rt/branches/rt-3.1/html/Ticket/ModifyDates.html Sun Jun 27 19:05:17 2004
@@ -35,7 +35,7 @@
<& Elements/EditDates, TicketObj => $TicketObj &>
<& /Elements/TitleBoxEnd &>
-<& /Elements/Submit, color => "#663366" &>
+<& /Elements/Submit, Label => loc('Save Changes'), color => "#663366" &>
</form>
Modified: rt/branches/rt-3.1/html/Ticket/ModifyLinks.html
==============================================================================
--- rt/branches/rt-3.1/html/Ticket/ModifyLinks.html (original)
+++ rt/branches/rt-3.1/html/Ticket/ModifyLinks.html Sun Jun 27 19:05:17 2004
@@ -35,7 +35,7 @@
<& /Elements/TitleBoxStart, title => loc('Edit Links'), color => "#336633"&>
<& /Elements/EditLinks, Object => $Ticket, Merge => 1 &>
<& /Elements/TitleBoxEnd &>
-<& /Elements/Submit, color => "#336633", Caption=> loc('Save Changes') &>
+<& /Elements/Submit, color => "#336633", Label => loc('Save Changes') &>
</form>
Modified: rt/branches/rt-3.1/html/Ticket/Update.html
==============================================================================
--- rt/branches/rt-3.1/html/Ticket/Update.html (original)
+++ rt/branches/rt-3.1/html/Ticket/Update.html Sun Jun 27 19:05:17 2004
@@ -94,7 +94,7 @@
-<& /Elements/Submit, Name => 'SubmitTicket' &>
+<& /Elements/Submit, Label => loc('Update Ticket'), Name => 'SubmitTicket' &>
% if ($TicketObj->CurrentUserHasRight('ShowOutgoingEmail')) {
<& /Ticket/Elements/PreviewScrips, TicketObj => $TicketObj, %ARGS &>
% }
Modified: rt/branches/rt-3.1/html/User/Delegation.html
==============================================================================
--- rt/branches/rt-3.1/html/User/Delegation.html (original)
+++ rt/branches/rt-3.1/html/User/Delegation.html Sun Jun 27 19:05:17 2004
@@ -33,7 +33,7 @@
<& Elements/DelegateRights, personalgroups => $personalgroups, objects => $objects, ObjectType => 'RT::Queue' &>
<& Elements/DelegateRights, personalgroups => $personalgroups, objects => $objects, ObjectType => 'RT::Group' &>
-<& /Elements/Submit &>
+<& /Elements/Submit, Label => loc('Modify Rights') &>
</form>
<%INIT>
Modified: rt/branches/rt-3.1/html/User/Groups/Members.html
==============================================================================
--- rt/branches/rt-3.1/html/User/Groups/Members.html (original)
+++ rt/branches/rt-3.1/html/User/Groups/Members.html Sun Jun 27 19:05:17 2004
@@ -76,7 +76,7 @@
</TD>
</TR>
</TABLE>
-<& /Elements/Submit &>
+<& /Elements/Submit, Label => loc('Modify Members') &>
</form>
Modified: rt/branches/rt-3.1/html/User/Groups/Modify.html
==============================================================================
--- rt/branches/rt-3.1/html/User/Groups/Modify.html (original)
+++ rt/branches/rt-3.1/html/User/Groups/Modify.html Sun Jun 27 19:05:17 2004
@@ -52,7 +52,7 @@
<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>> <&|/l&>Enabled (Unchecking this box disables this group)</&><BR>
</TR>
</TABLE>
-<& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
+<& /Elements/Submit, Label => loc('Create'), Reset => 1 &>
</form>
<%INIT>
Modified: rt/branches/rt-3.1/html/User/Prefs.html
==============================================================================
--- rt/branches/rt-3.1/html/User/Prefs.html (original)
+++ rt/branches/rt-3.1/html/User/Prefs.html Sun Jun 27 19:05:17 2004
@@ -154,7 +154,7 @@
</TABLE>
-<& /Elements/Submit &>
+<& /Elements/Submit, Label => loc('Save Preferences') &>
</form>
Modified: rt/branches/rt-3.1/html/autohandler
==============================================================================
--- rt/branches/rt-3.1/html/autohandler (original)
+++ rt/branches/rt-3.1/html/autohandler Sun Jun 27 19:05:17 2004
@@ -171,11 +171,15 @@
if (!$session{'CurrentUser'}->id() ||
!$session{'CurrentUser'}->IsPassword($pass))
{
+ $RT::Logger->error("FAILED LOGIN for $user from $ENV{'REMOTE_ADDR'}");
delete $session{'CurrentUser'};
$m->comp('/Elements/Login', %ARGS,
Error => loc('Your username or password is incorrect'));
$m->abort();
}
+ else {
+ $RT::Logger->info("Successful login for $user from $ENV{'REMOTE_ADDR'}");
+ }
}
# If we've got credentials, let's serve the file up.
Modified: rt/branches/rt-3.1/lib/RT/Interface/Web.pm
==============================================================================
--- rt/branches/rt-3.1/lib/RT/Interface/Web.pm (original)
+++ rt/branches/rt-3.1/lib/RT/Interface/Web.pm Sun Jun 27 19:05:17 2004
@@ -433,7 +433,8 @@
);
#Make the update content have no 'weird' newlines in it
- if ( $args{ARGSRef}->{'UpdateContent'} ||
+ if ( $args{ARGSRef}->{'UpdateTimeWorked'} ||
+ $args{ARGSRef}->{'UpdateContent'} ||
$args{ARGSRef}->{'UpdateAttachments'}) {
if (
Modified: rt/branches/rt-3.1/lib/RT/Templates_Overlay.pm
==============================================================================
--- rt/branches/rt-3.1/lib/RT/Templates_Overlay.pm (original)
+++ rt/branches/rt-3.1/lib/RT/Templates_Overlay.pm Sun Jun 27 19:05:17 2004
@@ -137,5 +137,40 @@
}
# }}}
+# {{{ sub Next
+
+=head2 Next
+
+Returns the next template that this user can see.
+
+=cut
+
+sub Next {
+ my $self = shift;
+
+
+ my $templ = $self->SUPER::Next();
+ if ((defined($templ)) and (ref($templ))) {
+
+ # If it's part of a queue, and the user can read templates in
+ # that queue, or the user can globally read templates, show it
+ if ($templ->Queue && $templ->CurrentUserHasQueueRight('ShowTemplate') or
+ $templ->CurrentUser->HasRight(Object => $RT::System, Right => 'ShowTemplate')) {
+ return($templ);
+ }
+
+ #If the user doesn't have the right to show this template
+ else {
+ return($self->Next());
+ }
+ }
+ #if there never was any template
+ else {
+ return(undef);
+ }
+
+}
+# }}}
+
1;
More information about the Rt-commit
mailing list