Added name duplication check when creating a variable

This commit is contained in:
franck
2013-09-02 01:25:11 +02:00
parent 928bf7b638
commit 1558f6af5f
10 changed files with 169 additions and 75 deletions

View File

@@ -83,7 +83,9 @@ class VariablesController extends BaseAdminController
->setValue($data['value'])
->setLocale($data["locale"])
->setTitle($data['title'])
;
->setHidden($data['hidden'])
->setSecured($data['secured'])
;
$this->dispatch(TheliaEvents::CONFIG_CREATE, $createEvent);
@@ -288,7 +290,7 @@ class VariablesController extends BaseAdminController
if (null !== $response = $this->checkAuth("admin.configuration.variables.delete")) return $response;
// Get the config id, and dispatch the delet request
$event = new ConfigDeleteEvent($this->getRequest()->get('id'));
$event = new ConfigDeleteEvent($this->getRequest()->get('variable_id'));
$this->dispatch(TheliaEvents::CONFIG_DELETE, $event);