X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=include%2Fconstants.php;h=7337549c335b6cb6516112967562a7177401561b;hp=e6e20486be22a08c1437ceaacb53333f589b0dd8;hb=66783e5581450bcbd507d8b0d169ea0140f1b220;hpb=6c99d1de81366bceab6c9d6cf12179eedc81f9bc diff --git a/include/constants.php b/include/constants.php index e6e20486..7337549c 100644 --- a/include/constants.php +++ b/include/constants.php @@ -6,7 +6,7 @@ * Loads constants used by the rest of the SquirrelMail source. * * Before 1.5.2 script was stored in functions/constants.php - * @copyright © 1999-2006 The SquirrelMail Project Team + * @copyright © 1999-2009 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail @@ -15,10 +15,37 @@ /** @ignore */ +/** + * SquirrelMail version number -- DO NOT CHANGE + * @since 1.5.2 + */ +define('SM_VERSION', '1.5.2 [SVN]'); + +/** + * Year interval for copyright notices in the interface + * @since 1.5.2 + */ +define('SM_COPYRIGHT', '1999-2009'); + /**************************************************************/ /* Set values for constants used by SquirrelMail preferences. */ /**************************************************************/ +/** + * Define constants for SquirrelMail debug modes. + * Note that these are binary so that modes can be + * mixed and matched, and they are also ordered from + * minor to severe. When adding new modes, please + * order them in a sensical way (MODERATE is the 10th + * bit; ADVANCED is the 20th bit). + * @since 1.5.2 + */ +define('SM_DEBUG_MODE_OFF', 0); // complete error suppression +define('SM_DEBUG_MODE_SIMPLE', 1); // PHP E_ERROR +define('SM_DEBUG_MODE_MODERATE', 512); // PHP E_ALL +define('SM_DEBUG_MODE_ADVANCED', 524288); // PHP E_ALL plus log errors intentionally suppressed +define('SM_DEBUG_MODE_STRICT', 536870912); // PHP E_STRICT + /** * Define basic, general purpose preference constants. * @since 1.2.0 @@ -51,6 +78,10 @@ define('SMPREF_UNSEEN_NORMAL', 5); // Only normal folders (since 1.2.5) define('SMPREF_UNSEEN_ONLY', 1); define('SMPREF_UNSEEN_TOTAL', 2); +define('SMPREF_MAILBOX_SELECT_LONG', 0); +define('SMPREF_MAILBOX_SELECT_INDENTED', 1); +define('SMPREF_MAILBOX_SELECT_DELIMITED', 2); + /** * Define constants for time/date display preferences. * @since 1.2.0 @@ -152,7 +183,109 @@ define('SQM_COL_CC', 10); define('SQM_COL_BCC', 11); /** - * FIXME: error notice on direct load - * @since 1.2.0 + * Address book field list + * @since 1.4.16 and 1.5.2 */ -do_hook('loading_constants'); +define('SM_ABOOK_FIELD_NICKNAME', 0); +define('SM_ABOOK_FIELD_FIRSTNAME', 1); +define('SM_ABOOK_FIELD_LASTNAME', 2); +define('SM_ABOOK_FIELD_EMAIL', 3); +define('SM_ABOOK_FIELD_LABEL', 4); + +/** + * Generic variable type constants + * @since 1.5.2 + */ +define('SQ_TYPE_INT', 'int'); +define('SQ_TYPE_BIGINT', 'bigint'); +define('SQ_TYPE_STRING', 'string'); +define('SQ_TYPE_BOOL', 'bool'); +define('SQ_TYPE_ARRAY', 'array'); + +/** + * Template engines supported + * @since 1.5.2 + */ +define('SQ_PHP_TEMPLATE', 'PHP_'); +define('SQ_SMARTY_TEMPLATE', 'Smarty_'); + +/** + * Used by plugins to indicate an incompatibility with a SM version + * @since 1.5.2 + */ +define('SQ_INCOMPATIBLE', 'INCOMPATIBLE'); + +/** + * Define constants used in the options code + */ + +// Define constants for the various option types +define('SMOPT_TYPE_STRING', 0); +define('SMOPT_TYPE_STRLIST', 1); +define('SMOPT_TYPE_TEXTAREA', 2); +define('SMOPT_TYPE_INTEGER', 3); +define('SMOPT_TYPE_FLOAT', 4); +define('SMOPT_TYPE_BOOLEAN', 5); +define('SMOPT_TYPE_HIDDEN', 6); +define('SMOPT_TYPE_COMMENT', 7); +define('SMOPT_TYPE_FLDRLIST', 8); +define('SMOPT_TYPE_FLDRLIST_MULTI', 9); +define('SMOPT_TYPE_EDIT_LIST', 10); +define('SMOPT_TYPE_STRLIST_MULTI', 11); +define('SMOPT_TYPE_BOOLEAN_CHECKBOX', 12); +define('SMOPT_TYPE_BOOLEAN_RADIO', 13); +define('SMOPT_TYPE_STRLIST_RADIO', 14); +define('SMOPT_TYPE_SUBMIT', 15); +define('SMOPT_TYPE_INFO', 16); +define('SMOPT_TYPE_PASSWORD', 17); + +// Define constants for the layout scheme for edit lists +define('SMOPT_EDIT_LIST_LAYOUT_LIST', 0); +define('SMOPT_EDIT_LIST_LAYOUT_SELECT', 1); + +// Define constants for the options refresh levels +define('SMOPT_REFRESH_NONE', 0); +define('SMOPT_REFRESH_FOLDERLIST', 1); +define('SMOPT_REFRESH_ALL', 2); + +// Define constants for the options size +define('SMOPT_SIZE_TINY', 0); +define('SMOPT_SIZE_SMALL', 1); +define('SMOPT_SIZE_MEDIUM', 2); +define('SMOPT_SIZE_LARGE', 3); +define('SMOPT_SIZE_HUGE', 4); +define('SMOPT_SIZE_NORMAL', 5); + +// Define miscellaneous options constants +define('SMOPT_SAVE_DEFAULT', 'save_option'); +define('SMOPT_SAVE_NOOP', 'save_option_noop'); + +// Convenience array of values 'a' through 'z' +$a_to_z = array( + 'a' => 'a', + 'b' => 'b', + 'c' => 'c', + 'd' => 'd', + 'e' => 'e', + 'f' => 'f', + 'g' => 'g', + 'h' => 'h', + 'i' => 'i', + 'j' => 'j', + 'k' => 'k', + 'l' => 'l', + 'm' => 'm', + 'n' => 'n', + 'o' => 'o', + 'p' => 'p', + 'q' => 'q', + 'r' => 'r', + 's' => 's', + 't' => 't', + 'u' => 'u', + 'v' => 'v', + 'w' => 'w', + 'x' => 'x', + 'y' => 'y', + 'z' => 'z', + );