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

git-svn-id: http://svn.automattic.com/wordpress/trunk@1423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
jverber 2004-06-14 20:09:46 +00:00
parent 7bf795a715
commit ac387706d0
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';
}