Code

Display fix for hosts without any logfiles
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 17 Jul 2008 12:21:27 +0000 (12:21 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 17 Jul 2008 12:21:27 +0000 (12:21 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11705 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/addons/goto/class_goto_log_view.inc
gosa-plugins/goto/addons/goto/log_view.tpl

index 36bb15c599ed166478e8bf171c6cc96c8ed2d903..4193a586c6f686979cd5a03ac5babc4ebede683b 100644 (file)
@@ -79,7 +79,9 @@ class goto_log_view extends plugin
     $smarty->assign("log_file", $this->get_log($this->mac,$this->selected_date,$this->selected_file));        
     $smarty->assign("standalone",$this->standalone);
 
-    $date = date("d.m.Y H:i:s",$this->logs[$this->mac][$this->selected_date]['REAL_DATE']);
+    if (isset($this->logs[$this->mac])){
+           $date = date("d.m.Y H:i:s",$this->logs[$this->mac][$this->selected_date]['REAL_DATE']);
+    }
     $file = $this->selected_file;
     $smarty->assign("selected_log",_("none"));
     if(!empty($file)){
index 24774c04e63f7336e5e2a67140a1e4b5b2c3baf4..5542cdf2ae5bb78667d14a8e4b48b05274dd5015 100644 (file)
@@ -1,7 +1,7 @@
+{if $logs_available}
 
 <h2>{t}Available logs{/t}</h2>
 
-{if $logs_available}
        <div style="width:99%;border: solid 1px #CCCCCC;">{$divlist}</div>
   <br>
   <p class="seperator"></p>
@@ -20,5 +20,5 @@
 <div style='text-align:right;width:99%; padding-right:5px; padding-top:5px;'>
        <input type='submit' name='abort_event_dialog' value='{msgPool type=backButton}'>
 </div>
-{/if}
 <br>
+{/if}