This commit has been accessed 589 times via Git panel.
commit b6523f1dbec49a6d83dca511eae8eb367c80c764
tree 2753e51619ddf10df4392a14a1a8e2c15eadcd78
parent 84cde9b2215fb7a6d5aa167df08665dbdb6a3bc5
author Engels Antonio <engels@majcms.org> 1277314198 +0800
committer Engels Antonio <engels@majcms.org> 1277314198 +0800
maj-0.14-20080523-bb.zip
diff --git a/index.php b/index.php
index 5d563e5..5b5ab41 100644
--- a/index.php
+++ b/index.php
@@ -370,7 +370,10 @@ if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST
fclose($fp_comment_count_txt);
}
- header("Location: http://{$_SERVER['HTTP_HOST']}" . dirname($_SERVER['PHP_SELF']) . "/index.php?entry={$_REQUEST['entry']}&show=comments");
+ $header_location = "http://{$_SERVER['HTTP_HOST']}" . dirname($_SERVER['PHP_SELF']) . "/index.php?entry={$_REQUEST['entry']}&show=comments";
+ $header_location = str_replace("//index.php","/index.php",$header_location);
+
+ header("Location: $header_location");
}
}
@@ -612,7 +615,11 @@ if (file_exists("data/comments/pending") and file_exists("data/xscreen.txt")) {
if ($xscreen_entry != "." && $xscreen_entry != "..") {
$xscreen_key = file_get_contents("data/items/$xscreen_dir/comments/pending/$xscreen_entry/key.txt");
- header("Location: http://{$_SERVER['HTTP_HOST']}" . dirname($_SERVER['PHP_SELF']) . "/index.php?entry={$xscreen_dir}&comment={$xscreen_entry}&key={$xscreen_key}&action=approve");
+
+ $header_location = "http://{$_SERVER['HTTP_HOST']}" . dirname($_SERVER['PHP_SELF']) . "/index.php?entry={$xscreen_dir}&comment={$xscreen_entry}&key={$xscreen_key}&action=approve";
+ $header_location = str_replace("//index.php","/index.php",$header_location);
+
+ header("Location: $header_location");
}
}
}
tree 2753e51619ddf10df4392a14a1a8e2c15eadcd78
parent 84cde9b2215fb7a6d5aa167df08665dbdb6a3bc5
author Engels Antonio <engels@majcms.org> 1277314198 +0800
committer Engels Antonio <engels@majcms.org> 1277314198 +0800
maj-0.14-20080523-bb.zip
diff --git a/index.php b/index.php
index 5d563e5..5b5ab41 100644
--- a/index.php
+++ b/index.php
@@ -370,7 +370,10 @@ if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST
fclose($fp_comment_count_txt);
}
- header("Location: http://{$_SERVER['HTTP_HOST']}" . dirname($_SERVER['PHP_SELF']) . "/index.php?entry={$_REQUEST['entry']}&show=comments");
+ $header_location = "http://{$_SERVER['HTTP_HOST']}" . dirname($_SERVER['PHP_SELF']) . "/index.php?entry={$_REQUEST['entry']}&show=comments";
+ $header_location = str_replace("//index.php","/index.php",$header_location);
+
+ header("Location: $header_location");
}
}
@@ -612,7 +615,11 @@ if (file_exists("data/comments/pending") and file_exists("data/xscreen.txt")) {
if ($xscreen_entry != "." && $xscreen_entry != "..") {
$xscreen_key = file_get_contents("data/items/$xscreen_dir/comments/pending/$xscreen_entry/key.txt");
- header("Location: http://{$_SERVER['HTTP_HOST']}" . dirname($_SERVER['PHP_SELF']) . "/index.php?entry={$xscreen_dir}&comment={$xscreen_entry}&key={$xscreen_key}&action=approve");
+
+ $header_location = "http://{$_SERVER['HTTP_HOST']}" . dirname($_SERVER['PHP_SELF']) . "/index.php?entry={$xscreen_dir}&comment={$xscreen_entry}&key={$xscreen_key}&action=approve";
+ $header_location = str_replace("//index.php","/index.php",$header_location);
+
+ header("Location: $header_location");
}
}
}