From a512f85b1f43068c203b29486422ad5700cdc6fe Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 18 May 2006 00:59:04 +0000 Subject: [PATCH] Backport nonce fixes. #2678 git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@3779 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-functions.php | 4 ++-- wp-admin/edit-form-advanced.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index 269f415782..85be0c30eb 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -597,9 +597,9 @@ function cat_rows($parent = 0, $level = 0, $categories = 0) { if ( current_user_can('manage_categories') ) { $edit = "".__('Edit').""; $default_cat_id = get_option('default_category'); - + if ($category->cat_ID != $default_cat_id) - $edit .= "cat_ID, '".sprintf(__("You are about to delete the category "%s". All of its posts will go to the default category.\\n"OK" to delete, "Cancel" to stop."), wp_specialchars($category->cat_name, 1))."' );\" class='delete'>".__('Delete').""; + $edit .= "cat_ID ) . "' onclick=\"return deleteSomething( 'cat', $category->cat_ID, '" . sprintf(__("You are about to delete the category "%s". All of its posts will go to the default category.\\n"OK" to delete, "Cancel" to stop."), wp_specialchars($category->cat_name, 1))."' );\" class='delete'>".__('Delete').""; else $edit .= "".__("Default"); } diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index bee6a9beac..755fd7a462 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -266,8 +266,8 @@ if($metadata = has_meta($post_ID)) { - -post_title) ) . "')\""; ?> /> + +post_title) ) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true;}\""; ?> />