summaryrefslogtreecommitdiff
path: root/includes/model
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2017-01-03 14:19:38 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2017-01-03 15:33:10 +0100
commit1c27bf1375fe769ab53cbd67278ce41a5cc2a9d8 (patch)
treea79cf598e87c64aee023237bc78f1c06ae38f0fb /includes/model
parent55141154c083acc2d0397f4c62b4e0be1c7a19fa (diff)
Removed $angeltype from function Shift_signup_allowed_*
Diffstat (limited to 'includes/model')
-rw-r--r--includes/model/Shifts_model.php22
1 files changed, 8 insertions, 14 deletions
diff --git a/includes/model/Shifts_model.php b/includes/model/Shifts_model.php
index e182d905..462b2f65 100644
--- a/includes/model/Shifts_model.php
+++ b/includes/model/Shifts_model.php
@@ -292,14 +292,11 @@ function Shift_signup_allowed_angel(
/**
* Check if an angeltype supporter can sign up a user to a shift.
*
- * @TODO: remove $angeltype
- *
- * @param array|null $angeltype
- * @param array $needed_angeltype
- * @param array[] $shift_entries
+ * @param array $needed_angeltype
+ * @param array[] $shift_entries
* @return ShiftSignupState
*/
-function Shift_signup_allowed_angeltype_supporter($angeltype, $needed_angeltype, $shift_entries)
+function Shift_signup_allowed_angeltype_supporter($needed_angeltype, $shift_entries)
{
$free_entries = Shift_free_entries($needed_angeltype, $shift_entries);
if ($free_entries == 0) {
@@ -312,14 +309,11 @@ function Shift_signup_allowed_angeltype_supporter($angeltype, $needed_angeltype,
/**
* Check if an admin can sign up a user to a shift.
*
- * @TODO: remove $angeltype
- *
- * @param array|null $angeltype The angeltype to which the user wants to sign up
- * @param array $needed_angeltype
- * @param array[] $shift_entries
+ * @param array $needed_angeltype
+ * @param array[] $shift_entries
* @return ShiftSignupState
*/
-function Shift_signup_allowed_admin($angeltype, $needed_angeltype, $shift_entries)
+function Shift_signup_allowed_admin($needed_angeltype, $shift_entries)
{
$free_entries = Shift_free_entries($needed_angeltype, $shift_entries);
@@ -355,14 +349,14 @@ function Shift_signup_allowed(
global $user, $privileges;
if (in_array('user_shifts_admin', $privileges)) {
- return Shift_signup_allowed_admin($angeltype, $needed_angeltype, $shift_entries);
+ return Shift_signup_allowed_admin($needed_angeltype, $shift_entries);
}
if (
in_array('shiftentry_edit_angeltype_supporter', $privileges)
&& User_is_AngelType_supporter($user, $angeltype)
) {
- return Shift_signup_allowed_angeltype_supporter($angeltype, $needed_angeltype, $shift_entries);
+ return Shift_signup_allowed_angeltype_supporter($needed_angeltype, $shift_entries);
}
return Shift_signup_allowed_angel(