From d068c0ec5447e8f373ebd536b08ed902c00de0f5 Mon Sep 17 00:00:00 2001 From: gustavf Date: Wed, 1 Mar 2000 08:44:35 +0000 Subject: [PATCH] Added a constat to all files in functions/ to be able to chech whether the file has already been included. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@255 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/array.php | 2 ++ functions/date.php | 23 ++++++++++++++--------- functions/display_messages.php | 2 ++ functions/imap.php | 2 ++ functions/mailbox_display.php | 2 ++ functions/mime.php | 29 +++++++++++++++++++---------- functions/page_header.php | 2 ++ functions/prefs.php | 5 ++++- functions/smtp.php | 1 + functions/strings.php | 2 ++ src/compose.php | 24 ++++++++++++++++-------- src/delete_message.php | 15 ++++++++++----- src/download.php | 18 ++++++++++++------ src/folders.php | 15 ++++++++++----- src/folders_create.php | 15 ++++++++++----- src/folders_delete.php | 15 ++++++++++----- src/folders_rename_do.php | 12 ++++++++---- src/folders_rename_getname.php | 12 ++++++++---- src/left_main.php | 12 ++++++++---- src/login.php | 6 ++++-- src/move_messages.php | 20 +++++++++++++------- src/options.php | 18 ++++++++++++------ src/options_submit.php | 18 ++++++++++++------ src/read_body.php | 18 ++++++++++++------ src/right_main.php | 27 ++++++++++++++++++--------- 25 files changed, 213 insertions(+), 102 deletions(-) diff --git a/functions/array.php b/functions/array.php index adccf776..8432ee6d 100644 --- a/functions/array.php +++ b/functions/array.php @@ -7,6 +7,8 @@ ** **/ + $array_php = true; + function ary_sort($ary,$col, $dir = 1){ // The globals are used because USORT determines what is passed to comp2 // These should be $this->col and $this->dir in a class diff --git a/functions/date.php b/functions/date.php index b4b1a7f8..a3403f95 100644 --- a/functions/date.php +++ b/functions/date.php @@ -9,6 +9,8 @@ ** **/ + $date_php = true; + function getMinutes($hour) { $date = $hour; @@ -196,16 +198,19 @@ ** and everything would be bumped up one. **/ - // Simply check to see if the first element in the dateParts array is an integer or not. + // Simply check to see if the first element in the dateParts + // array is an integer or not. // Since the day of week is optional, this check is needed. // - // The old code used eregi("mon|tue|wed|thu|fri|sat|sun", $dateParts[0], $tmp) - // to find if the first element was the day of week or day of month. This is an - // expensive call (processing time) to have inside a loop. Doing it this way saves - // quite a bit of time for large mailboxes. + // The old code used eregi("mon|tue|wed|thu|fri|sat|sun", + // $dateParts[0], $tmp) to find if the first element was the + // day of week or day of month. This is an expensive call + // (processing time) to have inside a loop. Doing it this way + // saves quite a bit of time for large mailboxes. // - // It is also quicker to call explode only once rather than the 3 times it was getting - // called by calling the functions getHour, getMinute, and getSecond. + // It is also quicker to call explode only once rather than + // the 3 times it was getting called by calling the functions + // getHour, getMinute, and getSecond. // if (intval(trim($dateParts[0])) > 0) { $time = explode(":", $dateParts[3]); @@ -227,8 +232,8 @@ return getGMTSeconds(mktime($d[0], $d[1], $d[2], $d[3], $d[4], $d[5]), $dateParts[5]); } - // I use this function for profiling. Should never be called in actual versions of squirrelmail - // released to public. + // I use this function for profiling. Should never be called in + // actual versions of squirrelmail released to public. function getmicrotime() { $mtime = microtime(); $mtime = explode(" ",$mtime); diff --git a/functions/display_messages.php b/functions/display_messages.php index fdfba0a3..c73dea1a 100644 --- a/functions/display_messages.php +++ b/functions/display_messages.php @@ -7,6 +7,8 @@ ** **/ + $display_messages_php = true; + function error_username_password_incorrect($color) { echo "
"; echo ""; diff --git a/functions/imap.php b/functions/imap.php index 1bf3a248..1ef7ace3 100644 --- a/functions/imap.php +++ b/functions/imap.php @@ -2,6 +2,8 @@ /** This just includes the different sections of the imap functions. ** They have been organized into these sections for simplicity sake. **/ + + $imap_php = true; include ("../functions/imap_mailbox.php"); include ("../functions/imap_messages.php"); diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index ed7e1236..7ec2a6f7 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -8,6 +8,8 @@ ** **/ + $mailbox_info = true; + function printMessageInfo($imapConnection, $t, $i, $from, $subject, $dateString, $answered, $seen, $mailbox, $sort, $startMessage) { require ("../config/config.php"); diff --git a/functions/mime.php b/functions/mime.php index 2ff5d656..8b364a37 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -1,9 +1,12 @@ \n"; diff --git a/src/move_messages.php b/src/move_messages.php index 33967ba4..dbe4b68b 100644 --- a/src/move_messages.php +++ b/src/move_messages.php @@ -1,9 +1,14 @@ -- 2.25.1