Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@sugarlabs.org>2008-12-19 14:46:43 (GMT)
committer YOUR NAME <USER@develer.com>2009-02-11 18:50:15 (GMT)
commitc8bdc15d17e5589cceedc693ba305611dd2069bc (patch)
treed0edc95f83b066707a503cfea3968aa2504c107e
parent5a47414303169c7e61612b406573f927c1ccdbd3 (diff)
Add APP_SUGAR and ADDON_ACTIVITY to constants and make Sugar the default application
-rw-r--r--site/app/config/bootstrap.php17
-rw-r--r--site/app/config/constants.php8
2 files changed, 12 insertions, 13 deletions
diff --git a/site/app/config/bootstrap.php b/site/app/config/bootstrap.php
index 65bbe75..c414330 100644
--- a/site/app/config/bootstrap.php
+++ b/site/app/config/bootstrap.php
@@ -219,14 +219,8 @@ if (array_key_exists($buf[0],$valid_languages)) {
// Now make sure that there's a known app/layout in the second position.
if (count($buf) < 2 || !array_key_exists($buf[1], $valid_layouts)) {
- // No app or unknown app, so we see if this is seamonkey, otherwise stick
- // firefox in the place of honour and redirect.
- if (array_key_exists('HTTP_USER_AGENT', $_SERVER) &&
- strpos($_SERVER['HTTP_USER_AGENT'], 'SeaMonkey') !== false) {
- array_splice($buf, 1, 0, "seamonkey");
- } else {
- array_splice($buf, 1, 0, "firefox");
- }
+ // No app or unknown app, so make it Sugar.
+ array_splice($buf, 1, 0, "sugar");
redirectWithNewLocaleAndExit($buf);
}
@@ -240,8 +234,8 @@ if (array_key_exists(SITE_LAYOUT, $other_layouts)) {
define('APP_SHORTNAME', $_COOKIE['AMOappName']);
}
else {
- // App wasn't set, so default to Firefox
- define('APP_SHORTNAME', 'firefox');
+ // App wasn't set, so default to Sugar
+ define('APP_SHORTNAME', 'sugar');
}
define('LAYOUT_NAME', $other_layouts[SITE_LAYOUT]);
}
@@ -275,7 +269,8 @@ $app_prettynames = array(
'thunderbird' => ___('main_prettyname_thunderbird'),
'sunbird' => ___('main_prettyname_sunbird'),
'seamonkey' => ___('main_prettyname_seamonkey'),
- 'fennec' => ___('main_prettyname_fennec')
+ 'fennec' => ___('main_prettyname_fennec'),
+ 'sugar' => ___('main_prettyname_sugar')
);
define('APP_PRETTYNAME', $app_prettynames[APP_SHORTNAME]);
diff --git a/site/app/config/constants.php b/site/app/config/constants.php
index fc5c5aa..1345c11 100644
--- a/site/app/config/constants.php
+++ b/site/app/config/constants.php
@@ -148,13 +148,15 @@ 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(
'firefox' => APP_FIREFOX,
'thunderbird' => APP_THUNDERBIRD,
'seamonkey' => APP_SEAMONKEY,
'sunbird' => APP_SUNBIRD,
- 'fennec' => APP_FENNEC
+ 'fennec' => APP_FENNEC,
+ 'sugar' => APP_SUGAR
);
global $app_prettynames;
$app_prettynames = array( // Overridden with L10n in bootstrap.php
@@ -193,6 +195,7 @@ 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('ADDON_ACTIVITY', '100');
/**
* Add-on Author Roles
@@ -223,7 +226,8 @@ $app_listedtypes = array(
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_SUNBIRD => array(ADDON_EXTENSION, ADDON_THEME, ADDON_DICT),
+ APP_SUGAR => array(ADDON_ACTIVITY),
);
/**