From bfda9f3139ea402f8f0dc1ca95bf9b5c1d32dce6 Mon Sep 17 00:00:00 2001 From: ralf Date: Sun, 8 Sep 2024 16:23:50 +0200 Subject: [PATCH] replace adodb_date() with PHP native date() as it is no longer available and necessary --- calendar/inc/class.calendar_bo.inc.php | 10 +++++----- calendar/inc/class.calendar_uilist.inc.php | 4 ++-- calendar/inc/class.calendar_uiviews.inc.php | 2 +- calendar/sitemgr/class.module_calendar_list.inc.php | 10 +++++----- calendar/sitemgr/class.module_calendar_month.inc.php | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/calendar/inc/class.calendar_bo.inc.php b/calendar/inc/class.calendar_bo.inc.php index f37c641dbf..fd6c77e064 100644 --- a/calendar/inc/class.calendar_bo.inc.php +++ b/calendar/inc/class.calendar_bo.inc.php @@ -1561,7 +1561,7 @@ class calendar_bo $param = $param ? 'True' : 'False'; break; case 'integer': - if ($param >= mktime(0,0,0,1,1,2000)) $param = adodb_date('Y-m-d H:i:s',$param)." ($param)"; + if ($param >= mktime(0,0,0,1,1,2000)) $param = date('Y-m-d H:i:s',$param)." ($param)"; break; } } @@ -1595,7 +1595,7 @@ class calendar_bo if ($display_day) { - $range = lang(adodb_date('l',$first['raw'])).($this->common_prefs['dateformat'][0] != 'd' ? ' ' : ', '); + $range = lang(date('l',$first['raw'])).($this->common_prefs['dateformat'][0] != 'd' ? ' ' : ', '); } for ($i = 0; $i < 5; $i += 2) { @@ -1615,7 +1615,7 @@ class calendar_bo } if ($display_time) { - $range .= ' '.adodb_date($timefmt,$first['raw']); + $range .= ' '.date($timefmt,$first['raw']); } if (!$last) { @@ -1637,7 +1637,7 @@ class calendar_bo { if ($display_time) { - $range .= ' '.adodb_date($timefmt,$first['raw']); + $range .= ' '.date($timefmt,$first['raw']); } $range .= ' - '; } @@ -1657,7 +1657,7 @@ class calendar_bo } if ($display_time && $last) { - $range .= ' '.adodb_date($timefmt,$last['raw']); + $range .= ' '.date($timefmt,$last['raw']); } if ($datefmt[4] == 'Y' && $datefmt[0] == 'm') { diff --git a/calendar/inc/class.calendar_uilist.inc.php b/calendar/inc/class.calendar_uilist.inc.php index 0e9e8f11e3..4ab90c4cf5 100644 --- a/calendar/inc/class.calendar_uilist.inc.php +++ b/calendar/inc/class.calendar_uilist.inc.php @@ -358,7 +358,7 @@ class calendar_uilist extends calendar_ui $this->last['hour'] = 23; $this->last['minute'] = $this->last['sec'] = 59; unset($this->last['raw']); $this->last = $this->bo->date2ts($this->last); - $this->date_filters['week'] = $label = lang('Week').' '.adodb_date('W',$this->first).': '.$this->bo->long_date($this->first,$this->last); + $this->date_filters['week'] = $label = lang('Week').' '.date('W',$this->first).': '.$this->bo->long_date($this->first,$this->last); $search_params['start'] = $this->first; $search_params['end'] = $this->last; $params['startdate'] = Api\DateTime::to($this->first, Api\DateTime::ET2); @@ -372,7 +372,7 @@ class calendar_uilist extends calendar_ui unset($this->first['raw']); $this->last = $this->first; $this->last['month'] += 1; - $this->date_filters['month'] = $label = lang(adodb_date('F',$this->bo->date2ts($params['date']))).' '.$this->first['year']; + $this->date_filters['month'] = $label = lang(date('F',$this->bo->date2ts($params['date']))).' '.$this->first['year']; $this->first = $this->bo->date2ts($this->first); $this->last = $this->bo->date2ts($this->last); $this->last--; diff --git a/calendar/inc/class.calendar_uiviews.inc.php b/calendar/inc/class.calendar_uiviews.inc.php index 101c3d2c24..5f0d71409d 100644 --- a/calendar/inc/class.calendar_uiviews.inc.php +++ b/calendar/inc/class.calendar_uiviews.inc.php @@ -558,7 +558,7 @@ class calendar_uiviews extends calendar_ui { $this->_week_align_month($this->first,$this->last); $weekNavH = "1 month"; - $navHeader = lang(adodb_date('F',$this->bo->date2ts($this->date))).' '.$this->year; + $navHeader = lang(date('F',$this->bo->date2ts($this->date))).' '.$this->year; } if ($this->debug > 0) $this->bo->debug_message('uiviews::month(%1) date=%2: first=%3, last=%4',False,$weeks,$this->date,$this->bo->date2string($this->first),$this->bo->date2string($this->last)); diff --git a/calendar/sitemgr/class.module_calendar_list.inc.php b/calendar/sitemgr/class.module_calendar_list.inc.php index 74a5b71a84..c4ebdc6850 100644 --- a/calendar/sitemgr/class.module_calendar_list.inc.php +++ b/calendar/sitemgr/class.module_calendar_list.inc.php @@ -331,11 +331,11 @@ class module_calendar_list extends Module $html .= '
'."\n"; foreach ($rows as $event) { - if (($last_week != 0) && (adodb_date('W-Y',$event['start']) != $last_week)) + if (($last_week != 0) && (date('W-Y',$event['start']) != $last_week)) { $html .= '
'."\n"; } - $last_week = adodb_date('W-Y',$event['start']); + $last_week = date('W-Y',$event['start']); $html .= " \n"; if ($event_count % 2 == 0) { $html .= '
'."\n"; @@ -347,10 +347,10 @@ class module_calendar_list extends Module $html .= '
'.$event['title']."
\n"; $html .= '
'; $html .= ''; - $html .= ''.lang(adodb_date('D',$event['start'])).".".($this->bo->common_prefs['dateformat'][0] != 'd' ? ' ' : ', ').""; + $html .= ''.lang(date('D',$event['start'])).".".($this->bo->common_prefs['dateformat'][0] != 'd' ? ' ' : ', ').""; $html .= $this->bo->format_date($event['start']).""; $html .= ' - '; - $html .= ''.lang(adodb_date('D',$event['end'])).".".($this->bo->common_prefs['dateformat'][0] != 'd' ? ' ' : ', ').""; + $html .= ''.lang(date('D',$event['end'])).".".($this->bo->common_prefs['dateformat'][0] != 'd' ? ' ' : ', ').""; $html .= $this->bo->format_date($event['end'])."
\n"; $descr = trim($event['description']); if (! empty($descr)) { @@ -365,4 +365,4 @@ class module_calendar_list extends Module } return $html; } -} +} \ No newline at end of file diff --git a/calendar/sitemgr/class.module_calendar_month.inc.php b/calendar/sitemgr/class.module_calendar_month.inc.php index b577f072f0..0c71e17dca 100644 --- a/calendar/sitemgr/class.module_calendar_month.inc.php +++ b/calendar/sitemgr/class.module_calendar_month.inc.php @@ -300,7 +300,7 @@ class module_calendar_month extends Module 'menuaction' => false, 'date' => $this->bo->date2string($week_start), ); - $title = lang('Wk').' '.adodb_date('W',$week_start); + $title = lang('Wk').' '.date('W',$week_start); if (!isset($GLOBALS['egw']->template)) { $GLOBALS['egw']->template = new Framework\Template; @@ -311,4 +311,4 @@ class module_calendar_month extends Module return $html; } -} +} \ No newline at end of file