From 9e7b078318c744f041512c1045995f9f8c21c203 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 30 Mar 2010 09:24:38 +0000 Subject: [PATCH] Reset keys, if empty data is given. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17383 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_sortableListing.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gosa-core/include/class_sortableListing.inc b/gosa-core/include/class_sortableListing.inc index 55c3bbfe9..26d30870e 100644 --- a/gosa-core/include/class_sortableListing.inc +++ b/gosa-core/include/class_sortableListing.inc @@ -101,6 +101,7 @@ class sortableListing { // Transfer information $this->displayData= array(); $this->modes= array(); + $this->mapping= array(); foreach ($data as $key => $value) { $this->displayData[]= $value['data']; if (isset($value['mode'])) { @@ -110,7 +111,9 @@ class sortableListing { $this->keys= array_keys($data); // Create initial mapping - $this->mapping= range(0, abs(count($this->keys)-1)); + if(count($this->keys)){ + $this->mapping= range(0, abs(count($this->keys)-1)); + } $this->current_mapping= $this->mapping; // Find the number of coluns -- 2.30.2