Add Status: 302 header for redirects, have fun, nitrox. :)
This commit is contained in:
parent
80534cb91a
commit
9bfe2cec62
@ -10,7 +10,9 @@ header('Content-Type: text/html; charset=' . LANG_CHARSET);
|
||||
if (isset($serendipity['GET']['delete'], $serendipity['GET']['entry'], $serendipity['GET']['type'])) {
|
||||
serendipity_deleteComment($serendipity['GET']['delete'], $serendipity['GET']['entry'], $serendipity['GET']['type']);
|
||||
if (serendipity_isResponseClean($_SERVER['HTTP_REFERER'])) {
|
||||
header('Status: 302 Found');
|
||||
header('Location: '. $_SERVER['HTTP_REFERER']);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
@ -170,6 +172,7 @@ if ($type == 'trackback') {
|
||||
if (serendipity_saveComment($id, $comment, 'NORMAL')) {
|
||||
$sc_url = $serendipity['baseURL'] . 'comment.php?serendipity[entry_id]=' . $id . '&success=true&url=' . urlencode($_SERVER['HTTP_REFERER']);
|
||||
if (serendipity_isResponseClean($sc_url)) {
|
||||
header('Status: 302 Found');
|
||||
header('Location: ' . $sc_url);
|
||||
}
|
||||
exit;
|
||||
|
@ -588,7 +588,9 @@ function serendipity_allowCommentsToggle($entry_id, $switch = 'disable') {
|
||||
$query = "UPDATE {$serendipity['dbPrefix']}entries SET allow_comments = '" . ($switch == 'disable' ? 'false' : 'true') . "' WHERE id = '". (int)$entry_id ."' $admin";
|
||||
serendipity_db_query($query);
|
||||
if (serendipity_isResponseClean($_SERVER['HTTP_REFERER'])) {
|
||||
header('Status: 302 Found');
|
||||
header('Location: '. $_SERVER['HTTP_REFERER']);
|
||||
exit;
|
||||
}
|
||||
} else {
|
||||
die('What are you up to? You need to be an admin to close comments');
|
||||
|
@ -278,6 +278,7 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
|
||||
if (serendipity_saveComment($serendipity['POST']['entry_id'], $comment, 'NORMAL')) {
|
||||
$sc_url = ($_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . (strstr($_SERVER['REQUEST_URI'], '?') ? '&' : '?') . 'serendipity[csuccess]=' . (isset($serendipity['csuccess']) ? $serendipity['csuccess'] : 'true');
|
||||
if (serendipity_isResponseClean($sc_url)) {
|
||||
header('Status: 302 Found');
|
||||
header('Location: ' . $sc_url);
|
||||
}
|
||||
exit;
|
||||
@ -366,6 +367,7 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
|
||||
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
|
||||
$base = str_replace('http://', 'https://', $base);
|
||||
}
|
||||
header('Status: 302 Found');
|
||||
header("Location: {$base}serendipity_admin.php");
|
||||
exit;
|
||||
} else if (preg_match(PAT_ARCHIVE, $uri)) {
|
||||
|
1
rss.php
1
rss.php
@ -174,6 +174,7 @@ if (is_array($plugins)) {
|
||||
!(serendipity_userLoggedIn() && isset($_GET['forceLocal']))
|
||||
) {
|
||||
$url = 'http://feeds.feedburner.com/' . $plugin->get_config('fb_id');
|
||||
header('Status: 302 Found');
|
||||
header('Location: ' . $url);
|
||||
exit;
|
||||
}
|
||||
|
@ -216,11 +216,13 @@ switch ($serendipity['GET']['step']) {
|
||||
$curl = ($_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . ($_SERVER['HTTP_PORT'] != 80 ? ':' . $_SERVER['HTTP_PORT'] : '');
|
||||
switch($serendipity['GET']['show']) {
|
||||
case 'redirect':
|
||||
header('Status: 302 Found');
|
||||
header('Location: ' . $curl . $file['links']['imagelinkurl']);
|
||||
exit;
|
||||
break;
|
||||
|
||||
case 'redirectThumb':
|
||||
header('Status: 302 Found');
|
||||
header('Location: ' . $curl . $file['show_thumb']);
|
||||
exit;
|
||||
break;
|
||||
|
@ -174,6 +174,7 @@ $serendipity['charsets'] = array(
|
||||
* Kill the script if we are not installed, and not inside the installer
|
||||
*/
|
||||
if ( !defined('IN_installer') && IS_installed === false ) {
|
||||
header('Status: 302 Found');
|
||||
header('Location: ' . (strtolower($_SERVER['HTTPS']) == 'on' ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . str_replace('\\', '/', dirname($_SERVER['PHP_SELF'])) . '/serendipity_admin.php');
|
||||
serendipity_die(sprintf(SERENDIPITY_NOT_INSTALLED, 'serendipity_admin.php'));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user