Commit c4aeb3b3 authored by mose's avatar mose

replace $_SESSION[user] by $user that is set in tiki-setup_base.php

parent 43431cc4
<?php
// $Header: /cvsroot/tikiwiki/tiki/messu-broadcast.php,v 1.13 2003-10-08 03:53:08 dheltzel Exp $
// $Header: /cvsroot/tikiwiki/tiki/messu-broadcast.php,v 1.14 2003-10-19 13:44:21 mose Exp $
// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
......@@ -60,7 +60,7 @@ $smarty->assign('mid', 'messu-broadcast.tpl');
$smarty->assign('sent', 0);
if (isset($_REQUEST['reply']) || isset($_REQUEST['replyall'])) {
$messulib->flag_message($_SESSION['user'], $_REQUEST['msgId'], 'isReplied', 'y');
$messulib->flag_message($user, $_REQUEST['msgId'], 'isReplied', 'y');
}
if (isset($_REQUEST['group'])) {
......@@ -124,8 +124,7 @@ if (isset($_REQUEST['send'])) {
// Insert the message in the inboxes of each user
foreach ($users as $a_user) {
$messulib->post_message($a_user, $_SESSION['user'], $a_user,
'', $_REQUEST['subject'], $_REQUEST['body'], $_REQUEST['priority']);
$messulib->post_message($a_user, $user, $a_user, '', $_REQUEST['subject'], $_REQUEST['body'], $_REQUEST['priority']);
}
$smarty->assign('message', $message);
......
<?php
// $Header: /cvsroot/tikiwiki/tiki/messu-compose.php,v 1.11 2003-10-08 03:53:08 dheltzel Exp $
// $Header: /cvsroot/tikiwiki/tiki/messu-compose.php,v 1.12 2003-10-19 13:44:21 mose Exp $
// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
......@@ -65,7 +65,7 @@ $smarty->assign('mid', 'messu-compose.tpl');
$smarty->assign('sent', 0);
if (isset($_REQUEST['reply']) || isset($_REQUEST['replyall'])) {
$messulib->flag_message($_SESSION['user'], $_REQUEST['msgId'], 'isReplied', 'y');
$messulib->flag_message($user, $_REQUEST['msgId'], 'isReplied', 'y');
}
if (isset($_REQUEST['send'])) {
......@@ -151,7 +151,7 @@ if (isset($_REQUEST['send'])) {
// Insert the message in the inboxes of each user
foreach ($users as $a_user) {
$messulib->post_message(
$a_user, $_SESSION['user'], $_REQUEST['to'], $_REQUEST['cc'], $_REQUEST['subject'], $_REQUEST['body'],
$a_user, $user, $_REQUEST['to'], $_REQUEST['cc'], $_REQUEST['subject'], $_REQUEST['body'],
$_REQUEST['priority']);
}
......
<?php
// $Header: /cvsroot/tikiwiki/tiki/messu-mailbox.php,v 1.9 2003-10-08 03:53:08 dheltzel Exp $
// $Header: /cvsroot/tikiwiki/tiki/messu-mailbox.php,v 1.10 2003-10-19 13:44:21 mose Exp $
// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
......@@ -30,21 +30,21 @@ if ($tiki_p_messages != 'y') {
die;
}
$maxRecords = $messulib->get_user_preference($_SESSION['user'], 'maxRecords', 20);
$maxRecords = $messulib->get_user_preference($user, 'maxRecords', 20);
// Mark messages if the mark button was pressed
if (isset($_REQUEST["mark"]) && isset($_REQUEST["msg"])) {
foreach (array_keys($_REQUEST["msg"])as $msg) {
$parts = explode('_', $_REQUEST['action']);
$messulib->flag_message($_SESSION['user'], $msg, $parts[0], $parts[1]);
$messulib->flag_message($user, $msg, $parts[0], $parts[1]);
}
}
// Delete messages if the delete button was pressed
if (isset($_REQUEST["delete"]) && isset($_REQUEST["msg"])) {
foreach (array_keys($_REQUEST["msg"])as $msg) {
$messulib->delete_message($_SESSION['user'], $msg);
$messulib->delete_message($user, $msg);
}
}
......
<?php
// $Header: /cvsroot/tikiwiki/tiki/messu-read.php,v 1.10 2003-10-08 03:53:08 dheltzel Exp $
// $Header: /cvsroot/tikiwiki/tiki/messu-read.php,v 1.11 2003-10-19 13:44:21 mose Exp $
// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
......@@ -31,7 +31,7 @@ if ($tiki_p_messages != 'y') {
}
if (isset($_REQUEST["delete"])) {
$messulib->delete_message($_SESSION['user'], $_REQUEST['msgdel']);
$messulib->delete_message($user, $_REQUEST['msgdel']);
}
$smarty->assign('sort_mode', $_REQUEST['sort_mode']);
......@@ -51,23 +51,23 @@ if (!isset($_REQUEST['msgId']) || $_REQUEST['msgId'] == 0) {
}
if (isset($_REQUEST['action'])) {
$messulib->flag_message($_SESSION['user'], $_REQUEST['msgId'], $_REQUEST['action'], $_REQUEST['actionval']);
$messulib->flag_message($user, $_REQUEST['msgId'], $_REQUEST['action'], $_REQUEST['actionval']);
}
// Using the sort_mode, flag, flagval and find get the next and prev messages
$smarty->assign('msgId', $_REQUEST['msgId']);
$next = $messulib->get_next_message($_SESSION['user'], $_REQUEST['msgId'], $_REQUEST['sort_mode'], $_REQUEST['find'],
$next = $messulib->get_next_message($user, $_REQUEST['msgId'], $_REQUEST['sort_mode'], $_REQUEST['find'],
$_REQUEST['flag'], $_REQUEST['flagval'], $_REQUEST['priority']);
$prev = $messulib->get_prev_message($_SESSION['user'], $_REQUEST['msgId'], $_REQUEST['sort_mode'], $_REQUEST['find'],
$prev = $messulib->get_prev_message($user, $_REQUEST['msgId'], $_REQUEST['sort_mode'], $_REQUEST['find'],
$_REQUEST['flag'], $_REQUEST['flagval'], $_REQUEST['priority']);
$smarty->assign('next', $next);
$smarty->assign('prev', $prev);
// Mark the message as read
$messulib->flag_message($_SESSION['user'], $_REQUEST['msgId'], 'isRead', 'y');
$messulib->flag_message($user, $_REQUEST['msgId'], 'isRead', 'y');
// Get the message and assign its data to template vars
$msg = $messulib->get_message($_SESSION['user'], $_REQUEST['msgId']);
$msg = $messulib->get_message($user, $_REQUEST['msgId']);
$smarty->assign('msg', $msg);
$section = 'user_messages';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment