diff --git a/composer.lock b/composer.lock index a9dea87..7d66b89 100755 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "37f7ef4e091e90d90b3c7d6056cbe454", + "content-hash": "697ec089fcf3d7f209de359fc23cd496", "packages": [ { "name": "ajani/flash-message", @@ -42,6 +42,123 @@ "description": "A simple package to allow usage of flash messages using session.", "time": "2019-11-09T02:11:30+00:00" }, + { + "name": "giggsey/libphonenumber-for-php", + "version": "8.10.22", + "source": { + "type": "git", + "url": "https://github.com/giggsey/libphonenumber-for-php.git", + "reference": "f3a55dcb6fead9d4fb291c6dadda0564e5ae8d3f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/giggsey/libphonenumber-for-php/zipball/f3a55dcb6fead9d4fb291c6dadda0564e5ae8d3f", + "reference": "f3a55dcb6fead9d4fb291c6dadda0564e5ae8d3f", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "giggsey/locale": "^1.7", + "php": ">=5.3.2" + }, + "require-dev": { + "pear/pear-core-minimal": "^1.9", + "pear/pear_exception": "^1.0", + "pear/versioncontrol_git": "^0.5", + "phing/phing": "^2.7", + "php-coveralls/php-coveralls": "^1.0|^2.0", + "phpunit/phpunit": "^4.8.36|^5.0", + "symfony/console": "^2.8|^3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "autoload": { + "psr-4": { + "libphonenumber\\": "src/" + }, + "exclude-from-classmap": [ + "/src/data/", + "/src/carrier/data/", + "/src/geocoding/data/", + "/src/timezone/data/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Joshua Gigg", + "email": "giggsey@gmail.com", + "homepage": "https://giggsey.com/" + } + ], + "description": "PHP Port of Google's libphonenumber", + "homepage": "https://github.com/giggsey/libphonenumber-for-php", + "keywords": [ + "geocoding", + "geolocation", + "libphonenumber", + "mobile", + "phonenumber", + "validation" + ], + "time": "2019-10-30T11:52:30+00:00" + }, + { + "name": "giggsey/locale", + "version": "1.8", + "source": { + "type": "git", + "url": "https://github.com/giggsey/Locale.git", + "reference": "85a1b251bad11c986fec2a051b10d4b80a5caa1b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/giggsey/Locale/zipball/85a1b251bad11c986fec2a051b10d4b80a5caa1b", + "reference": "85a1b251bad11c986fec2a051b10d4b80a5caa1b", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "pear/pear-core-minimal": "^1.9", + "pear/pear_exception": "^1.0", + "pear/versioncontrol_git": "^0.5", + "phing/phing": "~2.7", + "php-coveralls/php-coveralls": "^1.0|^2.0", + "phpunit/phpunit": "^4.8|^5.0", + "symfony/console": "^2.8|^3.0|^4.0", + "symfony/filesystem": "^2.8|^3.0|^4.0", + "symfony/finder": "^2.8|^3.0|^4.0", + "symfony/process": "^2.8|^3.0|^4.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Giggsey\\Locale\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Joshua Gigg", + "email": "giggsey@gmail.com", + "homepage": "http://giggsey.com/" + } + ], + "description": "Locale functions required by libphonenumber-for-php", + "time": "2019-10-09T18:53:14+00:00" + }, { "name": "ingenerator/tokenista", "version": "v1.1.0", diff --git a/controllers/publics/Command.php b/controllers/publics/Command.php index 3a4d565..4266452 100755 --- a/controllers/publics/Command.php +++ b/controllers/publics/Command.php @@ -108,7 +108,6 @@ namespace controllers\publics; if (!$this->verify_csrf($csrf)) { \FlashMessage\FlashMessage::push('danger', 'Jeton CSRF invalid !'); - return $this->redirect(\descartes\Router::url('Command', 'list')); } @@ -119,19 +118,16 @@ namespace controllers\publics; if (!$name || !$script) { \FlashMessage\FlashMessage::push('danger', 'Renseignez au moins un nom et un script.'); - return $this->redirect(\descartes\Router::url('Command', 'list')); } if (!$this->internal_command->create($name, $script, $admin)) { - \FlashMessage\FlashMessage::push('danger', 'Impossible créer cette commande.'); - + \FlashMessage\FlashMessage::push('danger', 'Impossible de créer cette commande.'); return $this->redirect(\descartes\Router::url('commands', 'add')); } \FlashMessage\FlashMessage::push('success', 'La commande a bien été crée.'); - return $this->redirect(\descartes\Router::url('Command', 'list')); } @@ -148,7 +144,6 @@ namespace controllers\publics; if (!$this->verify_csrf($csrf)) { \FlashMessage\FlashMessage::push('danger', 'Jeton CSRF invalid !'); - return $this->redirect(\descartes\Router::url('Command', 'list')); } diff --git a/templates/incs/nav.php b/templates/incs/nav.php index 5cea60b..bd7a94e 100755 --- a/templates/incs/nav.php +++ b/templates/incs/nav.php @@ -33,12 +33,23 @@