]> git.nbdom.net Git - nb.git/commitdiff
wp table
authorNicolas Boisselier <nicolas.boisselier@semantico.com>
Fri, 22 Apr 2016 08:43:15 +0000 (09:43 +0100)
committerNicolas Boisselier <nicolas.boisselier@semantico.com>
Fri, 22 Apr 2016 08:43:15 +0000 (09:43 +0100)
lib/php/db/table.php

index 26a6c07e7d93ae573ab98280131b09a2b422d5a5..f876512a37efbec9aef725ebfe405ac0734def46 100644 (file)
@@ -770,8 +770,8 @@ Class Table extends nb {
       return;
     }
 
-    $opt['count'] = $count;
-    $opt['limit'] = $limit;
+    $this->count = $opt['count'] = $count;
+    $this->limit = $opt['limit'] = $limit;
 
     if ($opt['is_html'] or $format=='wp') {
 
@@ -801,15 +801,11 @@ Class Table extends nb {
       if (!$query) $this->err_sql($sql);
 
       $tot = $query->fetch(PDO::FETCH_COLUMN);
-      $opt['tot'] = $tot;
+      $this->tot = $opt['tot'] = $tot;
       #if (!$tot) return;
 
     } # < is_html
 
-    $this->tot = $opt['tot'];
-    $this->count = $opt['count'];
-    $this->limit = $opt['limit'];
-
     if ($count === 0 and $this->p('header') === 'force') {
       echo $this->{"rows_begin_$format"}($this->fields());
     }