replace the hook for the subject line that Mr. Groot Koerkamp dropped.
[squirrelmail.git] / src / options.php
index 068810e48469d6ef6dde50575008b0600c4c41de..c6dd5c7d31c8b2c1010702723637f6acc9d9b9da 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * options.php
  *
- * Copyright (c) 1999-2002 The SquirrelMail Project Team
+ * Copyright (c) 1999-2003 The SquirrelMail Project Team
  * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
  * Displays the options page. Pulls from proper user preference files
@@ -17,9 +17,9 @@ define('SM_PATH','../');
 
 /* SquirrelMail required files. */
 require_once(SM_PATH . 'include/validate.php');
+require_once(SM_PATH . 'functions/global.php');
 require_once(SM_PATH . 'functions/display_messages.php');
 require_once(SM_PATH . 'functions/imap.php');
-require_once(SM_PATH . 'functions/array.php');
 require_once(SM_PATH . 'functions/options.php');
 require_once(SM_PATH . 'functions/strings.php');
 require_once(SM_PATH . 'functions/html.php');
@@ -115,6 +115,17 @@ function print_optionpages_row($leftopt, $rightopt = false) {
 
 /* ---------------------------- main ---------------------------- */
 
+/* get the globals that we may need */
+sqgetGlobalVar('key',       $key,           SQ_COOKIE);
+sqgetGlobalVar('username',  $username,      SQ_SESSION);
+sqgetGlobalVar('onetimepad',$onetimepad,    SQ_SESSION);
+sqgetGlobalVar('delimiter', $delimiter,     SQ_SESSION);
+
+sqgetGlobalVar('optpage',     $optpage);
+sqgetGlobalVar('optmode',     $optmode,      SQ_POST);
+sqgetGlobalVar('optpage_data',$optpage_data, SQ_POST);
+/* end of getting globals */
+
 /* Make sure we have an Option Page set. Default to main. */
 if ( !isset($optpage) || $optpage == '' ) {
     $optpage = SMOPT_PAGE_MAIN;
@@ -177,7 +188,7 @@ switch ($optpage) {
 /*** Second, load the option information for this page. ***/
 /**********************************************************/
 
-if ( !is_file( $optpage_file ) ) {
+if ( !@is_file( $optpage_file ) ) {
     $optpage = SMOPT_PAGE_MAIN;
 } else if ($optpage != SMOPT_PAGE_MAIN ) {
     /* Include the file for this optionpage. */