rewrote php session variables

This commit is contained in:
SJ
2013-11-18 19:24:33 +01:00
parent 0809b5a514
commit 881a2380e0
39 changed files with 302 additions and 609 deletions

View File

@ -9,6 +9,7 @@ class ControllerMessageBulkrestore extends Controller {
$this->template = "message/bulkrestore.tpl";
$this->layout = "common/layout-empty";
$session = Registry::get('session');
$request = Registry::get('request');
$db = Registry::get('db');
@ -65,7 +66,7 @@ class ControllerMessageBulkrestore extends Controller {
$rcpt = $this->model_search_search->get_message_recipients($id);
}
else {
array_push($rcpt, $_SESSION['email']);
array_push($rcpt, $session->get("email"));
}
if(count($rcpt) > 0) {

View File

@ -10,7 +10,7 @@ class ControllerMessageNote extends Controller {
$this->template = "message/note.tpl";
$this->layout = "common/layout-empty";
$session = Registry::get('session');
$request = Registry::get('request');
$db = Registry::get('db');
@ -20,7 +20,7 @@ class ControllerMessageNote extends Controller {
if(isset($this->request->post['note']) && isset($this->request->post['id'])) {
if($this->model_search_search->check_your_permission_by_id($this->request->post['id']) == 1) {
$this->model_search_message->add_message_note($this->request->post['id'], $_SESSION['uid'], urldecode($this->request->post['note']));
$this->model_search_message->add_message_note($this->request->post['id'], $session->get("uid"), urldecode($this->request->post['note']));
}
}
}

View File

@ -9,6 +9,7 @@ class ControllerMessageRestore extends Controller {
$this->template = "message/restore.tpl";
$this->layout = "common/layout-empty";
$session = Registry::get('session');
$request = Registry::get('request');
$db = Registry::get('db');
@ -55,7 +56,7 @@ class ControllerMessageRestore extends Controller {
/* send the email to all the recipients of the original email if we are admin or auditor users */
if(Registry::get('auditor_user') == 0) {
array_push($rcpt, $_SESSION['email']);
array_push($rcpt, $session->get("email"));
}
$this->data['data'] = $this->data['text_failed_to_restore'];

View File

@ -9,6 +9,7 @@ class ControllerMessageView extends Controller {
$this->template = "message/view.tpl";
$this->layout = "common/layout-empty";
$session = Registry::get('session');
$request = Registry::get('request');
$db = Registry::get('db');
@ -56,7 +57,7 @@ class ControllerMessageView extends Controller {
if($this->request->server['REQUEST_METHOD'] == 'POST' && isset($this->request->post['tag'])) {
$this->model_search_message->add_message_tag($this->data['id'], $_SESSION['uid'], $this->request->post['tag']);
$this->model_search_message->add_message_tag($this->data['id'], $session->get("uid"), $this->request->post['tag']);
header("Location: " . $_SERVER['HTTP_REFERER']);
exit;
}
@ -66,8 +67,8 @@ class ControllerMessageView extends Controller {
$this->data['attachments'] = $this->model_search_message->get_attachment_list($this->data['piler_id']);
$this->data['message'] = $this->model_search_message->extract_message($this->data['piler_id'], $this->data['search']);
$this->data['message']['tag'] = $this->model_search_message->get_message_tag($this->data['id'], $_SESSION['uid']);
$this->data['message']['note'] = $this->model_search_message->get_message_note($this->data['id'], $_SESSION['uid']);
$this->data['message']['tag'] = $this->model_search_message->get_message_tag($this->data['id'], $session->get("uid"));
$this->data['message']['note'] = $this->model_search_message->get_message_note($this->data['id'], $session->get("uid"));
$this->data['images'] = array();