From 6acaaa31adfd146852fee03019d3b031d9774ecc Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Tue, 9 Aug 2016 12:29:23 +0200 Subject: [PATCH] menu --- etc/dbs/rent.php | 4 ++-- lib/php/db/wp.php | 15 ++++----------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/etc/dbs/rent.php b/etc/dbs/rent.php index 58f465af..0f9fac11 100644 --- a/etc/dbs/rent.php +++ b/etc/dbs/rent.php @@ -22,7 +22,7 @@ $CONF['_rent'] = array( ), 'test' => array( - 'sql' => 'SELECT 1', + 'sql' => "SELECT 'Test sql table'", ), 'rent' => array( @@ -62,7 +62,7 @@ $CONF['_rent'] = array( ), ); -$CONF['rent'] = array ( +$CONF['rent-sqlite'] = array ( 'order' => 5, 'pdo' => 'sqlite:/opt/rent/rent.db', '_import' => '_rent', diff --git a/lib/php/db/wp.php b/lib/php/db/wp.php index b59de77f..064e11d9 100644 --- a/lib/php/db/wp.php +++ b/lib/php/db/wp.php @@ -10,15 +10,11 @@ class html_table extends WP_List_Table { public function __construct($table) { parent::__construct(); + $this->_table = $table; -#debug($table); - #$fields = $this->get_columns(); - #debug($sort); $this->_column_headers = array($this->get_columns(), array(), $this->get_sortable_columns()); - #$this->items = ['zaza']; $this->search_box('Search','search'); - #echo 'zaza;'.(int)$this->has_items(); return; } @@ -52,11 +48,9 @@ class html_table extends WP_List_Table { ,$a );},[10,50,100,500])) .'' -/* -*/ - .get_submit_button( __( 'Search' ), 'button', '', false, array('id' => 'search-submit') ) - .'Add New' + .get_submit_button( __( $text ), 'button', '', false, array('id' => 'search-submit') ) + .''.__('Add New').'' #.'' ; echo '