Code

Allow to disable the sorting
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 28 Sep 2010 06:49:52 +0000 (06:49 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 28 Sep 2010 06:49:52 +0000 (06:49 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19821 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_sortableListing.inc

index 0f3e650db934fc9c12be740b6932b7177bdaf84f..b134ab1dc06df26e048c867c9568cffa8130b69d 100644 (file)
@@ -33,6 +33,7 @@ class sortableListing {
     private $cssclass= "";
     private $id;
 
+    private $sortingEnabled= true;
     private $data= array();
     private $keys= array();
     private $modes= array();
@@ -506,9 +507,15 @@ class sortableListing {
     }
 
 
+    public function sortingEnabled($bool = TRUE)
+    {
+        $this->sortingEnabled= $bool;
+    }
+
+
     public function sortData()
     {
-        if(!count($this->data)) return;
+        if(!$this->sortingEnabled || !count($this->data)) return;
 
         // Extract data
         $tmp= array();