From a128bcbb38a664bb2a07d0beb8bfb777e4b5da44 Mon Sep 17 00:00:00 2001 From: msquare Date: Thu, 29 Sep 2016 16:04:05 +0200 Subject: use more ValidationResult --- includes/controller/angeltypes_controller.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'includes/controller') 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.")); } -- cgit v1.2.3-54-g00ecf