[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.9.7-839-gbbb202a

? sunnavy sunnavy at bestpractical.com
Mon Dec 13 07:59:06 EST 2010


The branch, 3.9-trunk has been updated
       via  bbb202a0745942ca48cbf70079cf3a1bd179bd99 (commit)
      from  198f04582ea974c37f8190a075e446e74ac5914d (commit)

Summary of changes:
 lib/RT/Article_Overlay.pm                          |    4 +++-
 .../Articles/Article/Elements/SearchByCustomField  |    2 +-
 .../Articles/Article/Elements/SelectSearchPrivacy  |    6 +++---
 .../Articles/Article/Elements/ShowSavedSearches    |    2 +-
 .../Articles/Article/Elements/ShowSearchCriteria   |   12 ++++++++++--
 5 files changed, 18 insertions(+), 8 deletions(-)

- Log -----------------------------------------------------------------
commit bbb202a0745942ca48cbf70079cf3a1bd179bd99
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Mon Dec 13 20:58:31 2010 +0800

    warning fix, which is for apache+fastcgi

diff --git a/lib/RT/Article_Overlay.pm b/lib/RT/Article_Overlay.pm
index e091f4e..f8208e7 100644
--- a/lib/RT/Article_Overlay.pm
+++ b/lib/RT/Article_Overlay.pm
@@ -386,7 +386,9 @@ sub AddLink {
     # Disallow parsing of plain numbers in article links.  If they are
     # allowed, they default to being tickets instead of articles, which
     # is counterintuitive.
-    if ($args{'Target'} =~ /^\d+$/ || $args{'Base'} =~ /^\d+$/) {
+    if (   $args{'Target'} && $args{'Target'} =~ /^\d+$/
+        || $args{'Base'} && $args{'Base'} =~ /^\d+$/ )
+    {
         return ( 0, $self->loc("Cannot add link to plain number") );
     }
 
diff --git a/share/html/Articles/Article/Elements/SearchByCustomField b/share/html/Articles/Article/Elements/SearchByCustomField
index 1fa0ee4..91b84f6 100644
--- a/share/html/Articles/Article/Elements/SearchByCustomField
+++ b/share/html/Articles/Article/Elements/SearchByCustomField
@@ -56,7 +56,7 @@
 % }
 %# otherwise, put in a textedity field
 % else {
-<input name="<%$Name%>" value="<%$Values[0]%>" />
+<input name="<%$Name%>" value="<%$Values[0]||''%>" />
 % }
 <%init>
 my @Values =ref( $Values ) ? @{ $Values } : ( $Values ); 
diff --git a/share/html/Articles/Article/Elements/SelectSearchPrivacy b/share/html/Articles/Article/Elements/SelectSearchPrivacy
index 4e44408..f592f56 100755
--- a/share/html/Articles/Article/Elements/SelectSearchPrivacy
+++ b/share/html/Articles/Article/Elements/SelectSearchPrivacy
@@ -53,9 +53,9 @@
 <%INIT>
 my $user = $session{'CurrentUser'}->UserObj;
 my $groups = $session{'CurrentUser'}->UserObj->OwnGroups;
-
+$Default = '' unless defined $Default;
 </%INIT>
 <%ARGS>
 $Name => 'GroupField'
-$Default => undef
-</%ARGS>
\ No newline at end of file
+$Default => ''
+</%ARGS>
diff --git a/share/html/Articles/Article/Elements/ShowSavedSearches b/share/html/Articles/Article/Elements/ShowSavedSearches
index 98a0c6d..0394e39 100644
--- a/share/html/Articles/Article/Elements/ShowSavedSearches
+++ b/share/html/Articles/Article/Elements/ShowSavedSearches
@@ -51,7 +51,7 @@
 % if ($session{'CurrentUser'}->HasRight( Right => 'CreateSavedSearch',
 %                                       Object=> $RT::System )) {
 <h2><&|/l&>Save this search</&></h2>
-<&|/l&>Name:</&> <input name="NewSearchName" value="<%$Name%>">
+<&|/l&>Name:</&> <input name="NewSearchName" value="<%$Name||''%>">
 <&|/l&>Privacy:</&> <& SelectSearchPrivacy, Name => 'SearchPrivacy',
 	Default => $Privacy &><br />
 %     if ($CurrentSearch && $CurrentSearch ne 'new') {
diff --git a/share/html/Articles/Article/Elements/ShowSearchCriteria b/share/html/Articles/Article/Elements/ShowSearchCriteria
index 33e0bdd..6df0958 100644
--- a/share/html/Articles/Article/Elements/ShowSearchCriteria
+++ b/share/html/Articles/Article/Elements/ShowSearchCriteria
@@ -152,11 +152,19 @@ for (@Classes) {
   $class->LoadById($_);
   $_ = $class;
 }
+
+for my $field ( qw/Class Name Summary Article/ ) {
+    $ARGS{"$field~"} = '' unless defined $ARGS{"$field~"};
+    $ARGS{"$field!~"} = '' unless defined $ARGS{"$field!~"};
+}
+$RefersTo = '' unless defined $RefersTo;
+$ReferredToBy = '' unless defined $ReferredToBy;
+
 </%init>
 
 <%ARGS>
 $dates =>undef
-$RefersTo => undef
-$ReferredToBy => undef
+$RefersTo => ''
+$ReferredToBy => ''
 $customfields => undef
 </%ARGS>

-----------------------------------------------------------------------


More information about the Rt-commit mailing list