From: Nicolas Boisselier Date: Sun, 16 Aug 2015 21:57:35 +0000 (+0100) Subject: db X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=4c1459dfd85918bb251bad9c7d588ff49f2dc291;p=nb.git db --- diff --git a/lib/php/db.php b/lib/php/db.php index 38064dbc..2d05d4a5 100644 --- a/lib/php/db.php +++ b/lib/php/db.php @@ -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('&','&',$this->url_list())); + header('Location: '.str_replace('&','&',$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('&','&',$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('&','&',$this->url_list())); return true; diff --git a/lib/python/nb.pyc b/lib/python/nb.pyc index c3109167..0b6d762a 100644 Binary files a/lib/python/nb.pyc and b/lib/python/nb.pyc differ