]> git.nbdom.net Git - nb.git/commitdiff
db
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Sun, 16 Aug 2015 21:57:35 +0000 (22:57 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Sun, 16 Aug 2015 21:57:35 +0000 (22:57 +0100)
lib/php/db.php
lib/python/nb.pyc

index 38064dbc903cdac6df6faf600e196db7a8642e1c..2d05d4a579a983359ce49115cfb16e654777e632 100644 (file)
@@ -337,7 +337,7 @@ EOF;
 
   function action() {
     $action = $this->p('action');
-    $table = $this->p('table');
+    $table = $this->table($this->p('table'));
 
     $data = null;
     
@@ -349,24 +349,24 @@ EOF;
       return true;
 
     } elseif ($action == 'fields') {
-      $data = $this->table($this->p('table'))->fields();
+      $data = $table->fields();
 
     } elseif ($action == 'delete') {
-      if (!$this->delete($this->p(),$e)) bye($e);
+      if (!$table->delete($this->p(),$e)) bye($e);
       #header('Location: ?table='.$table);
-      header('Location: '.str_replace('&amp;','&',$this->url_list()));
+      header('Location: '.str_replace('&amp;','&',$table->url_list()));
       return true;
 
     } elseif ($action == 'insert') {
-      $this->insert($this->p());
-      header('Location: ?table=' . $table);
+      $table->insert($this->p());
+      header('Location: ?table=' . $table->name);
       #header('Location: '.str_replace('&amp;','&',$this->url_list()));
       return true;
 
     } elseif ($action == 'update') {
-      $this->bye($this->p());
-      $this->update($this->p());
-      header('Location: ?table=' . $table);
+      #$this->bye($this->p());
+      $table->update($this->p());
+      header('Location: ?table=' . $table->name);
       #header('Location: '.str_replace('&amp;','&',$this->url_list()));
       return true;
 
index c31091678297c3c8915ac43e09e24539dc6d2bb6..0b6d762a2eb18492152aaab55cc8938784c2171e 100644 (file)
Binary files a/lib/python/nb.pyc and b/lib/python/nb.pyc differ