]> git.nbdom.net Git - nb.git/commitdiff
declare variables
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 28 Dec 2015 16:26:42 +0000 (17:26 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 28 Dec 2015 16:26:42 +0000 (17:26 +0100)
lib/php/db.php

index e0cb285950920bf5b661806266a288b8024d63e5..caa80f19da9e7e592a00bb622225a07fe08ea083 100644 (file)
@@ -39,10 +39,13 @@ class db extends nb {
   public $type;
   public $tables = array();
 
+  # Objects
+  public $table;
+
   # Web
   public $dbs; // others databases keys
-  public $table;
   public $default_table;
+  public $limits = array('10','20','50','100','500','1000');
   public $help_criterias = array(
     ' * or % for wildcar',
     ' ! to negate',
@@ -320,9 +323,7 @@ EOF;
 
     // Limit
     $r .= '<span class="label">';
-    $r .= '<label for="limit">Limit</label>'.html_select_array(array(
-      '10','20','50','100','500','1000'
-    ),array(
+    $r .= '<label for="limit">Limit</label>'.html_select_array($this->limits,array(
       'html'       => 'class="limit" name="limit" id="limit"',
       'selected'   => $this->p('limit'),
       'prettyText' => true,