Skip to content
Snippets Groups Projects
Commit acb69ee4 authored by Matthieu Guffroy's avatar Matthieu Guffroy
Browse files

Form: call insert or update

parent 29f2c126
No related branches found
No related tags found
No related merge requests found
...@@ -25,6 +25,13 @@ class Form { ...@@ -25,6 +25,13 @@ class Form {
} }
// If all validators ok, commit // If all validators ok, commit
if($success) {
if($this->action == "Modifier") {
$this->object->update();
} else {
$this->object->insert();
}
}
} else { } else {
$post = false; $post = false;
} }
......
...@@ -51,7 +51,7 @@ class Objet ...@@ -51,7 +51,7 @@ class Objet
return $ret; return $ret;
} }
public static function insertAll() public static function insert()
{ {
$className = get_called_class(); $className = get_called_class();
$dbName = lcfirst($className); $dbName = lcfirst($className);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment