From: Nicolas Boisselier Date: Sun, 8 May 2016 00:41:46 +0000 (+0100) Subject: wp X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=60579670a570532e9b9548a1807f26254c4476b3;p=nb.git wp --- diff --git a/lib/php/db/index.php b/lib/php/db/index.php index 78f33fce..c330117e 100755 --- a/lib/php/db/index.php +++ b/lib/php/db/index.php @@ -8,9 +8,7 @@ */ require_once(realpath(dirname(__FILE__).'/../config.php')); require_once(realpath(dirname(__FILE__).'/../db.php')); -/* -# TODO - NB 08.04.16 -*/ + Db::paliases(array( 'd' => 'db', 't' => 'table', diff --git a/lib/php/db/table.php b/lib/php/db/table.php index 6df7f785..5cf1e431 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -2,7 +2,6 @@ require_once(realpath(dirname(__FILE__).'/../db.php')); require_once(realpath(dirname(__FILE__).'/../db/field.php')); require_once(realpath(dirname(__FILE__).'/../out.php')); -if (class_exists('WP_List_Table')) require_once(realpath(dirname(__FILE__).'/wp.php')); #$a = array('a','b','c'); $b = array('c','a'); debug(array_diff($a,$b)); define('TABLE_INDENT',NB_EOL ? "\t" : ""); @@ -639,7 +638,7 @@ Class Table extends nb { if ($opt_by_val !== null) $opt = $opt_by_val; $format = $this->p('format'); - if (!$format) bye("Invalid parameter!"); + if (!$format) bye("Invalid parameter format!"); list($sql,$where,$limit,$select_count) = $this->rows_sql($opt); $st = $this->db()->conn->prepare($sql); @@ -838,6 +837,7 @@ Class Table extends nb { Wordpress -----------------------------------------------------------------*/ public function rows_begin_wp() { + require_once(realpath(dirname(__FILE__).'/wp.php')); $this->_html_table = new html_table($this); return ''; } diff --git a/lib/php/db/wp.php b/lib/php/db/wp.php index 4d934e51..a5f70d89 100644 --- a/lib/php/db/wp.php +++ b/lib/php/db/wp.php @@ -1,8 +1,4 @@