From 4d0a528f64062082f4b94a7739c280ee9c661d26 Mon Sep 17 00:00:00 2001 From: plegall Date: Mon, 30 Apr 2012 11:08:14 +0000 Subject: simplify code to save derivatives settings git-svn-id: http://piwigo.org/svn/trunk@14584 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/include/configuration_watermark_process.inc.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'admin/include') diff --git a/admin/include/configuration_watermark_process.inc.php b/admin/include/configuration_watermark_process.inc.php index 5440493a6..71f8c9f29 100644 --- a/admin/include/configuration_watermark_process.inc.php +++ b/admin/include/configuration_watermark_process.inc.php @@ -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)) { -- cgit v1.2.3