summaryrefslogtreecommitdiffstats
path: root/wp-includes/pluggable.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-06-27 11:03:10 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-06-27 11:03:10 +0000
commit8db1e81228b0e295199f6e3ee8a99d223c48f8c2 (patch)
tree131d8b23b9e939a9c23f24ec650b343efa918c5c /wp-includes/pluggable.php
parent13aff523358403d08dc7fcb0d844a2e6c12df41a (diff)
downloadwordpress-mu-8db1e81228b0e295199f6e3ee8a99d223c48f8c2.tar.gz
wordpress-mu-8db1e81228b0e295199f6e3ee8a99d223c48f8c2.tar.xz
wordpress-mu-8db1e81228b0e295199f6e3ee8a99d223c48f8c2.zip
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@599 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/pluggable.php')
-rw-r--r--wp-includes/pluggable.php27
1 files changed, 2 insertions, 25 deletions
diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php
index 8724cd9..9c2440f 100644
--- a/wp-includes/pluggable.php
+++ b/wp-includes/pluggable.php
@@ -227,7 +227,7 @@ function auth_redirect() {
(empty($_COOKIE[USER_COOKIE])) ) {
nocache_headers();
- header('Location: ' . get_settings('siteurl') . '/wp-login.php?redirect_to=' . urlencode($_SERVER['REQUEST_URI']));
+ wp_redirect(get_settings('siteurl') . '/wp-login.php?redirect_to=' . urlencode($_SERVER['REQUEST_URI']));
exit();
}
}
@@ -235,34 +235,11 @@ endif;
if ( !function_exists('check_admin_referer') ) :
function check_admin_referer($action = -1) {
- global $pagenow, $menu, $submenu, $parent_file, $submenu_file;;
$adminurl = strtolower(get_settings('siteurl')).'/wp-admin';
$referer = strtolower(wp_get_referer());
if ( !wp_verify_nonce($_REQUEST['_wpnonce'], $action) &&
!(-1 == $action && strstr($referer, $adminurl)) ) {
- if ( $referer )
- $adminurl = $referer;
- $title = __('WordPress Confirmation');
- require_once(ABSPATH . '/wp-admin/admin-header.php');
- // Remove extra layer of slashes.
- $_POST = stripslashes_deep($_POST );
- if ( $_POST ) {
- $q = http_build_query($_POST);
- $q = explode( ini_get('arg_separator.output'), $q);
- $html .= "\t<form method='post' action='$pagenow'>\n";
- foreach ( (array) $q as $a ) {
- $v = substr(strstr($a, '='), 1);
- $k = substr($a, 0, -(strlen($v)+1));
- $html .= "\t\t<input type='hidden' name='" . wp_specialchars( urldecode($k), 1 ) . "' value='" . wp_specialchars( urldecode($v), 1 ) . "' />\n";
- }
- $html .= "\t\t<input type='hidden' name='_wpnonce' value='" . wp_create_nonce($action) . "' />\n";
- $html .= "\t\t<div id='message' class='confirm fade'>\n\t\t<p>" . __('Are you sure you want to do this?') . "</p>\n\t\t<p><a href='$adminurl'>" . __('No') . "</a> <input type='submit' value='" . __('Yes') . "' /></p>\n\t\t</div>\n\t</form>\n";
- } else {
- $html .= "\t<div id='message' class='confirm fade'>\n\t<p>" . __('Are you sure you want to do this?') . "</p>\n\t<p><a href='$adminurl'>" . __('No') . "</a> <a href='" . add_query_arg( '_wpnonce', wp_create_nonce($action), $_SERVER['REQUEST_URI'] ) . "'>" . __('Yes') . "</a></p>\n\t</div>\n";
- }
- $html .= "</body>\n</html>";
- echo $html;
- include_once(ABSPATH . '/wp-admin/admin-footer.php');
+ wp_nonce_ays($action);
die();
}
do_action('check_admin_referer', $action);