Code

Divlist, was broken when no entry was given
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 8 Nov 2005 10:32:38 +0000 (10:32 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 8 Nov 2005 10:32:38 +0000 (10:32 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1874 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_divlist.inc

index aeb24a4a285fe0f812b7aa74c982edfa4df64495..ef1c137e9b621157a9f410f412101789aeec2a4b 100644 (file)
@@ -148,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;