mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-26 19:29:58 +03:00
simplify code to save derivatives settings
git-svn-id: http://piwigo.org/svn/trunk@14584 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
38d6d25f75
commit
4d0a528f64
1 changed files with 2 additions and 4 deletions
|
@ -133,10 +133,9 @@ if (count($errors) == 0)
|
|||
ImageStdParams::set_watermark($watermark);
|
||||
|
||||
// do we have to regenerate the derivatives (and which types)?
|
||||
$types = ImageStdParams::get_defined_type_map();
|
||||
$changed_types = array();
|
||||
|
||||
foreach ($types as $type => $params)
|
||||
foreach (ImageStdParams::get_defined_type_map() as $type => $params)
|
||||
{
|
||||
$old_use_watermark = $params->use_watermark;
|
||||
ImageStdParams::apply_global($params);
|
||||
|
@ -146,11 +145,10 @@ if (count($errors) == 0)
|
|||
{
|
||||
$params->last_mod_time = time();
|
||||
$changed_types[] = $type;
|
||||
$types[$type] = $params;
|
||||
}
|
||||
}
|
||||
|
||||
ImageStdParams::set_and_save($types);
|
||||
ImageStdParams::save();
|
||||
|
||||
if (count($changed_types))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue