summaryrefslogtreecommitdiff
path: root/includes/controller/angeltypes_controller.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2016-09-29 16:04:05 +0200
committermsquare <msquare@notrademark.de>2016-09-29 16:04:05 +0200
commita128bcbb38a664bb2a07d0beb8bfb777e4b5da44 (patch)
tree83e82028409818efa165d6b2720a5ab2c040a8c4 /includes/controller/angeltypes_controller.php
parent10ae8b3d5ccca647564929ef37ff59c2c14ecd96 (diff)
use more ValidationResult
Diffstat (limited to 'includes/controller/angeltypes_controller.php')
-rw-r--r--includes/controller/angeltypes_controller.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/controller/angeltypes_controller.php b/includes/controller/angeltypes_controller.php
index 92d1d8ee..5607ea7c 100644
--- a/includes/controller/angeltypes_controller.php
+++ b/includes/controller/angeltypes_controller.php
@@ -137,8 +137,9 @@ function angeltype_edit_controller() {
if (! $coordinator_mode) {
if (isset($_REQUEST['name'])) {
- list($valid, $name) = AngelType_validate_name($_REQUEST['name'], $angeltype);
- if (! $valid) {
+ $result = AngelType_validate_name($_REQUEST['name'], $angeltype);
+ $name = $result->getValue();
+ if (! $result->isValid()) {
$valid = false;
error(_("Please check the name. Maybe it already exists."));
}