mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-05 14:40:44 -04:00
Remove all non Identity API methods from Identity.php. Created an MY_Session class to provide the user state changes in the session and a login.php helper that has the login form.
This commit is contained in:
@@ -37,13 +37,13 @@ class Theme_View_Core extends Gallery_View {
|
||||
parent::__construct($name);
|
||||
|
||||
$this->theme_name = module::get_var("gallery", "active_site_theme");
|
||||
if (Identity::active()->admin) {
|
||||
if (Session::active_user()->admin) {
|
||||
$this->theme_name = Input::instance()->get("theme", $this->theme_name);
|
||||
}
|
||||
$this->item = null;
|
||||
$this->tag = null;
|
||||
$this->set_global("theme", $this);
|
||||
$this->set_global("user", Identity::active());
|
||||
$this->set_global("user", Session::active_user());
|
||||
$this->set_global("page_type", $page_type);
|
||||
$this->set_global("page_title", null);
|
||||
if ($page_type == "album") {
|
||||
@@ -158,7 +158,7 @@ class Theme_View_Core extends Gallery_View {
|
||||
*/
|
||||
public function sidebar_blocks() {
|
||||
$sidebar = block_manager::get_html("site.sidebar", $this);
|
||||
if (empty($sidebar) && Identity::active()->admin) {
|
||||
if (empty($sidebar) && Session::active_user()->admin) {
|
||||
$sidebar = new View("no_sidebar.html");
|
||||
}
|
||||
return $sidebar;
|
||||
|
||||
Reference in New Issue
Block a user