diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2018-09-02 02:09:56 +0200 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2018-09-02 02:09:56 +0200 |
commit | 9e217d87c095170460a8580d5215ddf7cbe639f4 (patch) | |
tree | 3b426fe52e70ef0f1395edcb354f1be4788ca329 /includes/view/EventConfig_view.php | |
parent | ac48332166ce28fcb1a2fc130c7f5adbc760e42d (diff) |
Template refactoring to use twig
Diffstat (limited to 'includes/view/EventConfig_view.php')
-rw-r--r-- | includes/view/EventConfig_view.php | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/includes/view/EventConfig_view.php b/includes/view/EventConfig_view.php index 2525182a..4290ab0a 100644 --- a/includes/view/EventConfig_view.php +++ b/includes/view/EventConfig_view.php @@ -61,57 +61,6 @@ function EventConfig_countdown_page($event_config) } /** - * Converts event name and start+end date into a line of text. - * - * @param array $event_config - * @return string - */ -function EventConfig_info($event_config) -{ - if (empty($event_config)) { - return ''; - } - - // Event name, start+end date are set - if ( - !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'), - $event_config['event_name'], - date(__('Y-m-d'), $event_config['event_start_date']), - date(__('Y-m-d'), $event_config['event_end_date']) - ); - } - - // Event name, start date are set - 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']) - ); - } - - // Event start+end date are set - 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']), - date(__('Y-m-d'), $event_config['event_end_date']) - ); - } - - // Only event name is set - if (!is_null($event_config['event_name'])) { - return sprintf($event_config['event_name']); - } - - return ''; -} - -/** * Render edit page for event config. * * @param string $event_name The event name |