From bd9c880b180d3db597909c87c7cbf3fadef40be2 Mon Sep 17 00:00:00 2001 From: indiri69 Date: Tue, 10 Sep 2002 22:35:30 +0000 Subject: [PATCH] More SM_PATH changes git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3640 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/addressbook.php | 4 ++-- functions/file_prefs.php | 16 ++++++++-------- functions/imap_general.php | 4 ++-- functions/mime.php | 2 +- functions/plugin.php | 4 ++-- functions/prefs.php | 2 +- functions/smtp.php | 4 ++-- plugins/squirrelspell/modules/check_me.mod | 2 +- plugins/squirrelspell/sqspell_options.php | 6 +++--- src/addressbook.php | 2 +- 10 files changed, 23 insertions(+), 23 deletions(-) diff --git a/functions/addressbook.php b/functions/addressbook.php index f62ccde5..9b98f61b 100644 --- a/functions/addressbook.php +++ b/functions/addressbook.php @@ -37,12 +37,12 @@ global $addrbook_dsn; /* Use this if you wanna have a global address book */ if (isset($address_book_global_filename)) { - include_once('../functions/abook_global_file.php'); + include_once(SM_PATH . 'functions/abook_global_file.php'); } /* Only load database backend if database is configured */ if(isset($addrbook_dsn) && !empty($addrbook_dsn)) { - include_once('../functions/abook_database.php'); + include_once(SM_PATH . 'functions/abook_database.php'); } /* diff --git a/functions/file_prefs.php b/functions/file_prefs.php index 0ae47bac..3e594e62 100644 --- a/functions/file_prefs.php +++ b/functions/file_prefs.php @@ -35,7 +35,7 @@ function cachePrefValues($data_dir, $username) { /* Make sure that the preference file now DOES exist. */ if (!file_exists($filename)) { - include_once( '../functions/display_messages.php' ); + include_once(SM_PATH . 'functions/display_messages.php'); logout_error( sprintf( _("Preference file, %s, does not exist. Log out, and log back in to create a default preference file."), $filename) ); exit; } @@ -43,7 +43,7 @@ function cachePrefValues($data_dir, $username) { /* Open the file, or else display an error to the user. */ if(!$file = @fopen($filename, 'r')) { - include_once( '../functions/display_messages.php' ); + include_once(SM_PATH . 'functions/display_messages.php'); logout_error( sprintf( _("Preference file, %s, could not be opened. Contact your system administrator to resolve this issue."), $filename) ); exit; } @@ -103,7 +103,7 @@ function savePrefValues($data_dir, $username) { /* Open the file for writing, or else display an error to the user. */ if(!$file = @fopen($filename, 'w')) { - include_once( '../functions/display_messages.php' ); + include_once(SM_PATH . 'functions/display_messages.php'); logout_error( sprintf( _("Preference file, %s, could not be opened. Contact your system administrator to resolve this issue."), $filename) ); exit; } @@ -168,7 +168,7 @@ function checkForPrefs($data_dir, $username, $filename = '') { /* If it is not there, check the internal data directory. */ if (!@file_exists($default_pref)) { - $default_pref = '../data/default_pref'; + $default_pref = SM_PATH . 'data/default_pref'; } /* Otherwise, report an error. */ @@ -177,7 +177,7 @@ function checkForPrefs($data_dir, $username, $filename = '') { $errString = $errTitle . "
\n" . _("Default preference file not found!") . "
\n" . _("Please contact your system administrator and report this error.") . "
\n"; - include_once( '../functions/display_messages.php' ); + include_once(SM_PATH . 'functions/display_messages.php' ); logout_error( $errString, $errTitle ); exit; } else if (!@copy($default_pref, $filename)) { @@ -190,7 +190,7 @@ function checkForPrefs($data_dir, $username, $filename = '') { _("Could not create initial preference file!") . "
\n" . sprintf( _("%s should be writable by user %s"), $data_dir, $uid ) . "
\n" . _("Please contact your system administrator and report this error.") . "
\n"; - include_once( '../functions/display_messages.php' ); + include_once(SM_PATH . 'functions/display_messages.php' ); logout_error( $errString, $errTitle ); exit; } @@ -205,7 +205,7 @@ function setSig($data_dir, $username, $number, $value) { /* Open the file for writing, or else display an error to the user. */ if(!$file = @fopen($filename, 'w')) { - include_once( '../functions/display_messages.php' ); + include_once(SM_PATH . '/functions/display_messages.php' ); logout_error( sprintf( _("Signature file, %s, could not be opened. Contact your system administrator to resolve this issue."), $filename) ); exit; } @@ -223,7 +223,7 @@ function getSig($data_dir, $username, $number) { /* Open the file, or else display an error to the user. */ if(!$file = @fopen($filename, 'r')) { - include_once( '../functions/display_messages.php' ); + include_once(SM_PATH . 'functions/display_messages.php'); logout_error( sprintf( _("Signature file, %s, could not be opened. Contact your system administrator to resolve this issue."), $filename) ); exit; } diff --git a/functions/imap_general.php b/functions/imap_general.php index 4e7db9ae..24dd45fc 100755 --- a/functions/imap_general.php +++ b/functions/imap_general.php @@ -234,8 +234,8 @@ function sqimap_login ($username, $password, $imap_server_address, $imap_port, $ */ set_up_language($squirrelmail_language, true); - include_once( '../functions/display_messages.php' ); - logout_error( _("Unknown user or password incorrect.") ); + include_once(SM_PATH . 'functions/display_messages.php' ); + logout_error( _("Unknown user or password incorrect.") ); session_destroy(); exit; } diff --git a/functions/mime.php b/functions/mime.php index 273e6b3e..6e7bbe55 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -33,7 +33,7 @@ function mime_structure ($bodystructure, $flags=array()) { $res = $msg->parseStructure($read); $msg = $res[0]; if (!is_object($msg)) { - include_once( '../functions/display_messages.php' ); + include_once(SM_PATH . 'functions/display_messages.php'); global $color, $mailbox; displayPageHeader( $color, urldecode($mailbox) ); echo "\n\n" . diff --git a/functions/plugin.php b/functions/plugin.php index 9b52a649..3cc3af43 100644 --- a/functions/plugin.php +++ b/functions/plugin.php @@ -18,8 +18,8 @@ $squirrelmail_plugin_hooks = array(); /* This function adds a plugin. */ function use_plugin ($name) { - if (file_exists("../plugins/$name/setup.php")) { - include_once("../plugins/$name/setup.php"); + if (file_exists(SM_PATH . "plugins/$name/setup.php")) { + include_once(SM_PATH . "plugins/$name/setup.php"); $function = "squirrelmail_plugin_init_$name"; if (function_exists($function)) { $function(); diff --git a/functions/prefs.php b/functions/prefs.php index bc534c34..b17e9c5e 100644 --- a/functions/prefs.php +++ b/functions/prefs.php @@ -45,7 +45,7 @@ function getHashedFile($username, $dir, $datafile, $hash_search = true) { $real_hash_dir = getHashedDir($username, $dir, $hash_dirs); /* Set the value of our real data file. */ - $result = "$real_hash_dir/$datafile"; + $result = SM_PATH . "$real_hash_dir/$datafile"; /* Check for this file in the real hash directory. */ if ($hash_search && !@file_exists($result)) { diff --git a/functions/smtp.php b/functions/smtp.php index ad556115..44611dcc 100644 --- a/functions/smtp.php +++ b/functions/smtp.php @@ -787,14 +787,14 @@ function errorCheck($line, $smtpConnection, $verbose = false) { } if ($status == 0) { - include_once('../functions/page_header.php'); + include_once(SM_PATH . 'functions/page_header.php'); if ($compose_new_win == '1') { compose_Header($color, 'None'); } else { displayPageHeader($color, 'None'); } - include_once('../functions/display_messages.php'); + include_once(SM_PATH . 'functions/display_messages.php'); $lines = nl2br(htmlspecialchars($lines)); $msg = $message . "
\nServer replied: $lines"; plain_error_message($msg, $color); diff --git a/plugins/squirrelspell/modules/check_me.mod b/plugins/squirrelspell/modules/check_me.mod index 370241f1..313c0b52 100644 --- a/plugins/squirrelspell/modules/check_me.mod +++ b/plugins/squirrelspell/modules/check_me.mod @@ -90,7 +90,7 @@ $sqspell_command=$SQSPELL_APP[$sqspell_use_app]; * QUITE remote. */ do { - $floc = "$attachment_dir/" . md5($sqspell_new_text . microtime()); + $floc = SM_PATH . "$attachment_dir/" . md5($sqspell_new_text . microtime()); } while (file_exists($floc)); /** * Write the contents to the file. diff --git a/plugins/squirrelspell/sqspell_options.php b/plugins/squirrelspell/sqspell_options.php index dbff9073..54a898f5 100644 --- a/plugins/squirrelspell/sqspell_options.php +++ b/plugins/squirrelspell/sqspell_options.php @@ -30,8 +30,8 @@ require_once(SM_PATH . 'include/validate.php'); require_once(SM_PATH . 'include/load_prefs.php'); require_once(SM_PATH . 'functions/strings.php'); require_once(SM_PATH . 'functions/page_header.php'); -require_once($SQSPELL_DIR . 'sqspell_config.php'); -require_once($SQSPELL_DIR . 'sqspell_functions.php'); +require_once(SM_PATH . $SQSPELL_DIR . 'sqspell_config.php'); +require_once(SM_PATH . $SQSPELL_DIR . 'sqspell_functions.php'); /** * $MOD is the name of the module to invoke. @@ -45,6 +45,6 @@ if (!isset($MOD) || !$MOD){ } /* Load the stuff already. */ -require_once($SQSPELL_DIR . "modules/$MOD.mod"); +require_once(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod"); ?> diff --git a/src/addressbook.php b/src/addressbook.php index 20082452..923f85ec 100644 --- a/src/addressbook.php +++ b/src/addressbook.php @@ -175,7 +175,7 @@ if($REQUEST_METHOD == 'POST') { "\n". '' . _("Update address") . '' ."\n", 'center', $color[0] ) ), - 'center', '', 'width="100%" ' ) . + 'center', '', 'width="100%" ' ); address_form("editaddr", _("Update address"), $olddata); echo '\n" . -- 2.25.1