Index: branches/RC/core/kernel/db/dblist.php =================================================================== diff -u -r11107 -r11395 --- branches/RC/core/kernel/db/dblist.php (.../dblist.php) (revision 11107) +++ branches/RC/core/kernel/db/dblist.php (.../dblist.php) (revision 11395) @@ -677,19 +677,22 @@ return $ret; } - function GetOrderField($pos=NULL) + function GetOrderField($pos = NULL, $no_default = false) { - if(!(isset($this->OrderFields[$pos]) && $this->OrderFields[$pos]) ) - { + if ( !(isset($this->OrderFields[$pos]) && $this->OrderFields[$pos]) && !$no_default ) { $pos = 0; } + return isset($this->OrderFields[$pos][0]) ? $this->OrderFields[$pos][0] : ''; } - function GetOrderDirection($pos=NULL) + function GetOrderDirection($pos = NULL, $no_default = false) { - if( !getArrayValue($this->OrderFields, $pos) ) $pos = 0; - return getArrayValue($this->OrderFields, $pos, 1); + if ( !(isset($this->OrderFields[$pos]) && $this->OrderFields[$pos]) && !$no_default ) { + $pos = 0; + } + + return isset($this->OrderFields[$pos][1]) ? $this->OrderFields[$pos][1] : ''; } /**