X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fconstants.php;h=649febf8f1ad4ec409139479b73a4a61758cc112;hb=bb50b50818e1eb3b2ff8f8c49883c1a7f19707e5;hp=8605078d5fe15e64f774685366d6f740e1c8ce63;hpb=355861846a51d35efe50848869d680fd3b4a5316;p=squirrelmail.git diff --git a/functions/constants.php b/functions/constants.php index 8605078d..649febf8 100644 --- a/functions/constants.php +++ b/functions/constants.php @@ -3,7 +3,7 @@ /** * constants.php * - * Copyright (c) 1999-2001 The SquirrelMail Development Team + * Copyright (c) 1999-2004 The SquirrelMail Project Team * Licensed under the GNU GPL. For full terms see the file COPYING. * * Loads constants used by the rest of the Squirrelmail source. @@ -11,59 +11,48 @@ * src/load_prefs.php. * * $Id$ + * @package squirrelmail */ -/*****************************************************************/ -/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!! ***/ -/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION. ***/ -/*** + Base level indent should begin at left margin, as ***/ -/*** the require_once below. ***/ -/*** + All identation should consist of four space blocks ***/ -/*** + Tab characters are evil. ***/ -/*** + all comments should use "slash-star ... star-slash" ***/ -/*** style -- no pound characters, no slash-slash style ***/ -/*** + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD ***/ -/*** ALWAYS USE { AND } CHARACTERS!!! ***/ -/*** + Please use ' instead of ", when possible. Note " ***/ -/*** should always be used in _( ) function calls. ***/ -/*** Thank you for your help making the SM code more readable. ***/ -/*****************************************************************/ - -require_once( '../functions/plugin.php' ); // Required for the hook +/** Need to enable plugin functions for a hook */ +require_once(SM_PATH . 'functions/plugin.php'); /* Required for the hook */ /**************************************************************/ /* Set values for constants used by Squirrelmail preferences. */ /**************************************************************/ - /* Define basic, general purpose preference constants. */ - define('SMPREF_NO', 0); - define('SMPREF_OFF', 0); - define('SMPREF_YES', 1); - define('SMPREF_ON', 1); - define('SMPREF_NONE', 'none'); - - /* Define constants for location based preferences. */ - define('SMPREF_LOC_TOP', 'top'); - define('SMPREF_LOC_BETWEEN', 'between'); - define('SMPREF_LOC_BOTTOM', 'bottom'); - define('SMPREF_LOC_LEFT', ''); - define('SMPREF_LOC_RIGHT', 'right'); - - /* Define preferences for folder settings. */ - define('SMPREF_UNSEEN_NONE', 1); - define('SMPREF_UNSEEN_INBOX', 2); - define('SMPREF_UNSEEN_ALL', 3); - define('SMPREF_UNSEEN_ONLY', 1); - define('SMPREF_UNSEEN_TOTAL', 2); - - /* Define constants for time/date display preferences. */ - define('SMPREF_TIME_24HR', 1); - define('SMPREF_TIME_12HR', 2); - - /* Define constants for javascript preferences. */ - define('SMPREF_JS_OFF', 0); - define('SMPREF_JS_ON', 1); - define('SMPREF_JS_AUTODETECT', 2); +/* Define basic, general purpose preference constants. */ +define('SMPREF_NO', 0); +define('SMPREF_OFF', 0); +define('SMPREF_YES', 1); +define('SMPREF_ON', 1); +define('SMPREF_NONE', 'none'); + +/* Define constants for location based preferences. */ +define('SMPREF_LOC_TOP', 'top'); +define('SMPREF_LOC_BETWEEN', 'between'); +define('SMPREF_LOC_BOTTOM', 'bottom'); +define('SMPREF_LOC_LEFT', ''); +define('SMPREF_LOC_RIGHT', 'right'); + +/* Define preferences for folder settings. */ +define('SMPREF_UNSEEN_NONE', 1); +define('SMPREF_UNSEEN_INBOX', 2); +define('SMPREF_UNSEEN_ALL', 3); +define('SMPREF_UNSEEN_SPECIAL', 4); // Only special folders +define('SMPREF_UNSEEN_NORMAL', 5); // Only normal folders +define('SMPREF_UNSEEN_ONLY', 1); +define('SMPREF_UNSEEN_TOTAL', 2); + +/* Define constants for time/date display preferences. */ +define('SMPREF_TIME_24HR', 1); +define('SMPREF_TIME_12HR', 2); + +/* Define constants for javascript preferences. */ +define('SMPREF_JS_OFF', 0); +define('SMPREF_JS_ON', 1); +define('SMPREF_JS_AUTODETECT', 2); + +do_hook('loading_constants'); - do_hook('loading_constants'); ?>