X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=include%2Foptions%2Fdisplay.php;h=72f65c4e797c8e0ac823965c56a3fb04bcde2eaa;hp=33496d569ece8e6221097a3712f0c0b3036c5b24;hb=c997cbe6f5a46d432d7733acb207dfcdfd00e49e;hpb=e8b2c636ecd84bebb8d145474ba06e69b1136381 diff --git a/include/options/display.php b/include/options/display.php index 33496d56..72f65c4e 100644 --- a/include/options/display.php +++ b/include/options/display.php @@ -5,7 +5,7 @@ * * Displays all optinos about display preferences * - * @copyright 1999-2020 The SquirrelMail Project Team + * @copyright 1999-2021 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail @@ -523,9 +523,11 @@ function icon_theme_save($option) { // Don't assume the new value is there, double check // and only save if found $found = false; - while (!$found && (list($index, $data) = each($icon_themes))) { - if ($data['PATH'] == $option->new_value) + foreach ($icon_themes as $data) { + if ($data['PATH'] == $option->new_value) { $found = true; + break; + } } if (!$found) @@ -540,17 +542,20 @@ function css_theme_save ($option) { // Don't assume the new value is there, double check // and only save if found $found = false; - reset($user_themes); - while (!$found && (list($index, $data) = each($user_themes))) { - if ($data['PATH'] == $option->new_value) + foreach ($user_themes as $data) { + if ($data['PATH'] == $option->new_value) { $found = true; + break; + } } if (!$found) { $template_themes = $oTemplate->get_alternative_stylesheets(true); - while (!$found && (list($path, $name) = each($template_themes))) { - if ($path == $option->new_value) + foreach ($template_themes as $path => $name) { + if ($path == $option->new_value) { $found = true; + break; + } } }