1
+ − 1
<?php
+ − 2
+ − 3
/*
+ − 4
* Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
801
eb8b23f11744
Two big commits in one day I know, but redid password storage to use HMAC-SHA1. Consolidated much AES processing to three core methods in session that should handle everything automagically. Installation works; upgrades should. Rebranded as 1.1.6.
Dan
diff
changeset
+ − 5
* Version 1.1.6 (Caoineag beta 1)
536
+ − 6
* Copyright (C) 2006-2008 Dan Fuhry
1
+ − 7
* constants.php - important defines used Enano-wide
+ − 8
*
+ − 9
* This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+ − 10
* as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+ − 11
*
+ − 12
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ − 13
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ − 14
*/
+ − 15
+ − 16
// Ban types
+ − 17
define('BAN_IP', 1);
+ − 18
define('BAN_USER', 2);
+ − 19
define('BAN_EMAIL', 3);
+ − 20
+ − 21
// ACL permission types
+ − 22
define('AUTH_ALLOW', 4);
+ − 23
define('AUTH_WIKIMODE', 3); // User can do this if wiki mode is enabled
+ − 24
define('AUTH_DISALLOW', 2);
+ − 25
define('AUTH_DENY', 1); // A Deny setting overrides *everything*
+ − 26
+ − 27
define('ACL_TYPE_GROUP', 1);
+ − 28
define('ACL_TYPE_USER', 2);
+ − 29
define('ACL_TYPE_PRESET', 3);
+ − 30
554
+ − 31
// ACL inheritance debugging info
556
63e131c38876
More work done on effective permissions API, namely reporting of page group and usergroup names
Dan
diff
changeset
+ − 32
define('ACL_INHERIT_ENANO_DEFAULT', 10);
554
+ − 33
define('ACL_INHERIT_GLOBAL_EVERYONE', 9);
+ − 34
define('ACL_INHERIT_GLOBAL_GROUP', 8);
+ − 35
define('ACL_INHERIT_GLOBAL_USER', 7);
+ − 36
define('ACL_INHERIT_PG_EVERYONE', 6);
+ − 37
define('ACL_INHERIT_PG_GROUP', 5);
+ − 38
define('ACL_INHERIT_PG_USER', 4);
+ − 39
define('ACL_INHERIT_LOCAL_EVERYONE', 3);
+ − 40
define('ACL_INHERIT_LOCAL_GROUP', 2);
+ − 41
define('ACL_INHERIT_LOCAL_USER', 1);
+ − 42
513
+ − 43
// ACL color scale minimal shade for red and green ends
+ − 44
// The lower, the more saturated the color on the scale.
+ − 45
// Purely cosmetic. 0x0 - 0xFF, 0xFF will basically disable the scale
+ − 46
define('ACL_SCALE_MINIMAL_SHADE', 0xA8);
+ − 47
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
diff
changeset
+ − 48
// 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
diff
changeset
+ − 49
// 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
diff
changeset
+ − 50
// 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
diff
changeset
+ − 51
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
diff
changeset
+ − 52
1
+ − 53
// 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
diff
changeset
+ − 54
define('GROUP_ID_EVERYONE', 1);
1
+ − 55
define('GROUP_ID_ADMIN', 2);
+ − 56
define('GROUP_ID_MOD', 3);
+ − 57
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
diff
changeset
+ − 58
// 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
diff
changeset
+ − 59
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
diff
changeset
+ − 60
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
diff
changeset
+ − 61
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
diff
changeset
+ − 62
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
diff
changeset
+ − 63
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
diff
changeset
+ − 64
// 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
diff
changeset
+ − 65
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
diff
changeset
+ − 66
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
diff
changeset
+ − 67
define('PAGE_GRP_NORMAL', 3);
156
+ − 68
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
diff
changeset
+ − 69
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
diff
changeset
+ − 70
// 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
diff
changeset
+ − 71
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
diff
changeset
+ − 72
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
diff
changeset
+ − 73
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
diff
changeset
+ − 74
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
diff
changeset
+ − 75
// 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
diff
changeset
+ − 76
// 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
diff
changeset
+ − 77
// 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
diff
changeset
+ − 78
// 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
diff
changeset
+ − 79
// 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
diff
changeset
+ − 80
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
diff
changeset
+ − 81
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
diff
changeset
+ − 82
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
diff
changeset
+ − 83
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
diff
changeset
+ − 84
// Identifier for the default pseudo-language
205
+ − 85
define('LANG_DEFAULT', 0);
+ − 86
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
diff
changeset
+ − 87
// 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
diff
changeset
+ − 88
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
diff
changeset
+ − 89
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
diff
changeset
+ − 90
define('IMAGE_TYPE_JPG', 3);
621
+ − 91
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
diff
changeset
+ − 92
592
+ − 93
// token types
+ − 94
define('TOKEN_VARIABLE', 1);
+ − 95
define('TOKEN_BOOLOP', 2);
+ − 96
define('TOKEN_PARENTHLEFT', 3);
+ − 97
define('TOKEN_PARENTHRIGHT', 4);
+ − 98
define('TOKEN_NOT', 5);
+ − 99
711
+ − 100
// DST constants
+ − 101
define('FIRST_SUNDAY', 1);
+ − 102
define('SECOND_SUNDAY', 2);
+ − 103
define('THIRD_SUNDAY', 3);
+ − 104
define('LAST_SUNDAY', 4);
+ − 105
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
diff
changeset
+ − 106
// 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
diff
changeset
+ − 107
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
diff
changeset
+ − 108
/**
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
diff
changeset
+ − 109
* Render using the default engine (Text_Wiki + Enano pre- and post-processing).
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
diff
changeset
+ − 110
* @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
diff
changeset
+ − 111
*/
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
diff
changeset
+ − 112
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
diff
changeset
+ − 113
define('RENDER_WIKI_DEFAULT', 1);
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
diff
changeset
+ − 114
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
diff
changeset
+ − 115
/**
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
diff
changeset
+ − 116
* 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
diff
changeset
+ − 117
* @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
diff
changeset
+ − 118
*/
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
diff
changeset
+ − 119
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
diff
changeset
+ − 120
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
diff
changeset
+ − 121
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
diff
changeset
+ − 122
/**
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
diff
changeset
+ − 123
* 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
diff
changeset
+ − 124
* @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
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
diff
changeset
+ − 126
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
diff
changeset
+ − 127
define('RENDER_BLOCKONLY', 4);
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
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
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
diff
changeset
+ − 130
* 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
diff
changeset
+ − 131
* @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
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
diff
changeset
+ − 133
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
diff
changeset
+ − 134
define('RENDER_INLINEONLY', 8);
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
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
diff
changeset
+ − 136
/**
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
diff
changeset
+ − 137
* 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
diff
changeset
+ − 138
* @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
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
diff
changeset
+ − 140
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
diff
changeset
+ − 141
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
diff
changeset
+ − 142
1
+ − 143
//
+ − 144
// User types - don't touch these
+ − 145
//
+ − 146
+ − 147
// User can do absolutely everything
+ − 148
define('USER_LEVEL_ADMIN', 9);
+ − 149
+ − 150
// User can edit/[un]approve comments and do some basic administration
+ − 151
define('USER_LEVEL_MOD', 5);
+ − 152
+ − 153
// Default for members. When authed at this level, the user can change his/her password.
+ − 154
define('USER_LEVEL_CHPREF', 3);
+ − 155
+ − 156
// The level that you will be running at most of the time
+ − 157
define('USER_LEVEL_MEMBER', 2);
+ − 158
+ − 159
// Special level for guests
+ − 160
define('USER_LEVEL_GUEST', 1);
+ − 161
+ − 162
// Group status
+ − 163
define('GROUP_CLOSED', 1);
+ − 164
define('GROUP_REQUEST', 2);
+ − 165
define('GROUP_HIDDEN', 3);
+ − 166
define('GROUP_OPEN', 4);
+ − 167
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
diff
changeset
+ − 168
// 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
diff
changeset
+ − 169
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
diff
changeset
+ − 170
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
diff
changeset
+ − 171
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
diff
changeset
+ − 172
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
diff
changeset
+ − 173
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
diff
changeset
+ − 174
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
diff
changeset
+ − 175
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
diff
changeset
+ − 176
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
diff
changeset
+ − 177
// 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
diff
changeset
+ − 178
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
diff
changeset
+ − 179
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
diff
changeset
+ − 180
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
diff
changeset
+ − 181
1
+ − 182
// Other stuff
+ − 183
+ − 184
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
+ − 185
define('SEARCH_RESULTS_PER_PAGE', 10);
+ − 186
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
diff
changeset
+ − 187
define('ENANO_SUPPORT_AVATARS', 1);
771
+ − 188
// don't change this next line in upstream (it has to be auto-patched by the dynamic download script)
+ − 189
// define('WINDOWS_MOD_REWRITE_WORKAROUNDS', '');
1
+ − 190
+ − 191
// Sidebar
+ − 192
+ − 193
define('BLOCK_WIKIFORMAT', 0);
+ − 194
define('BLOCK_TEMPLATEFORMAT', 1);
+ − 195
define('BLOCK_HTML', 2);
+ − 196
define('BLOCK_PHP', 3);
+ − 197
define('BLOCK_PLUGIN', 4);
+ − 198
define('SIDEBAR_LEFT', 1);
+ − 199
define('SIDEBAR_RIGHT', 2);
+ − 200
+ − 201
define('GENERAL_ERROR', 'General error');
+ − 202
define('GENERAL_NOTICE', 'Information');
+ − 203
define('CRITICAL_ERROR', 'Critical error');
+ − 204
468
+ − 205
// Protection levels
+ − 206
// These are still hardcoded in some places, so don't change them
+ − 207
define('PROTECT_NONE', 0);
+ − 208
define('PROTECT_FULL', 1);
+ − 209
define('PROTECT_SEMI', 2);
+ − 210
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
diff
changeset
+ − 211
//
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
diff
changeset
+ − 212
// 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
diff
changeset
+ − 213
//
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
diff
changeset
+ − 214
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
diff
changeset
+ − 215
// 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
diff
changeset
+ − 216
// 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
diff
changeset
+ − 217
// 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
diff
changeset
+ − 218
// 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
diff
changeset
+ − 219
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
diff
changeset
+ − 220
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
diff
changeset
+ − 221
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
diff
changeset
+ − 222
1
+ − 223
// You can un-comment the next line to require database backups to be encrypted using the site's unique key.
+ − 224
// This keeps the file safe in transit, but also prevents any type of editing to the file. This is NOT
+ − 225
// recommended except for tiny sites because encrypting an average of 2MB of data will take a while.
+ − 226
// define('SQL_BACKUP_CRYPT', '');
+ − 227
+ − 228
// Security
+ − 229
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
diff
changeset
+ − 230
// 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
diff
changeset
+ − 231
// 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
diff
changeset
+ − 232
define('AES_BITS', 192);
1
+ − 233
+ − 234
// Define this to enable Mcrypt support which makes encryption work faster. This is only triggered if Mcrypt support is detected.
+ − 235
// THIS IS DISABLED BECAUSE MCRYPT DOES NOT SEEM TO SUPPORT THE AES BLOCK SIZES THAT ENANO USES.
+ − 236
//define('MCRYPT_ACCEL', '');
+ − 237
+ − 238
//if(defined('MCRYPT_RIJNDAEL_' . AES_BITS))
+ − 239
//{
+ − 240
// eval('$bs = MCRYPT_RIJNDAEL_' . AES_BITS . ';');
+ − 241
// $bs = mcrypt_module_get_algo_block_size($bs);
+ − 242
// $bs = $bs * 8;
+ − 243
// define('AES_BLOCKSIZE', $bs);
+ − 244
//}
+ − 245
// else
+ − 246
// {
+ − 247
// define('AES_BLOCKSIZE', AES_BITS);
+ − 248
// }
+ − 249
348
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
diff
changeset
+ − 250
// 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
diff
changeset
+ − 251
// significantly increase encryption strength either.
1
+ − 252
define('AES_BLOCKSIZE', 128);
+ − 253
352
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 254
// 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
diff
changeset
+ − 255
$system_table_list = Array(
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 256
'categories',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 257
'comments',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 258
'config',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 259
'logs',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 260
'page_text',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 261
'session_keys',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 262
'pages',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 263
'users',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 264
'users_extra',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 265
'themes',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 266
'buddies',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 267
'banlist',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 268
'files',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 269
'privmsgs',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 270
'sidebar',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 271
'hits',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 272
'groups',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 273
'group_members',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 274
'acl',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 275
'page_groups',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 276
'page_group_members',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 277
'tags',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 278
'language',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 279
'language_strings',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 280
'lockout',
719
f82da241eaf8
Fixed system table list; added safeguard against twice prefixing the tables in $system_table_list
Dan
diff
changeset
+ − 281
'search_index',
f82da241eaf8
Fixed system table list; added safeguard against twice prefixing the tables in $system_table_list
Dan
diff
changeset
+ − 282
'captcha',
f82da241eaf8
Fixed system table list; added safeguard against twice prefixing the tables in $system_table_list
Dan
diff
changeset
+ − 283
'diffiehellman',
f82da241eaf8
Fixed system table list; added safeguard against twice prefixing the tables in $system_table_list
Dan
diff
changeset
+ − 284
'plugins',
f82da241eaf8
Fixed system table list; added safeguard against twice prefixing the tables in $system_table_list
Dan
diff
changeset
+ − 285
'ranks'
352
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 286
);
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 287
719
f82da241eaf8
Fixed system table list; added safeguard against twice prefixing the tables in $system_table_list
Dan
diff
changeset
+ − 288
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
diff
changeset
+ − 289
{
719
f82da241eaf8
Fixed system table list; added safeguard against twice prefixing the tables in $system_table_list
Dan
diff
changeset
+ − 290
define('ENANO_TABLELIST_PREFIXED', 1);
352
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 291
foreach ( $system_table_list as $i => $_ )
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 292
{
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 293
$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
diff
changeset
+ − 294
}
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 295
}
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 296
1
+ − 297
/*
+ − 298
* MIMETYPES
+ − 299
*
+ − 300
* This array defines the 166 known MIME types used by the Enano file-extension filter. Whether extensions are allowed or not is
+ − 301
* determined by a bitfield in the config table.
+ − 302
*/
+ − 303
+ − 304
global $mime_types, $mimetype_exps, $mimetype_extlist;
+ − 305
+ − 306
// IMPORTANT: this array can NEVER have items removed from it or key indexes changed
+ − 307
$mime_types = Array (
+ − 308
'ai' => 'application/postscript',
+ − 309
'aif' => 'audio/x-aiff',
+ − 310
'aifc' => 'audio/x-aiff',
+ − 311
'aiff' => 'audio/x-aiff',
+ − 312
'au' => 'audio/basic',
+ − 313
'avi' => 'video/x-msvideo',
+ − 314
'bcpio' => 'application/x-bcpio',
+ − 315
'bin' => 'application/octet-stream',
+ − 316
'bmp' => 'image/bmp',
+ − 317
'bz2' => 'application/x-bzip',
+ − 318
'cdf' => 'application/x-netcdf',
+ − 319
'cgm' => 'image/cgm',
+ − 320
'class' => 'application/octet-stream',
+ − 321
'cpio' => 'application/x-cpio',
+ − 322
'cpt' => 'application/mac-compactpro',
+ − 323
'csh' => 'application/x-csh',
+ − 324
'css' => 'text/css',
+ − 325
'dcr' => 'application/x-director',
+ − 326
'dir' => 'application/x-director',
+ − 327
'djv' => 'image/vnd.djvu',
+ − 328
'djvu' => 'image/vnd.djvu',
+ − 329
'dll' => 'application/octet-stream',
+ − 330
'dms' => 'application/octet-stream',
+ − 331
'doc' => 'application/msword',
+ − 332
'dtd' => 'application/xml-dtd',
+ − 333
'dvi' => 'application/x-dvi',
+ − 334
'dxr' => 'application/x-director',
+ − 335
'eps' => 'application/postscript',
+ − 336
'etx' => 'text/x-setext',
+ − 337
'exe' => 'application/octet-stream',
+ − 338
'ez' => 'application/andrew-inset',
+ − 339
'gif' => 'image/gif',
+ − 340
'gram' => 'application/srgs',
+ − 341
'grxml' => 'application/srgs+xml',
+ − 342
'gtar' => 'application/x-gtar',
+ − 343
'gz' => 'application/x-gzip',
+ − 344
'hdf' => 'application/x-hdf',
+ − 345
'hqx' => 'application/mac-binhex40',
+ − 346
'htm' => 'text/html',
+ − 347
'html' => 'text/html',
+ − 348
'ice' => 'x-conference/x-cooltalk',
+ − 349
'ico' => 'image/x-icon',
+ − 350
'ics' => 'text/calendar',
+ − 351
'ief' => 'image/ief',
+ − 352
'ifb' => 'text/calendar',
+ − 353
'iges' => 'model/iges',
+ − 354
'igs' => 'model/iges',
+ − 355
'jar' => 'application/zip',
+ − 356
'jpe' => 'image/jpeg',
+ − 357
'jpeg' => 'image/jpeg',
+ − 358
'jpg' => 'image/jpeg',
+ − 359
'js' => 'application/x-javascript',
+ − 360
'kar' => 'audio/midi',
+ − 361
'latex' => 'application/x-latex',
+ − 362
'lha' => 'application/octet-stream',
+ − 363
'lzh' => 'application/octet-stream',
+ − 364
'm3u' => 'audio/x-mpegurl',
+ − 365
'man' => 'application/x-troff-man',
+ − 366
'mathml' => 'application/mathml+xml',
+ − 367
'me' => 'application/x-troff-me',
+ − 368
'mesh' => 'model/mesh',
+ − 369
'mid' => 'audio/midi',
+ − 370
'midi' => 'audio/midi',
+ − 371
'mif' => 'application/vnd.mif',
+ − 372
'mov' => 'video/quicktime',
+ − 373
'movie' => 'video/x-sgi-movie',
+ − 374
'mp2' => 'audio/mpeg',
+ − 375
'mp3' => 'audio/mpeg',
+ − 376
'mpe' => 'video/mpeg',
+ − 377
'mpeg' => 'video/mpeg',
+ − 378
'mpg' => 'video/mpeg',
+ − 379
'mpga' => 'audio/mpeg',
+ − 380
'ms' => 'application/x-troff-ms',
+ − 381
'msh' => 'model/mesh',
+ − 382
'mxu' => 'video/vnd.mpegurl',
+ − 383
'nc' => 'application/x-netcdf',
+ − 384
'oda' => 'application/oda',
+ − 385
'ogg' => 'application/ogg',
+ − 386
'ogm' => 'application/ogg',
+ − 387
'pbm' => 'image/x-portable-bitmap',
+ − 388
'pdb' => 'chemical/x-pdb',
+ − 389
'pdf' => 'application/pdf',
+ − 390
'pgm' => 'image/x-portable-graymap',
+ − 391
'pgn' => 'application/x-chess-pgn',
+ − 392
'png' => 'image/png',
+ − 393
'pnm' => 'image/x-portable-anymap',
+ − 394
'ppm' => 'image/x-portable-pixmap',
+ − 395
'ppt' => 'application/vnd.ms-powerpoint',
+ − 396
'ps' => 'application/postscript',
+ − 397
'psd' => 'image/x-photoshop',
+ − 398
'qt' => 'video/quicktime',
+ − 399
'ra' => 'audio/x-realaudio',
+ − 400
'ram' => 'audio/x-pn-realaudio',
+ − 401
'ras' => 'image/x-cmu-raster',
+ − 402
'rdf' => 'text/xml',
+ − 403
'rgb' => 'image/x-rgb',
+ − 404
'rm' => 'audio/x-pn-realaudio',
+ − 405
'roff' => 'application/x-troff',
+ − 406
'rpm' => 'audio/x-pn-realaudio-plugin',
+ − 407
'rss' => 'text/xml',
+ − 408
'rtf' => 'text/rtf',
+ − 409
'rtx' => 'text/richtext',
+ − 410
'sgm' => 'text/sgml',
+ − 411
'sgml' => 'text/sgml',
+ − 412
'sh' => 'application/x-sh',
+ − 413
'shar' => 'application/x-shar',
+ − 414
'silo' => 'model/mesh',
+ − 415
'sit' => 'application/x-stuffit',
+ − 416
'skd' => 'application/x-koan',
+ − 417
'skm' => 'application/x-koan',
+ − 418
'skp' => 'application/x-koan',
+ − 419
'skt' => 'application/x-koan',
+ − 420
'smi' => 'application/smil',
+ − 421
'smil' => 'application/smil',
+ − 422
'snd' => 'audio/basic',
+ − 423
'so' => 'application/octet-stream',
+ − 424
'spl' => 'application/x-futuresplash',
+ − 425
'src' => 'application/x-wais-source',
+ − 426
'stc' => 'application/zip',
+ − 427
'std' => 'application/zip',
+ − 428
'sti' => 'application/zip',
+ − 429
'stm' => 'application/zip',
+ − 430
'stw' => 'application/zip',
+ − 431
'sv4cpio' => 'application/x-sv4cpio',
+ − 432
'sv4crc' => 'application/x-sv4crc',
+ − 433
'svg' => 'image/svg+xml',
+ − 434
'swf' => 'application/x-shockwave-flash',
+ − 435
'sxc' => 'application/zip',
+ − 436
'sxd' => 'application/zip',
+ − 437
'sxi' => 'application/zip',
+ − 438
'sxm' => 'application/zip',
+ − 439
'sxw' => 'application/zip',
+ − 440
't' => 'application/x-troff',
+ − 441
'tar' => 'application/x-tar',
+ − 442
'tcl' => 'application/x-tcl',
+ − 443
'tex' => 'application/x-tex',
+ − 444
'texi' => 'application/x-texinfo',
+ − 445
'texinfo' => 'application/x-texinfo',
+ − 446
'tif' => 'image/tiff',
+ − 447
'tiff' => 'image/tiff',
+ − 448
'tr' => 'application/x-troff',
+ − 449
'tsv' => 'text/tab-separated-values',
+ − 450
'txt' => 'text/plain',
+ − 451
'ustar' => 'application/x-ustar',
+ − 452
'vcd' => 'application/x-cdlink',
+ − 453
'vrml' => 'model/vrml',
+ − 454
'vxml' => 'application/voicexml+xml',
+ − 455
'wav' => 'audio/x-wav',
+ − 456
'wbmp' => 'image/vnd.wap.wbmp',
+ − 457
'wbxml' => 'application/vnd.wap.wbxml',
+ − 458
'wml' => 'text/vnd.wap.wml',
+ − 459
'wmlc' => 'application/vnd.wap.wmlc',
+ − 460
'wmls' => 'text/vnd.wap.wmlscript',
+ − 461
'wmlsc' => 'application/vnd.wap.wmlscriptc',
+ − 462
'wrl' => 'model/vrml',
+ − 463
'xbm' => 'image/x-xbitmap',
+ − 464
'xcf' => 'image/xcf',
+ − 465
'xht' => 'application/xhtml+xml',
+ − 466
'xhtml' => 'application/xhtml+xml',
+ − 467
'xls' => 'application/vnd.ms-excel',
+ − 468
'xml' => 'text/xml',
+ − 469
'xpi' => 'application/zip',
+ − 470
'xpm' => 'image/x-xpixmap',
+ − 471
'xsl' => 'text/xml',
+ − 472
'xslt' => 'text/xml',
+ − 473
'xwd' => 'image/x-xwindowdump',
+ − 474
'xyz' => 'chemical/x-xyz',
+ − 475
'zip' => 'application/zip',
293
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
diff
changeset
+ − 476
'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
diff
changeset
+ − 477
'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
diff
changeset
+ − 478
'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
diff
changeset
+ − 479
'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
diff
changeset
+ − 480
'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
diff
changeset
+ − 481
'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
diff
changeset
+ − 482
'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
diff
changeset
+ − 483
'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
diff
changeset
+ − 484
'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
diff
changeset
+ − 485
'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
diff
changeset
+ − 486
'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
diff
changeset
+ − 487
'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
diff
changeset
+ − 488
'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
diff
changeset
+ − 489
'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
diff
changeset
+ − 490
'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
diff
changeset
+ − 491
'oth' => 'application/vnd.oasis.opendocument.text-web'
1
+ − 492
);
+ − 493
+ − 494
$mimetype_extlist = Array(
+ − 495
'application/andrew-inset'=>'ez',
+ − 496
'application/mac-binhex40'=>'hqx',
+ − 497
'application/mac-compactpro'=>'cpt',
+ − 498
'application/mathml+xml'=>'mathml',
+ − 499
'application/msword'=>'doc',
+ − 500
'application/octet-stream'=>'bin dms lha lzh exe class so dll',
+ − 501
'application/oda'=>'oda',
+ − 502
'application/ogg'=>'ogg ogm',
+ − 503
'application/pdf'=>'pdf',
+ − 504
'application/postscript'=>'ai eps ps',
+ − 505
'application/rdf+xml'=>'rdf',
+ − 506
'application/smil'=>'smi smil',
+ − 507
'application/srgs'=>'gram',
+ − 508
'application/srgs+xml'=>'grxml',
+ − 509
'application/vnd.mif'=>'mif',
+ − 510
'application/vnd.ms-excel'=>'xls',
+ − 511
'application/vnd.ms-powerpoint'=>'ppt',
+ − 512
'application/vnd.wap.wbxml'=>'wbxml',
+ − 513
'application/vnd.wap.wmlc'=>'wmlc',
+ − 514
'application/vnd.wap.wmlscriptc'=>'wmlsc',
+ − 515
'application/voicexml+xml'=>'vxml',
+ − 516
'application/x-bcpio'=>'bcpio',
+ − 517
'application/x-bzip'=>'gz bz2',
+ − 518
'application/x-cdlink'=>'vcd',
+ − 519
'application/x-chess-pgn'=>'pgn',
+ − 520
'application/x-cpio'=>'cpio',
+ − 521
'application/x-csh'=>'csh',
+ − 522
'application/x-director'=>'dcr dir dxr',
+ − 523
'application/x-dvi'=>'dvi',
+ − 524
'application/x-futuresplash'=>'spl',
+ − 525
'application/x-gtar'=>'gtar tar',
+ − 526
'application/x-gzip'=>'gz',
+ − 527
'application/x-hdf'=>'hdf',
+ − 528
'application/x-jar'=>'jar',
+ − 529
'application/x-javascript'=>'js',
+ − 530
'application/x-koan'=>'skp skd skt skm',
+ − 531
'application/x-latex'=>'latex',
+ − 532
'application/x-netcdf'=>'nc cdf',
+ − 533
'application/x-sh'=>'sh',
+ − 534
'application/x-shar'=>'shar',
+ − 535
'application/x-shockwave-flash'=>'swf',
+ − 536
'application/x-stuffit'=>'sit',
+ − 537
'application/x-sv4cpio'=>'sv4cpio',
+ − 538
'application/x-sv4crc'=>'sv4crc',
+ − 539
'application/x-tar'=>'tar',
+ − 540
'application/x-tcl'=>'tcl',
+ − 541
'application/x-tex'=>'tex',
+ − 542
'application/x-texinfo'=>'texinfo texi',
+ − 543
'application/x-troff'=>'t tr roff',
+ − 544
'application/x-troff-man'=>'man',
+ − 545
'application/x-troff-me'=>'me',
+ − 546
'application/x-troff-ms'=>'ms',
+ − 547
'application/x-ustar'=>'ustar',
+ − 548
'application/x-wais-source'=>'src',
+ − 549
'application/x-xpinstall'=>'xpi',
+ − 550
'application/xhtml+xml'=>'xhtml xht',
+ − 551
'application/xslt+xml'=>'xslt',
+ − 552
'application/xml'=>'xml xsl',
+ − 553
'application/xml-dtd'=>'dtd',
+ − 554
'application/zip'=>'zip jar xpi sxc stc sxd std sxi sti sxm stm sxw stw ',
+ − 555
'audio/basic'=>'au snd',
+ − 556
'audio/midi'=>'mid midi kar',
+ − 557
'audio/mpeg'=>'mpga mp2 mp3',
+ − 558
'audio/ogg'=>'ogg ',
+ − 559
'audio/x-aiff'=>'aif aiff aifc',
+ − 560
'audio/x-mpegurl'=>'m3u',
+ − 561
'audio/x-ogg'=>'ogg ',
+ − 562
'audio/x-pn-realaudio'=>'ram rm',
+ − 563
'audio/x-pn-realaudio-plugin'=>'rpm',
+ − 564
'audio/x-realaudio'=>'ra',
+ − 565
'audio/x-wav'=>'wav',
+ − 566
'chemical/x-pdb'=>'pdb',
+ − 567
'chemical/x-xyz'=>'xyz',
+ − 568
'image/bmp'=>'bmp',
+ − 569
'image/cgm'=>'cgm',
+ − 570
'image/gif'=>'gif',
+ − 571
'image/ief'=>'ief',
+ − 572
'image/jpeg'=>'jpeg jpg jpe',
+ − 573
'image/png'=>'png',
+ − 574
'image/svg+xml'=>'svg',
+ − 575
'image/tiff'=>'tiff tif',
+ − 576
'image/vnd.djvu'=>'djvu djv',
+ − 577
'image/vnd.wap.wbmp'=>'wbmp',
+ − 578
'image/x-cmu-raster'=>'ras',
+ − 579
'image/x-icon'=>'ico',
+ − 580
'image/x-portable-anymap'=>'pnm',
+ − 581
'image/x-portable-bitmap'=>'pbm',
+ − 582
'image/x-portable-graymap'=>'pgm',
+ − 583
'image/x-portable-pixmap'=>'ppm',
+ − 584
'image/x-rgb'=>'rgb',
+ − 585
'image/x-photoshop'=>'psd',
+ − 586
'image/x-xbitmap'=>'xbm',
+ − 587
'image/x-xpixmap'=>'xpm',
+ − 588
'image/x-xwindowdump'=>'xwd',
+ − 589
'model/iges'=>'igs iges',
+ − 590
'model/mesh'=>'msh mesh silo',
+ − 591
'model/vrml'=>'wrl vrml',
+ − 592
'text/calendar'=>'ics ifb',
+ − 593
'text/css'=>'css',
+ − 594
'text/html'=>'html htm',
+ − 595
'text/plain'=>'txt',
+ − 596
'text/richtext'=>'rtx',
+ − 597
'text/rtf'=>'rtf',
+ − 598
'text/sgml'=>'sgml sgm',
+ − 599
'text/tab-separated-values'=>'tsv',
+ − 600
'text/vnd.wap.wml'=>'wml',
+ − 601
'text/vnd.wap.wmlscript'=>'wmls',
+ − 602
'text/xml'=>'xml xsl xslt rss rdf',
+ − 603
'text/x-setext'=>'etx',
+ − 604
'video/mpeg'=>'mpeg mpg mpe',
+ − 605
'video/ogg'=>'ogm ogg',
+ − 606
'video/quicktime'=>'qt mov',
+ − 607
'video/vnd.mpegurl'=>'mxu',
+ − 608
'video/x-msvideo'=>'avi',
+ − 609
'video/x-ogg'=>'ogm ogg',
+ − 610
'video/x-sgi-movie'=>'movie',
+ − 611
'x-conference/x-cooltalk'=>'ice',
+ − 612
// Added for Enano
+ − 613
'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
diff
changeset
+ − 614
'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
diff
changeset
+ − 615
'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
diff
changeset
+ − 616
'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
diff
changeset
+ − 617
'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
diff
changeset
+ − 618
'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
diff
changeset
+ − 619
'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
diff
changeset
+ − 620
'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
diff
changeset
+ − 621
'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
diff
changeset
+ − 622
'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
diff
changeset
+ − 623
'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
diff
changeset
+ − 624
'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
diff
changeset
+ − 625
'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
diff
changeset
+ − 626
'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
diff
changeset
+ − 627
'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
diff
changeset
+ − 628
'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
diff
changeset
+ − 629
'application/vnd.oasis.opendocument.text-web' => 'oth'
1
+ − 630
);
+ − 631
+ − 632
$k = array_keys($mime_types);
+ − 633
$mimetype_exps = Array();
+ − 634
foreach($k as $s => $x)
+ − 635
{
+ − 636
$mimetype_exps[$x] = pow(2, $s);
+ − 637
}
+ − 638
+ − 639
unset($k, $s, $x);
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 640
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 641
/******************************************************************************
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 642
* Global Variable: JPEG_Segment_Names
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 643
*
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 644
* 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
diff
changeset
+ − 645
*
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 646
******************************************************************************/
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 647
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 648
$GLOBALS[ "JPEG_Segment_Names" ] = array(
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 649
0xC0 => "SOF0", 0xC1 => "SOF1", 0xC2 => "SOF2", 0xC3 => "SOF4",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 650
0xC5 => "SOF5", 0xC6 => "SOF6", 0xC7 => "SOF7", 0xC8 => "JPG",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 651
0xC9 => "SOF9", 0xCA => "SOF10", 0xCB => "SOF11", 0xCD => "SOF13",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 652
0xCE => "SOF14", 0xCF => "SOF15",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 653
0xC4 => "DHT", 0xCC => "DAC",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 654
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 655
0xD0 => "RST0", 0xD1 => "RST1", 0xD2 => "RST2", 0xD3 => "RST3",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 656
0xD4 => "RST4", 0xD5 => "RST5", 0xD6 => "RST6", 0xD7 => "RST7",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 657
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 658
0xD8 => "SOI", 0xD9 => "EOI", 0xDA => "SOS", 0xDB => "DQT",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 659
0xDC => "DNL", 0xDD => "DRI", 0xDE => "DHP", 0xDF => "EXP",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 660
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 661
0xE0 => "APP0", 0xE1 => "APP1", 0xE2 => "APP2", 0xE3 => "APP3",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 662
0xE4 => "APP4", 0xE5 => "APP5", 0xE6 => "APP6", 0xE7 => "APP7",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 663
0xE8 => "APP8", 0xE9 => "APP9", 0xEA => "APP10", 0xEB => "APP11",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 664
0xEC => "APP12", 0xED => "APP13", 0xEE => "APP14", 0xEF => "APP15",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 665
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 666
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 667
0xF0 => "JPG0", 0xF1 => "JPG1", 0xF2 => "JPG2", 0xF3 => "JPG3",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 668
0xF4 => "JPG4", 0xF5 => "JPG5", 0xF6 => "JPG6", 0xF7 => "JPG7",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 669
0xF8 => "JPG8", 0xF9 => "JPG9", 0xFA => "JPG10", 0xFB => "JPG11",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 670
0xFC => "JPG12", 0xFD => "JPG13",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 671
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 672
0xFE => "COM", 0x01 => "TEM", 0x02 => "RES",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 673
);
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 674
711
+ − 675
// DST profiles
+ − 676
global $dst_profiles;
+ − 677
$dst_profiles = array(
+ − 678
'off' => '0;0;0;0;60',
+ − 679
'usa' => '3;' . SECOND_SUNDAY . ';11;' . FIRST_SUNDAY . ';60',
+ − 680
'europe' => '3;' . LAST_SUNDAY . ';10;' . LAST_SUNDAY . ';60',
+ − 681
'australia' => '10;' . LAST_SUNDAY . ';3;' . LAST_SUNDAY . ';60',
+ − 682
'tasmania' => '10;' . FIRST_SUNDAY . ';3;' . LAST_SUNDAY . ';60'
+ − 683
);