]> git.nbdom.net Git - nb.git/commitdiff
db.stdin
authorNico Boisselier <nico@dhcp-192-168-4-150.semantico.net>
Thu, 27 Oct 2016 09:40:30 +0000 (10:40 +0100)
committerNico Boisselier <nico@dhcp-192-168-4-150.semantico.net>
Thu, 27 Oct 2016 09:40:30 +0000 (10:40 +0100)
etc/vim/source/functions.vim
lib/php/db.php

index 8be28cc08d6c2ff3a5bde1b5ecc3ac97112c3b3b..526cd40fbd68911e310b010cabb845eb60a145a8 100644 (file)
@@ -106,7 +106,7 @@ func! FileInit(...)
        let g:File['check'] = 'du -sh'
 
        if (g:File['type'] == 'php')
-               let g:File['check'] = "php5 --define error_reporting=22519 --define display_errors=1 --define log_errors=1 --define html_errors=0" " E_ALL & ~E_NOTICE & ~E_DEPRECATED
+               let g:File['check'] = "php --define error_reporting=22519 --define display_errors=1 --define log_errors=1 --define html_errors=0" " E_ALL & ~E_NOTICE & ~E_DEPRECATED
 " todo - NB 11.12.12           if match(expand('%'),'/izideal/') let g:File['check'] = g:File['check'] . ' -z ~izideal/include/default.inc.php'
 
        elseif (g:File['type'] == 'python')
index 1faf91533a4555108cd2f371425b7ff82a950897..1d91767a5a953e775b3d175fad08993e2cb60f91 100644 (file)
@@ -510,6 +510,18 @@ class Db extends nb {
           $this->out($available,['action','description']);
           $return = true;
 
+        } elseif ($action == 'db.stdin') {
+
+          $count = 0;
+          while ($line = fgets(STDIN)) {
+            $count++;
+            #echo "$count> $line";
+            $this->conn->exec($line);
+          }
+          $return = $this->out([
+            'count' => $count,
+          ]);
+
         } elseif ($action == 'db.tables' or $action == 'tables') {
           # Filters
           $type = $this->p('type','');