]> git.nbdom.net Git - nb.git/commitdiff
wp dump
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 18 Apr 2016 09:50:57 +0000 (11:50 +0200)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 18 Apr 2016 09:50:57 +0000 (11:50 +0200)
etc/dbs.php
etc/dbs.yaml
etc/dbs/wp.php [new file with mode: 0644]

index 7065f4261b4bac966a7ac23be584824ff8fdaa92..088c2d5141dc7d9a762db81766d2cf1981a7ba9b 100644 (file)
@@ -7,6 +7,7 @@ foreach (array(
   'rent',
   'puppetdb',
   'ui',
+  'wp',
 ) as $file) {
   if (file_exists("$dir/$file.php")) require_once("$dir/$file.php");
 }
index 1df31c3b60c1e74dc0dd5f1dd7165471ff6e082a..e9c281f8fefd434eeebe3ef3dbb19596aa49c0ec 100644 (file)
@@ -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 (file)
index 0000000..726c6a4
--- /dev/null
@@ -0,0 +1,17 @@
+<?php
+$CONF['wp'] = array (
+  'title' => '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);
+        }
+      },
+    ),
+  ),
+);
+?>