Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/site/app/app_controller.php
diff options
context:
space:
mode:
authorshaver@mozilla.com <shaver@mozilla.com@4eb1ac78-321c-0410-a911-ec516a8615a5>2007-02-12 00:33:27 (GMT)
committer shaver@mozilla.com <shaver@mozilla.com@4eb1ac78-321c-0410-a911-ec516a8615a5>2007-02-12 00:33:27 (GMT)
commit23ca7bb7c49f75e1b50fe7c855389088ee015cde (patch)
tree6982571fa7545a96707bb212385ba9b0df45921d /site/app/app_controller.php
parent34272ed6e90ed84bd2d4f15b45b67e7852983bb1 (diff)
Make the referer and flash stuff aware of app, as it is of locale.
git-svn-id: http://svn.mozilla.org/addons/trunk@1953 4eb1ac78-321c-0410-a911-ec516a8615a5
Diffstat (limited to 'site/app/app_controller.php')
-rw-r--r--site/app/app_controller.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/site/app/app_controller.php b/site/app/app_controller.php
index b79a2bd..050c8dc 100644
--- a/site/app/app_controller.php
+++ b/site/app/app_controller.php
@@ -101,9 +101,10 @@ class AppController extends Controller
/**
* locale-aware flash function
*/
- function flash($message, $url, $pause = null, $addLocale = true) {
+ function flash($message, $url, $pause = null, $addLocale = true, $addApp = true) {
$oldBase = $this->base;
if ($addLocale) $this->base = $this->_getLocaleBase();
+ if ($addApp) $this->base .= '/' . APP_SHORTNAME;
$ret = parent::flash($message, $url, $pause);
@@ -114,9 +115,10 @@ class AppController extends Controller
/**
* locale-aware referer
*/
- function referer($default = null, $local = false, $addLocale = true) {
+ function referer($default = null, $local = false, $addLocale = true, $addApp = true) {
$oldRoot = $this->webroot;
if ($addLocale) $this->webroot = $this->_getLocaleWebRoot();
+ if ($addApp) $this->webroot .= '/' . APP_SHORTNAME;
$ret = parent::referer($default, $local);