Code

Updated Translation Strings.
[gosa.git] / include / class_divlist.inc
index 1df4ac48176c53ee03ded5583421eac2c393d20e..ef1c137e9b621157a9f410f412101789aeec2a4b 100644 (file)
@@ -54,7 +54,11 @@ class divlist {
       // TODO: Find a more convenient way to use the same functionality in both
       // MSIE and non-MSIE browsers. ATM we need to manually set entriesPerPage to
       // a non-zero value, because MSIE won't scroll the tbody properly.
-      if((strpos($_SERVER['HTTP_USER_AGENT'],'MSIE') == 0) && (strpos($_SERVER['HTTP_USER_AGENT'],'KHTML') == 0)){
+      $s_browser = isset($_SERVER['HTTP_USER_AGENT'])?$_SERVER['HTTP_USER_AGENT']:"";
+      if(is_numeric(strpos($s_browser,'Mozilla')) &&
+         !is_numeric(strpos($s_browser,'MSIE')) &&
+         !is_numeric(strpos($s_browser,'KHTML'))
+        ){
         $s_return.= "<thead>".$this->_generateHeader()."</thead>";
         // Define an alternate style for IE (not used ATM)
         // $s_return.= "<!--[if IE]><style type='text/css'>tbody.scrollcontent {overflow-y:scroll;max-height:480px;}</style><![endif]-->";
@@ -144,7 +148,17 @@ class divlist {
                                $start=0;
                        }
                }
-               
+
+    /* If divlist is empty, append a single white entry */
+    if(count($this->a_entries)==0){
+      $str = "<tr>";
+      for($i = 0 ; $i < count($this->a_header[0]); $i++){
+        $str.="<td class='list1' style='height:100%';>&nbsp;</td>";
+      }
+      $str .="</tr>";
+      return($str);
+    }
     if ($this->i_entriesPerPage > 0) {
                while($start > $this->_numentries()){
                        $start = $start - $this->i_entriesPerPage;