[Rt-commit] r4282 - in rt/branches/3.7-EXPERIMENTAL: . html/Elements html/Search/Elements html/Widgets lib/RT/Interface

ruz at bestpractical.com ruz at bestpractical.com
Mon Dec 12 11:12:59 EST 2005


Author: ruz
Date: Mon Dec 12 11:12:57 2005
New Revision: 4282

Modified:
   rt/branches/3.7-EXPERIMENTAL/   (props changed)
   rt/branches/3.7-EXPERIMENTAL/html/Elements/SelectBoolean
   rt/branches/3.7-EXPERIMENTAL/html/Search/Elements/BuildFormatString
   rt/branches/3.7-EXPERIMENTAL/html/Widgets/TitleBox
   rt/branches/3.7-EXPERIMENTAL/html/Widgets/TitleBoxStart
   rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Web.pm
Log:
 r1432 at cubic-pc:  cubic | 2005-12-12 17:26:06 +0300
 get rid of errorless uninit warnings


Modified: rt/branches/3.7-EXPERIMENTAL/html/Elements/SelectBoolean
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Elements/SelectBoolean	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Elements/SelectBoolean	Mon Dec 12 11:12:57 2005
@@ -58,11 +58,11 @@
 </%ARGS>
 
 <%INIT>
-my ($TrueDefault, $FalseDefault);
+my ($TrueDefault, $FalseDefault) = ('', '');
 if ($Default && $Default !~ /true/i) {
-	$FalseDefault = "SELECTED";
+	$FalseDefault = "selected";
 }
 else {
-	$TrueDefault = "SELECTED";
+	$TrueDefault = "selected";
 }
 </%INIT>

Modified: rt/branches/3.7-EXPERIMENTAL/html/Search/Elements/BuildFormatString
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Search/Elements/BuildFormatString	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Search/Elements/BuildFormatString	Mon Dec 12 11:12:57 2005
@@ -223,11 +223,13 @@
 my @format_string;
 foreach my $field (@seen) {
     next unless $field;
-    my $row = "'" . $field->{Prefix};
+    my $row = "'";
+    $row .= $field->{Prefix} if defined $field->{Prefix};
     $row .= "__" . ($field->{Column} =~ m/\(/ ? $field->{Column} # func, don't escape
 		    : $m->interp->apply_escapes( $field->{Column}, 'h' )) . "__"
       unless ( $field->{Column} eq "<blank>" );
-    $row .= $field->{Suffix} . "'";
+    $row .= $field->{Suffix} if defined $field->{Suffix};
+    $row .= "'";
     push( @format_string, $row );
 }
 

Modified: rt/branches/3.7-EXPERIMENTAL/html/Widgets/TitleBox
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Widgets/TitleBox	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Widgets/TitleBox	Mon Dec 12 11:12:57 2005
@@ -47,6 +47,6 @@
   <& TitleBoxStart, %ARGS &><% $m->content | n %><& TitleBoxEnd &>
 </div>
 <%ARGS>
-$class => undef
+$class => ''
 </%ARGS>
 

Modified: rt/branches/3.7-EXPERIMENTAL/html/Widgets/TitleBoxStart
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Widgets/TitleBoxStart	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Widgets/TitleBoxStart	Mon Dec 12 11:12:57 2005
@@ -55,16 +55,16 @@
 
 <%ARGS>
 $width => undef
-$class => undef
-$bodyclass => undef
-$title_href => undef
-$title => undef
+$class => ''
+$bodyclass => ''
+$title_href => ''
+$title => ''
 $title_class => ''
-$titleright_href => undef
-$titleright => undef
+$titleright_href => ''
+$titleright => ''
 $contentbg => "#dddddd"
 $color => "#336699"
-$id => undef
+$id => ''
 $hideable => 1
 </%ARGS>
 

Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Web.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Web.pm	(original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Web.pm	Mon Dec 12 11:12:57 2005
@@ -1577,15 +1577,9 @@
 =cut
 
 sub _parse_saved_search {
-    my $spec = shift;
-    if ($spec  !~ /^(.*?)-(\d+)-SavedSearch-(\d+)$/ ) {
-	return;
-    }
-    my $obj_type  = $1;
-    my $obj_id    = $2;
-    my $search_id = $3;
-
-    return (_load_container_object ($obj_type, $obj_id), $search_id);
+    my $spec = shift || '';
+    return unless $spec =~ /^(.*?)-(\d+)-SavedSearch-(\d+)$/;
+    return (_load_container_object ($1, $2), $3);
 }
 
 eval "require RT::Interface::Web_Vendor";


More information about the Rt-commit mailing list