From: Nicolas Boisselier Date: Tue, 24 Jan 2017 21:21:38 +0000 (+0000) Subject: db.order no more ls X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=2c4b298ebbda190964acda685adc4d2359784a64;p=nb.git db.order no more ls --- diff --git a/lib/php/db.php b/lib/php/db.php index 0c184ec9..0c624d25 100644 --- a/lib/php/db.php +++ b/lib/php/db.php @@ -1242,16 +1242,14 @@ class Db extends nb { public function ls(&$fields=[]) { - $fields = ['id','name','title','type','host','order']; + $fields = ['id','name','title','type','host' ]; #,'order']; $dbs = []; $name = self::p('name',''); $type = self::p('type',''); - $has_order = false; foreach ($this->conf as $id => $attr) { # NB 21.09.16 $attr['_no_connect'] = true; $attr['id'] = $id; - if (isset($attr['id'])) $has_order = true; $d = new Db($attr); $db = []; @@ -1265,7 +1263,6 @@ class Db extends nb { $dbs[] = $db; } - if ($has_order) foreach ($dbs as $i=>$db) if (!isset($db['order'])) $dbs[$i]['order'] = ''; return $dbs; }