Just fiddling. Give credit where credit is due. Template class header() function...
[squirrelmail.git] / src / options.php
index c59579774cfaed5f4b38ceba10d184f31430b412..ed0fb673f83770e19aabc4a03494bd6938465bd4 100644 (file)
@@ -43,6 +43,19 @@ define('SMOPT_PAGE_HIGHLIGHT', 'highlight');
 define('SMOPT_PAGE_FOLDER', 'folder');
 define('SMOPT_PAGE_ORDER', 'order');
 
+/**
+  * Save submitted options and calculate the most 
+  * we need to refresh the page
+  *
+  * @param string $optpage      The name of the page being submitted
+  * @param array  $optpage_data An array of all the submitted options
+  *
+  * @return int The highest level of screen refresh needed per
+  *             the options that were changed.  This value will
+  *             correspond to the SMOPT_REFRESH_* constants found
+  *             in functions/options.php.
+  *
+  */
 function process_optionmode_submit($optpage, $optpage_data) {
     /* Initialize the maximum option refresh level. */
     $max_refresh = SMOPT_REFRESH_NONE;
@@ -201,6 +214,7 @@ if (isset($optpage_name) && ($optpage_name != '')) {
 /* DO OLD SAVING OF SUBMITTED OPTIONS. THIS WILL BE REMOVED LATER. */
 /*******************************************************************/
 
+//FIXME: let's remove these finally in 1.5.2..... but first, are there any plugins using them?
 /* If in submit mode, select a save hook name and run it. */
 if ($optmode == SMOPT_MODE_SUBMIT) {
     /* Select a save hook name. */
@@ -235,6 +249,7 @@ if ($optmode == SMOPT_MODE_SUBMIT) {
 
 if ($optmode == SMOPT_MODE_SUBMIT) {
     $optpage = SMOPT_PAGE_MAIN;
+    $optpage_title = _("Options");
 }
 
 /***************************************************************/
@@ -410,7 +425,7 @@ if ($optpage == SMOPT_PAGE_MAIN) {
     }
 
     // Begin output form
-    echo addForm('options.php', 'post', 'f')
+    echo addForm('options.php', 'post', 'option_form')
        . create_optpage_element($optpage)
        . create_optmode_element(SMOPT_MODE_SUBMIT);