projects
/
Pman.Base
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cc55cf9
)
Pman/Roo.php
author
Alan Knowles
<alan@akbkhome.com>
Fri, 12 Nov 2010 08:39:07 +0000
(16:39 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Fri, 12 Nov 2010 08:39:07 +0000
(16:39 +0800)
Pman/Roo.php
patch
|
blob
|
history
diff --git
a/Pman/Roo.php
b/Pman/Roo.php
index
9ceaf9c
..
f82116c
100644
(file)
--- a/
Pman/Roo.php
+++ b/
Pman/Roo.php
@@
-259,12
+259,13
@@
class Pman_Roo extends Pman
* @arg DB_DataObject $x
*
*/
* @arg DB_DataObject $x
*
*/
- function applySort($x)
+ function applySort($x
, $sort = '', $dir =''
)
{
// Db_DataObject::debugLevel(1);
{
// Db_DataObject::debugLevel(1);
- $sort = empty($_REQUEST['sort']) ? '' : $_REQUEST['sort'];
- $dir = (empty($_REQUEST['dir']) || strtoupper($_REQUEST['dir']) == 'ASC' ? 'ASC' : 'DESC');
+ $sort = empty($_REQUEST['sort']) ? $sort : $_REQUEST['sort'];
+ $dir = empty($_REQUEST['dir']) ? $sort : $_REQUEST['dir'];
+ $dir = $dir == 'ASC' ? 'ASC' : 'DESC';