Code

Updated Translation Strings.
[gosa.git] / include / class_divlist.inc
index 3ad7a51fff508866bad09a932e38182b8191ee44..ef1c137e9b621157a9f410f412101789aeec2a4b 100644 (file)
@@ -55,7 +55,10 @@ class divlist {
       // 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.
       $s_browser = isset($_SERVER['HTTP_USER_AGENT'])?$_SERVER['HTTP_USER_AGENT']:"";
-      if(strpos($s_browser,'Mozilla') != 0 && ((strpos($_SERVER['HTTP_USER_AGENT'],'MSIE') == 0) && (strpos($_SERVER['HTTP_USER_AGENT'],'KHTML') == 0))){
+      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]-->";
@@ -145,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;