author | Dan |
Wed, 06 Jan 2010 02:02:51 -0500 | |
changeset 1206 | 50f6c144ec68 |
parent 1101 | 30d8bb88572d |
child 1227 | bdac73ed481e |
permissions | -rw-r--r-- |
1 | 1 |
<?php |
2 |
||
3 |
/* |
|
4 |
* Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between |
|
1081
745200a9cc2a
Fixed some upgrade bugs; added support for choosing one's own date/time formats; rebrand as 1.1.7
Dan
parents:
1027
diff
changeset
|
5 |
* Copyright (C) 2006-2009 Dan Fuhry |
1 | 6 |
* constants.php - important defines used Enano-wide |
7 |
* |
|
8 |
* This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License |
|
9 |
* as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
|
10 |
* |
|
11 |
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied |
|
12 |
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. |
|
13 |
*/ |
|
14 |
||
15 |
// Ban types |
|
16 |
define('BAN_IP', 1); |
|
17 |
define('BAN_USER', 2); |
|
18 |
define('BAN_EMAIL', 3); |
|
19 |
||
20 |
// ACL permission types |
|
21 |
define('AUTH_ALLOW', 4); |
|
22 |
define('AUTH_WIKIMODE', 3); // User can do this if wiki mode is enabled |
|
23 |
define('AUTH_DISALLOW', 2); |
|
24 |
define('AUTH_DENY', 1); // A Deny setting overrides *everything* |
|
25 |
||
26 |
define('ACL_TYPE_GROUP', 1); |
|
27 |
define('ACL_TYPE_USER', 2); |
|
28 |
define('ACL_TYPE_PRESET', 3); |
|
29 |
||
554
e87390b1f9b0
Revamped some ACL code and added effective permissions calculation code into session manager
Dan
parents:
541
diff
changeset
|
30 |
// ACL inheritance debugging info |
556
63e131c38876
More work done on effective permissions API, namely reporting of page group and usergroup names
Dan
parents:
554
diff
changeset
|
31 |
define('ACL_INHERIT_ENANO_DEFAULT', 10); |
554
e87390b1f9b0
Revamped some ACL code and added effective permissions calculation code into session manager
Dan
parents:
541
diff
changeset
|
32 |
define('ACL_INHERIT_GLOBAL_EVERYONE', 9); |
e87390b1f9b0
Revamped some ACL code and added effective permissions calculation code into session manager
Dan
parents:
541
diff
changeset
|
33 |
define('ACL_INHERIT_GLOBAL_GROUP', 8); |
e87390b1f9b0
Revamped some ACL code and added effective permissions calculation code into session manager
Dan
parents:
541
diff
changeset
|
34 |
define('ACL_INHERIT_GLOBAL_USER', 7); |
e87390b1f9b0
Revamped some ACL code and added effective permissions calculation code into session manager
Dan
parents:
541
diff
changeset
|
35 |
define('ACL_INHERIT_PG_EVERYONE', 6); |
e87390b1f9b0
Revamped some ACL code and added effective permissions calculation code into session manager
Dan
parents:
541
diff
changeset
|
36 |
define('ACL_INHERIT_PG_GROUP', 5); |
e87390b1f9b0
Revamped some ACL code and added effective permissions calculation code into session manager
Dan
parents:
541
diff
changeset
|
37 |
define('ACL_INHERIT_PG_USER', 4); |
e87390b1f9b0
Revamped some ACL code and added effective permissions calculation code into session manager
Dan
parents:
541
diff
changeset
|
38 |
define('ACL_INHERIT_LOCAL_EVERYONE', 3); |
e87390b1f9b0
Revamped some ACL code and added effective permissions calculation code into session manager
Dan
parents:
541
diff
changeset
|
39 |
define('ACL_INHERIT_LOCAL_GROUP', 2); |
e87390b1f9b0
Revamped some ACL code and added effective permissions calculation code into session manager
Dan
parents:
541
diff
changeset
|
40 |
define('ACL_INHERIT_LOCAL_USER', 1); |
e87390b1f9b0
Revamped some ACL code and added effective permissions calculation code into session manager
Dan
parents:
541
diff
changeset
|
41 |
|
513 | 42 |
// ACL color scale minimal shade for red and green ends |
43 |
// The lower, the more saturated the color on the scale. |
|
44 |
// Purely cosmetic. 0x0 - 0xFF, 0xFF will basically disable the scale |
|
45 |
define('ACL_SCALE_MINIMAL_SHADE', 0xA8); |
|
46 |
||
511
f88c8c79d784
Made some improvements to ACL system including: warning on setting Deny for Everyone on the entire site, added ACL_ALWAYS_ALLOW_ADMIN_EDIT_ACL, and changed behavior as noted in the docs so that Deny for Everyone is no longer able to be overridden
Dan
parents:
507
diff
changeset
|
47 |
// ACL switch |
f88c8c79d784
Made some improvements to ACL system including: warning on setting Deny for Everyone on the entire site, added ACL_ALWAYS_ALLOW_ADMIN_EDIT_ACL, and changed behavior as noted in the docs so that Deny for Everyone is no longer able to be overridden
Dan
parents:
507
diff
changeset
|
48 |
// If this is defined, administrators can edit ACLs regardless of current |
f88c8c79d784
Made some improvements to ACL system including: warning on setting Deny for Everyone on the entire site, added ACL_ALWAYS_ALLOW_ADMIN_EDIT_ACL, and changed behavior as noted in the docs so that Deny for Everyone is no longer able to be overridden
Dan
parents:
507
diff
changeset
|
49 |
// permissions. This is enabled by default. |
f88c8c79d784
Made some improvements to ACL system including: warning on setting Deny for Everyone on the entire site, added ACL_ALWAYS_ALLOW_ADMIN_EDIT_ACL, and changed behavior as noted in the docs so that Deny for Everyone is no longer able to be overridden
Dan
parents:
507
diff
changeset
|
50 |
define('ACL_ALWAYS_ALLOW_ADMIN_EDIT_ACL', 1); |
f88c8c79d784
Made some improvements to ACL system including: warning on setting Deny for Everyone on the entire site, added ACL_ALWAYS_ALLOW_ADMIN_EDIT_ACL, and changed behavior as noted in the docs so that Deny for Everyone is no longer able to be overridden
Dan
parents:
507
diff
changeset
|
51 |
|
1 | 52 |
// System groups |
541
acb7e23b6ffa
Massive commit with various changes. Added user ranks system (no admin interface yet) and ability for users to have custom user titles. Made cron framework accept fractions of hours through floating-point intervals. Modifed ACL editor to use miniPrompt framework for close confirmation box. Made avatar system use a special page as opposed to fetching the files directly for caching reasons.
Dan
parents:
536
diff
changeset
|
53 |
define('GROUP_ID_EVERYONE', 1); |
1 | 54 |
define('GROUP_ID_ADMIN', 2); |
55 |
define('GROUP_ID_MOD', 3); |
|
56 |
||
541
acb7e23b6ffa
Massive commit with various changes. Added user ranks system (no admin interface yet) and ability for users to have custom user titles. Made cron framework accept fractions of hours through floating-point intervals. Modifed ACL editor to use miniPrompt framework for close confirmation box. Made avatar system use a special page as opposed to fetching the files directly for caching reasons.
Dan
parents:
536
diff
changeset
|
57 |
// System ranks |
acb7e23b6ffa
Massive commit with various changes. Added user ranks system (no admin interface yet) and ability for users to have custom user titles. Made cron framework accept fractions of hours through floating-point intervals. Modifed ACL editor to use miniPrompt framework for close confirmation box. Made avatar system use a special page as opposed to fetching the files directly for caching reasons.
Dan
parents:
536
diff
changeset
|
58 |
define('RANK_ID_MEMBER', 1); |
acb7e23b6ffa
Massive commit with various changes. Added user ranks system (no admin interface yet) and ability for users to have custom user titles. Made cron framework accept fractions of hours through floating-point intervals. Modifed ACL editor to use miniPrompt framework for close confirmation box. Made avatar system use a special page as opposed to fetching the files directly for caching reasons.
Dan
parents:
536
diff
changeset
|
59 |
define('RANK_ID_MOD', 2); |
acb7e23b6ffa
Massive commit with various changes. Added user ranks system (no admin interface yet) and ability for users to have custom user titles. Made cron framework accept fractions of hours through floating-point intervals. Modifed ACL editor to use miniPrompt framework for close confirmation box. Made avatar system use a special page as opposed to fetching the files directly for caching reasons.
Dan
parents:
536
diff
changeset
|
60 |
define('RANK_ID_ADMIN', 3); |
acb7e23b6ffa
Massive commit with various changes. Added user ranks system (no admin interface yet) and ability for users to have custom user titles. Made cron framework accept fractions of hours through floating-point intervals. Modifed ACL editor to use miniPrompt framework for close confirmation box. Made avatar system use a special page as opposed to fetching the files directly for caching reasons.
Dan
parents:
536
diff
changeset
|
61 |
define('RANK_ID_GUEST', 4); |
acb7e23b6ffa
Massive commit with various changes. Added user ranks system (no admin interface yet) and ability for users to have custom user titles. Made cron framework accept fractions of hours through floating-point intervals. Modifed ACL editor to use miniPrompt framework for close confirmation box. Made avatar system use a special page as opposed to fetching the files directly for caching reasons.
Dan
parents:
536
diff
changeset
|
62 |
|
73
0a74676a2f2f
Made the move to Loch Ness, and got some basic page grouping functionality working. TODO: fix some UI issues in Javascript ACL editor and change non-JS ACL editor to work with page groups too
Dan
parents:
21
diff
changeset
|
63 |
// Page group types |
0a74676a2f2f
Made the move to Loch Ness, and got some basic page grouping functionality working. TODO: fix some UI issues in Javascript ACL editor and change non-JS ACL editor to work with page groups too
Dan
parents:
21
diff
changeset
|
64 |
define('PAGE_GRP_CATLINK', 1); |
0a74676a2f2f
Made the move to Loch Ness, and got some basic page grouping functionality working. TODO: fix some UI issues in Javascript ACL editor and change non-JS ACL editor to work with page groups too
Dan
parents:
21
diff
changeset
|
65 |
define('PAGE_GRP_TAGGED', 2); |
0a74676a2f2f
Made the move to Loch Ness, and got some basic page grouping functionality working. TODO: fix some UI issues in Javascript ACL editor and change non-JS ACL editor to work with page groups too
Dan
parents:
21
diff
changeset
|
66 |
define('PAGE_GRP_NORMAL', 3); |
156
edbff85d43e8
Feature add: new page group type: regular expression match (PCRE)
Dan
parents:
142
diff
changeset
|
67 |
define('PAGE_GRP_REGEX', 4); |
73
0a74676a2f2f
Made the move to Loch Ness, and got some basic page grouping functionality working. TODO: fix some UI issues in Javascript ACL editor and change non-JS ACL editor to work with page groups too
Dan
parents:
21
diff
changeset
|
68 |
|
825
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
parents:
801
diff
changeset
|
69 |
// Comment types |
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
parents:
801
diff
changeset
|
70 |
define('COMMENT_APPROVED', 1); |
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
parents:
801
diff
changeset
|
71 |
define('COMMENT_UNAPPROVED', 0); |
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
parents:
801
diff
changeset
|
72 |
define('COMMENT_SPAM', 2); |
9d5c04c1414f
Added (very basic) spam filtering plugin support. Plugins can mark a message as spam by hooking into the spam check API, which is documented in functions.php. No spam checking functionality is built-in.
Dan
parents:
801
diff
changeset
|
73 |
|
688
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
parents:
685
diff
changeset
|
74 |
// Session key types |
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
parents:
685
diff
changeset
|
75 |
// Short keys last for getConfig('session_short_time', '720'); in minutes and auto-renew. |
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
parents:
685
diff
changeset
|
76 |
// Long keys last for getConfig('session_remember_time', '30'); in days and do NOT auto-renew. |
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
parents:
685
diff
changeset
|
77 |
// Elevated keys have a hard-coded 15-minute limit for security reasons and because |
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
parents:
685
diff
changeset
|
78 |
// that's how Enano's done it since before beta 1. |
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
parents:
685
diff
changeset
|
79 |
define('SK_SHORT', 0); |
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
parents:
685
diff
changeset
|
80 |
define('SK_LONG', 1); |
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
parents:
685
diff
changeset
|
81 |
define('SK_ELEV', 2); |
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
parents:
685
diff
changeset
|
82 |
|
511
f88c8c79d784
Made some improvements to ACL system including: warning on setting Deny for Everyone on the entire site, added ACL_ALWAYS_ALLOW_ADMIN_EDIT_ACL, and changed behavior as noted in the docs so that Deny for Everyone is no longer able to be overridden
Dan
parents:
507
diff
changeset
|
83 |
// Identifier for the default pseudo-language |
205 | 84 |
define('LANG_DEFAULT', 0); |
85 |
||
541
acb7e23b6ffa
Massive commit with various changes. Added user ranks system (no admin interface yet) and ability for users to have custom user titles. Made cron framework accept fractions of hours through floating-point intervals. Modifed ACL editor to use miniPrompt framework for close confirmation box. Made avatar system use a special page as opposed to fetching the files directly for caching reasons.
Dan
parents:
536
diff
changeset
|
86 |
// Image types |
acb7e23b6ffa
Massive commit with various changes. Added user ranks system (no admin interface yet) and ability for users to have custom user titles. Made cron framework accept fractions of hours through floating-point intervals. Modifed ACL editor to use miniPrompt framework for close confirmation box. Made avatar system use a special page as opposed to fetching the files directly for caching reasons.
Dan
parents:
536
diff
changeset
|
87 |
define('IMAGE_TYPE_PNG', 1); |
acb7e23b6ffa
Massive commit with various changes. Added user ranks system (no admin interface yet) and ability for users to have custom user titles. Made cron framework accept fractions of hours through floating-point intervals. Modifed ACL editor to use miniPrompt framework for close confirmation box. Made avatar system use a special page as opposed to fetching the files directly for caching reasons.
Dan
parents:
536
diff
changeset
|
88 |
define('IMAGE_TYPE_GIF', 2); |
acb7e23b6ffa
Massive commit with various changes. Added user ranks system (no admin interface yet) and ability for users to have custom user titles. Made cron framework accept fractions of hours through floating-point intervals. Modifed ACL editor to use miniPrompt framework for close confirmation box. Made avatar system use a special page as opposed to fetching the files directly for caching reasons.
Dan
parents:
536
diff
changeset
|
89 |
define('IMAGE_TYPE_JPG', 3); |
621
68f8a9cc0a18
Added Gravatar support! And it's really configurable too.
Dan
parents:
592
diff
changeset
|
90 |
define('IMAGE_TYPE_GRV', 4); |
541
acb7e23b6ffa
Massive commit with various changes. Added user ranks system (no admin interface yet) and ability for users to have custom user titles. Made cron framework accept fractions of hours through floating-point intervals. Modifed ACL editor to use miniPrompt framework for close confirmation box. Made avatar system use a special page as opposed to fetching the files directly for caching reasons.
Dan
parents:
536
diff
changeset
|
91 |
|
592 | 92 |
// token types |
93 |
define('TOKEN_VARIABLE', 1); |
|
94 |
define('TOKEN_BOOLOP', 2); |
|
95 |
define('TOKEN_PARENTHLEFT', 3); |
|
96 |
define('TOKEN_PARENTHRIGHT', 4); |
|
97 |
define('TOKEN_NOT', 5); |
|
98 |
||
711
f70d764aab33
Added initial support for DST. Rules are defined in constants.php and are extensible.
Dan
parents:
692
diff
changeset
|
99 |
// DST constants |
f70d764aab33
Added initial support for DST. Rules are defined in constants.php and are extensible.
Dan
parents:
692
diff
changeset
|
100 |
define('FIRST_SUNDAY', 1); |
f70d764aab33
Added initial support for DST. Rules are defined in constants.php and are extensible.
Dan
parents:
692
diff
changeset
|
101 |
define('SECOND_SUNDAY', 2); |
f70d764aab33
Added initial support for DST. Rules are defined in constants.php and are extensible.
Dan
parents:
692
diff
changeset
|
102 |
define('THIRD_SUNDAY', 3); |
f70d764aab33
Added initial support for DST. Rules are defined in constants.php and are extensible.
Dan
parents:
692
diff
changeset
|
103 |
define('LAST_SUNDAY', 4); |
f70d764aab33
Added initial support for DST. Rules are defined in constants.php and are extensible.
Dan
parents:
692
diff
changeset
|
104 |
|
1081
745200a9cc2a
Fixed some upgrade bugs; added support for choosing one's own date/time formats; rebrand as 1.1.7
Dan
parents:
1027
diff
changeset
|
105 |
// Date types |
745200a9cc2a
Fixed some upgrade bugs; added support for choosing one's own date/time formats; rebrand as 1.1.7
Dan
parents:
1027
diff
changeset
|
106 |
define('DATE_1', 'y/m/d'); |
745200a9cc2a
Fixed some upgrade bugs; added support for choosing one's own date/time formats; rebrand as 1.1.7
Dan
parents:
1027
diff
changeset
|
107 |
define('DATE_2', 'y/d/m'); |
745200a9cc2a
Fixed some upgrade bugs; added support for choosing one's own date/time formats; rebrand as 1.1.7
Dan
parents:
1027
diff
changeset
|
108 |
define('DATE_3', 'Y-m-d'); |
745200a9cc2a
Fixed some upgrade bugs; added support for choosing one's own date/time formats; rebrand as 1.1.7
Dan
parents:
1027
diff
changeset
|
109 |
define('DATE_4', 'F d, Y'); |
745200a9cc2a
Fixed some upgrade bugs; added support for choosing one's own date/time formats; rebrand as 1.1.7
Dan
parents:
1027
diff
changeset
|
110 |
// 12 hour, no seconds |
745200a9cc2a
Fixed some upgrade bugs; added support for choosing one's own date/time formats; rebrand as 1.1.7
Dan
parents:
1027
diff
changeset
|
111 |
define('TIME_12_NS', 'g:i A'); |
745200a9cc2a
Fixed some upgrade bugs; added support for choosing one's own date/time formats; rebrand as 1.1.7
Dan
parents:
1027
diff
changeset
|
112 |
// 12 hour, seconds |
745200a9cc2a
Fixed some upgrade bugs; added support for choosing one's own date/time formats; rebrand as 1.1.7
Dan
parents:
1027
diff
changeset
|
113 |
define('TIME_12_S', 'g:i:s A'); |
745200a9cc2a
Fixed some upgrade bugs; added support for choosing one's own date/time formats; rebrand as 1.1.7
Dan
parents:
1027
diff
changeset
|
114 |
// 24 hour, no seconds |
745200a9cc2a
Fixed some upgrade bugs; added support for choosing one's own date/time formats; rebrand as 1.1.7
Dan
parents:
1027
diff
changeset
|
115 |
define('TIME_24_NS', 'G:i'); |
745200a9cc2a
Fixed some upgrade bugs; added support for choosing one's own date/time formats; rebrand as 1.1.7
Dan
parents:
1027
diff
changeset
|
116 |
// 24 hour, seconds |
745200a9cc2a
Fixed some upgrade bugs; added support for choosing one's own date/time formats; rebrand as 1.1.7
Dan
parents:
1027
diff
changeset
|
117 |
define('TIME_24_S', 'G:i:s'); |
745200a9cc2a
Fixed some upgrade bugs; added support for choosing one's own date/time formats; rebrand as 1.1.7
Dan
parents:
1027
diff
changeset
|
118 |
|
745200a9cc2a
Fixed some upgrade bugs; added support for choosing one's own date/time formats; rebrand as 1.1.7
Dan
parents:
1027
diff
changeset
|
119 |
define('ED_DATE', 1); |
745200a9cc2a
Fixed some upgrade bugs; added support for choosing one's own date/time formats; rebrand as 1.1.7
Dan
parents:
1027
diff
changeset
|
120 |
define('ED_TIME', 2); |
1101
30d8bb88572d
Sessions: Improved inactive account UX; shuffled around a bit of code so that whitelist checks are shared; fixed a bunch of bugs related to ban code and IPv6 addresses
Dan
parents:
1081
diff
changeset
|
121 |
define('ED_DATE_FULL', 4); |
1081
745200a9cc2a
Fixed some upgrade bugs; added support for choosing one's own date/time formats; rebrand as 1.1.7
Dan
parents:
1027
diff
changeset
|
122 |
|
832
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
123 |
// Rendering options! |
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
124 |
|
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
125 |
/** |
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
126 |
* Render using template/wiki hybrid syntax (Enano processing + template variable/logic access) |
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
127 |
* @const int |
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
128 |
*/ |
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
129 |
|
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
130 |
define('RENDER_WIKI_TEMPLATE', 2); |
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
131 |
|
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
132 |
/** |
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
133 |
* Only render block-level things, like paragraphs, divs, etc. |
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
134 |
* @const int |
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
135 |
*/ |
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
136 |
|
1027
98c052fc3337
First implementation of new parser; Text_Wiki is now gone. VERY BETA! WiP.
Dan
parents:
832
diff
changeset
|
137 |
define('RENDER_BLOCK', 4); |
832
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
138 |
|
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
139 |
/** |
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
140 |
* Only render inline-level things, like links. |
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
141 |
* @const int |
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
142 |
*/ |
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
143 |
|
1027
98c052fc3337
First implementation of new parser; Text_Wiki is now gone. VERY BETA! WiP.
Dan
parents:
832
diff
changeset
|
144 |
define('RENDER_INLINE', 8); |
832
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
145 |
|
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
146 |
/** |
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
147 |
* Disable smilies when rendering. |
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
148 |
* @const int |
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
149 |
*/ |
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
150 |
|
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
151 |
define('RENDER_NOSMILIES', 16); |
7152ca0a0ce9
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message)
Dan
parents:
825
diff
changeset
|
152 |
|
1027
98c052fc3337
First implementation of new parser; Text_Wiki is now gone. VERY BETA! WiP.
Dan
parents:
832
diff
changeset
|
153 |
/** |
98c052fc3337
First implementation of new parser; Text_Wiki is now gone. VERY BETA! WiP.
Dan
parents:
832
diff
changeset
|
154 |
* Render using the default engine |
98c052fc3337
First implementation of new parser; Text_Wiki is now gone. VERY BETA! WiP.
Dan
parents:
832
diff
changeset
|
155 |
* @const int |
98c052fc3337
First implementation of new parser; Text_Wiki is now gone. VERY BETA! WiP.
Dan
parents:
832
diff
changeset
|
156 |
*/ |
98c052fc3337
First implementation of new parser; Text_Wiki is now gone. VERY BETA! WiP.
Dan
parents:
832
diff
changeset
|
157 |
|
98c052fc3337
First implementation of new parser; Text_Wiki is now gone. VERY BETA! WiP.
Dan
parents:
832
diff
changeset
|
158 |
define('RENDER_WIKI_DEFAULT', RENDER_BLOCK | RENDER_INLINE); |
98c052fc3337
First implementation of new parser; Text_Wiki is now gone. VERY BETA! WiP.
Dan
parents:
832
diff
changeset
|
159 |
|
98c052fc3337
First implementation of new parser; Text_Wiki is now gone. VERY BETA! WiP.
Dan
parents:
832
diff
changeset
|
160 |
// parser order |
98c052fc3337
First implementation of new parser; Text_Wiki is now gone. VERY BETA! WiP.
Dan
parents:
832
diff
changeset
|
161 |
define('PO_BEFORE', 1); |
98c052fc3337
First implementation of new parser; Text_Wiki is now gone. VERY BETA! WiP.
Dan
parents:
832
diff
changeset
|
162 |
define('PO_AFTER', 2); |
98c052fc3337
First implementation of new parser; Text_Wiki is now gone. VERY BETA! WiP.
Dan
parents:
832
diff
changeset
|
163 |
define('PO_FIRST', 3); |
98c052fc3337
First implementation of new parser; Text_Wiki is now gone. VERY BETA! WiP.
Dan
parents:
832
diff
changeset
|
164 |
define('PO_LAST', 4); |
98c052fc3337
First implementation of new parser; Text_Wiki is now gone. VERY BETA! WiP.
Dan
parents:
832
diff
changeset
|
165 |
|
1 | 166 |
// |
167 |
// User types - don't touch these |
|
168 |
// |
|
169 |
||
170 |
// User can do absolutely everything |
|
171 |
define('USER_LEVEL_ADMIN', 9); |
|
172 |
||
173 |
// User can edit/[un]approve comments and do some basic administration |
|
174 |
define('USER_LEVEL_MOD', 5); |
|
175 |
||
176 |
// Default for members. When authed at this level, the user can change his/her password. |
|
177 |
define('USER_LEVEL_CHPREF', 3); |
|
178 |
||
179 |
// The level that you will be running at most of the time |
|
180 |
define('USER_LEVEL_MEMBER', 2); |
|
181 |
||
182 |
// Special level for guests |
|
183 |
define('USER_LEVEL_GUEST', 1); |
|
184 |
||
185 |
// Group status |
|
186 |
define('GROUP_CLOSED', 1); |
|
187 |
define('GROUP_REQUEST', 2); |
|
188 |
define('GROUP_HIDDEN', 3); |
|
189 |
define('GROUP_OPEN', 4); |
|
190 |
||
334
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
328
diff
changeset
|
191 |
// Private message flags |
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
328
diff
changeset
|
192 |
define('PM_UNREAD', 1); |
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
328
diff
changeset
|
193 |
define('PM_STARRED', 2); |
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
328
diff
changeset
|
194 |
define('PM_SENT', 4); |
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
328
diff
changeset
|
195 |
define('PM_DRAFT', 8); |
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
328
diff
changeset
|
196 |
define('PM_ARCHIVE', 16); |
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
328
diff
changeset
|
197 |
define('PM_TRASH', 32); |
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
328
diff
changeset
|
198 |
define('PM_DELIVERED', 64); |
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
328
diff
changeset
|
199 |
|
526
b2fb50d572c7
New plugin manager half-implemented. Most of the UI/frontend code is done. Moved sql_parse.php to /includes/ to allow use after installation - TODO: check installer, etc. for breakage
Dan
parents:
513
diff
changeset
|
200 |
// Plugin status |
b2fb50d572c7
New plugin manager half-implemented. Most of the UI/frontend code is done. Moved sql_parse.php to /includes/ to allow use after installation - TODO: check installer, etc. for breakage
Dan
parents:
513
diff
changeset
|
201 |
define('PLUGIN_INSTALLED', 1); |
b2fb50d572c7
New plugin manager half-implemented. Most of the UI/frontend code is done. Moved sql_parse.php to /includes/ to allow use after installation - TODO: check installer, etc. for breakage
Dan
parents:
513
diff
changeset
|
202 |
define('PLUGIN_DISABLED', 2); |
b2fb50d572c7
New plugin manager half-implemented. Most of the UI/frontend code is done. Moved sql_parse.php to /includes/ to allow use after installation - TODO: check installer, etc. for breakage
Dan
parents:
513
diff
changeset
|
203 |
define('PLUGIN_OUTOFDATE', 4); |
b2fb50d572c7
New plugin manager half-implemented. Most of the UI/frontend code is done. Moved sql_parse.php to /includes/ to allow use after installation - TODO: check installer, etc. for breakage
Dan
parents:
513
diff
changeset
|
204 |
|
1 | 205 |
// Other stuff |
206 |
||
207 |
define('MAX_PMS_PER_BATCH', 7); // The maximum number of users that users can send PMs to in one go; restriction does not apply to users with mod_misc rights |
|
208 |
define('SEARCH_RESULTS_PER_PAGE', 10); |
|
209 |
define('MYSQL_MAX_PACKET_SIZE', 1048576); // 1MB; this is the default in MySQL 4.x I think |
|
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
210 |
define('ENANO_SUPPORT_AVATARS', 1); |
771
5e85d7db8ee5
Merged WINDOWS_MOD_REWRITE_WORKAROUNDS changes from stable.
Dan
parents:
719
diff
changeset
|
211 |
// don't change this next line in upstream (it has to be auto-patched by the dynamic download script) |
5e85d7db8ee5
Merged WINDOWS_MOD_REWRITE_WORKAROUNDS changes from stable.
Dan
parents:
719
diff
changeset
|
212 |
// define('WINDOWS_MOD_REWRITE_WORKAROUNDS', ''); |
1 | 213 |
|
214 |
// Sidebar |
|
215 |
||
216 |
define('BLOCK_WIKIFORMAT', 0); |
|
217 |
define('BLOCK_TEMPLATEFORMAT', 1); |
|
218 |
define('BLOCK_HTML', 2); |
|
219 |
define('BLOCK_PHP', 3); |
|
220 |
define('BLOCK_PLUGIN', 4); |
|
221 |
define('SIDEBAR_LEFT', 1); |
|
222 |
define('SIDEBAR_RIGHT', 2); |
|
223 |
||
224 |
define('GENERAL_ERROR', 'General error'); |
|
225 |
define('GENERAL_NOTICE', 'Information'); |
|
226 |
define('CRITICAL_ERROR', 'Critical error'); |
|
227 |
||
468
194a19711346
Fixed the fact that cron just didn't work at all (brain fart that day or something)
Dan
parents:
411
diff
changeset
|
228 |
// Protection levels |
194a19711346
Fixed the fact that cron just didn't work at all (brain fart that day or something)
Dan
parents:
411
diff
changeset
|
229 |
// These are still hardcoded in some places, so don't change them |
194a19711346
Fixed the fact that cron just didn't work at all (brain fart that day or something)
Dan
parents:
411
diff
changeset
|
230 |
define('PROTECT_NONE', 0); |
194a19711346
Fixed the fact that cron just didn't work at all (brain fart that day or something)
Dan
parents:
411
diff
changeset
|
231 |
define('PROTECT_FULL', 1); |
194a19711346
Fixed the fact that cron just didn't work at all (brain fart that day or something)
Dan
parents:
411
diff
changeset
|
232 |
define('PROTECT_SEMI', 2); |
194a19711346
Fixed the fact that cron just didn't work at all (brain fart that day or something)
Dan
parents:
411
diff
changeset
|
233 |
|
345
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
parents:
334
diff
changeset
|
234 |
// |
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
parents:
334
diff
changeset
|
235 |
// Enano versions progress |
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
parents:
334
diff
changeset
|
236 |
// |
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
parents:
334
diff
changeset
|
237 |
|
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
parents:
334
diff
changeset
|
238 |
// These constants are used to perform "at least version X" type logic in plugins. Constants should |
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
parents:
334
diff
changeset
|
239 |
// be defined as ENANO_ATLEAST_<major version>_<minor version>, and they should match the version of |
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
parents:
334
diff
changeset
|
240 |
// the Enano API, not any forked version. This is to ensure that plugins know what features to enable |
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
parents:
334
diff
changeset
|
241 |
// and disable for compatibility with both branches. |
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
parents:
334
diff
changeset
|
242 |
|
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
parents:
334
diff
changeset
|
243 |
define('ENANO_ATLEAST_1_0', ''); |
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
parents:
334
diff
changeset
|
244 |
define('ENANO_ATLEAST_1_1', ''); |
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
parents:
334
diff
changeset
|
245 |
|
1 | 246 |
// You can un-comment the next line to require database backups to be encrypted using the site's unique key. |
247 |
// This keeps the file safe in transit, but also prevents any type of editing to the file. This is NOT |
|
248 |
// recommended except for tiny sites because encrypting an average of 2MB of data will take a while. |
|
249 |
// define('SQL_BACKUP_CRYPT', ''); |
|
250 |
||
251 |
// Security |
|
252 |
||
98
6457a9b983c6
Fixed non-object reference in databaseless template, added locking for Javascript paginator, made comments on AES key size more clear in constants, and disallowed "anonymous" and IP addresses for admin username in install.php; Loch Ness release candidate
Dan
parents:
73
diff
changeset
|
253 |
// AES cipher strength - defaults to 192 and cannot be changed after installation. |
6457a9b983c6
Fixed non-object reference in databaseless template, added locking for Javascript paginator, made comments on AES key size more clear in constants, and disallowed "anonymous" and IP addresses for admin username in install.php; Loch Ness release candidate
Dan
parents:
73
diff
changeset
|
254 |
// This can be 128, 192, or 256. |
6457a9b983c6
Fixed non-object reference in databaseless template, added locking for Javascript paginator, made comments on AES key size more clear in constants, and disallowed "anonymous" and IP addresses for admin username in install.php; Loch Ness release candidate
Dan
parents:
73
diff
changeset
|
255 |
define('AES_BITS', 192); |
1 | 256 |
|
257 |
// Define this to enable Mcrypt support which makes encryption work faster. This is only triggered if Mcrypt support is detected. |
|
258 |
// THIS IS DISABLED BECAUSE MCRYPT DOES NOT SEEM TO SUPPORT THE AES BLOCK SIZES THAT ENANO USES. |
|
259 |
//define('MCRYPT_ACCEL', ''); |
|
260 |
||
261 |
//if(defined('MCRYPT_RIJNDAEL_' . AES_BITS)) |
|
262 |
//{ |
|
263 |
// eval('$bs = MCRYPT_RIJNDAEL_' . AES_BITS . ';'); |
|
264 |
// $bs = mcrypt_module_get_algo_block_size($bs); |
|
265 |
// $bs = $bs * 8; |
|
266 |
// define('AES_BLOCKSIZE', $bs); |
|
267 |
//} |
|
268 |
// else |
|
269 |
// { |
|
270 |
// define('AES_BLOCKSIZE', AES_BITS); |
|
271 |
// } |
|
272 |
||
348
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
345
diff
changeset
|
273 |
// You probably don't want to change the block size because it will cause the Javascript test vectors to fail. Changing it doesn't |
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
345
diff
changeset
|
274 |
// significantly increase encryption strength either. |
1 | 275 |
define('AES_BLOCKSIZE', 128); |
276 |
||
352
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
277 |
// Our list of tables included in Enano |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
278 |
$system_table_list = Array( |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
279 |
'categories', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
280 |
'comments', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
281 |
'config', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
282 |
'logs', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
283 |
'page_text', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
284 |
'session_keys', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
285 |
'pages', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
286 |
'users', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
287 |
'users_extra', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
288 |
'themes', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
289 |
'buddies', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
290 |
'banlist', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
291 |
'files', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
292 |
'privmsgs', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
293 |
'sidebar', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
294 |
'hits', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
295 |
'groups', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
296 |
'group_members', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
297 |
'acl', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
298 |
'page_groups', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
299 |
'page_group_members', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
300 |
'tags', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
301 |
'language', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
302 |
'language_strings', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
303 |
'lockout', |
719
f82da241eaf8
Fixed system table list; added safeguard against twice prefixing the tables in $system_table_list
Dan
parents:
711
diff
changeset
|
304 |
'search_index', |
f82da241eaf8
Fixed system table list; added safeguard against twice prefixing the tables in $system_table_list
Dan
parents:
711
diff
changeset
|
305 |
'captcha', |
f82da241eaf8
Fixed system table list; added safeguard against twice prefixing the tables in $system_table_list
Dan
parents:
711
diff
changeset
|
306 |
'diffiehellman', |
f82da241eaf8
Fixed system table list; added safeguard against twice prefixing the tables in $system_table_list
Dan
parents:
711
diff
changeset
|
307 |
'plugins', |
f82da241eaf8
Fixed system table list; added safeguard against twice prefixing the tables in $system_table_list
Dan
parents:
711
diff
changeset
|
308 |
'ranks' |
352
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
309 |
); |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
310 |
|
719
f82da241eaf8
Fixed system table list; added safeguard against twice prefixing the tables in $system_table_list
Dan
parents:
711
diff
changeset
|
311 |
if ( defined('table_prefix') && !defined('ENANO_TABLELIST_PREFIXED') ) |
352
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
312 |
{ |
719
f82da241eaf8
Fixed system table list; added safeguard against twice prefixing the tables in $system_table_list
Dan
parents:
711
diff
changeset
|
313 |
define('ENANO_TABLELIST_PREFIXED', 1); |
352
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
314 |
foreach ( $system_table_list as $i => $_ ) |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
315 |
{ |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
316 |
$system_table_list[$i] = table_prefix . $system_table_list[$i]; |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
317 |
} |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
318 |
} |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
319 |
|
1 | 320 |
/* |
321 |
* MIMETYPES |
|
322 |
* |
|
323 |
* This array defines the 166 known MIME types used by the Enano file-extension filter. Whether extensions are allowed or not is |
|
324 |
* determined by a bitfield in the config table. |
|
325 |
*/ |
|
326 |
||
327 |
global $mime_types, $mimetype_exps, $mimetype_extlist; |
|
328 |
||
329 |
// IMPORTANT: this array can NEVER have items removed from it or key indexes changed |
|
330 |
$mime_types = Array ( |
|
331 |
'ai' => 'application/postscript', |
|
332 |
'aif' => 'audio/x-aiff', |
|
333 |
'aifc' => 'audio/x-aiff', |
|
334 |
'aiff' => 'audio/x-aiff', |
|
335 |
'au' => 'audio/basic', |
|
336 |
'avi' => 'video/x-msvideo', |
|
337 |
'bcpio' => 'application/x-bcpio', |
|
338 |
'bin' => 'application/octet-stream', |
|
339 |
'bmp' => 'image/bmp', |
|
340 |
'bz2' => 'application/x-bzip', |
|
341 |
'cdf' => 'application/x-netcdf', |
|
342 |
'cgm' => 'image/cgm', |
|
343 |
'class' => 'application/octet-stream', |
|
344 |
'cpio' => 'application/x-cpio', |
|
345 |
'cpt' => 'application/mac-compactpro', |
|
346 |
'csh' => 'application/x-csh', |
|
347 |
'css' => 'text/css', |
|
348 |
'dcr' => 'application/x-director', |
|
349 |
'dir' => 'application/x-director', |
|
350 |
'djv' => 'image/vnd.djvu', |
|
351 |
'djvu' => 'image/vnd.djvu', |
|
352 |
'dll' => 'application/octet-stream', |
|
353 |
'dms' => 'application/octet-stream', |
|
354 |
'doc' => 'application/msword', |
|
355 |
'dtd' => 'application/xml-dtd', |
|
356 |
'dvi' => 'application/x-dvi', |
|
357 |
'dxr' => 'application/x-director', |
|
358 |
'eps' => 'application/postscript', |
|
359 |
'etx' => 'text/x-setext', |
|
360 |
'exe' => 'application/octet-stream', |
|
361 |
'ez' => 'application/andrew-inset', |
|
362 |
'gif' => 'image/gif', |
|
363 |
'gram' => 'application/srgs', |
|
364 |
'grxml' => 'application/srgs+xml', |
|
365 |
'gtar' => 'application/x-gtar', |
|
366 |
'gz' => 'application/x-gzip', |
|
367 |
'hdf' => 'application/x-hdf', |
|
368 |
'hqx' => 'application/mac-binhex40', |
|
369 |
'htm' => 'text/html', |
|
370 |
'html' => 'text/html', |
|
371 |
'ice' => 'x-conference/x-cooltalk', |
|
372 |
'ico' => 'image/x-icon', |
|
373 |
'ics' => 'text/calendar', |
|
374 |
'ief' => 'image/ief', |
|
375 |
'ifb' => 'text/calendar', |
|
376 |
'iges' => 'model/iges', |
|
377 |
'igs' => 'model/iges', |
|
378 |
'jar' => 'application/zip', |
|
379 |
'jpe' => 'image/jpeg', |
|
380 |
'jpeg' => 'image/jpeg', |
|
381 |
'jpg' => 'image/jpeg', |
|
382 |
'js' => 'application/x-javascript', |
|
383 |
'kar' => 'audio/midi', |
|
384 |
'latex' => 'application/x-latex', |
|
385 |
'lha' => 'application/octet-stream', |
|
386 |
'lzh' => 'application/octet-stream', |
|
387 |
'm3u' => 'audio/x-mpegurl', |
|
388 |
'man' => 'application/x-troff-man', |
|
389 |
'mathml' => 'application/mathml+xml', |
|
390 |
'me' => 'application/x-troff-me', |
|
391 |
'mesh' => 'model/mesh', |
|
392 |
'mid' => 'audio/midi', |
|
393 |
'midi' => 'audio/midi', |
|
394 |
'mif' => 'application/vnd.mif', |
|
395 |
'mov' => 'video/quicktime', |
|
396 |
'movie' => 'video/x-sgi-movie', |
|
397 |
'mp2' => 'audio/mpeg', |
|
398 |
'mp3' => 'audio/mpeg', |
|
399 |
'mpe' => 'video/mpeg', |
|
400 |
'mpeg' => 'video/mpeg', |
|
401 |
'mpg' => 'video/mpeg', |
|
402 |
'mpga' => 'audio/mpeg', |
|
403 |
'ms' => 'application/x-troff-ms', |
|
404 |
'msh' => 'model/mesh', |
|
405 |
'mxu' => 'video/vnd.mpegurl', |
|
406 |
'nc' => 'application/x-netcdf', |
|
407 |
'oda' => 'application/oda', |
|
408 |
'ogg' => 'application/ogg', |
|
409 |
'ogm' => 'application/ogg', |
|
410 |
'pbm' => 'image/x-portable-bitmap', |
|
411 |
'pdb' => 'chemical/x-pdb', |
|
412 |
'pdf' => 'application/pdf', |
|
413 |
'pgm' => 'image/x-portable-graymap', |
|
414 |
'pgn' => 'application/x-chess-pgn', |
|
415 |
'png' => 'image/png', |
|
416 |
'pnm' => 'image/x-portable-anymap', |
|
417 |
'ppm' => 'image/x-portable-pixmap', |
|
418 |
'ppt' => 'application/vnd.ms-powerpoint', |
|
419 |
'ps' => 'application/postscript', |
|
420 |
'psd' => 'image/x-photoshop', |
|
421 |
'qt' => 'video/quicktime', |
|
422 |
'ra' => 'audio/x-realaudio', |
|
423 |
'ram' => 'audio/x-pn-realaudio', |
|
424 |
'ras' => 'image/x-cmu-raster', |
|
425 |
'rdf' => 'text/xml', |
|
426 |
'rgb' => 'image/x-rgb', |
|
427 |
'rm' => 'audio/x-pn-realaudio', |
|
428 |
'roff' => 'application/x-troff', |
|
429 |
'rpm' => 'audio/x-pn-realaudio-plugin', |
|
430 |
'rss' => 'text/xml', |
|
431 |
'rtf' => 'text/rtf', |
|
432 |
'rtx' => 'text/richtext', |
|
433 |
'sgm' => 'text/sgml', |
|
434 |
'sgml' => 'text/sgml', |
|
435 |
'sh' => 'application/x-sh', |
|
436 |
'shar' => 'application/x-shar', |
|
437 |
'silo' => 'model/mesh', |
|
438 |
'sit' => 'application/x-stuffit', |
|
439 |
'skd' => 'application/x-koan', |
|
440 |
'skm' => 'application/x-koan', |
|
441 |
'skp' => 'application/x-koan', |
|
442 |
'skt' => 'application/x-koan', |
|
443 |
'smi' => 'application/smil', |
|
444 |
'smil' => 'application/smil', |
|
445 |
'snd' => 'audio/basic', |
|
446 |
'so' => 'application/octet-stream', |
|
447 |
'spl' => 'application/x-futuresplash', |
|
448 |
'src' => 'application/x-wais-source', |
|
449 |
'stc' => 'application/zip', |
|
450 |
'std' => 'application/zip', |
|
451 |
'sti' => 'application/zip', |
|
452 |
'stm' => 'application/zip', |
|
453 |
'stw' => 'application/zip', |
|
454 |
'sv4cpio' => 'application/x-sv4cpio', |
|
455 |
'sv4crc' => 'application/x-sv4crc', |
|
456 |
'svg' => 'image/svg+xml', |
|
457 |
'swf' => 'application/x-shockwave-flash', |
|
458 |
'sxc' => 'application/zip', |
|
459 |
'sxd' => 'application/zip', |
|
460 |
'sxi' => 'application/zip', |
|
461 |
'sxm' => 'application/zip', |
|
462 |
'sxw' => 'application/zip', |
|
463 |
't' => 'application/x-troff', |
|
464 |
'tar' => 'application/x-tar', |
|
465 |
'tcl' => 'application/x-tcl', |
|
466 |
'tex' => 'application/x-tex', |
|
467 |
'texi' => 'application/x-texinfo', |
|
468 |
'texinfo' => 'application/x-texinfo', |
|
469 |
'tif' => 'image/tiff', |
|
470 |
'tiff' => 'image/tiff', |
|
471 |
'tr' => 'application/x-troff', |
|
472 |
'tsv' => 'text/tab-separated-values', |
|
473 |
'txt' => 'text/plain', |
|
474 |
'ustar' => 'application/x-ustar', |
|
475 |
'vcd' => 'application/x-cdlink', |
|
476 |
'vrml' => 'model/vrml', |
|
477 |
'vxml' => 'application/voicexml+xml', |
|
478 |
'wav' => 'audio/x-wav', |
|
479 |
'wbmp' => 'image/vnd.wap.wbmp', |
|
480 |
'wbxml' => 'application/vnd.wap.wbxml', |
|
481 |
'wml' => 'text/vnd.wap.wml', |
|
482 |
'wmlc' => 'application/vnd.wap.wmlc', |
|
483 |
'wmls' => 'text/vnd.wap.wmlscript', |
|
484 |
'wmlsc' => 'application/vnd.wap.wmlscriptc', |
|
485 |
'wrl' => 'model/vrml', |
|
486 |
'xbm' => 'image/x-xbitmap', |
|
487 |
'xcf' => 'image/xcf', |
|
488 |
'xht' => 'application/xhtml+xml', |
|
489 |
'xhtml' => 'application/xhtml+xml', |
|
490 |
'xls' => 'application/vnd.ms-excel', |
|
491 |
'xml' => 'text/xml', |
|
492 |
'xpi' => 'application/zip', |
|
493 |
'xpm' => 'image/x-xpixmap', |
|
494 |
'xsl' => 'text/xml', |
|
495 |
'xslt' => 'text/xml', |
|
496 |
'xwd' => 'image/x-xwindowdump', |
|
497 |
'xyz' => 'chemical/x-xyz', |
|
498 |
'zip' => 'application/zip', |
|
293
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
499 |
'odt' => 'application/vnd.oasis.opendocument.text', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
500 |
'ott' => 'application/vnd.oasis.opendocument.text-template', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
501 |
'odg' => 'application/vnd.oasis.opendocument.graphics', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
502 |
'otg' => 'application/vnd.oasis.opendocument.graphics-template', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
503 |
'odp' => 'application/vnd.oasis.opendocument.presentation', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
504 |
'otp' => 'application/vnd.oasis.opendocument.presentation-template', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
505 |
'ods' => 'application/vnd.oasis.opendocument.spreadsheet', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
506 |
'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
507 |
'odc' => 'application/vnd.oasis.opendocument.chart', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
508 |
'otc' => 'application/vnd.oasis.opendocument.chart-template', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
509 |
'odi' => 'application/vnd.oasis.opendocument.image', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
510 |
'oti' => 'application/vnd.oasis.opendocument.image-template', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
511 |
'odf' => 'application/vnd.oasis.opendocument.formula', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
512 |
'otf' => 'application/vnd.oasis.opendocument.formula-template', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
513 |
'odm' => 'application/vnd.oasis.opendocument.text-master', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
514 |
'oth' => 'application/vnd.oasis.opendocument.text-web' |
1 | 515 |
); |
516 |
||
517 |
$mimetype_extlist = Array( |
|
518 |
'application/andrew-inset'=>'ez', |
|
519 |
'application/mac-binhex40'=>'hqx', |
|
520 |
'application/mac-compactpro'=>'cpt', |
|
521 |
'application/mathml+xml'=>'mathml', |
|
522 |
'application/msword'=>'doc', |
|
523 |
'application/octet-stream'=>'bin dms lha lzh exe class so dll', |
|
524 |
'application/oda'=>'oda', |
|
525 |
'application/ogg'=>'ogg ogm', |
|
526 |
'application/pdf'=>'pdf', |
|
527 |
'application/postscript'=>'ai eps ps', |
|
528 |
'application/rdf+xml'=>'rdf', |
|
529 |
'application/smil'=>'smi smil', |
|
530 |
'application/srgs'=>'gram', |
|
531 |
'application/srgs+xml'=>'grxml', |
|
532 |
'application/vnd.mif'=>'mif', |
|
533 |
'application/vnd.ms-excel'=>'xls', |
|
534 |
'application/vnd.ms-powerpoint'=>'ppt', |
|
535 |
'application/vnd.wap.wbxml'=>'wbxml', |
|
536 |
'application/vnd.wap.wmlc'=>'wmlc', |
|
537 |
'application/vnd.wap.wmlscriptc'=>'wmlsc', |
|
538 |
'application/voicexml+xml'=>'vxml', |
|
539 |
'application/x-bcpio'=>'bcpio', |
|
540 |
'application/x-bzip'=>'gz bz2', |
|
541 |
'application/x-cdlink'=>'vcd', |
|
542 |
'application/x-chess-pgn'=>'pgn', |
|
543 |
'application/x-cpio'=>'cpio', |
|
544 |
'application/x-csh'=>'csh', |
|
545 |
'application/x-director'=>'dcr dir dxr', |
|
546 |
'application/x-dvi'=>'dvi', |
|
547 |
'application/x-futuresplash'=>'spl', |
|
548 |
'application/x-gtar'=>'gtar tar', |
|
549 |
'application/x-gzip'=>'gz', |
|
550 |
'application/x-hdf'=>'hdf', |
|
551 |
'application/x-jar'=>'jar', |
|
552 |
'application/x-javascript'=>'js', |
|
553 |
'application/x-koan'=>'skp skd skt skm', |
|
554 |
'application/x-latex'=>'latex', |
|
555 |
'application/x-netcdf'=>'nc cdf', |
|
556 |
'application/x-sh'=>'sh', |
|
557 |
'application/x-shar'=>'shar', |
|
558 |
'application/x-shockwave-flash'=>'swf', |
|
559 |
'application/x-stuffit'=>'sit', |
|
560 |
'application/x-sv4cpio'=>'sv4cpio', |
|
561 |
'application/x-sv4crc'=>'sv4crc', |
|
562 |
'application/x-tar'=>'tar', |
|
563 |
'application/x-tcl'=>'tcl', |
|
564 |
'application/x-tex'=>'tex', |
|
565 |
'application/x-texinfo'=>'texinfo texi', |
|
566 |
'application/x-troff'=>'t tr roff', |
|
567 |
'application/x-troff-man'=>'man', |
|
568 |
'application/x-troff-me'=>'me', |
|
569 |
'application/x-troff-ms'=>'ms', |
|
570 |
'application/x-ustar'=>'ustar', |
|
571 |
'application/x-wais-source'=>'src', |
|
572 |
'application/x-xpinstall'=>'xpi', |
|
573 |
'application/xhtml+xml'=>'xhtml xht', |
|
574 |
'application/xslt+xml'=>'xslt', |
|
575 |
'application/xml'=>'xml xsl', |
|
576 |
'application/xml-dtd'=>'dtd', |
|
577 |
'application/zip'=>'zip jar xpi sxc stc sxd std sxi sti sxm stm sxw stw ', |
|
578 |
'audio/basic'=>'au snd', |
|
579 |
'audio/midi'=>'mid midi kar', |
|
580 |
'audio/mpeg'=>'mpga mp2 mp3', |
|
581 |
'audio/ogg'=>'ogg ', |
|
582 |
'audio/x-aiff'=>'aif aiff aifc', |
|
583 |
'audio/x-mpegurl'=>'m3u', |
|
584 |
'audio/x-ogg'=>'ogg ', |
|
585 |
'audio/x-pn-realaudio'=>'ram rm', |
|
586 |
'audio/x-pn-realaudio-plugin'=>'rpm', |
|
587 |
'audio/x-realaudio'=>'ra', |
|
588 |
'audio/x-wav'=>'wav', |
|
589 |
'chemical/x-pdb'=>'pdb', |
|
590 |
'chemical/x-xyz'=>'xyz', |
|
591 |
'image/bmp'=>'bmp', |
|
592 |
'image/cgm'=>'cgm', |
|
593 |
'image/gif'=>'gif', |
|
594 |
'image/ief'=>'ief', |
|
595 |
'image/jpeg'=>'jpeg jpg jpe', |
|
596 |
'image/png'=>'png', |
|
597 |
'image/svg+xml'=>'svg', |
|
598 |
'image/tiff'=>'tiff tif', |
|
599 |
'image/vnd.djvu'=>'djvu djv', |
|
600 |
'image/vnd.wap.wbmp'=>'wbmp', |
|
601 |
'image/x-cmu-raster'=>'ras', |
|
602 |
'image/x-icon'=>'ico', |
|
603 |
'image/x-portable-anymap'=>'pnm', |
|
604 |
'image/x-portable-bitmap'=>'pbm', |
|
605 |
'image/x-portable-graymap'=>'pgm', |
|
606 |
'image/x-portable-pixmap'=>'ppm', |
|
607 |
'image/x-rgb'=>'rgb', |
|
608 |
'image/x-photoshop'=>'psd', |
|
609 |
'image/x-xbitmap'=>'xbm', |
|
610 |
'image/x-xpixmap'=>'xpm', |
|
611 |
'image/x-xwindowdump'=>'xwd', |
|
612 |
'model/iges'=>'igs iges', |
|
613 |
'model/mesh'=>'msh mesh silo', |
|
614 |
'model/vrml'=>'wrl vrml', |
|
615 |
'text/calendar'=>'ics ifb', |
|
616 |
'text/css'=>'css', |
|
617 |
'text/html'=>'html htm', |
|
618 |
'text/plain'=>'txt', |
|
619 |
'text/richtext'=>'rtx', |
|
620 |
'text/rtf'=>'rtf', |
|
621 |
'text/sgml'=>'sgml sgm', |
|
622 |
'text/tab-separated-values'=>'tsv', |
|
623 |
'text/vnd.wap.wml'=>'wml', |
|
624 |
'text/vnd.wap.wmlscript'=>'wmls', |
|
625 |
'text/xml'=>'xml xsl xslt rss rdf', |
|
626 |
'text/x-setext'=>'etx', |
|
627 |
'video/mpeg'=>'mpeg mpg mpe', |
|
628 |
'video/ogg'=>'ogm ogg', |
|
629 |
'video/quicktime'=>'qt mov', |
|
630 |
'video/vnd.mpegurl'=>'mxu', |
|
631 |
'video/x-msvideo'=>'avi', |
|
632 |
'video/x-ogg'=>'ogm ogg', |
|
633 |
'video/x-sgi-movie'=>'movie', |
|
634 |
'x-conference/x-cooltalk'=>'ice', |
|
635 |
// Added for Enano |
|
636 |
'image/xcf' => 'xcf xcfbz2 xcf.bz2', |
|
293
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
637 |
'application/vnd.oasis.opendocument.text' => 'odt', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
638 |
'application/vnd.oasis.opendocument.text-template' => 'ott', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
639 |
'application/vnd.oasis.opendocument.graphics' => 'odg', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
640 |
'application/vnd.oasis.opendocument.graphics-template' => 'otg', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
641 |
'application/vnd.oasis.opendocument.presentation' => 'odp', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
642 |
'application/vnd.oasis.opendocument.presentation-template' => 'otp', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
643 |
'application/vnd.oasis.opendocument.spreadsheet' => 'ods', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
644 |
'application/vnd.oasis.opendocument.spreadsheet-template' => 'ots', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
645 |
'application/vnd.oasis.opendocument.chart' => 'odc', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
646 |
'application/vnd.oasis.opendocument.chart-template' => 'otc', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
647 |
'application/vnd.oasis.opendocument.image' => 'odi', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
648 |
'application/vnd.oasis.opendocument.image-template' => 'oti', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
649 |
'application/vnd.oasis.opendocument.formula' => 'odf', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
650 |
'application/vnd.oasis.opendocument.formula-template' => 'otf', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
651 |
'application/vnd.oasis.opendocument.text-master' => 'odm', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
652 |
'application/vnd.oasis.opendocument.text-web' => 'oth' |
1 | 653 |
); |
654 |
||
655 |
$k = array_keys($mime_types); |
|
656 |
$mimetype_exps = Array(); |
|
657 |
foreach($k as $s => $x) |
|
658 |
{ |
|
659 |
$mimetype_exps[$x] = pow(2, $s); |
|
660 |
} |
|
661 |
||
662 |
unset($k, $s, $x); |
|
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
663 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
664 |
/****************************************************************************** |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
665 |
* Global Variable: JPEG_Segment_Names |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
666 |
* |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
667 |
* Contents: The names of the JPEG segment markers, indexed by their marker number. This data is from the PHP JPEG Metadata Toolkit. Licensed under the GPLv2 or later. |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
668 |
* |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
669 |
******************************************************************************/ |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
670 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
671 |
$GLOBALS[ "JPEG_Segment_Names" ] = array( |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
672 |
0xC0 => "SOF0", 0xC1 => "SOF1", 0xC2 => "SOF2", 0xC3 => "SOF4", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
673 |
0xC5 => "SOF5", 0xC6 => "SOF6", 0xC7 => "SOF7", 0xC8 => "JPG", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
674 |
0xC9 => "SOF9", 0xCA => "SOF10", 0xCB => "SOF11", 0xCD => "SOF13", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
675 |
0xCE => "SOF14", 0xCF => "SOF15", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
676 |
0xC4 => "DHT", 0xCC => "DAC", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
677 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
678 |
0xD0 => "RST0", 0xD1 => "RST1", 0xD2 => "RST2", 0xD3 => "RST3", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
679 |
0xD4 => "RST4", 0xD5 => "RST5", 0xD6 => "RST6", 0xD7 => "RST7", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
680 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
681 |
0xD8 => "SOI", 0xD9 => "EOI", 0xDA => "SOS", 0xDB => "DQT", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
682 |
0xDC => "DNL", 0xDD => "DRI", 0xDE => "DHP", 0xDF => "EXP", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
683 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
684 |
0xE0 => "APP0", 0xE1 => "APP1", 0xE2 => "APP2", 0xE3 => "APP3", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
685 |
0xE4 => "APP4", 0xE5 => "APP5", 0xE6 => "APP6", 0xE7 => "APP7", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
686 |
0xE8 => "APP8", 0xE9 => "APP9", 0xEA => "APP10", 0xEB => "APP11", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
687 |
0xEC => "APP12", 0xED => "APP13", 0xEE => "APP14", 0xEF => "APP15", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
688 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
689 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
690 |
0xF0 => "JPG0", 0xF1 => "JPG1", 0xF2 => "JPG2", 0xF3 => "JPG3", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
691 |
0xF4 => "JPG4", 0xF5 => "JPG5", 0xF6 => "JPG6", 0xF7 => "JPG7", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
692 |
0xF8 => "JPG8", 0xF9 => "JPG9", 0xFA => "JPG10", 0xFB => "JPG11", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
693 |
0xFC => "JPG12", 0xFD => "JPG13", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
694 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
695 |
0xFE => "COM", 0x01 => "TEM", 0x02 => "RES", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
696 |
); |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
697 |
|
711
f70d764aab33
Added initial support for DST. Rules are defined in constants.php and are extensible.
Dan
parents:
692
diff
changeset
|
698 |
// DST profiles |
f70d764aab33
Added initial support for DST. Rules are defined in constants.php and are extensible.
Dan
parents:
692
diff
changeset
|
699 |
global $dst_profiles; |
f70d764aab33
Added initial support for DST. Rules are defined in constants.php and are extensible.
Dan
parents:
692
diff
changeset
|
700 |
$dst_profiles = array( |
f70d764aab33
Added initial support for DST. Rules are defined in constants.php and are extensible.
Dan
parents:
692
diff
changeset
|
701 |
'off' => '0;0;0;0;60', |
f70d764aab33
Added initial support for DST. Rules are defined in constants.php and are extensible.
Dan
parents:
692
diff
changeset
|
702 |
'usa' => '3;' . SECOND_SUNDAY . ';11;' . FIRST_SUNDAY . ';60', |
f70d764aab33
Added initial support for DST. Rules are defined in constants.php and are extensible.
Dan
parents:
692
diff
changeset
|
703 |
'europe' => '3;' . LAST_SUNDAY . ';10;' . LAST_SUNDAY . ';60', |
f70d764aab33
Added initial support for DST. Rules are defined in constants.php and are extensible.
Dan
parents:
692
diff
changeset
|
704 |
'australia' => '10;' . LAST_SUNDAY . ';3;' . LAST_SUNDAY . ';60', |
f70d764aab33
Added initial support for DST. Rules are defined in constants.php and are extensible.
Dan
parents:
692
diff
changeset
|
705 |
'tasmania' => '10;' . FIRST_SUNDAY . ';3;' . LAST_SUNDAY . ';60' |
f70d764aab33
Added initial support for DST. Rules are defined in constants.php and are extensible.
Dan
parents:
692
diff
changeset
|
706 |
); |