[Rt-commit] r7952 - in rt/branches/3.7-EXPERIMENTAL-TUNIS: .
html/Admin/CustomFields html/Admin/Elements html/Admin/Queues
html/Admin/Users html/Approvals/Elements html/REST/1.0/NoAuth
html/Tools/Reports html/Tools/Reports/Elements lib/RT
clsung at bestpractical.com
clsung at bestpractical.com
Tue May 29 02:14:08 EDT 2007
Author: clsung
Date: Tue May 29 02:14:05 2007
New Revision: 7952
Modified:
rt/branches/3.7-EXPERIMENTAL-TUNIS/ (props changed)
rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Admin/CustomFields/Modify.html
rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Admin/Elements/GlobalCustomFieldTabs
rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Admin/Queues/Template.html
rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Admin/Users/index.html
rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Approvals/Elements/PendingMyApproval
rt/branches/3.7-EXPERIMENTAL-TUNIS/html/REST/1.0/NoAuth/mail-gateway
rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Search/Bulk.html
rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Tools/Reports/CreatedByDates.html
rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Tools/Reports/Elements/Tabs
rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Tools/Reports/ResolvedByDates.html
rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/CustomField_Overlay.pm
Log:
r10810 at going04: clsung | 2007-05-29 11:05:44 +0800
- also return $msg. (fix warning in t/api/ticket.t:24)
r10811 at going04: clsung | 2007-05-29 11:17:44 +0800
- give default ''.
r10812 at going04: clsung | 2007-05-29 12:57:51 +0800
- fix warning
- Use of uninitialized value in string eq at line 81
r10813 at going04: clsung | 2007-05-29 13:20:45 +0800
- give default value
- some default value set to '' instead of undef
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Admin/CustomFields/Modify.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Admin/CustomFields/Modify.html (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Admin/CustomFields/Modify.html Tue May 29 02:14:05 2007
@@ -59,7 +59,7 @@
<table>
<tr><td class="label"><&|/l&>Name</&></td>
-<td><input name="Name" value="<% $CustomFieldObj->Name %>" size="20" /></td></tr>
+<td><input name="Name" value="<% $CustomFieldObj->Name || '' %>" size="20" /></td></tr>
<tr><td class="label"><&|/l&>Description</&></td>
<td><input name="Description" value="<% $CustomFieldObj->Description || '' %>" size="80" /></td></tr>
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Admin/Elements/GlobalCustomFieldTabs
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Admin/Elements/GlobalCustomFieldTabs (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Admin/Elements/GlobalCustomFieldTabs Tue May 29 02:14:05 2007
@@ -88,7 +88,7 @@
<%ARGS>
$id => undef
-$current_tab => undef
+$current_tab => ''
$subtabs => undef
$current_subtab => undef
$Title => undef
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Admin/Queues/Template.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Admin/Queues/Template.html (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Admin/Queues/Template.html Tue May 29 02:14:05 2007
@@ -123,8 +123,8 @@
</%INIT>
<%ARGS>
-$Queue => undef
-$Template => undef
+$Queue => ''
+$Template => ''
$Create => undef
$Name => undef
</%ARGS>
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Admin/Users/index.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Admin/Users/index.html (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Admin/Users/index.html Tue May 29 02:14:05 2007
@@ -96,7 +96,7 @@
my $users = RT::Users->new( $session{'CurrentUser'} );
$users->{'find_disabled_rows'} = 1 if $FindDisabledUsers;
-if ( length $UserString ) {
+if ( defined($UserString) && length $UserString ) {
$caption = loc("Users matching search criteria");
if ( $UserField =~ /^CustomField-(\d+)/ ) {
$users->LimitCustomField(
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Approvals/Elements/PendingMyApproval
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Approvals/Elements/PendingMyApproval (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Approvals/Elements/PendingMyApproval Tue May 29 02:14:05 2007
@@ -63,9 +63,9 @@
<%((!$ARGS{'ShowRejected'} && !$ARGS{'ShowResolved'}) ||
$ARGS{'ShowPending'})
&& "checked"%> /> <&|/l&>Show pending requests</&><br />
-<input type="checkbox" class="checkbox" value="1" name="ShowResolved" <%$ARGS{'ShowResolved'} && "checked"%> /> <&|/l&>Show approved requests</&><br />
-<input type="checkbox" class="checkbox" value="1" name="ShowRejected" <%$ARGS{'ShowRejected'} && "checked"%> /> <&|/l&>Show denied requests</&><br />
-<input type="checkbox" class="checkbox" value="1" name="ShowDependent" <%$ARGS{'ShowDependent'} && "checked"%> /> <&|/l&>Show requests awaiting other approvals</&><br />
+<input type="checkbox" class="checkbox" value="1" name="ShowResolved" <% defined($ARGS{'ShowResolved'}) && $ARGS{'ShowResolved'} && "checked"%> /> <&|/l&>Show approved requests</&><br />
+<input type="checkbox" class="checkbox" value="1" name="ShowRejected" <% defined($ARGS{'ShowRejected'}) && $ARGS{'ShowRejected'} && "checked"%> /> <&|/l&>Show denied requests</&><br />
+<input type="checkbox" class="checkbox" value="1" name="ShowDependent" <% defined($ARGS{'ShowDependent'}) && $ARGS{'ShowDependent'} && "checked"%> /> <&|/l&>Show requests awaiting other approvals</&><br />
<&|/l,"<input size='15' value='".($created_before->Unix > 0 &&$created_before->ISO)."' name='CreatedBefore' id='CreatedBefore' />"&>Only show approvals for requests created before [_1]</&><br />
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/html/REST/1.0/NoAuth/mail-gateway
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/html/REST/1.0/NoAuth/mail-gateway (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/html/REST/1.0/NoAuth/mail-gateway Tue May 29 02:14:05 2007
@@ -62,10 +62,10 @@
$m->out('ok');
if ( $Ticket->Id ) {
$m->out( 'Ticket: ' . $Ticket->Id );
- $m->out( 'Queue: ' . $Ticket->QueueObj->Name );
- $m->out( 'Owner: ' . $Ticket->OwnerObj->Name );
- $m->out( 'Status: ' . $Ticket->Status );
- $m->out( 'Subject: ' . $Ticket->Subject );
+ $m->out( 'Queue: ' . ($Ticket->QueueObj->Name || '') );
+ $m->out( 'Owner: ' . ($Ticket->OwnerObj->Name || '') );
+ $m->out( 'Status: ' . ($Ticket->Status || '') );
+ $m->out( 'Subject: ' . ($Ticket->Subject || '') );
$m->out(
'Requestor: ' . $Ticket->Requestors->MemberEmailAddressesAsString );
}
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Search/Bulk.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Search/Bulk.html (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Search/Bulk.html Tue May 29 02:14:05 2007
@@ -58,7 +58,7 @@
<& /Elements/ListActions, actions => \@results &>
<form method="post" action="<% RT->Config->Get('WebPath') %>/Search/Bulk.html" enctype="multipart/form-data">
% foreach my $var qw(Query Format OrderBy Order Rows Page) {
-<input type="hidden" class="hidden" name="<%$var%>" value="<%$ARGS{$var}%>" />
+<input type="hidden" class="hidden" name="<%$var%>" value="<%$ARGS{$var} || ''%>" />
%}
<& /Elements/TicketList, Query => $Query,
DisplayFormat => $Format,
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Tools/Reports/CreatedByDates.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Tools/Reports/CreatedByDates.html (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Tools/Reports/CreatedByDates.html Tue May 29 02:14:05 2007
@@ -86,9 +86,9 @@
<br /><&|/l&>Queue</&>: <& /Elements/SelectQueue, Name => 'Queue', NamedValues => 1, Default => $q->id &>
<br /><&|/l&>Tickets created after</&>:
-<input size="20" name="CreatedAfter" value="<%$CreatedAfter%>" />
+<input size="20" name="CreatedAfter" value="<%$CreatedAfter || ''%>" />
<br /><&|/l&>Tickets created before</&>:
-<input size="20" name="CreatedBefore" value="<%$CreatedBefore%>" />
+<input size="20" name="CreatedBefore" value="<%$CreatedBefore || ''%>" />
<& /Elements/Submit&>
</form>
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Tools/Reports/Elements/Tabs
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Tools/Reports/Elements/Tabs (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Tools/Reports/Elements/Tabs Tue May 29 02:14:05 2007
@@ -83,7 +83,7 @@
<%ARGS>
$subtabs => undef
-$current_tab => undef
+$current_tab => ''
$current_subtab => undef
$Title => undef
</%ARGS>
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Tools/Reports/ResolvedByDates.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Tools/Reports/ResolvedByDates.html (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Tools/Reports/ResolvedByDates.html Tue May 29 02:14:05 2007
@@ -87,9 +87,9 @@
<br /><&|/l&>Queue</&>: <& /Elements/SelectQueue, Name => 'Queue', NamedValues => 1, Default => $q->id &>
<br /><&|/l&>Tickets resolved after</&>:
-<input size="20" name="ResolvedAfter" value="<%$ResolvedAfter%>" />
+<input size="20" name="ResolvedAfter" value="<%$ResolvedAfter || ''%>" />
<br /><&|/l&>Tickets resolved before</&>:
-<input size="20" name="ResolvedBefore" value="<%$ResolvedBefore%>" />
+<input size="20" name="ResolvedBefore" value="<%$ResolvedBefore || ''%>" />
<& /Elements/Submit&>
</form>
Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/CustomField_Overlay.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/CustomField_Overlay.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/CustomField_Overlay.pm Tue May 29 02:14:05 2007
@@ -202,7 +202,7 @@
my ($ok, $msg) = $self->_IsValidRegex( $args{'Pattern'} );
return (0, $self->loc("Invalid pattern: [_1]", $msg)) unless $ok;
- my $rv = $self->SUPER::Create(
+ (my $rv, $msg) = $self->SUPER::Create(
Name => $args{'Name'},
Type => $args{'Type'},
MaxValues => $args{'MaxValues'},
@@ -217,7 +217,7 @@
$self->SetValuesClass( $args{'ValuesClass'} );
}
- return $rv unless exists $args{'Queue'};
+ return ($rv, $msg) unless exists $args{'Queue'};
# Compat code -- create a new ObjectCustomField mapping
my $OCF = RT::ObjectCustomField->new( $self->CurrentUser );
@@ -226,7 +226,7 @@
ObjectId => $args{'Queue'},
);
- return $rv;
+ return ($rv, $msg);
}
=head2 Load ID/NAME
More information about the Rt-commit
mailing list