* To reduce on errors, I moved the includes for config.php and strings.php
authorfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 26 Apr 2001 14:28:02 +0000 (14:28 +0000)
committerfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 26 Apr 2001 14:28:02 +0000 (14:28 +0000)
  into validate.php.
    = They (config/strings) were used eveywhere validate was used
    = Validate already included auth.php (which included i18n.php)
    = Now including just one file does a lot of stuff including loading
      SM config, validating data, and loading internationalization
    = Since we only include config.php once and not dozens of times, we could
      have a slight speed increase

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1306 7612ce4b-ef26-0410-bec9-ea0150e637f0

36 files changed:
functions/auth.php
functions/mime.php
functions/page_header.php
functions/tree.php
src/addrbook_popup.php
src/addrbook_search.php
src/addrbook_search_html.php
src/addressbook.php
src/compose.php
src/delete_message.php
src/download.php
src/empty_trash.php
src/folders.php
src/folders_create.php
src/folders_delete.php
src/folders_rename_do.php
src/folders_rename_getname.php
src/folders_subscribe.php
src/help.php
src/left_main.php
src/load_prefs.php
src/login.php
src/move_messages.php
src/options.php
src/options_display.php
src/options_folder.php
src/options_highlight.php
src/options_order.php
src/options_personal.php
src/read_body.php
src/redirect.php
src/right_main.php
src/search.php
src/signout.php
src/validate.php
src/webmail.php

index daacc76..ea692ee 100644 (file)
@@ -10,7 +10,9 @@
 
    if (defined ('auth_php'))
       return; 
-   define ('auth_php', true); 
+   define ('auth_php', true);
+   
+   include '../functions/i18n.php';
 
    function is_logged_in () {
       if (session_is_registered('user_is_logged_in'))
index dff98e9..5270679 100644 (file)
@@ -14,9 +14,7 @@
    global $debug_mime;
    $debug_mime = false;
    
-   include "../functions/i18n.php";
    include "../functions/imap.php";
-   include "../config/config.php";
 
    /** Setting up the objects that have the structure for the message **/
 
index b398c34..9dc2a5c 100644 (file)
@@ -13,7 +13,6 @@
 
    include('../src/validate.php');
    include("../functions/prefs.php");
-   include("../functions/i18n.php");
    include("../functions/plugin.php");
 
    // Check to see if gettext is installed
index 01e318d..cda8c8e 100644 (file)
@@ -7,7 +7,6 @@
    define('tree_php', true);
 
    include('../functions/imap.php');
-   include('../config/config.php');
 
    // Recursive function to find the correct parent for a new node
    function findParentForChild($value, $treeIndexToStart, $tree) {
index a387df2..a042eae 100644 (file)
@@ -11,9 +11,6 @@
     **/
 
    include('../src/validate.php');
-   include("../functions/strings.php");
-   include('../functions/i18n.php');
-   include('../config/config.php');
    include('../functions/page_header.php');
    include('../functions/addressbook.php');
    include('../src/load_prefs.php');
index a4a92bb..a8dd816 100644 (file)
@@ -128,9 +128,6 @@ function bcc_address($addr) {
 
    /* ================= End of functions ================= */
 
-   include("../functions/strings.php");
-   include('../functions/i18n.php');
-   include('../config/config.php');
    include('../functions/array.php');
    include('../functions/strings.php');
    include('../functions/page_header.php');
index 4ff7aca..63b3e4d 100644 (file)
@@ -17,8 +17,6 @@
     **/
 
    include('../src/validate.php');
-   include('../functions/strings.php');
-   include('../config/config.php');
    include('../functions/page_header.php');
    include('../functions/date.php');
    include('../functions/smtp.php');
index 404b06c..b9fc59b 100644 (file)
@@ -11,8 +11,6 @@
     **/
 
    include('../src/validate.php');
-   include('../functions/strings.php');
-   include('../config/config.php');
    include('../functions/array.php');
    include('../functions/page_header.php');
    include('../functions/display_messages.php');
index edec6ed..0fc6361 100644 (file)
@@ -16,8 +16,6 @@
     **/
 
    include('../src/validate.php');
-   include("../functions/strings.php");
-   include("../config/config.php");
    include("../functions/page_header.php");
    include("../functions/imap.php");
    include("../functions/date.php");
index 072eaf6..691c97a 100644 (file)
@@ -11,8 +11,6 @@
     **/
 
    include("../src/validate.php");
-   include("../functions/strings.php");
-   include("../config/config.php");
    include("../functions/page_header.php");
    include("../functions/display_messages.php");
    include("../functions/imap.php");
index b1e0b1a..0e9e9ee 100644 (file)
    define('download_php', true);  // Used for preferences
 
    include('../src/validate.php');
-   include("../functions/strings.php");
-   include("../config/config.php");
    include("../functions/imap.php");
    include("../functions/mime.php");
    include("../functions/date.php");
-   include("../functions/i18n.php");
    include("../src/load_prefs.php");
 
    header("Pragma: ");
index 6605b52..486b15e 100644 (file)
@@ -12,8 +12,6 @@
     **/
 
    include('../src/validate.php');
-   include("../functions/strings.php");
-   include("../config/config.php");
    include("../functions/page_header.php");
    include("../functions/display_messages.php");
    include("../functions/imap.php");
index f727337..95d938c 100644 (file)
@@ -13,8 +13,6 @@
     **/
 
    include('../src/validate.php');
-   include("../functions/strings.php");
-   include("../config/config.php");
    include("../functions/page_header.php");
    include("../functions/imap.php");
    include("../functions/array.php");
index 30e6059..a16b43d 100644 (file)
@@ -12,8 +12,6 @@
     **/
 
    include('../src/validate.php');
-   include("../functions/strings.php");
-   include("../config/config.php");
    include("../functions/page_header.php");
    include("../functions/imap.php");
    include("../functions/display_messages.php");
index 65f5763..7cbea84 100644 (file)
@@ -12,8 +12,6 @@
     **/
 
    include('../src/validate.php');
-   include("../functions/strings.php");
-   include("../config/config.php");
    include("../functions/page_header.php");
    include("../functions/imap.php");
    include("../functions/array.php");
index e18a44c..e2db9cc 100644 (file)
@@ -12,8 +12,6 @@
     **/
 
    include("../src/validate.php");
-   include("../functions/strings.php");
-   include("../config/config.php");
    include("../functions/page_header.php");
    include("../functions/imap.php");
    include("../src/load_prefs.php");
index 071c2d0..44c7a69 100644 (file)
@@ -12,8 +12,6 @@
     **/
 
    include('../src/validate.php');
-   include("../functions/strings.php");
-   include("../config/config.php");
    include("../functions/page_header.php");
    include("../functions/imap.php");
    include("../src/load_prefs.php");
index add22eb..286064e 100644 (file)
     **  $Id$
     **/
 
-   session_start();
-
-   if (!isset($strings_php))
-      include("../functions/strings.php");
-   if (!isset($config_php))
-      include("../config/config.php");
-   if (!isset($page_header_php))
-      include("../functions/page_header.php");
-   if (!isset($imap_php))
-      include("../functions/imap.php");
-   if (!isset($display_messages_php))
-      include("../functions/display_messages.php");
-
+   include ('../src/validate.php');
+   include("../functions/page_header.php");
+   include("../functions/imap.php");
+   include("../functions/display_messages.php");
    include("../src/load_prefs.php");
 
    $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
index 162f99e..f689c6d 100644 (file)
     **/
 
    include('../src/validate.php');
-   include("../functions/strings.php");
-   include("../config/config.php");
    include("../functions/page_header.php");
    include("../functions/display_messages.php");
    include("../functions/imap.php");
    include("../functions/array.php");
-   include("../functions/i18n.php");
    include("../src/load_prefs.php");
 
 
index a907a73..96ef450 100644 (file)
@@ -11,9 +11,6 @@
     **/
 
    include('../src/validate.php');
-   include ("../functions/i18n.php");
-   include("../functions/strings.php");
-   include("../config/config.php");
    include("../functions/array.php");
    include("../functions/imap.php");
    include("../functions/page_header.php");
index 9716a90..8f4e303 100644 (file)
@@ -20,8 +20,6 @@
       $theme = array();
    if (! isset($color))
       $color = array();
-   include('../src/validate.php');
-   include("../config/config.php");
    include("../functions/prefs.php");
    include("../functions/plugin.php");
       
index 2ebf129..feb2a5c 100644 (file)
@@ -13,7 +13,6 @@
 
    include("../functions/strings.php");
    include("../config/config.php");
-   include("../functions/i18n.php");
    include("../functions/plugin.php");
 
    // $squirrelmail_language is set by a cookie when the user selects
index ee676e2..953fcbd 100644 (file)
@@ -11,8 +11,6 @@
     **/
 
    include('../src/validate.php');
-   include("../functions/strings.php");
-   include("../config/config.php");
    include("../functions/page_header.php");
    include("../functions/display_messages.php");
    include("../functions/imap.php");
index 4a29dd9..db4a472 100644 (file)
     **/
 
    include('../src/validate.php');
-   include('../functions/strings.php');
-   include('../config/config.php');
    include('../functions/page_header.php');
    include('../functions/display_messages.php');
    include('../functions/imap.php');
    include('../functions/array.php');
-   include('../functions/i18n.php');
 
    if (isset($language)) {
       setcookie('squirrelmail_language', $language, time()+2592000);
index 4580e8d..a8ea085 100644 (file)
     **/
 
    include('../src/validate.php');
-   include('../functions/strings.php');
-   include('../config/config.php');
    include('../functions/page_header.php');
    include('../functions/display_messages.php');
    include('../functions/imap.php');
    include('../functions/array.php');
-   include('../functions/i18n.php');
    include('../functions/plugin.php');
    include('../src/load_prefs.php');
    
index dd5f21f..2b62364 100644 (file)
     **/
 
    include('../src/validate.php');
-   include('../functions/strings.php');
-   include('../config/config.php');
    include('../functions/page_header.php');
    include('../functions/display_messages.php');
    include('../functions/imap.php');
    include('../functions/array.php');
-   include('../functions/i18n.php');
    include('../functions/plugin.php');
    include('../src/load_prefs.php');
    
index de804a1..c2aa086 100644 (file)
     **/
 
    include('../src/validate.php');
-   include('../functions/strings.php');
-   include('../config/config.php');
    include('../functions/page_header.php');
    include('../functions/display_messages.php');
    include('../functions/imap.php');
    include('../functions/array.php');
-   include('../functions/i18n.php');
    include('../functions/plugin.php');
 
    if (! isset($action))
index 15c9fb7..21bc43f 100644 (file)
     **/
 
    include('../src/validate.php');
-   include('../functions/strings.php');
-   include('../config/config.php');
    include('../functions/page_header.php');
    include('../functions/display_messages.php');
    include('../functions/imap.php');
    include('../functions/array.php');
-   include('../functions/i18n.php');
    include('../functions/plugin.php');
 
 
index 2937a5c..784dd75 100644 (file)
     **/
 
    include('../src/validate.php');
-   include('../functions/strings.php');
-   include('../config/config.php');
    include('../functions/page_header.php');
    include('../functions/display_messages.php');
    include('../functions/imap.php');
    include('../functions/array.php');
-   include('../functions/i18n.php');
    include('../functions/plugin.php');
    include('../src/load_prefs.php');
    
index 2ba8d07..287b275 100644 (file)
@@ -12,8 +12,6 @@
    **/
 
    include("../src/validate.php");
-   include('../functions/strings.php');
-   include('../config/config.php');
    include('../functions/page_header.php');
    include('../functions/imap.php');
    include('../functions/mime.php');
index 5e7f9d0..959ecd3 100644 (file)
@@ -13,6 +13,7 @@
     **  $Id$
     **/
 
+   include('../functions/i18n.php');
    include ('../functions/strings.php');
    include('../config/config.php');
 
index 7c33892..630d585 100644 (file)
@@ -12,9 +12,6 @@
     **/
 
    include('../src/validate.php');
-   include('../functions/i18n.php');
-   include('../functions/strings.php');
-   include('../config/config.php');
    include('../functions/imap.php');
    include('../functions/date.php');
    include('../functions/page_header.php');
index 2c0874f..8071a43 100644 (file)
@@ -3,9 +3,6 @@
    /* $Id$ */
 
    include('../src/validate.php');
-   include('../functions/strings.php');
-   include('../functions/i18n.php');
-   include('../config/config.php');
    include('../functions/page_header.php');
    include('../functions/imap.php');
    include('../functions/imap_search.php');
index a30910d..3dd17fd 100644 (file)
     **/
 
    include('../src/validate.php');
-   include('../functions/strings.php');
    include ('../src/load_prefs.php');
-   include('../config/config.php');
-   include('../functions/i18n.php');
    include ('../functions/prefs.php');
    include ('../functions/plugin.php');
 
index 0594d87..7added4 100644 (file)
    }
 
    session_start();
-   include ("../functions/auth.php");
+   include ('../functions/auth.php');
+   
+   // Everyone needs stuff from config, and config needs stuff from
+   // strings.php, so include them both here.
+   include ('../functions/strings.php');
+   include ('../config/config.php');
+   
    is_logged_in();
 
 
index 6e26623..45242c7 100644 (file)
@@ -13,7 +13,6 @@
     **  $Id$
     **/
 
-   include ('../functions/i18n.php');
    include ('../functions/strings.php');
    include ('../config/config.php');
    include ('../functions/prefs.php');