summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a22dd5c)
raw | patch | inline | side by side (parent: a22dd5c)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 6 Apr 2010 14:01:24 +0000 (14:01 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 6 Apr 2010 14:01:24 +0000 (14:01 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17485 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_sortableListing.inc | patch | blob | history |
diff --git a/gosa-core/include/class_sortableListing.inc b/gosa-core/include/class_sortableListing.inc
index 63f04ffc66f8bb58fe8ca0e2a378e396318633d8..f545cb74ec3e764d2a23cc15fd854c6eb199b6e1 100644 (file)
private function setDisplayData($data)
{
if (!is_array($data)) {
- die ("sortableList needs an array as data!");
+ trigger_error ("sortableList needs an array as data!");
}
// Transfer information
}
// Preset sort orders to 'down'
+ if(!count($this->sortDirection))
for ($column= 0; $column<$this->columns; $column++) {
- $this->sortDirection[]= true;
+ $this->sortDirection[$column]= true;
}
}
}
// Filter GET with "act" attributes
- if (!$this->reorderable && isset($_GET['act'])) {
- $key= validate($_GET['act']);
- if (preg_match('/^SORT_([0-9]+)$/', $key, $match)) {
- // Switch to new column or invert search order?
- $column= $match[1];
- if ($this->sortColumn != $column) {
- $this->sortColumn= $column;
- } else {
- $this->sortDirection[$column]= !$this->sortDirection[$column];
- }
+ if (!$this->reorderable){
+ if(isset($_GET['act'])) {
+ $key= validate($_GET['act']);
+ if (preg_match('/^SORT_([0-9]+)$/', $key, $match)) {
+ // Switch to new column or invert search order?
+ $column= $match[1];
+ if ($this->sortColumn != $column) {
+ $this->sortColumn= $column;
+ } else {
+ $this->sortDirection[$column]= !$this->sortDirection[$column];
+ }
- // Update mapping according to sort parameters
- $this->sortData();
+ }
}
+
+ // Update mapping according to sort parameters
+ $this->sortData();
}
}