replace adodb_date() with PHP native date() as it is no longer available and necessary

This commit is contained in:
ralf 2024-09-08 16:23:50 +02:00
parent c59be309d6
commit bfda9f3139
5 changed files with 15 additions and 15 deletions

View File

@ -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')
{

View File

@ -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--;

View File

@ -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));

View File

@ -331,11 +331,11 @@ class module_calendar_list extends Module
$html .= ' <div class="cal_list_weektop"></div>'."\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 .= ' <div class="cal_list_weeksplit"></div>'."\n";
}
$last_week = adodb_date('W-Y',$event['start']);
$last_week = date('W-Y',$event['start']);
$html .= " <!-- Event -->\n";
if ($event_count % 2 == 0) {
$html .= ' <div class="cal_list_event cal_event_even">'."\n";
@ -347,10 +347,10 @@ class module_calendar_list extends Module
$html .= ' <div class="cal_list_title">'.$event['title']."</div>\n";
$html .= ' <div class="cal_list_date">';
$html .= '<span class="cal_list_start">';
$html .= '<span class="cal_list_weekday">'.lang(adodb_date('D',$event['start'])).".".($this->bo->common_prefs['dateformat'][0] != 'd' ? ' ' : ', ')."</span>";
$html .= '<span class="cal_list_weekday">'.lang(date('D',$event['start'])).".".($this->bo->common_prefs['dateformat'][0] != 'd' ? ' ' : ', ')."</span>";
$html .= $this->bo->format_date($event['start'])."</span>";
$html .= '<span class="cal_list_end"> - ';
$html .= '<span class="cal_list_weekday">'.lang(adodb_date('D',$event['end'])).".".($this->bo->common_prefs['dateformat'][0] != 'd' ? ' ' : ', ')."</span>";
$html .= '<span class="cal_list_weekday">'.lang(date('D',$event['end'])).".".($this->bo->common_prefs['dateformat'][0] != 'd' ? ' ' : ', ')."</span>";
$html .= $this->bo->format_date($event['end'])."</span></div>\n";
$descr = trim($event['description']);
if (! empty($descr)) {
@ -365,4 +365,4 @@ class module_calendar_list extends Module
}
return $html;
}
}
}

View File

@ -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;
}
}
}