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

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;

View File

@@ -207,6 +207,16 @@ $(".restore-settings-button").each(function() {
</tr>
{/foreach}
</table>
<p style="margin:10px 0 0 0;{if isset($ferrors)} display:block;{/if}" class="sizeDetails">
{'Image Quality'|translate}
<input type="text" name="resize_quality" value="{$resize_quality}" size="3" maxlength="3"{if isset($ferrors.resize_quality)} class="dError"{/if}> %
{if isset($ferrors.resize_quality)}<span class="dErrorDesc" title="{$ferrors.resize_quality}">!</span>{/if}
</p>
<p style="margin:10px 0 0 0;{if isset($ferrors)} display:block;{/if}" class="sizeDetails">
<a href="{$F_ACTION}&action=restore_settings" class="restore-settings-button">{'Reset to default values'|translate}</a>
</p>
</fieldset>
</div> <!-- configContent -->