From: Nicolas Boisselier Date: Mon, 18 Apr 2016 09:50:57 +0000 (+0200) Subject: wp dump X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=4593e5694bf8e80ad3602d47295702253010b562;p=nb.git wp dump --- diff --git a/etc/dbs.php b/etc/dbs.php index 7065f426..088c2d51 100644 --- a/etc/dbs.php +++ b/etc/dbs.php @@ -7,6 +7,7 @@ foreach (array( 'rent', 'puppetdb', 'ui', + 'wp', ) as $file) { if (file_exists("$dir/$file.php")) require_once("$dir/$file.php"); } diff --git a/etc/dbs.yaml b/etc/dbs.yaml index 1df31c3b..e9c281f8 100644 --- a/etc/dbs.yaml +++ b/etc/dbs.yaml @@ -7,24 +7,6 @@ _mysql: crypt: pdo: 'sqlite:/dev/shm/crypt.db' -wp: - host: admin.izideal.vpn - type: mysql - _import: - - _nico -# NB 11.04.16 ui: -# NB 11.04.16 pdo: 'sqlite:/opt/semantico/product/releases/sem_ui/db/semantico.db' -# NB 11.04.16 title: 'Semantico UI' -# NB 11.04.16 #default_table: view_puppet_error -# NB 11.04.16 default_table: node -# NB 11.04.16 tables: -# NB 11.04.16 node: -# NB 11.04.16 orderby: "(SELECT value FROM fact WHERE idnode=id AND name='date_install') DESC" -# NB 11.04.16 replace_: -# NB 11.04.16 iddc: dc.id -# NB 11.04.16 replace: -# NB 11.04.16 "SELECT name FROM dc WHERE id='@id'": ".node td.iddc" - rt: pdo: 'pgsql:host=db.rt.semantico.net;port=5432;dbname=rtdb;user=rtuser;password=' title: 'RT' diff --git a/etc/dbs/wp.php b/etc/dbs/wp.php new file mode 100644 index 00000000..726c6a4d --- /dev/null +++ b/etc/dbs/wp.php @@ -0,0 +1,17 @@ + 'Puppetdb', + 'host' => 'admin.izideal.vpn', + 'type' => 'mysql', + '_import' => '_nico', + 'tables' => array( + 'wp_options' => array( + 'row_parse_pre' => function(&$r) { + foreach ($r as $k=>$v) { + $r[$k] = str_replace("\0",'',$v); + } + }, + ), + ), +); +?>