From 6f40829b34aedd7087a67b609134d98fd71a4d64 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Tue, 2 May 2017 01:00:50 -0500 Subject: [PATCH] Bugfix: incorrect session name in use --- common/standard/classes/standard_path.php | 7 ------- common/standard/paths/u/dashboard.php | 2 +- common/standard/paths/u/login.php | 2 +- program/reservation/index.php | 5 +---- 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/common/standard/classes/standard_path.php b/common/standard/classes/standard_path.php index 6b503eb..973f345 100644 --- a/common/standard/classes/standard_path.php +++ b/common/standard/classes/standard_path.php @@ -38,7 +38,6 @@ class c_standard_path extends c_base_path { protected $use_p_tags = NULL; protected $base_path = NULL; - protected $user_name = NULL; /** @@ -49,7 +48,6 @@ class c_standard_path extends c_base_path { $this->use_p_tags = FALSE; $this->base_path = ''; - $this->user_name = ''; } /** @@ -58,7 +56,6 @@ class c_standard_path extends c_base_path { public function __destruct() { unset($this->use_p_tags); unset($this->base_path); - unset($this->user_name); parent::__destruct(); } @@ -77,10 +74,6 @@ class c_standard_path extends c_base_path { if (isset($settings['base_path']) && is_string($settings['base_path'])) { $this->base_path = $settings['base_path']; } - - if (isset($settings['database_user']) && is_string($settings['database_user'])) { - $this->user_name = $settings['database_user']; - } } /** diff --git a/common/standard/paths/u/dashboard.php b/common/standard/paths/u/dashboard.php index 008f71b..caf7b7c 100644 --- a/common/standard/paths/u/dashboard.php +++ b/common/standard/paths/u/dashboard.php @@ -40,7 +40,7 @@ class c_standard_path_user_dashboard extends c_standard_path { $roles = $current_user->get_roles(); } - $wrapper->set_tag($this->pr_create_tag_text_block($this->pr_get_text(2, array('@{user}' => $this->user_name)))); + $wrapper->set_tag($this->pr_create_tag_text_block($this->pr_get_text(2, array('@{user}' => $session->get_name()->get_value_exact())))); $block = $this->pr_create_tag_text_block(NULL); $block->set_tag($this->pr_create_tag_text(3)); diff --git a/common/standard/paths/u/login.php b/common/standard/paths/u/login.php index 4bcfc38..75186c7 100644 --- a/common/standard/paths/u/login.php +++ b/common/standard/paths/u/login.php @@ -67,7 +67,7 @@ class c_standard_path_user_login extends c_standard_path { // Content $wrapper->set_tag($this->pr_create_tag_title(3)); - $wrapper->set_tag($this->pr_create_tag_text_block(4, array('@{user}' => $this->user_name))); + $wrapper->set_tag($this->pr_create_tag_text_block(4, array('@{user}' => $session->get_name()->get_value_exact()))); $wrapper->set_tag($this->pr_create_tag_break()); diff --git a/program/reservation/index.php b/program/reservation/index.php index 6182d83..478ac8a 100644 --- a/program/reservation/index.php +++ b/program/reservation/index.php @@ -22,10 +22,7 @@ class c_reservation_index extends c_standard_index { $this->settings['database_name'] = 'reservation'; $this->settings['database_user_public'] = 'u_reservation_public'; - $this->settings['database_name'] = 'reservation'; - $this->settings['database_user'] = 'u_reservation_public'; - - $this->settings['session_system'] = 'reservation'; + $this->settings['session_system'] = 'reservation'; $this->settings['cookie_name'] = 'reservation-session'; } -- 1.8.3.1