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 0e2a44aa421c83bed06383cc2c56cbaab2d19cca..f62ccde50fdc0f752c2968d05edf02a7d4864ea2 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 10342589d8e6216bc0b965148ef9c9112d1b4625..a6ac0909de3afc8db4c29dabc4213052ac48a98c 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 706616fc274137b756547f9e3be687a629bf87c6..f38deda1bd2006eb0e769ec6bffbca62eec7949c 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 2742d90cc395a8c0571b978c86e4454b39d4a64f..a8a5ba3a77a26e537600c0004a361be45e2fdfa8 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 7bcb56767aee9a538e1c0d451bf800e9a014b87e..4bd9ce285955514475b80870fcc2072fc1df7f58 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 2b4b9e9dd8ee77e671867292940177134abf33fc..4e7db9ae0059ca08aff4839c2bd1ab3c07a18fbc 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 aed2c4328fa4beccbc7e29f0e220fc72ce5a0b5d..40b281a2f10ac11e0aaa1eb7063a5f0c4d853ad9 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 463d69089485857e47a8c0f2d2b4690d017247d0..d7b1924b46ceacdd9c11b85f7e433f5d73124c4f 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 1a3b14c033b6325ec8571528e1b08cc4010ca3c1..b33fd32d32d688d663b700a99071d6ce4707d329 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 d2e88463ce6da95afb4fcdd2fa908fca19838fd4..273e6b3ec0346bada7523e32a3b6df0467a64b66 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 3626507ab0cb663e719078f77c79eaad96a85281..e48bf2a0a8e26b65f99a3d9255f1a34a12567575 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 2d9083fbed8fdd89f7cb220df1e1cc033b391580..159fb154982e44b059350419189541fcb7fcad83 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 047e1de68d3cbad607e9053553ace507afee0e1a..bc534c346e55e33e1200c48d8e34e879e0ee63fe 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 c57936c4500137e5d3cd8b0464afcba5832f976f..ad55611525c867802d4e5a7c4cf2504e17894fbb 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 2a0b9bbdd524a30d3dd8be71eb0c39f6b24971f9..3557f594bb9ee10140bfed2e2fa3fae1ddfe31e9 100644 (file)
@@ -12,7 +12,7 @@
  * $Id$
  */
 
-require_once('../functions/imap.php');
+require_once(SM_PATH . 'functions/imap.php');
 
 /**
  * findParentForChild