summaryrefslogtreecommitdiff
path: root/includes/view/Shifts_view.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-08-20 20:58:51 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2018-08-20 21:07:57 +0200
commitd6c8f1a61475fefa9594141aaf12a28d220bdaf8 (patch)
tree905051fdb1307f947c3a3a7be240609f8bc00e59 /includes/view/Shifts_view.php
parentbf6efe532c8f2de84e95b090911280a9b1b61ce8 (diff)
parent2f41b9e4418def9b69cf237312bc592364585025 (diff)
Merge branch 'master' to 'rebuild-database'
Diffstat (limited to 'includes/view/Shifts_view.php')
-rw-r--r--includes/view/Shifts_view.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/view/Shifts_view.php b/includes/view/Shifts_view.php
index 755fab74..c5680578 100644
--- a/includes/view/Shifts_view.php
+++ b/includes/view/Shifts_view.php
@@ -50,14 +50,14 @@ function Shift_view_header($shift, $room)
function Shift_editor_info_render($shift)
{
$info = [];
- if ($shift['created_by_user_id'] != null) {
+ if (!empty($shift['created_by_user_id'])) {
$info[] = sprintf(
glyph('plus') . _('created at %s by %s'),
date('Y-m-d H:i', $shift['created_at_timestamp']),
User_Nick_render(User($shift['created_by_user_id']))
);
}
- if ($shift['edited_by_user_id'] != null) {
+ if (!empty($shift['edited_by_user_id'])) {
$info[] = sprintf(
glyph('pencil') . _('edited at %s by %s'),
date('Y-m-d H:i', $shift['edited_at_timestamp']),
@@ -77,13 +77,13 @@ function Shift_signup_button_render($shift, $angeltype, $user_angeltype = null)
{
global $user;
- if ($user_angeltype == null) {
+ if (empty($user_angeltype)) {
$user_angeltype = UserAngelType_by_User_and_AngelType($user, $angeltype);
}
if ($angeltype['shift_signup_state']->isSignupAllowed()) {
return button(shift_entry_create_link($shift, $angeltype), _('Sign up'));
- } elseif ($user_angeltype == null) {
+ } elseif (empty($user_angeltype)) {
return button(
page_link_to('angeltypes', ['action' => 'view', 'angeltype_id' => $angeltype['id']]),
sprintf(_('Become %s'),