summaryrefslogtreecommitdiff
path: root/includes/model
diff options
context:
space:
mode:
authorFelix Favre <gnomus@gnomus.de>2014-12-07 18:01:05 +0100
committerFelix Favre <gnomus@gnomus.de>2014-12-07 18:01:05 +0100
commit4b490167acd4a316ee9b5f60f7975f2ac595077d (patch)
tree2eac4d3b2e41d9e31332e6a1ab65a1449ce9534a /includes/model
parent514d2aca641f2c6fd9262e575153824e2cf977f1 (diff)
added User.Nick to ShiftEntries_by_shift function
Diffstat (limited to 'includes/model')
-rw-r--r--includes/model/ShiftEntry_model.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/includes/model/ShiftEntry_model.php b/includes/model/ShiftEntry_model.php
index 20d0946f..e3046152 100644
--- a/includes/model/ShiftEntry_model.php
+++ b/includes/model/ShiftEntry_model.php
@@ -9,7 +9,7 @@ function ShiftEntries_freeleaded_count() {
function ShiftEntries_by_shift($shift_id) {
return sql_select("
- SELECT `User`.`email`, `User`.`email_shiftinfo`, `User`.`Sprache`, `ShiftEntry`.`UID`, `ShiftEntry`.`TID`, `ShiftEntry`.`SID`, `AngelTypes`.`name` as `angel_type_name`, `ShiftEntry`.`Comment`, `ShiftEntry`.`freeloaded`
+ SELECT `User`.`email`, `User`.`email_shiftinfo`, `User`.`Nick`, `User`.`Sprache`, `ShiftEntry`.`UID`, `ShiftEntry`.`TID`, `ShiftEntry`.`SID`, `AngelTypes`.`name` as `angel_type_name`, `ShiftEntry`.`Comment`, `ShiftEntry`.`freeloaded`
FROM `ShiftEntry`
JOIN `User` ON `ShiftEntry`.`UID`=`User`.`UID`
JOIN `AngelTypes` ON `ShiftEntry`.`TID`=`AngelTypes`.`id`
@@ -19,7 +19,7 @@ function ShiftEntries_by_shift($shift_id) {
/**
* Create a new shift entry.
*
- * @param ShiftEntry $shift_entry
+ * @param ShiftEntry $shift_entry
*/
function ShiftEntry_create($shift_entry) {
return sql_query("INSERT INTO `ShiftEntry` SET
@@ -34,7 +34,7 @@ function ShiftEntry_create($shift_entry) {
/**
* Returns next (or current) shifts of given user.
*
- * @param User $user
+ * @param User $user
*/
function ShiftEntries_upcoming_for_user($user) {
return sql_select("
@@ -50,12 +50,12 @@ function ShiftEntries_upcoming_for_user($user) {
/**
* Returns all shift entries in given shift for given angeltype.
*
- * @param int $shift_id
- * @param int $angeltype_id
+ * @param int $shift_id
+ * @param int $angeltype_id
*/
function ShiftEntries_by_shift_and_angeltype($shift_id, $angeltype_id) {
return sql_select("
- SELECT *
+ SELECT *
FROM `ShiftEntry`
WHERE `SID`=" . sql_escape($shift_id) . "
AND `TID`=" . sql_escape($angeltype_id) . "
@@ -66,10 +66,10 @@ function ShiftEntries_by_shift_and_angeltype($shift_id, $angeltype_id) {
* Returns all freeloaded shifts for given user.
*/
function ShiftEntries_freeloaded_by_user($user) {
- return sql_select("SELECT *
- FROM `ShiftEntry`
- WHERE `freeloaded` = 1
+ return sql_select("SELECT *
+ FROM `ShiftEntry`
+ WHERE `freeloaded` = 1
AND `UID`=" . sql_escape($user['UID']));
}
-?> \ No newline at end of file
+?>