[Rt-commit] rt branch, 5.0-trunk, updated. rt-5.0.1-29-gc0356eab7b

? sunnavy sunnavy at bestpractical.com
Tue Mar 9 15:20:29 EST 2021


The branch, 5.0-trunk has been updated
       via  c0356eab7b8585e5b62044bad032f0e1c2c611f1 (commit)
      from  10d6eb20375b168edd15d33dab400008bae10641 (commit)

Summary of changes:
 lib/RT/Interface/Web/MenuBuilder.pm | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit c0356eab7b8585e5b62044bad032f0e1c2c611f1
Author: Andreas Voegele <voegelas at cpan.org>
Date:   Fri Mar 5 10:50:30 2021 +0100

    Do not remove WebPath from undefined result page
    
    Fixes: I#37068

diff --git a/lib/RT/Interface/Web/MenuBuilder.pm b/lib/RT/Interface/Web/MenuBuilder.pm
index 1a61c7bcee..e40e26aa3d 100644
--- a/lib/RT/Interface/Web/MenuBuilder.pm
+++ b/lib/RT/Interface/Web/MenuBuilder.pm
@@ -700,11 +700,15 @@ sub BuildMainNav {
         }
         if ($has_query) {
             my $result_page = $HTML::Mason::Commands::DECODED_ARGS->{ResultPage};
-            if ( my $web_path = RT->Config->Get('WebPath') ) {
-                $result_page =~ s!^$web_path!!;
+            if ( $result_page ) {
+                if ( my $web_path = RT->Config->Get('WebPath') ) {
+                    $result_page =~ s!^$web_path!!;
+                }
+            }
+            else {
+                $result_page = '/Search/Results.html';
             }
 
-            $result_page ||= '/Search/Results.html';
             $current_search_menu->child( results => title => loc('Show Results'), path => "$result_page$args" );
         }
 

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


More information about the rt-commit mailing list