summaryrefslogtreecommitdiff
path: root/core/helpers/core_theme.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-03-09 00:03:04 +0000
committerBharat Mediratta <bharat@menalto.com>2009-03-09 00:03:04 +0000
commit198297e0d465de8d479db93cf17d08b5b5e1016e (patch)
tree7ffa7f7d8c55daadadb4e30e72880fd5cb7405aa /core/helpers/core_theme.php
parent72c7fed975ce797da1f33ea82651c5a91ce3957e (diff)
Instead of putting after_install in the url, put it in the session.
This helps us to make sure that we only see the welcome message once.
Diffstat (limited to 'core/helpers/core_theme.php')
-rw-r--r--core/helpers/core_theme.php23
1 files changed, 14 insertions, 9 deletions
diff --git a/core/helpers/core_theme.php b/core/helpers/core_theme.php
index eed64ded..fbb8aef3 100644
--- a/core/helpers/core_theme.php
+++ b/core/helpers/core_theme.php
@@ -19,8 +19,9 @@
*/
class core_theme_Core {
static function head($theme) {
+ $session = Session::instance();
$buf = "";
- if (Session::instance()->get("debug")) {
+ if ($session->get("debug")) {
$buf .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"" .
url::file("core/css/debug.css") . "\" />";
}
@@ -40,7 +41,7 @@ class core_theme_Core {
$buf .= html::script("core/js/fullsize.js");
}
- if (Session::instance()->get("l10n_mode", false)) {
+ if ($session->get("l10n_mode", false)) {
$buf .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"" .
url::file("core/css/l10n_client.css") . "\" />";
$buf .= html::script("lib/jquery.cookie.js");
@@ -64,13 +65,14 @@ class core_theme_Core {
}
static function admin_head($theme) {
+ $session = Session::instance();
$buf = "";
- if (Session::instance()->get("debug")) {
+ if ($session->get("debug")) {
$buf .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"" .
url::file("core/css/debug.css") . "\" />";
}
- if (Session::instance()->get("l10n_mode", false)) {
+ if ($session->get("l10n_mode", false)) {
$buf .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"" .
url::file("core/css/l10n_client.css") . "\" />";
$buf .= html::script("lib/jquery.cookie.js");
@@ -81,25 +83,28 @@ class core_theme_Core {
}
static function page_bottom($theme) {
- if (Session::instance()->get("profiler", false)) {
+ $session = Session::instance();
+ if ($session->get("profiler", false)) {
$profiler = new Profiler();
$profiler->render();
}
- if (Session::instance()->get("l10n_mode", false)) {
+ if ($session->get("l10n_mode", false)) {
return L10n_Client_Controller::l10n_form();
}
- if (Input::instance()->get("after_install")) {
+ if ($session->get("after_install")) {
+ $session->delete("after_install");
return new View("after_install_loader.html");
}
}
static function admin_page_bottom($theme) {
- if (Session::instance()->get("profiler", false)) {
+ $session = Session::instance();
+ if ($session->get("profiler", false)) {
$profiler = new Profiler();
$profiler->render();
}
- if (Session::instance()->get("l10n_mode", false)) {
+ if ($session->get("l10n_mode", false)) {
return L10n_Client_Controller::l10n_form();
}
}