diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2018-08-20 20:58:51 +0200 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2018-08-20 21:07:57 +0200 |
commit | d6c8f1a61475fefa9594141aaf12a28d220bdaf8 (patch) | |
tree | 905051fdb1307f947c3a3a7be240609f8bc00e59 /includes/view/EventConfig_view.php | |
parent | bf6efe532c8f2de84e95b090911280a9b1b61ce8 (diff) | |
parent | 2f41b9e4418def9b69cf237312bc592364585025 (diff) |
Merge branch 'master' to 'rebuild-database'
Diffstat (limited to 'includes/view/EventConfig_view.php')
-rw-r--r-- | includes/view/EventConfig_view.php | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/includes/view/EventConfig_view.php b/includes/view/EventConfig_view.php index 25c4b225..fe6de670 100644 --- a/includes/view/EventConfig_view.php +++ b/includes/view/EventConfig_view.php @@ -8,7 +8,7 @@ */ function EventConfig_countdown_page($event_config) { - if ($event_config == null) { + if (empty($event_config)) { return div('col-md-12 text-center', [ heading(sprintf(_('Welcome to the %s!'), '<span class="icon-icon_angel"></span> ENGELSYSTEM'), 2) ]); @@ -16,7 +16,7 @@ function EventConfig_countdown_page($event_config) $elements = []; - if ($event_config['event_name'] != null) { + if (!is_null($event_config['event_name'])) { $elements[] = div('col-sm-12 text-center', [ heading(sprintf( _('Welcome to the %s!'), @@ -25,7 +25,7 @@ function EventConfig_countdown_page($event_config) ]); } - if ($event_config['buildup_start_date'] != null && time() < $event_config['buildup_start_date']) { + if (!is_null($event_config['buildup_start_date']) && time() < $event_config['buildup_start_date']) { $elements[] = div('col-sm-3 text-center hidden-xs', [ heading(_('Buildup starts'), 4), '<span class="moment-countdown text-big" data-timestamp="' . $event_config['buildup_start_date'] . '">%c</span>', @@ -33,7 +33,7 @@ function EventConfig_countdown_page($event_config) ]); } - if ($event_config['event_start_date'] != null && time() < $event_config['event_start_date']) { + if (!is_null($event_config['event_start_date']) && time() < $event_config['event_start_date']) { $elements[] = div('col-sm-3 text-center hidden-xs', [ heading(_('Event starts'), 4), '<span class="moment-countdown text-big" data-timestamp="' . $event_config['event_start_date'] . '">%c</span>', @@ -41,7 +41,7 @@ function EventConfig_countdown_page($event_config) ]); } - if ($event_config['event_end_date'] != null && time() < $event_config['event_end_date']) { + if (!is_null($event_config['event_end_date']) && time() < $event_config['event_end_date']) { $elements[] = div('col-sm-3 text-center hidden-xs', [ heading(_('Event ends'), 4), '<span class="moment-countdown text-big" data-timestamp="' . $event_config['event_end_date'] . '">%c</span>', @@ -49,7 +49,7 @@ function EventConfig_countdown_page($event_config) ]); } - if ($event_config['teardown_end_date'] != null && time() < $event_config['teardown_end_date']) { + if (!is_null($event_config['teardown_end_date']) && time() < $event_config['teardown_end_date']) { $elements[] = div('col-sm-3 text-center hidden-xs', [ heading(_('Teardown ends'), 4), '<span class="moment-countdown text-big" data-timestamp="' . $event_config['teardown_end_date'] . '">%c</span>', @@ -68,15 +68,15 @@ function EventConfig_countdown_page($event_config) */ function EventConfig_info($event_config) { - if ($event_config == null) { + if (empty($event_config)) { return ''; } // Event name, start+end date are set if ( - $event_config['event_name'] != null - && $event_config['event_start_date'] != null - && $event_config['event_end_date'] != null + !is_null($event_config['event_name']) + && !is_null($event_config['event_start_date']) + && !is_null($event_config['event_end_date']) ) { return sprintf( _('%s, from %s to %s'), @@ -87,7 +87,7 @@ function EventConfig_info($event_config) } // Event name, start date are set - if ($event_config['event_name'] != null && $event_config['event_start_date'] != null) { + if (!is_null($event_config['event_name']) && !is_null($event_config['event_start_date'])) { return sprintf( _('%s, starting %s'), $event_config['event_name'], date(_('Y-m-d'), $event_config['event_start_date']) @@ -95,7 +95,7 @@ function EventConfig_info($event_config) } // Event start+end date are set - if ($event_config['event_start_date'] != null && $event_config['event_end_date'] != null) { + if (!is_null($event_config['event_start_date']) && !is_null($event_config['event_end_date'])) { return sprintf( _('Event from %s to %s'), date(_('Y-m-d'), $event_config['event_start_date']), @@ -104,7 +104,7 @@ function EventConfig_info($event_config) } // Only event name is set - if ($event_config['event_name'] != null) { + if (!is_null($event_config['event_name'])) { return sprintf($event_config['event_name']); } |