Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

If tablelib is going to do fullname voodoo, it should allow us to mak…

…e the default order field something that makes up fullname (ie, firstname/lastname)
  • Loading branch information...
commit f53fba389a67880c9b0b054d8e4e62c281a992be 1 parent c38c0e3
authored November 18, 2005

Showing 1 changed file with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. 5  lib/tablelib.php
5  lib/tablelib.php
@@ -227,7 +227,10 @@ function setup() {
227 227
         }
228 228
 
229 229
         // If we didn't sort just now, then use the default sort order if one is defined and the column exists
230  
-        if(empty($this->sess->sortby) && !empty($this->sort_default_column) && isset($this->columns[$this->sort_default_column])) {
  230
+        if(empty($this->sess->sortby) && !empty($this->sort_default_column) && (isset($this->columns[$this->sort_default_column])
  231
+                                                                                || (in_array('fullname',$this->columns)
  232
+                                                                                    && in_array($this->sort_default_column,
  233
+                                                                                                array('firstname','lastname')))))  {
231 234
             $this->sess->sortby = array ($this->sort_default_column => ($this->sort_default_order == SORT_DESC ? SORT_DESC : SORT_ASC));
232 235
         }
233 236
 

0 notes on commit f53fba3

Please sign in to comment.
Something went wrong with that request. Please try again.