diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php index 5fb04d5258..86a9a80776 100644 --- a/wp-admin/includes/schema.php +++ b/wp-admin/includes/schema.php @@ -257,7 +257,7 @@ function populate_options() { add_option('avatar_default', 'mystery'); // Delete unused options - $unusedoptions = array ('blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'fileupload_allowedusers', 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls', 'default_geourl_lat', 'default_geourl_lon', 'use_default_geourl', 'weblogs_xml_url', 'new_users_can_blog', '_wpnonce', '_wp_http_referer', 'Update', 'action', 'rich_editing', 'autosave_interval'); + $unusedoptions = array ('blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'fileupload_allowedusers', 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls', 'default_geourl_lat', 'default_geourl_lon', 'use_default_geourl', 'weblogs_xml_url', 'new_users_can_blog', '_wpnonce', '_wp_http_referer', 'Update', 'action', 'rich_editing', 'autosave_interval', 'deactivated_plugins'); foreach ($unusedoptions as $option) : delete_option($option); endforeach; @@ -274,6 +274,7 @@ function populate_roles() { populate_roles_210(); populate_roles_230(); populate_roles_250(); + populate_roles_260(); } function populate_roles_160() { @@ -429,4 +430,13 @@ function populate_roles_250() { } } +function populate_roles_260() { + $role = get_role( 'administrator' ); + + if ( !empty( $role ) ) { + $role->add_cap( 'update_plugins' ); + $role->add_cap( 'delete_plugins' ); + } +} + ?> diff --git a/wp-admin/includes/update.php b/wp-admin/includes/update.php index eb96385adf..b7592c689f 100644 --- a/wp-admin/includes/update.php +++ b/wp-admin/includes/update.php @@ -126,7 +126,7 @@ function wp_plugin_update_row( $file, $plugin_data ) { $r = $current->response[ $file ]; echo '
'.__('You do not have sufficient permissions to update plugins for this blog.').'
'); +if ( ! current_user_can('update_plugins') ) + wp_die(__('You do not have sufficient permissions to update plugins for this blog.')); function request_filesystem_credentials($form_post, $type = '', $error = false) { $req_cred = apply_filters('request_filesystem_credentials', '', $form_post, $type, $error); diff --git a/wp-includes/version.php b/wp-includes/version.php index e9bf67da66..3e818326b8 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,6 +16,6 @@ $wp_version = '2.6-bleeding2'; * * @global int $wp_db_version */ -$wp_db_version = 7935; +$wp_db_version = 8000; ?>