~ubuntu-branches/debian/sid/wordpress/sid

« back to all changes in this revision

Viewing changes to wp-admin/update.php

  • Committer: Package Import Robot
  • Author(s): Craig Small
  • Date: 2014-09-05 20:58:06 UTC
  • mfrom: (1.2.38)
  • Revision ID: package-import@ubuntu.com-20140905205806-e4h6dkg4190n0svf
Tags: 4.0+dfsg-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
/** WordPress Administration Bootstrap */
13
13
require_once( dirname( __FILE__ ) . '/admin.php' );
14
14
 
15
 
include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
 
15
include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
16
16
 
17
17
if ( isset($_GET['action']) ) {
18
18
        $plugin = isset($_REQUEST['plugin']) ? trim($_REQUEST['plugin']) : '';
95
95
                if ( ! current_user_can('install_plugins') )
96
96
                        wp_die( __( 'You do not have sufficient permissions to install plugins on this site.' ) );
97
97
 
98
 
                include_once ABSPATH . 'wp-admin/includes/plugin-install.php'; //for plugins_api..
 
98
                include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); //for plugins_api..
99
99
 
100
100
                check_admin_referer('install-plugin_' . $plugin);
101
101
                $api = plugins_api('plugin_information', array('slug' => $plugin, 'fields' => array('sections' => false) ) ); //Save on a bit of bandwidth.
123
123
 
124
124
        } elseif ( 'upload-plugin' == $action ) {
125
125
 
126
 
                if ( ! current_user_can('install_plugins') )
 
126
                if ( ! current_user_can( 'upload_plugins' ) ) {
127
127
                        wp_die( __( 'You do not have sufficient permissions to install plugins on this site.' ) );
 
128
                }
128
129
 
129
130
                check_admin_referer('plugin-upload');
130
131
 
200
201
                if ( ! current_user_can('install_themes') )
201
202
                        wp_die( __( 'You do not have sufficient permissions to install themes on this site.' ) );
202
203
 
203
 
                include_once ABSPATH . 'wp-admin/includes/theme-install.php'; //for themes_api..
 
204
                include_once( ABSPATH . 'wp-admin/includes/theme-install.php' ); //for themes_api..
204
205
 
205
206
                check_admin_referer( 'install-theme_' . $theme );
206
207
                $api = themes_api('theme_information', array('slug' => $theme, 'fields' => array('sections' => false, 'tags' => false) ) ); //Save on a bit of bandwidth.
227
228
 
228
229
        } elseif ( 'upload-theme' == $action ) {
229
230
 
230
 
                if ( ! current_user_can('install_themes') )
 
231
                if ( ! current_user_can( 'upload_themes' ) ) {
231
232
                        wp_die( __( 'You do not have sufficient permissions to install themes on this site.' ) );
 
233
                }
232
234
 
233
235
                check_admin_referer('theme-upload');
234
236