X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Foptions.php;h=c59579774cfaed5f4b38ceba10d184f31430b412;hb=fcc81e7a016f627891305f132772117e07cd9e6f;hp=f07752e25a2efcbbe8e46e682d3fc4c67873db80;hpb=457e85930298524fc08003d262c71ab621470ab4;p=squirrelmail.git diff --git a/src/options.php b/src/options.php index f07752e2..c5957977 100644 --- a/src/options.php +++ b/src/options.php @@ -6,13 +6,16 @@ * Displays the options page. Pulls from proper user preference files * and config.php. Displays preferences as selected and other options. * - * @copyright © 1999-2006 The SquirrelMail Project Team + * @copyright © 1999-2007 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail * @subpackage prefs */ +/** This is the options page */ +define('PAGE_NAME', 'options'); + /** * Include the SquirrelMail initialization file. */ @@ -44,13 +47,25 @@ function process_optionmode_submit($optpage, $optpage_data) { /* Initialize the maximum option refresh level. */ $max_refresh = SMOPT_REFRESH_NONE; + + /* Save each option in each option group. */ foreach ($optpage_data['options'] as $option_grp) { foreach ($option_grp['options'] as $option) { + + /* Special case: need to make sure emailaddress + * is saved if we use it as a test for ask_user_info */ + global $ask_user_info; + if ( $optpage = SMOPT_PAGE_PERSONAL && $ask_user_info && + $option->name == 'email_address' ) { + $option->setValue(''); + } + /* Remove Debug Mode Until Needed echo "name = '$option->name', " . "value = '$option->value', " . "new_value = '$option->new_value'\n"; +//FIXME: NO HTML IN THE CORE! echo "
"; */ if ($option->changed()) { @@ -226,7 +241,7 @@ if ($optmode == SMOPT_MODE_SUBMIT) { /* Finally, display whatever page we are supposed to show now. */ /***************************************************************/ -displayPageHeader($color, 'None', (isset($optpage_data['xtra']) ? $optpage_data['xtra'] : '')); +displayPageHeader($color, null, (isset($optpage_data['xtra']) ? $optpage_data['xtra'] : '')); /* * The main option page has a different layout then the rest of the option @@ -243,6 +258,7 @@ if ($optpage == SMOPT_PAGE_MAIN) { } if (isset($optpage_save_error) && $optpage_save_error!=array()) { +//FIXME: REMOVE HTML FROM CORE $notice = _("Error(s) occurred while saving your options") . "
\n