From cf1efdce52fce19388a74b85903cbeb7fd5e31ad Mon Sep 17 00:00:00 2001 From: stekkel Date: Fri, 6 Sep 2002 17:12:17 +0000 Subject: [PATCH] SMPATH fix git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3598 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- plugins/administrator/options.php | 16 ++++++++++------ plugins/calendar/calendar.php | 17 ++++++++++------- plugins/calendar/day.php | 18 +++++++++++------- plugins/calendar/event_create.php | 17 ++++++++++------- plugins/calendar/event_delete.php | 17 ++++++++++------- plugins/calendar/event_edit.php | 17 ++++++++++------- 6 files changed, 61 insertions(+), 41 deletions(-) diff --git a/plugins/administrator/options.php b/plugins/administrator/options.php index 3963b972..ed695e0f 100644 --- a/plugins/administrator/options.php +++ b/plugins/administrator/options.php @@ -133,12 +133,16 @@ function parseConfig( $cfg_file ) { /* ---------------------- main -------------------------- */ chdir('..'); -require_once('../src/validate.php'); -require_once('../functions/page_header.php'); -require_once('../functions/imap.php'); -require_once('../src/load_prefs.php'); -require_once('../plugins/administrator/defines.php'); -require_once('../plugins/administrator/auth.php'); +chdir('..'); +define('SM_PATH','../'); + +/* SquirrelMail required files. */ +require_once(SM_PATH . 'include/validate.php'); +require_once(SM_PATH . 'functions/page_header.php'); +require_once(SM_PATH . 'functions/imap.php'); +require_once(SM_PATH . 'src/load_prefs.php'); +require_once(SM_PATH . 'plugins/administrator/defines.php'); +require_once(SM_PATH . 'plugins/administrator/auth.php'); GLOBAL $data_dir, $username; diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php index e4434fe6..31e7ee47 100644 --- a/plugins/calendar/calendar.php +++ b/plugins/calendar/calendar.php @@ -17,13 +17,16 @@ require_once('calendar_data.php'); require_once('functions.php'); chdir('..'); -require_once('../src/validate.php'); -require_once('../functions/strings.php'); -require_once('../functions/date.php'); -require_once('../config/config.php'); -require_once('../functions/page_header.php'); -require_once('../src/load_prefs.php'); -require_once('../functions/html.php'); +define('SM_PATH','../'); + +/* SquirrelMail required files. */ +require_once(SM_PATH . 'include/validate.php'); +require_once(SM_PATH . 'functions/strings.php'); +require_once(SM_PATH . 'functions/date.php'); +require_once(SM_PATH . 'config/config.php'); +require_once(SM_PATH . 'functions/page_header.php'); +require_once(SM_PATH . 'src/load_prefs.php'); +require_once(SM_PATH . 'functions/html.php'); //display upper part of month calendar view function startcalendar() { diff --git a/plugins/calendar/day.php b/plugins/calendar/day.php index 53db266d..feb6489b 100644 --- a/plugins/calendar/day.php +++ b/plugins/calendar/day.php @@ -15,14 +15,18 @@ require_once('calendar_data.php'); require_once('functions.php'); + chdir('..'); -require_once('../src/validate.php'); -require_once('../functions/strings.php'); -require_once('../functions/date.php'); -require_once('../config/config.php'); -require_once('../functions/page_header.php'); -require_once('../src/load_prefs.php'); -require_once('../functions/html.php'); +define('SM_PATH','../'); + +/* SquirrelMail required files. */ +require_once(SM_PATH . 'include/validate.php'); +require_once(SM_PATH . 'functions/strings.php'); +require_once(SM_PATH . 'functions/date.php'); +require_once(SM_PATH . 'config/config.php'); +require_once(SM_PATH . 'functions/page_header.php'); +require_once(SM_PATH . 'src/load_prefs.php'); +require_once(SM_PATH . 'functions/html.php'); //displays head of day calendar view function day_header() { diff --git a/plugins/calendar/event_create.php b/plugins/calendar/event_create.php index 1153a678..96876853 100644 --- a/plugins/calendar/event_create.php +++ b/plugins/calendar/event_create.php @@ -16,13 +16,16 @@ require_once('calendar_data.php'); require_once('functions.php'); chdir('..'); -require_once('../src/validate.php'); -require_once('../functions/strings.php'); -require_once('../functions/date.php'); -require_once('../config/config.php'); -require_once('../functions/page_header.php'); -require_once('../src/load_prefs.php'); -require_once('../functions/html.php'); +define('SM_PATH','../'); + +/* SquirrelMail required files. */ +require_once(SM_PATH . 'include/validate.php'); +require_once(SM_PATH . 'functions/strings.php'); +require_once(SM_PATH . 'functions/date.php'); +require_once(SM_PATH . 'config/config.php'); +require_once(SM_PATH . 'functions/page_header.php'); +require_once(SM_PATH . 'src/load_prefs.php'); +require_once(SM_PATH . 'functions/html.php'); //main form to gather event info function show_event_form() { diff --git a/plugins/calendar/event_delete.php b/plugins/calendar/event_delete.php index 345e1e22..a9ecc725 100644 --- a/plugins/calendar/event_delete.php +++ b/plugins/calendar/event_delete.php @@ -16,13 +16,16 @@ require_once('calendar_data.php'); require_once('functions.php'); chdir('..'); -require_once('../src/validate.php'); -require_once('../functions/strings.php'); -require_once('../functions/date.php'); -require_once('../config/config.php'); -require_once('../functions/page_header.php'); -require_once('../src/load_prefs.php'); -require_once('../functions/html.php'); +define('SM_PATH','../'); + +/* SquirrelMail required files. */ +require_once(SM_PATH . 'include/validate.php'); +require_once(SM_PATH . 'functions/strings.php'); +require_once(SM_PATH . 'functions/date.php'); +require_once(SM_PATH . 'config/config.php'); +require_once(SM_PATH . 'functions/page_header.php'); +require_once(SM_PATH . 'src/load_prefs.php'); +require_once(SM_PATH . 'functions/html.php'); function confirm_deletion() { diff --git a/plugins/calendar/event_edit.php b/plugins/calendar/event_edit.php index 3e5cc9af..f1ce4ce4 100644 --- a/plugins/calendar/event_edit.php +++ b/plugins/calendar/event_edit.php @@ -16,13 +16,16 @@ require_once('calendar_data.php'); require_once('functions.php'); chdir('..'); -require_once('../src/validate.php'); -require_once('../functions/strings.php'); -require_once('../functions/date.php'); -require_once('../config/config.php'); -require_once('../functions/page_header.php'); -require_once('../src/load_prefs.php'); -require_once('../functions/html.php'); +define('SM_PATH','../'); + +/* SquirrelMail required files. */ +require_once(SM_PATH . 'include/validate.php'); +require_once(SM_PATH . 'functions/strings.php'); +require_once(SM_PATH . 'functions/date.php'); +require_once(SM_PATH . 'config/config.php'); +require_once(SM_PATH . 'functions/page_header.php'); +require_once(SM_PATH . 'src/load_prefs.php'); +require_once(SM_PATH . 'functions/html.php'); // update event info function show_event_form() { -- 2.25.1