Fixed bug #0000047: Now a user will be redirected to prev. location after editing a post. Also fixed line breaks.

git-svn-id: https://develop.svn.wordpress.org/trunk@1423 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
jverber 2004-06-14 20:09:46 +00:00
parent 9724fbd2da
commit d2e20de82d
2 changed files with 3 additions and 1 deletions

View File

@ -163,7 +163,7 @@ if ('publish' != $post_status || 0 == $post_ID) {
<?php
}
?>
<input name="referredby" type="hidden" id="referredby" value="<?php echo $_SERVER['HTTP_REFERER']; ?>" />
<input name="referredby" type="hidden" id="referredby" value="<?php echo htmlspecialchars($_SERVER['HTTP_REFERER']); ?>" />
</p>
<?php
if ('' != $pinged) {

View File

@ -334,6 +334,8 @@ case 'editpost':
$location = $_SERVER['HTTP_REFERER'] . '&message=2#postcustom';
} elseif ($_POST['deletemeta']) {
$location = $_SERVER['HTTP_REFERER'] . '&message=3#postcustom';
} elseif (isset($_POST['referredby']) && $_POST['referredby'] != $_SERVER['HTTP_REFERER']) {
$location = $_POST['referredby'];
} else {
$location = 'post.php';
}