- web: fixed a couple of references to "global $logged_in_user".

It's $g_logged_in_user.

svn path=/trunk/boinc/; revision=15362
This commit is contained in:
David Anderson 2008-06-05 04:35:21 +00:00
parent 4fb05c642c
commit 348f90574c
3 changed files with 19 additions and 9 deletions

View File

@ -4656,3 +4656,13 @@ Charlie 4 June 2008
clientgui/
sg_BoincSimpleGUI.cpp,h
David 4 June 2008
- web: fixed a couple of references to "global $logged_in_user".
It's $g_logged_in_user.
html/
inc/
pm.inc
user/
forum_reply.php

View File

@ -20,7 +20,7 @@ function pm_create_new($error = null) {
echo "</div>\n";
}
global $logged_in_user;
global $g_logged_in_user;
$replyto = get_int("replyto", true);
$userid = get_int("userid", true);
@ -28,7 +28,7 @@ function pm_create_new($error = null) {
$content = null;
if ($replyto) {
$message = BoincPrivateMessage::lookup_id($replyto);
if (!$message || $message->userid != $logged_in_user->id) {
if (!$message || $message->userid != $g_logged_in_user->id) {
error_page("no such message");
}
$content = "[quote]".$message->content."[/quote]\n";
@ -61,7 +61,7 @@ function pm_create_new($error = null) {
echo "<form action=\"pm.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"send\">\n";
echo form_tokens($logged_in_user->authenticator);
echo form_tokens($g_logged_in_user->authenticator);
start_table();
row2(tra("To")."<br /><span class=\"smalltext\">".tra("User IDs or unique usernames, separated with commas")."</span>",
"<input type=\"text\" name=\"to\" value=\"$writeto\" size=\"60\">"
@ -112,10 +112,10 @@ function pm_web_line($notify) {
}
function pm_send($to_user, $subject, $content) {
global $logged_in_user;
global $g_logged_in_user;
$sql_subject = mysql_real_escape_string($subject);
$sql_content = mysql_real_escape_string($content);
$mid = BoincPrivateMessage::insert("(userid, senderid, date, subject, content) VALUES ($to_user->id, $logged_in_user->id, UNIX_TIMESTAMP(), '$sql_subject', '$sql_content')");
$mid = BoincPrivateMessage::insert("(userid, senderid, date, subject, content) VALUES ($to_user->id, $g_logged_in_user->id, UNIX_TIMESTAMP(), '$sql_subject', '$sql_content')");
if (!$mid) {
error_page("Couldn't create message");
}
@ -128,7 +128,7 @@ function pm_send($to_user, $subject, $content) {
break;
case 1:
send_pm_notification_email(
$logged_in_user, $to_user, $subject, $content
$g_logged_in_user, $to_user, $subject, $content
);
break;
}

View File

@ -87,7 +87,7 @@ end_table();
page_tail();
function show_message_row($thread, $parent_post) {
global $logged_in_user;
global $g_logged_in_user;
global $content;
global $preview;
@ -103,14 +103,14 @@ function show_message_row($thread, $parent_post) {
}
$x2 .= " method=\"post\">\n";
$x2 .= form_tokens($logged_in_user->authenticator);
$x2 .= form_tokens($g_logged_in_user->authenticator);
$x2 .= "<textarea name=\"content\" rows=\"18\" cols=\"80\">";
if ($preview) {
$x2 .= stripslashes(htmlspecialchars($content));
} else {
if ($parent_post) $x2 .= quote_text(stripslashes(htmlspecialchars($parent_post->content)), 80)."\n";
}
if (!$logged_in_user->prefs->no_signature_by_default){
if (!$g_logged_in_user->prefs->no_signature_by_default){
$enable_signature="checked=\"true\"";
} else {
$enable_signature="";