Converted all files in functions/ to use SM_PATH. This will break all
authorthomppj <thomppj@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 6 Sep 2002 00:31:43 +0000 (00:31 +0000)
committerthomppj <thomppj@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 6 Sep 2002 00:31:43 +0000 (00:31 +0000)
plugins. Each callable script needs a:

  define('SM_PATH', '../../');

Or something like that put at the top.

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

15 files changed:
functions/addressbook.php
functions/constants.php
functions/date.php
functions/db_prefs.php
functions/imap.php
functions/imap_general.php
functions/imap_mailbox.php
functions/imap_search.php
functions/mailbox_display.php
functions/mime.php
functions/page_header.php
functions/plugin.php
functions/prefs.php
functions/smtp.php
functions/tree.php

index 0e2a44a..f62ccde 100644 (file)
@@ -30,8 +30,8 @@
   Include backends here.
 */
 
-require_once('../functions/abook_local_file.php');
-require_once('../functions/abook_ldap_server.php');
+require_once(SM_PATH . 'functions/abook_local_file.php');
+require_once(SM_PATH . 'functions/abook_ldap_server.php');
 
 global $addrbook_dsn;
 
index 1034258..a6ac090 100644 (file)
@@ -13,7 +13,7 @@
  * $Id$
  */
 
-require_once('../functions/plugin.php');      // Required for the hook
+require_once(SM_PATH . 'functions/plugin.php');  /* Required for the hook */
 
 /**************************************************************/
 /* Set values for constants used by Squirrelmail preferences. */
index 706616f..f38deda 100644 (file)
@@ -14,7 +14,7 @@
  * $Id$
  */
 
-require_once( '../functions/constants.php' );
+require_once(SM_PATH . 'functions/constants.php');
 
 /* corrects a time stamp to be the local time */
 function getGMTSeconds($stamp, $gmt) {
index 2742d90..a8a5ba3 100644 (file)
@@ -33,7 +33,7 @@ define('SMDB_MYSQL', 1);
 define('SMDB_PGSQL', 2);
 
 require_once('DB.php');
-require_once('../config/config.php');
+require_once(SM_PATH . 'config/config.php');
 
 global $prefs_are_cached, $prefs_cache;
 
index 7bcb567..4bd9ce2 100644 (file)
  * $Id$
  */
 
-require_once('../functions/imap_mailbox.php');
-require_once('../functions/imap_messages.php');
-require_once('../functions/imap_general.php');
-require_once('../functions/imap_search.php');
-require_once('../functions/imap_parse.php');
+require_once(SM_PATH . 'functions/imap_mailbox.php');
+require_once(SM_PATH . 'functions/imap_messages.php');
+require_once(SM_PATH . 'functions/imap_general.php');
+require_once(SM_PATH . 'functions/imap_search.php');
+require_once(SM_PATH . 'functions/imap_parse.php');
+
 ?>
index 2b4b9e9..4e7db9a 100755 (executable)
@@ -11,7 +11,7 @@
  * $Id$
  */
 
-require_once('../functions/page_header.php');
+require_once(SM_PATH . 'functions/page_header.php');
 
 global $sqimap_session_id;
 $sqimap_session_id = 1;
index aed2c43..40b281a 100755 (executable)
@@ -10,8 +10,8 @@
  *
  * $Id$
  */
-require_once('../functions/imap_utf7_encode_local.php');
-require_once('../functions/imap_utf7_decode_local.php');
+require_once(SM_PATH . 'functions/imap_utf7_encode_local.php');
+require_once(SM_PATH . 'functions/imap_utf7_decode_local.php');
 global $boxesnew;
 
 class mailboxes {
@@ -461,8 +461,8 @@ function sqimap_mailbox_list($imap_stream) {
         $inbox_in_list = false;
         $inbox_subscribed = false;
 
-        require_once('../src/load_prefs.php');
-        require_once('../functions/array.php');
+        require_once(SM_PATH . 'src/load_prefs.php');
+        require_once(SM_PATH . 'functions/array.php');
 
     if ($noselect_fix_enable) {
         $lsub_args = "LSUB \"$folder_prefix\" \"*%\"";
@@ -615,7 +615,7 @@ function sqimap_mailbox_list($imap_stream) {
 function sqimap_mailbox_list_all($imap_stream) {
     global $list_special_folders_first, $folder_prefix, $delimiter;
 
-    require_once('../functions/array.php');
+    require_once(SM_PATH . 'functions/array.php');
 
     $ssid = sqimap_session_id();
     $lsid = strlen( $ssid );
@@ -711,8 +711,8 @@ function sqimap_mailbox_tree($imap_stream) {
         $inbox_in_list = false;
         $inbox_subscribed = false;
 
-        require_once('../src/load_prefs.php');
-        require_once('../functions/array.php');
+        require_once(SM_PATH . 'src/load_prefs.php');
+        require_once(SM_PATH . 'functions/array.php');
 
         /* LSUB array */
         $lsub_ary = sqimap_run_command ($imap_stream, "LSUB \"$folder_prefix\" \"*\"",
index 463d690..d7b1924 100644 (file)
  * $Id$
  */
 
-require_once('../functions/imap.php');
-require_once('../functions/date.php');
-require_once('../functions/array.php');
-require_once('../functions/mailbox_display.php');
-require_once('../functions/mime.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/date.php');
+require_once(SM_PATH . 'functions/array.php');
+require_once(SM_PATH . 'functions/mailbox_display.php');
+require_once(SM_PATH . 'functions/mime.php');
 
 function sqimap_search($imapConnection, $search_where, $search_what, $mailbox,
                        $color, $search_position = '', $search_all, $count_all) {
index 1a3b14c..b33fd32 100644 (file)
  * $Id$
  */
 
-require_once('../functions/strings.php');
-require_once('../functions/html.php');
-require_once('../class/html.class.php');
-require_once('../functions/imap_mailbox.php');
+require_once(SM_PATH . 'functions/strings.php');
+require_once(SM_PATH . 'functions/html.php');
+require_once(SM_PATH . 'class/html.class.php');
+require_once(SM_PATH . 'functions/imap_mailbox.php');
 
 /* Default value for page_selector_max. */
 define('PG_SEL_MAX', 10);
index d2e8846..273e6b3 100644 (file)
@@ -12,8 +12,8 @@
  * $Id$
  */
 
-require_once('../functions/imap.php');
-require_once('../functions/attachment_common.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'functions/attachment_common.php');
 
 /* --------------------------------------------------------------------------------- */
 /* MIME DECODING                                                                     */
@@ -268,7 +268,7 @@ function translateText(&$body, $wrap_at, $charset) {
     global $where, $what;   /* from searching */
     global $color;          /* color theme */
 
-    require_once('../functions/url_parser.php');
+    require_once(SM_PATH . 'functions/url_parser.php');
 
     $body_ary = explode("\n", $body);
     for ($i=0; $i < count($body_ary); $i++) {
index 3626507..e48bf2a 100644 (file)
  * $Id$
  */
 
-require_once('../functions/strings.php');
-//require_once('../functions/imap_utf7_decode_local.php');
-require_once('../functions/html.php');
-require_once('../functions/imap_mailbox.php');
+require_once(SM_PATH . 'functions/strings.php');
+require_once(SM_PATH . 'functions/html.php');
+require_once(SM_PATH . 'functions/imap_mailbox.php');
+
 /* Always set up the language before calling these functions */
 function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE ) {
 
index 2d9083f..159fb15 100644 (file)
@@ -89,10 +89,10 @@ if (isset($plugins) && is_array($plugins)) {
 
         global $HTTP_USER_AGENT, $SQSPELL_SOUP_NAZI;
         
-        require_once('../plugins/squirrelspell/sqspell_config.php');
+        require_once(SM_PATH . 'plugins/squirrelspell/sqspell_config.php');
 
         $soup_menu = explode( ',', $SQSPELL_SOUP_NAZI );
         return( in_array( trim( $HTTP_USER_AGENT ), $soup_menu ) );
     }
 
-?>
\ No newline at end of file
+?>
index 047e1de..bc534c3 100644 (file)
@@ -23,9 +23,9 @@ if ( !session_is_registered('prefs_are_cached') ||
 }
 
 if (isset($prefs_dsn) && !empty($prefs_dsn)) {
-    require_once('../functions/db_prefs.php');
+    require_once(SM_PATH . 'functions/db_prefs.php');
 } else {
-    require_once('../functions/file_prefs.php');
+    require_once(SM_PATH . 'functions/file_prefs.php');
 }
 
 /* Hashing functions */
index c57936c..ad55611 100644 (file)
@@ -12,9 +12,9 @@
  * $Id$
  */
 
-require_once('../functions/addressbook.php');
-require_once('../functions/plugin.php');
-require_once('../functions/prefs.php');
+require_once(SM_PATH . 'functions/addressbook.php');
+require_once(SM_PATH . 'functions/plugin.php');
+require_once(SM_PATH . 'functions/prefs.php');
 
 global $username, $popuser, $domain;
 
index 2a0b9bb..3557f59 100644 (file)
@@ -12,7 +12,7 @@
  * $Id$
  */
 
-require_once('../functions/imap.php');
+require_once(SM_PATH . 'functions/imap.php');
 
 /**
  * findParentForChild