Ticket #14530: chaetin.patch
File chaetin.patch, 13.9 KB (added by , 14 years ago) |
---|
-
wp-admin/admin-ajax.php
1249 1249 1250 1250 $taxonomy = !empty($_POST['taxonomy']) ? $_POST['taxonomy'] : false; 1251 1251 if ( ! $taxonomy ) 1252 die( __('Cheatin’ uh?'));1252 wp_die(__('There was a problem loading this page, you may not have the necessary permissions, or may need to <a href="' . get_option('siteurl') . '/wp-login.php">' . __('login') . '</a>.')); 1253 1253 $tax = get_taxonomy($taxonomy); 1254 1254 1255 1255 if ( ! current_user_can( $tax->cap->edit_terms ) ) 1256 die( __('Cheatin’ uh?'));1256 wp_die(__('There was a problem loading this page, you may not have the necessary permissions, or may need to <a href="' . get_option('siteurl') . '/wp-login.php">' . __('login') . '</a>.')); 1257 1257 1258 1258 if ( ! isset($_POST['tax_ID']) || ! ( $id = (int) $_POST['tax_ID'] ) ) 1259 1259 die(-1); -
wp-admin/edit-comments.php
10 10 require_once('./admin.php'); 11 11 12 12 if ( !current_user_can('edit_posts') ) 13 wp_die(__(' Cheatin’ uh?'));13 wp_die(__('There was a problem loading this page, you may not have the necessary permissions, or may need to <a href="' . get_option('siteurl') . '/wp-login.php">' . __('login') . '</a>.')); 14 14 15 15 wp_enqueue_script('admin-comments'); 16 16 enqueue_comment_hotkeys_js(); -
wp-admin/edit-link-categories.php
15 15 $doaction = $_GET['action'] ? $_GET['action'] : $_GET['action2']; 16 16 17 17 if ( !current_user_can('manage_categories') ) 18 wp_die(__(' Cheatin’ uh?'));18 wp_die(__('There was a problem loading this page, you may not have the necessary permissions, or may need to <a href="' . get_option('siteurl') . '/wp-login.php">' . __('login') . '</a>.')); 19 19 20 20 if ( 'delete' == $doaction ) { 21 21 $cats = (array) $_GET['delete']; -
wp-admin/edit-tags.php
20 20 $tax = get_taxonomy($taxonomy); 21 21 22 22 if ( ! current_user_can($tax->cap->manage_terms) ) 23 wp_die(__(' Cheatin’ uh?'));23 wp_die(__('There was a problem loading this page, you may not have the necessary permissions, or may need to <a href="' . get_option('siteurl') . '/wp-login.php">' . __('login') . '</a>.')); 24 24 25 25 $title = $tax->labels->name; 26 26 … … 45 45 check_admin_referer('add-tag'); 46 46 47 47 if ( !current_user_can($tax->cap->edit_terms) ) 48 wp_die(__(' Cheatin’ uh?'));48 wp_die(__('There was a problem loading this page, you may not have the necessary permissions, or may need to <a href="' . get_option('siteurl') . '/wp-login.php">' . __('login') . '</a>.')); 49 49 50 50 $ret = wp_insert_term($_POST['tag-name'], $taxonomy, $_POST); 51 51 $location = 'edit-tags.php?taxonomy=' . $taxonomy; … … 83 83 check_admin_referer('delete-tag_' . $tag_ID); 84 84 85 85 if ( !current_user_can($tax->cap->delete_terms) ) 86 wp_die(__(' Cheatin’ uh?'));86 wp_die(__('There was a problem loading this page, you may not have the necessary permissions, or may need to <a href="' . get_option('siteurl') . '/wp-login.php">' . __('login') . '</a>.')); 87 87 88 88 wp_delete_term( $tag_ID, $taxonomy); 89 89 … … 97 97 check_admin_referer('bulk-tags'); 98 98 99 99 if ( !current_user_can($tax->cap->delete_terms) ) 100 wp_die(__(' Cheatin’ uh?'));100 wp_die(__('There was a problem loading this page, you may not have the necessary permissions, or may need to <a href="' . get_option('siteurl') . '/wp-login.php">' . __('login') . '</a>.')); 101 101 102 102 $tags = (array) $_GET['delete_tags']; 103 103 foreach( $tags as $tag_ID ) { … … 137 137 check_admin_referer('update-tag_' . $tag_ID); 138 138 139 139 if ( !current_user_can($tax->cap->edit_terms) ) 140 wp_die(__(' Cheatin’ uh?'));140 wp_die(__('There was a problem loading this page, you may not have the necessary permissions, or may need to <a href="' . get_option('siteurl') . '/wp-login.php">' . __('login') . '</a>.')); 141 141 142 142 $ret = wp_update_term($tag_ID, $taxonomy, $_POST); 143 143 -
wp-admin/edit.php
20 20 $post_type_object = get_post_type_object($post_type); 21 21 22 22 if ( !current_user_can($post_type_object->cap->edit_posts) ) 23 wp_die(__('Cheatin’ uh?'));23 wp_die(__('There was a problem loading this page, you may not have the necessary permissions, or may need to <a href="' . get_option('siteurl') . '/wp-login.php">' . __('login') . '</a>.')); 24 24 25 25 // Back-compat for viewing comments of an entry 26 26 if ( $_redirect = intval( max( @$_GET['p'], @$_GET['attachment_id'], @$_GET['page_id'] ) ) ) { -
wp-admin/includes/bookmark.php
27 27 */ 28 28 function edit_link( $link_id = '' ) { 29 29 if (!current_user_can( 'manage_links' )) 30 wp_die( __( 'Cheatin’ uh?'));30 wp_die(__('There was a problem loading this page, you may not have the necessary permissions, or may need to <a href="' . get_option('siteurl') . '/wp-login.php">' . __('login') . '</a>.')); 31 31 32 32 $_POST['link_url'] = esc_html( $_POST['link_url'] ); 33 33 $_POST['link_url'] = esc_url($_POST['link_url']); -
wp-admin/link-category.php
21 21 check_admin_referer('add-link-category'); 22 22 23 23 if ( !current_user_can('manage_categories') ) 24 wp_die(__(' Cheatin’ uh?'));24 wp_die(__('There was a problem loading this page, you may not have the necessary permissions, or may need to <a href="' . get_option('siteurl') . '/wp-login.php">' . __('login') . '</a>.')); 25 25 26 26 if ( wp_insert_term($_POST['name'], 'link_category', $_POST ) ) { 27 27 wp_redirect('edit-link-categories.php?message=1#addcat'); … … 36 36 check_admin_referer('delete-link-category_' . $cat_ID); 37 37 38 38 if ( !current_user_can('manage_categories') ) 39 wp_die(__(' Cheatin’ uh?'));39 wp_die(__('There was a problem loading this page, you may not have the necessary permissions, or may need to <a href="' . get_option('siteurl') . '/wp-login.php">' . __('login') . '</a>.')); 40 40 41 41 $cat_name = get_term_field('name', $cat_ID, 'link_category'); 42 42 $default_cat_id = get_option('default_link_category'); … … 77 77 check_admin_referer('update-link-category_' . $cat_ID); 78 78 79 79 if ( !current_user_can('manage_categories') ) 80 wp_die(__(' Cheatin’ uh?'));80 wp_die(__('There was a problem loading this page, you may not have the necessary permissions, or may need to <a href="' . get_option('siteurl') . '/wp-login.php">' . __('login') . '</a>.')); 81 81 82 82 $location = 'edit-link-categories.php'; 83 83 if ( $referer = wp_get_original_referer() ) { -
wp-admin/nav-menus.php
20 20 21 21 // Permissions Check 22 22 if ( ! current_user_can('edit_theme_options') ) 23 wp_die( __( 'Cheatin’ uh?' ));23 wp_die(__('There was a problem loading this page, you may not have the necessary permissions, or may need to <a href="' . get_option('siteurl') . '/wp-login.php">' . __('login') . '</a>.')); 24 24 25 25 // Nav Menu CSS 26 26 wp_admin_css( 'nav-menu' ); -
wp-admin/options.php
28 28 $option_page = 'options'; 29 29 30 30 if ( !current_user_can('manage_options') ) 31 wp_die(__(' Cheatin’ uh?'));31 wp_die(__('There was a problem loading this page, you may not have the necessary permissions, or may need to <a href="' . get_option('siteurl') . '/wp-login.php">' . __('login') . '</a>.')); 32 32 33 33 // Handle admin email change requests 34 34 if ( is_multisite() ) { … … 52 52 } 53 53 54 54 if ( is_multisite() && !is_super_admin() && 'update' != $action ) 55 wp_die(__(' Cheatin’ uh?'));55 wp_die(__('There was a problem loading this page, you may not have the necessary permissions, or may need to <a href="' . get_option('siteurl') . '/wp-login.php">' . __('login') . '</a>.')); 56 56 57 57 $whitelist_options = array( 58 58 'general' => array( 'blogname', 'blogdescription', 'gmt_offset', 'date_format', 'time_format', 'start_of_week', 'timezone_string' ), -
wp-admin/plugins.php
13 13 14 14 if ( empty( $menu_perms['plugins'] ) ) { 15 15 if ( ! is_super_admin() ) 16 wp_die( __( 'Cheatin’ uh?' ));16 wp_die(__('There was a problem loading this page, you may not have the necessary permissions, or may need to <a href="' . get_option('siteurl') . '/wp-login.php">' . __('login') . '</a>.')); 17 17 } 18 18 } 19 19 -
wp-admin/press-this.php
11 11 header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); 12 12 13 13 if ( ! current_user_can('edit_posts') ) 14 wp_die( __( 'Cheatin’ uh?' ));14 wp_die(__('There was a problem loading this page, you may not have the necessary permissions, or may need to <a href="' . get_option('siteurl') . '/wp-login.php">' . __('login') . '</a>.')); 15 15 16 16 /** 17 17 * Press It form handler. -
wp-admin/sidebar.php
16 16 require_once('./admin.php'); 17 17 18 18 if ( ! current_user_can('edit_posts') ) 19 wp_die(__(' Cheatin’ uh?'));19 wp_die(__('There was a problem loading this page, you may not have the necessary permissions, or may need to <a href="' . get_option('siteurl') . '/wp-login.php">' . __('login') . '</a>.')); 20 20 21 21 $post = get_default_post_to_edit(); 22 22 -
wp-admin/themes.php
10 10 require_once('./admin.php'); 11 11 12 12 if ( !current_user_can('switch_themes') && !current_user_can('edit_theme_options') ) 13 wp_die( __( 'Cheatin’ uh?' ));13 wp_die(__('There was a problem loading this page, you may not have the necessary permissions, or may need to <a href="' . get_option('siteurl') . '/wp-login.php">' . __('login') . '</a>.')); 14 14 15 15 if ( current_user_can('switch_themes') && isset($_GET['action']) ) { 16 16 if ( 'activate' == $_GET['action'] ) { … … 21 21 } else if ( 'delete' == $_GET['action'] ) { 22 22 check_admin_referer('delete-theme_' . $_GET['template']); 23 23 if ( !current_user_can('delete_themes') ) 24 wp_die( __( 'Cheatin’ uh?' ));24 wp_die(__('There was a problem loading this page, you may not have the necessary permissions, or may need to <a href="' . get_option('siteurl') . '/wp-login.php">' . __('login') . '</a>.')); 25 25 delete_theme($_GET['template']); 26 26 wp_redirect('themes.php?deleted=true'); 27 27 exit; -
wp-admin/user-new.php
10 10 require_once('./admin.php'); 11 11 12 12 if ( !current_user_can('create_users') ) 13 wp_die(__(' Cheatin’ uh?'));13 wp_die(__('There was a problem loading this page, you may not have the necessary permissions, or may need to <a href="' . get_option('siteurl') . '/wp-login.php">' . __('login') . '</a>.')); 14 14 15 15 if ( is_multisite() && !get_site_option( 'add_new_users' ) ) 16 wp_die( __(' Pagedisabled by the administrator') );16 wp_die( __('This page has been disabled by the administrator') ); 17 17 18 18 /** WordPress Registration API */ 19 19 require_once( ABSPATH . WPINC . '/registration.php'); -
wp-admin/users.php
13 13 require_once( ABSPATH . WPINC . '/registration.php'); 14 14 15 15 if ( !current_user_can('list_users') ) 16 wp_die(__(' Cheatin’ uh?'));16 wp_die(__('There was a problem loading this page, you may not have the necessary permissions, or may need to <a href="' . get_option('siteurl') . '/wp-login.php">' . __('login') . '</a>.')); 17 17 18 18 $title = __('Users'); 19 19 $parent_file = 'users.php'; … … 78 78 79 79 // If the user doesn't already belong to the blog, bail. 80 80 if ( is_multisite() && !is_user_member_of_blog( $id ) ) 81 wp_die(__(' Cheatin’ uh?'));81 wp_die(__('There was a problem loading this page, you may not have the necessary permissions, or may need to <a href="' . get_option('siteurl') . '/wp-login.php">' . __('login') . '</a>.')); 82 82 83 83 $user = new WP_User($id); 84 84 $user->set_role($_REQUEST['new_role']); -
wp-admin/widgets.php
13 13 require_once(ABSPATH . 'wp-admin/includes/widgets.php'); 14 14 15 15 if ( ! current_user_can('edit_theme_options') ) 16 wp_die( __( 'Cheatin’ uh?'));16 wp_die(__('There was a problem loading this page, you may not have the necessary permissions, or may need to <a href="' . get_option('siteurl') . '/wp-login.php">' . __('login') . '</a>.')); 17 17 18 18 wp_admin_css( 'widgets' ); 19 19