mirror of https://github.com/BOINC/boinc.git
Fix previous checkin to conform to RFC (Location header expects complete URL)
svn path=/trunk/boinc/; revision=13413
This commit is contained in:
parent
882d20b226
commit
bc17c8ab45
|
@ -7988,4 +7988,6 @@ Rytis 18 Aug 2007
|
|||
|
||||
html/
|
||||
user/forum_index.php
|
||||
inc/forum.inc
|
||||
inc/
|
||||
forum.inc
|
||||
util.inc
|
||||
|
|
|
@ -418,7 +418,7 @@ function show_forum_title($forum=NULL, $thread=NULL, $extended=true) {
|
|||
if ($logged_in_user) {
|
||||
echo "<td align=\"right\">\n";
|
||||
|
||||
$return = urlencode($_SERVER["SCRIPT_NAME"]."?".$_SERVER["QUERY_STRING"]);
|
||||
$return = urlencode(current_url());
|
||||
echo "<a href=\"forum_index.php?read=1&".url_tokens($logged_in_user->authenticator)."&return=".$return."\">Mark all threads as read</a><br />\n";
|
||||
|
||||
// Private messages
|
||||
|
|
|
@ -707,4 +707,22 @@ function strip_bbcode($string){
|
|||
return preg_replace("/((\[.+\])+?)(.+?)((\[\/.+\])+?)/","",$string);
|
||||
}
|
||||
|
||||
function current_url() {
|
||||
$url = "http";
|
||||
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") {
|
||||
$url .= "s";
|
||||
}
|
||||
$url .= "://";
|
||||
$url .= $_SERVER['SERVER_NAME'];
|
||||
$url .= ":".$_SERVER['SERVER_PORT'];
|
||||
if (isset($_SERVER['REQUEST_URI'])) {
|
||||
$url .= $_SERVER['REQUEST_URI'];
|
||||
} else {
|
||||
if ($_SERVER['QUERY_STRING']) {
|
||||
$url .= "?".$_SERVER['QUERY_STRING'];
|
||||
}
|
||||
}
|
||||
return $url;
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue