diff options
Diffstat (limited to 'site/app/config/constants.php')
-rw-r--r-- | site/app/config/constants.php | 73 |
1 files changed, 38 insertions, 35 deletions
diff --git a/site/app/config/constants.php b/site/app/config/constants.php index dc4190a..9d90eb2 100644 --- a/site/app/config/constants.php +++ b/site/app/config/constants.php @@ -43,7 +43,13 @@ * Site URL default */ if (!defined('SITE_URL')) - define('SITE_URL', 'https://addons.mozilla.org'); + define('SITE_URL', 'http://addons.mozilla.org'); + +/** + * Secure Site URL default + */ +if (!defined('SSITE_URL')) + define('SSITE_URL', 'https://addons.mozilla.org'); /** * Site State default @@ -148,17 +154,19 @@ define('APP_THUNDERBIRD', 18); define('APP_SEAMONKEY', 59); define('APP_SUNBIRD', 52); define('APP_FENNEC', 60); +define('APP_SUGAR', 19); global $app_shortnames; // shortnames are used in URLs $app_shortnames = array( - 'sugar' => APP_FIREFOX, - 'thunderbird' => APP_THUNDERBIRD, - 'seamonkey' => APP_SEAMONKEY, - 'sunbird' => APP_SUNBIRD, - 'fennec' => APP_FENNEC +// 'firefox' => APP_FIREFOX, +// 'thunderbird' => APP_THUNDERBIRD, +// 'seamonkey' => APP_SEAMONKEY, +// 'sunbird' => APP_SUNBIRD, +// 'fennec' => APP_FENNEC, + 'sugar' => APP_SUGAR ); global $app_prettynames; $app_prettynames = array( // Overridden with L10n in bootstrap.php - 'sugar' => "Sugar", + 'firefox' => "Firefox", 'thunderbird' => "Thunderbird", 'seamonkey' => "SeaMonkey", 'sunbird' => "Sunbird", @@ -166,6 +174,8 @@ $app_prettynames = array( // Overridden with L10n in bootstrap.php ); global $browser_apps; // browser applications; for non-browser apps, use !in_array() $browser_apps = array( + APP_FIREFOX, + APP_SEAMONKEY ); global $other_layouts; // non-app top-level layouts in URLs // controller => header @@ -183,16 +193,22 @@ $valid_layouts = array_merge($other_layouts, $app_shortnames); * Addontypes */ define('ADDON_ANY', '-1'); // default of advanced search -define('ADDON_EXTENSION', '1'); -define('ADDON_THEME', '2'); -define('ADDON_DICT', '3'); -define('ADDON_SEARCH', '4'); -define('ADDON_LPAPP', '5'); -define('ADDON_LPADDON', '6'); -define('ADDON_PLUGIN', '7'); -define('ADDON_API', '8'); // not actually a type but used to identify extensions + themes - -define('COUNT_ADDON_PLUGIN', 7); // Since the plugin page is static, define a static count here, +if (!defined('ADDON_EXTENSION')) + define('ADDON_EXTENSION', '1'); +if (!defined('ADDON_THEME')) + define('ADDON_THEME', '2'); +if (!defined('ADDON_DICT')) + define('ADDON_DICT', '3'); +if (!defined('ADDON_SEARCH')) + define('ADDON_SEARCH', '4'); +if (!defined('ADDON_LPAPP')) + define('ADDON_LPAPP', '5'); +if (!defined('ADDON_LPADDON')) + define('ADDON_LPADDON', '6'); +if (!defined('ADDON_PLUGIN')) + define('ADDON_PLUGIN', '7'); +if (!defined('ADDON_API')) + define('ADDON_API', '8'); // not actually a type but used to identify extensions + themes /** * Add-on Author Roles @@ -204,15 +220,6 @@ define('AUTHOR_ROLE_DEV', 4); define('AUTHOR_ROLE_VIEWER', 1); define('AUTHOR_ROLE_NONE', 0); -/** - * Collection Author Roles - */ -define('COLLECTION_ROLE_OWNER', 2); -define('COLLECTION_ROLE_ADMIN', 1); -define('COLLECTION_ROLE_PUBLISHER', 0); - -define('COLLECTOR_ID', 11950); - /* hybrid categories (extensions + other add-on types) */ global $hybrid_categories; $hybrid_categories = array( @@ -229,7 +236,11 @@ $hybrid_categories = array( // for very little gain. global $app_listedtypes; $app_listedtypes = array( - APP_FIREFOX => array(ADDON_EXTENSION) + APP_FIREFOX => array(ADDON_EXTENSION, ADDON_THEME, ADDON_DICT, ADDON_SEARCH, ADDON_PLUGIN), + APP_THUNDERBIRD => array(ADDON_EXTENSION, ADDON_THEME, ADDON_DICT), + APP_SEAMONKEY => array(ADDON_EXTENSION, ADDON_THEME, ADDON_DICT, ADDON_SEARCH, ADDON_PLUGIN), + APP_SUNBIRD => array(ADDON_EXTENSION, ADDON_THEME, ADDON_DICT), + APP_SUGAR => array(ADDON_ACTIVITY, ADDON_CONTENT), ); /** @@ -270,12 +281,8 @@ define('VALID_URL_REQ','/^https?:\/\/([a-z0-9][a-z0-9-]*\.)+([a-z]+)(:[0-9]+)?(\ define('VALID_URL_OPT','/(^$)|(^https?:\/\/([a-z0-9][a-z0-9-]*\.)+([a-z]+)(:[0-9]+)?(\/|$))/i'); // EMAIL optional validator define('VALID_EMAIL_OPT', '/(^$)|\\A(?:^([a-z0-9][a-z0-9_\\-\\.\\+]*)@([a-z0-9][a-z0-9\\.\\-]{0,63}\\.(com|org|net|biz|info|name|net|pro|aero|coop|museum|[a-z]{2,4}))$)\\z/i'); -// UUID required validator -define('VALID_UUID_REQ','/^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$/'); // regex to preg_replace() the bad characters in uploaded filenames define('INVALID_FILENAME_CHARS', '/[^\w\d\.\-_!+]/'); -// invalid collection nicknames -define('INVALID_COLLECTION_NICKNAME_CHARS', INVALID_FILENAME_CHARS); /** * entities to be sanitized by publish() @@ -297,8 +304,4 @@ if(defined('ROOT')) { include_once ROOT.DS.APP_DIR.DS.'config'.DS.'revisions.php'; } -/** - * Password Reset Expires: the number of days before a resetcode expires. - */ -define('PASSWORD_RESET_EXPIRES', 3); ?> |