]> git.nbdom.net Git - nb.git/commitdiff
rename sort to order by
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 1 Mar 2016 03:01:34 +0000 (03:01 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 1 Mar 2016 03:01:34 +0000 (03:01 +0000)
lib/php/db/table.php

index ef40de978558ff64deaa51da8aeff91fc218e7b2..aedb37bc80c2b2e06c0be3a4cb730a0206f816e2 100644 (file)
@@ -76,8 +76,8 @@ class table extends nb {
 # NB 10.01.16     if (
 # NB 10.01.16       isset($this->db->sort)
 # NB 10.01.16       and isset($this->db->sort[$this->name])
-# NB 10.01.16     ) $this->db->pset('sort',$this->db->sort[$this->name]);
-    if ($this->order_by) $this->pset('sort',$this->order_by);
+# NB 10.01.16     ) $this->db->pset('orderby',$this->db->sort[$this->name]);
+    if ($this->order_by) $this->pset('orderby',$this->order_by);
 
     return $this->fields();
   }
@@ -400,8 +400,8 @@ FROM pg_catalog.pg_attribute a WHERE a.attrelid = (SELECT c.oid FROM pg_catalog.
     $html = '';
 
     # Asc
-    $sel = ( $this->p('sort')=="$name asc") ? " sel" : "";
-    $html .= '<a title="First In (asc)" class="sort asc'.$sel.'" href="'.$this->url_list("sort","$name asc").'">'
+    $sel = ( $this->p('orderby')=="$name asc") ? " sel" : "";
+    $html .= '<a title="First In (asc)" class="sort asc'.$sel.'" href="'.$this->url_list('orderby',"$name asc").'">'
       .'<span class="asc">&darr;</span>'
     .'</a>';
     $html .= '&nbsp;';
@@ -411,8 +411,8 @@ FROM pg_catalog.pg_attribute a WHERE a.attrelid = (SELECT c.oid FROM pg_catalog.
     $html .= '&nbsp;';
 
     # Desc
-    $sel = ( $this->p('sort')=="$name desc") ? " sel" : "";
-    $html .= '<a title="Last In (desc)" class="sort desc'.$sel.'" href="'.$this->url_list("sort","$name desc").'">'
+    $sel = ( $this->p('orderby')=="$name desc") ? " sel" : "";
+    $html .= '<a title="Last In (desc)" class="sort desc'.$sel.'" href="'.$this->url_list('orderby',"$name desc").'">'
       .'<span class="desc">&uarr;</span>'
     .'</a>';
 
@@ -590,7 +590,7 @@ FROM pg_catalog.pg_attribute a WHERE a.attrelid = (SELECT c.oid FROM pg_catalog.
     $sql .= " FROM ".$this->sql_name();
     $sql .= $where;
 
-    if ($this->p('sort')) $sql .= ' ORDER BY '.$this->p('sort');
+    if ($this->p('orderby')) $sql .= ' ORDER BY '.$this->p('orderby');
 
     if ($this->p('limit')) {
       $limit = $this->p('limit');