[Rt-commit] r7798 - in rt/branches/3.7-EXPERIMENTAL-TUNIS/html: Admin/Elements

clkao at bestpractical.com clkao at bestpractical.com
Wed May 9 11:42:27 EDT 2007


Author: clkao
Date: Wed May  9 11:42:27 2007
New Revision: 7798

Modified:
   rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Admin/Elements/SystemTabs
   rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Elements/PageLayout

Log:
remove some trivial warnings.

Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Admin/Elements/SystemTabs
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Admin/Elements/SystemTabs	(original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Admin/Elements/SystemTabs	Wed May  9 11:42:27 2007
@@ -79,10 +79,12 @@
   # Now let callbacks add their extra tabs
   $m->callback( %ARGS, tabs => $tabs );
 
-  foreach my $tab (sort keys %{$tabs}) {
-    if ($tabs->{$tab}->{'path'} eq $current_tab) {
-      $tabs->{$tab}->{"subtabs"} = $subtabs;
-      $tabs->{$tab}->{"current_subtab"} = $current_subtab;
+  if ($current_tab) {
+    foreach my $tab (sort keys %{$tabs}) {
+      if ($tabs->{$tab}->{'path'} eq $current_tab) {
+        $tabs->{$tab}->{"subtabs"} = $subtabs;
+        $tabs->{$tab}->{"current_subtab"} = $current_subtab;
+      }
     }
   }
 </%INIT>

Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Elements/PageLayout
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Elements/PageLayout	(original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Elements/PageLayout	Wed May  9 11:42:27 2007
@@ -206,6 +206,7 @@
       $level   => 0
   </%args>
   <%init>
+    if ($current) {
       for my $key (keys %$data) {
           next if $data->{$key}->{'path'} ne $current;
           next unless    ref( $data->{$key} ) eq 'HASH'
@@ -219,8 +220,9 @@
               level   => $level + 1,
           );
       }
-      $ppdata->{last_system_menu_level}++;
-      return [$level, $pdata];
+    }
+    $ppdata->{last_system_menu_level}++;
+    return [$level, $pdata];
   </%init>
 </%def>
 


More information about the Rt-commit mailing list