Per last commit, fix other places using msg message file extension - change to eml
[squirrelmail.git] / include / constants.php
CommitLineData
202bcbcc 1<?php
2
3/**
4 * constants.php
5 *
6 * Loads constants used by the rest of the SquirrelMail source.
202bcbcc 7 *
867fed37 8 * Before 1.5.2 script was stored in functions/constants.php
4b5049de 9 * @copyright &copy; 1999-2007 The SquirrelMail Project Team
202bcbcc 10 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
11 * @version $Id$
12 * @package squirrelmail
13 * @since 1.2.0
14 */
15
16/** @ignore */
17
b37e457f 18/**
19 * SquirrelMail version number -- DO NOT CHANGE
20 * @since 1.5.2
21 */
22define('SM_VERSION', '1.5.2 [SVN]');
23
202bcbcc 24/**************************************************************/
25/* Set values for constants used by SquirrelMail preferences. */
26/**************************************************************/
27
1888b1bf 28/**
29 * Define constants for SquirrelMail debug modes.
30 * Note that these are binary so that modes can be
31 * mixed and matched, and they are also ordered from
32 * minor to severe. When adding new modes, please
33 * order them in a sensical way (MODERATE is the 10th
34 * bit; ADVANCED is the 20th bit).
35 * @since 1.5.2
36 */
37define('SM_DEBUG_MODE_OFF', 0); // complete error suppression
38define('SM_DEBUG_MODE_SIMPLE', 1); // PHP E_ERROR
39define('SM_DEBUG_MODE_MODERATE', 512); // PHP E_ALL
40define('SM_DEBUG_MODE_ADVANCED', 524288); // PHP E_ALL plus log errors intentionally suppressed
41define('SM_DEBUG_MODE_STRICT', 536870912); // PHP E_STRICT
42
202bcbcc 43/**
44 * Define basic, general purpose preference constants.
45 * @since 1.2.0
46 */
47define('SMPREF_NO', 0);
48define('SMPREF_OFF', 0);
49define('SMPREF_YES', 1);
50define('SMPREF_ON', 1);
51define('SMPREF_NONE', 'none');
52
53/**
54 * Define constants for location based preferences.
55 * @since 1.2.0
56 */
57define('SMPREF_LOC_TOP', 'top');
58define('SMPREF_LOC_BETWEEN', 'between');
59define('SMPREF_LOC_BOTTOM', 'bottom');
60define('SMPREF_LOC_LEFT', '');
61define('SMPREF_LOC_RIGHT', 'right');
62
63/**
64 * Define preferences for folder settings.
65 * @since 1.2.0
66 */
67define('SMPREF_UNSEEN_NONE', 1);
68define('SMPREF_UNSEEN_INBOX', 2);
69define('SMPREF_UNSEEN_ALL', 3);
70define('SMPREF_UNSEEN_SPECIAL', 4); // Only special folders (since 1.2.5)
71define('SMPREF_UNSEEN_NORMAL', 5); // Only normal folders (since 1.2.5)
72define('SMPREF_UNSEEN_ONLY', 1);
73define('SMPREF_UNSEEN_TOTAL', 2);
74
d56050e1 75define('SMPREF_MAILBOX_SELECT_LONG', 0);
76define('SMPREF_MAILBOX_SELECT_INDENTED', 1);
77define('SMPREF_MAILBOX_SELECT_DELIMITED', 2);
78
202bcbcc 79/**
80 * Define constants for time/date display preferences.
81 * @since 1.2.0
82 */
83define('SMPREF_TIME_24HR', 1);
84define('SMPREF_TIME_12HR', 2);
85
86/**
87 * Define constants for javascript preferences.
88 * @since 1.2.0
89 */
90define('SMPREF_JS_OFF', 0);
91define('SMPREF_JS_ON', 1);
92define('SMPREF_JS_AUTODETECT', 2);
93
94/**
95 * default value for page_selector_max
96 * @since 1.5.1
97 */
98define('PG_SEL_MAX', 10);
99
100
101/**
102 * The number of pages to cache msg headers
103 * @since 1.5.1
104 */
105define('SQM_MAX_PAGES_IN_CACHE',5);
106
107/**
108 * The number of mailboxes to cache msg headers
109 * @since 1.5.1
110 */
111define('SQM_MAX_MBX_IN_CACHE',3);
112
113/**
114 * Sort constants used for sorting of messages
115 * @since 1.5.1
116 */
117define('SQSORT_NONE',0);
118define('SQSORT_DATE_ASC',1);
119define('SQSORT_DATE_DESC',2);
120define('SQSORT_FROM_ASC',3);
121define('SQSORT_FROM_DESC',4);
122define('SQSORT_SUBJ_ASC',5);
123define('SQSORT_SUBJ_DESC',6);
124define('SQSORT_SIZE_ASC',7);
125define('SQSORT_SIZE_DESC',8);
126define('SQSORT_TO_ASC',9);
127define('SQSORT_TO_DESC',10);
128define('SQSORT_CC_ASC',11);
129define('SQSORT_CC_DESC',12);
130define('SQSORT_INT_DATE_ASC',13);
131define('SQSORT_INT_DATE_DESC',14);
132
133/**
134 * Special sort constant thread which is added to above sort mode.
135 * By doing a bitwise check ($sort & SQSORT_THREAD) we know if the mailbox
136 * is sorted by thread.
137 * @since 1.5.1
138 */
139define('SQSORT_THREAD',32);
140
141/**
142 * Mailbox preference array keys
143 * @since 1.5.1
144 */
145define('MBX_PREF_SORT',0);
146define('MBX_PREF_LIMIT',1);
147define('MBX_PREF_AUTO_EXPUNGE',2);
148define('MBX_PREF_INTERNALDATE',3);
149define('MBX_PREF_COLUMNS',4);
150// define('MBX_PREF_FUTURE',unique integer key);
151
152/**
153 * Email address array keys
154 * @since 1.5.1
155 */
156define('SQM_ADDR_PERSONAL', 0);
157define('SQM_ADDR_ADL', 1);
158define('SQM_ADDR_MAILBOX', 2);
159define('SQM_ADDR_HOST', 3);
160
161/**
162 * Supported columns to show in a messages list
163 * The MBX_PREF_COLUMNS contains an ordered array with these columns
164 * @since 1.5.1
165 */
166define('SQM_COL_CHECK',0);
167define('SQM_COL_FROM',1);
168define('SQM_COL_DATE', 2);
169define('SQM_COL_SUBJ', 3);
170define('SQM_COL_FLAGS', 4);
171define('SQM_COL_SIZE', 5);
172define('SQM_COL_PRIO', 6);
173define('SQM_COL_ATTACHMENT', 7);
174define('SQM_COL_INT_DATE', 8);
175define('SQM_COL_TO', 9);
176define('SQM_COL_CC', 10);
177define('SQM_COL_BCC', 11);
c2b585c5 178
179/**
180 * Generic variable type constants
181 * @since 1.5.2
182 */
183define('SQ_TYPE_INT', 'int');
184define('SQ_TYPE_STRING', 'string');
185define('SQ_TYPE_BOOL', 'bool');
186define('SQ_TYPE_ARRAY', 'array');
187
28294310 188/**
189 * Template engines supported
190 * @since 1.5.2
191 */
192define('SQ_PHP_TEMPLATE', 'PHP_');
193define('SQ_SMARTY_TEMPLATE', 'Smarty_');
194
f258865c 195/**
196 * Used by plugins to indicate an incompatibility with a SM version
197 * @since 1.5.2
198 */
199define('SQ_INCOMPATIBLE', 'INCOMPATIBLE');
200