X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Foptions.php;h=b13e04a045c577e56a47a17c1ad1d930b3e93159;hp=f07752e25a2efcbbe8e46e682d3fc4c67873db80;hb=c4dcda235cd69f4a5cfab95cec25b128224cda80;hpb=457e85930298524fc08003d262c71ab621470ab4
diff --git a/src/options.php b/src/options.php
index f07752e2..b13e04a0 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,9 +47,20 @@ 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', "
@@ -226,7 +240,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 +257,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