Code

Enabled sorting
[gosa.git] / gosa-core / include / class_divlist.inc
index 9c52b768c9044d714fc81ea9eef9820b53d6f744..9a3f6999154c4d686f136d41646feaf3a06464ac 100644 (file)
@@ -1,4 +1,24 @@
 <?php
+/*
+ * This code is part of GOsa (http://www.gosa-project.org)
+ * Copyright (C) 2003-2008 GONICUS GmbH
+ *
+ * ID: $$Id$$
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
 
 class divlist {
 
@@ -201,11 +221,11 @@ class divlist {
  
     $i_alternate=0;
                if(isset($_GET['start'])){
-                       $_SESSION['start'.$this->pageid]=$_GET['start'];
+                       session::set('start'.$this->pageid,$_GET['start']);
                        $start = $_GET['start'];
                } else {
-                       if(isset($_SESSION['start'.$this->pageid])){
-                               $start = $_SESSION['start'.$this->pageid];
+                       if(session::is_set('start'.$this->pageid)){
+                               $start = session::get('start'.$this->pageid);
                        } else {
                                $start=0;
                        }
@@ -278,7 +298,7 @@ class divlist {
                        for($i = 0 ; $i < $nums ; $i ++ ){
                                $s_return.="<tr>";
                                $cnt=0;
-                               for($a = 0 ; $a < (count($this->a_header[0])) ; $a ++ ) {
+                               for($a = 0, $l= count($this->a_header[0]); $a < $l ; $a ++ ) {
                                        if($a ==(count($this->a_header[0])-1)){
                                                $s_return.="\n<td class='list1' style='border:0px;height:26px;'>&nbsp;</td>";
                                        } else {