fixed #1655 undo commit 7958cd4 and removing confusing section

This commit is contained in:
Matthieu Leproux
2022-09-12 16:18:51 +02:00
parent 217de988b2
commit 0890142a3e
2 changed files with 17 additions and 7 deletions
+7 -7
View File
@@ -523,13 +523,13 @@ switch ($page['section'])
$template->assign('derivatives', $tpl_vars);
$template->assign('resize_quality', ImageStdParams::$quality);
// $tpl_vars = array();
// $now = time();
// foreach(ImageStdParams::$custom as $custom=>$time)
// {
// $tpl_vars[$custom] = ($now-$time<=24*3600) ? l10n('today') : time_since($time, 'day');
// }
// $template->assign('custom_derivatives', $tpl_vars);
$tpl_vars = array();
$now = time();
foreach(ImageStdParams::$custom as $custom=>$time)
{
$tpl_vars[$custom] = ($now-$time<=24*3600) ? l10n('today') : time_since($time, 'day');
}
$template->assign('custom_derivatives', $tpl_vars);
}
break;