Don't run url_to_postid on admin pages.

git-svn-id: http://svn.automattic.com/wordpress/trunk@7740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-04-18 18:22:33 +00:00
parent 65e4ddc684
commit 2ca92d8905
2 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ $saveasdraft = '<input name="save" type="submit" id="save" class="button" tabind
<input name="referredby" type="hidden" id="referredby" value="<?php
if ( !empty($_REQUEST['popupurl']) )
echo clean_url(stripslashes($_REQUEST['popupurl']));
else if ( url_to_postid(wp_get_referer()) == $post_ID && strpos( wp_get_referer(), '/wp-admin/' ) === false )
else if ( strpos( wp_get_referer(), '/wp-admin/' ) === false && url_to_postid(wp_get_referer()) == $post_ID )
echo 'redo';
else
echo clean_url(stripslashes(wp_get_referer()));

View File

@ -48,7 +48,7 @@ if (isset($mode) && 'bookmarklet' == $mode)
<input type="hidden" id="post_type" name="post_type" value="<?php echo $post->post_type ?>" />
<input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo $post->post_status ?>" />
<input name="referredby" type="hidden" id="referredby" value="<?php
if ( url_to_postid(wp_get_referer()) == $post_ID && strpos( wp_get_referer(), '/wp-admin/' ) === false )
if ( strpos( wp_get_referer(), '/wp-admin/' ) === false && url_to_postid(wp_get_referer()) == $post_ID )
echo 'redo';
else
echo clean_url(stripslashes(wp_get_referer()));