From 7add8e3608e986cba26b8fca7fa0215f40b06618 Mon Sep 17 00:00:00 2001 From: rurban Date: Thu, 16 Apr 2009 06:51:35 +0000 Subject: [PATCH] * ignore sortby clicked on init (debugging cruft) * fix assertion with sorting on multiple lists git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@6778 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/PageList.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/PageList.php b/lib/PageList.php index 2e0ab64c7..279ff8d29 100644 --- a/lib/PageList.php +++ b/lib/PageList.php @@ -1,6 +1,6 @@ id, E_USER_NOTICE); return ($order == '+' ? '-' : '+') . $column; } elseif ($action == 'init') { // only allowed from PageList::PageList - if ($this->sortby($column, 'clicked')) { - if (0 and DEBUG) + if (0 and DEBUG) { + if ($this->sortby($column, 'clicked')) { trigger_error("clicked $order $column $this->id", E_USER_NOTICE); //$order = ($order == '+' ? '-' : '+'); // $this->sortby($sortby, 'flip_order'); + } } $this->_sortby[$column] = $order; // forces show icon return $order . $column; @@ -1309,7 +1310,9 @@ class PageList { elseif (isset($this->_types[$colNum])) $col = $this->_types[$colNum]; } - + if (empty($col)){ + return 0; + } assert(isset($col)); $revision_handle = false; $aval = $col->_getSortableValue($pagea, $revision_handle); -- 2.45.2