diff options
author | msquare <msquare@notrademark.de> | 2017-12-26 10:29:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-26 10:29:16 +0100 |
commit | de61c88d6de67d12d5de5b6dd0ab6b8c82e5a290 (patch) | |
tree | aac6a43cb88e3d803da5809ab37885b41bc811c6 /includes/model/AngelType_model.php | |
parent | 879918864a9c6da0fe9be1aca6c443ec8df0afc3 (diff) | |
parent | f8d0a7c5b00a58c646871e355b5876dcc5890be5 (diff) |
Merge pull request #388 from MyIgel/master
Formatting, Docstrings, and fixup
Diffstat (limited to 'includes/model/AngelType_model.php')
-rw-r--r-- | includes/model/AngelType_model.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/includes/model/AngelType_model.php b/includes/model/AngelType_model.php index f6e2a9cf..3641f125 100644 --- a/includes/model/AngelType_model.php +++ b/includes/model/AngelType_model.php @@ -25,13 +25,14 @@ function AngelType_new() /** * Checks if the angeltype has any contact information. - * - * @param Angeltype $angeltype + * + * @param array $angeltype Angeltype * @return bool */ -function AngelType_has_contact_info($angeltype) { - return !empty($angeltype['contact_name']) - || !empty($angeltype['contact_dect']) +function AngelType_has_contact_info($angeltype) +{ + return !empty($angeltype['contact_name']) + || !empty($angeltype['contact_dect']) || !empty($angeltype['contact_email']); } @@ -139,6 +140,7 @@ function AngelType_create($angeltype) . $angeltype['contact_email'] . ', ' . $angeltype['show_on_dashboard'] ); + return $angeltype; } @@ -172,6 +174,7 @@ function AngelType_validate_name($name, $angeltype) FROM `AngelTypes` WHERE `name`=? LIMIT 1', [$name])) == 0); + return new ValidationResult($valid, $name); } |