From 1f602473435747ddc5829b23ad3f15af3b214441 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 1 Jun 2010 18:02:05 +0000 Subject: [PATCH] Add export capability. fixes #13681 git-svn-id: http://svn.automattic.com/wordpress/trunk@15096 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/export.php | 2 +- wp-admin/includes/schema.php | 1 + wp-admin/includes/upgrade.php | 4 ++-- wp-includes/version.php | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/wp-admin/export.php b/wp-admin/export.php index 8e0ed7bc4f..e907a7b29e 100644 --- a/wp-admin/export.php +++ b/wp-admin/export.php @@ -9,7 +9,7 @@ /** Load WordPress Bootstrap */ require_once ('admin.php'); -if ( !current_user_can('edit_files') ) +if ( !current_user_can('export') ) wp_die(__('You do not have sufficient permissions to export the content of this site.')); /** Load WordPress export API */ diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php index b27931404c..38b13deacb 100644 --- a/wp-admin/includes/schema.php +++ b/wp-admin/includes/schema.php @@ -613,6 +613,7 @@ function populate_roles_300() { $role->add_cap( 'promote_users' ); $role->add_cap( 'edit_theme_options' ); $role->add_cap( 'delete_themes' ); + $role->add_cap( 'export' ); } } diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index d9a29672ba..a8377a10ee 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -440,7 +440,7 @@ function upgrade_all() { if ( $wp_current_db_version < 11958 ) upgrade_290(); - if ( $wp_current_db_version < 14984 ) + if ( $wp_current_db_version < 15093 ) upgrade_300(); maybe_disable_automattic_widgets(); @@ -1108,7 +1108,7 @@ function upgrade_290() { function upgrade_300() { global $wp_current_db_version, $wpdb; - if ( $wp_current_db_version < 14984 ) + if ( $wp_current_db_version < 15093 ) populate_roles_300(); if ( $wp_current_db_version < 14139 && is_multisite() && is_main_site() && ! defined( 'MULTISITE' ) && get_site_option( 'siteurl' ) === false ) diff --git a/wp-includes/version.php b/wp-includes/version.php index b54045ad42..bf75de6e95 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -15,7 +15,7 @@ $wp_version = '3.0-RC1-15092'; * * @global int $wp_db_version */ -$wp_db_version = 15084; +$wp_db_version = 15093; /** * Holds the TinyMCE version