summaryrefslogtreecommitdiff
path: root/includes/model
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2016-10-05 22:28:39 +0200
committermsquare <msquare@notrademark.de>2016-10-05 22:28:39 +0200
commit6d97aa2d273464e3cb6703a0527793c52583d4cd (patch)
treee2c6780b096161d374627119a91397ab160da4f6 /includes/model
parent6fff6a6c1a5a4ae6c6977c3aeb4ac532ba09a395 (diff)
continue working on shifts calendar renderer
Diffstat (limited to 'includes/model')
-rw-r--r--includes/model/AngelType_model.php11
-rw-r--r--includes/model/Shifts_model.php2
2 files changed, 5 insertions, 8 deletions
diff --git a/includes/model/AngelType_model.php b/includes/model/AngelType_model.php
index d01cf905..be15dc59 100644
--- a/includes/model/AngelType_model.php
+++ b/includes/model/AngelType_model.php
@@ -124,14 +124,11 @@ function AngelTypes() {
* Returns AngelType id array
*/
function AngelType_ids() {
- $angelType_source = sql_select("SELECT `id` FROM `AngelTypes`");
- if ($angelType_source === false) {
- return false;
- }
- if (count($angelType_source) > 0) {
- return $angelType_source;
+ $result = sql_select("SELECT `id` FROM `AngelTypes`");
+ if ($result === false) {
+ engelsystem_error("Unable to load angeltypes.");
}
- return null;
+ return select_array($result, 'id', 'id');
}
/**
diff --git a/includes/model/Shifts_model.php b/includes/model/Shifts_model.php
index 6721c30e..5a38abdd 100644
--- a/includes/model/Shifts_model.php
+++ b/includes/model/Shifts_model.php
@@ -49,7 +49,7 @@ function Shifts_by_ShiftsFilter(ShiftsFilter $shiftsFilter, $user) {
AND `ShiftEntry`.`SID` = `Shifts`.`SID`
)
)";
- } elseif ($_SESSION['user_shifts']['filled'][0] == 1) {
+ } elseif ($_SESSION['user_shifts']['filled'][0] == ShiftsFilter::FILLED_FILLED) {
$SQL .= "
AND (
nat.`count` <= entries.`count`