[fix] More PHP-8.1 issues

This commit is contained in:
Solomon Peachy 2022-11-20 11:49:54 -05:00
parent e438d95292
commit 0462c9c6a5
4 changed files with 44 additions and 44 deletions

View File

@ -170,7 +170,7 @@ switch ($action) {
case 'edit':
$timestamp = mktime(12, 0, 0, $month, $day, $year);
$date = strftime($strings['formats_date'], $timestamp);
$date = date($strings['formats_date'], $timestamp);
$dayNameIndex = $date["wday"];
/* Retrieve location info */

View File

@ -89,7 +89,7 @@ function display_image_repository($database, $image_repository_path) {
$size['size'] = round($size['size']/1048576, 2);
$stat = stat($image_repository_path ."/". $file_name);
$max_size = $po_options_default['volume_max_size'];
$stat[9] = strftime($strings['formats_date'], $stat[9]);
$stat[9] = date($strings['formats_date'], $stat[9]);
print "<tr>\n";
print emit_td($file_name);

View File

@ -225,7 +225,7 @@ function emit_date_html($timestamp, $format, $special = FALSE) {
$html_string = "";
if ($date_format) {
$html_string .= strftime($date_format, $timestamp);
$html_string .= date($date_format, $timestamp);
}
if ($link)
@ -237,7 +237,7 @@ function emit_date_html($timestamp, $format, $special = FALSE) {
} else {
if ($date_format)
$html_string .= " @ ";
$html_string .= strftime($time_format, $timestamp);
$html_string .= date($time_format, $timestamp);
}
}

View File

@ -118,7 +118,7 @@ switch ($calendar_view) {
print sprintf($thm_elem['button.previous'], "my.datebook.php?view=1&amp;year=$yesterday[0]&amp;month=$yesterday[1]&amp;day=$yesterday[2]", $strings['generic_day'], "");
print "<b>&nbsp;&nbsp; $dayNames[$dayNameIndex] ".strftime($strings['formats_date'], $timestamp)."&nbsp;&nbsp;</b>";
print "<b>&nbsp;&nbsp; $dayNames[$dayNameIndex] ".date($strings['formats_date'], $timestamp)."&nbsp;&nbsp;</b>";
$tomorrow = adjustDay($calendar_year, $calendar_month, $calendar_day + 1);
print sprintf($thm_elem['button.next'], "my.datebook.php?view=1&amp;year=$tomorrow[0]&amp;month=$tomorrow[1]&amp;day=$tomorrow[2]", $strings['generic_day'], "");