Forums: return user to the same page after selecting "Mark all threads as read".

svn path=/trunk/boinc/; revision=13412
This commit is contained in:
Rytis Slatkevičius 2007-08-18 16:14:53 +00:00
parent 9e70619846
commit 882d20b226
3 changed files with 11 additions and 2 deletions

View File

@ -7982,3 +7982,10 @@ Charlie 17 Aug 2007
clientgui/
AdvancedFrame.cpp
BOINCGUIApp.cpp
Rytis 18 Aug 2007
Forums: return user to the same page after selecting "Mark all threads as read".
html/
user/forum_index.php
inc/forum.inc

View File

@ -1,5 +1,4 @@
<?php
$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit
require_once('../inc/db.inc');
@ -419,7 +418,8 @@ function show_forum_title($forum=NULL, $thread=NULL, $extended=true) {
if ($logged_in_user) {
echo "<td align=\"right\">\n";
echo "<a href=\"forum_index.php?read=1&amp;".url_tokens($logged_in_user->authenticator)."\">Mark all threads as read</a><br />\n";
$return = urlencode($_SERVER["SCRIPT_NAME"]."?".$_SERVER["QUERY_STRING"]);
echo "<a href=\"forum_index.php?read=1&amp;".url_tokens($logged_in_user->authenticator)."&amp;return=".$return."\">Mark all threads as read</a><br />\n";
// Private messages
echo pm_notification($logged_in_user);

View File

@ -1,4 +1,5 @@
<?php
$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit
/**
* This is the forum index
* It shows the categories available and each of the forums that are
@ -15,6 +16,7 @@ $logged_in_user = get_logged_in_user(false);
if ((get_int("read", true) == 1) && ($logged_in_user)) {
check_tokens($logged_in_user->authenticator);
mysql_query("UPDATE forum_preferences SET mark_as_read_timestamp=".time()." WHERE userid=".$logged_in_user->id.";");
Header("Location: ".get_str("return", true));
}
function forum_summary($forum) {