summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r--modules/gallery/helpers/gallery_event.php4
-rw-r--r--modules/gallery/helpers/gallery_theme.php1
-rw-r--r--modules/gallery/helpers/user.php1
3 files changed, 4 insertions, 2 deletions
diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php
index e0de2152..4a6b14b6 100644
--- a/modules/gallery/helpers/gallery_event.php
+++ b/modules/gallery/helpers/gallery_event.php
@@ -23,6 +23,10 @@ class gallery_event_Core {
* Initialization.
*/
static function gallery_ready() {
+ // Call Identity::instance() now to force the load of the user interface classes.
+ // user::load_user will attempt to load the active user from the session and needs
+ // the user definition class, which can't be reached by Kohana's heiracrchical lookup.
+ Identity::instance();
user::load_user();
locales::set_request_locale();
}
diff --git a/modules/gallery/helpers/gallery_theme.php b/modules/gallery/helpers/gallery_theme.php
index 54b35fb7..a342b4bd 100644
--- a/modules/gallery/helpers/gallery_theme.php
+++ b/modules/gallery/helpers/gallery_theme.php
@@ -55,7 +55,6 @@ class gallery_theme_Core {
if ($theme->page_type != "login") {
$view = new View("login.html");
$view->user = user::active();
- $view->writable = user::is_writable();
return $view->render();
}
}
diff --git a/modules/gallery/helpers/user.php b/modules/gallery/helpers/user.php
index efe08830..c51a4a9c 100644
--- a/modules/gallery/helpers/user.php
+++ b/modules/gallery/helpers/user.php
@@ -78,7 +78,6 @@ class user_Core {
* driver classes.
*/
static function load_user() {
- Identity::instance();
$session = Session::instance();
if (!($user = $session->get("user"))) {
$session->set("user", $user = self::guest());