Browse files

Use wp_get_referer(). Props robmiller. fixes #2855

git-svn-id: http://svn.automattic.com/wordpress/trunk@3921 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent e344771 commit 99d63ca220601cd7a561d6c5db808d85f99dbcb4 ryan committed Jun 24, 2006
Showing with 4 additions and 4 deletions.
  1. +2 −2 wp-admin/edit-form-advanced.php
  2. +1 −1 wp-admin/edit-form.php
  3. +1 −1 wp-pass.php
View
4 wp-admin/edit-form-advanced.php
@@ -164,10 +164,10 @@ function focusit() {
<input name="referredby" type="hidden" id="referredby" value="<?php
if ( !empty($_REQUEST['popupurl']) )
echo wp_specialchars($_REQUEST['popupurl']);
-else if ( url_to_postid($_SERVER['HTTP_REFERER']) == $post_ID )
+else if ( url_to_postid(wp_get_referer()) == $post_ID )
echo 'redo';
else
- echo wp_specialchars($_SERVER['HTTP_REFERER']);
+ echo wp_specialchars(wp_get_referer());
?>" /></p>
<?php do_action('edit_form_advanced'); ?>
View
2 wp-admin/edit-form.php
@@ -64,7 +64,7 @@ function focusit() { // focus on first input field
<?php if ('bookmarklet' != $mode) {
echo '<input name="advanced" type="submit" id="advancededit" tabindex="7" value="' . __('Advanced Editing &raquo;') . '" />';
} ?>
- <input name="referredby" type="hidden" id="referredby" value="<?php if (isset($_SERVER['HTTP_REFERER'])) echo urlencode($_SERVER['HTTP_REFERER']); ?>" />
+ <input name="referredby" type="hidden" id="referredby" value="<?php if (isset(wp_get_referer())) echo urlencode($_SERVER['HTTP_REFERER']); ?>" />
</p>
<?php do_action('simple_edit_form', ''); ?>
View
2 wp-pass.php
@@ -7,5 +7,5 @@
// 10 days
setcookie('wp-postpass_' . COOKIEHASH, $_POST['post_password'], time() + 864000, COOKIEPATH);
-wp_redirect($_SERVER['HTTP_REFERER']);
+wp_redirect(wp_get_referer());
?>

0 comments on commit 99d63ca

Please sign in to comment.