Changeset 14348
- Timestamp:
- 05/02/2010 10:57:44 PM (15 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-upgrader.php
r14173 r14348 987 987 var $plugin = ''; 988 988 var $plugin_active = false; 989 var $plugin_network_active = false; 989 990 990 991 function Plugin_Upgrader_Skin($args = array()) { … … 998 999 $this->plugin = $args['plugin']; 999 1000 1000 $this->plugin_active = is_plugin_active($this->plugin); 1001 $this->plugin_active = is_plugin_active( $this->plugin ); 1002 $this->plugin_network_active = is_plugin_active_for_network( $this->plugin ); 1001 1003 1002 1004 parent::__construct($args); … … 1007 1009 if ( !empty($this->plugin) && !is_wp_error($this->result) && $this->plugin_active ){ 1008 1010 show_message(__('Reactivating the plugin…')); 1009 echo '<iframe style="border:0;overflow:hidden" width="100%" height="170px" src="' . wp_nonce_url('update.php?action=activate-plugin& plugin=' . $this->plugin, 'activate-plugin_' . $this->plugin) .'"></iframe>';1011 echo '<iframe style="border:0;overflow:hidden" width="100%" height="170px" src="' . wp_nonce_url('update.php?action=activate-plugin&networkwide=' . $this->plugin_network_active . '&plugin=' . $this->plugin, 'activate-plugin_' . $this->plugin) .'"></iframe>'; 1010 1012 } 1011 1013 -
trunk/wp-admin/plugin-editor.php
r14299 r14348 56 56 fclose($f); 57 57 58 $network_wide = is_plugin_active_for_network( $file ); 59 58 60 // Deactivate so we can test it. 59 61 if ( is_plugin_active($file) || isset($_POST['phperror']) ) { … … 63 65 update_option('recently_activated', array($file => time()) + (array)get_option('recently_activated')); 64 66 65 wp_redirect(add_query_arg('_wpnonce', wp_create_nonce('edit-plugin-test_' . $file), "plugin-editor.php?file=$file&liveupdate=1&scrollto=$scrollto "));67 wp_redirect(add_query_arg('_wpnonce', wp_create_nonce('edit-plugin-test_' . $file), "plugin-editor.php?file=$file&liveupdate=1&scrollto=$scrollto&networkwide=" . $network_wide)); 66 68 exit; 67 69 } … … 84 86 85 87 if ( ! is_plugin_active($file) ) 86 activate_plugin($file, "plugin-editor.php?file=$file&phperror=1" ); // we'll override this later if the plugin can be included without fatal error88 activate_plugin($file, "plugin-editor.php?file=$file&phperror=1", ! empty( $_GET['networkwide'] ) ); // we'll override this later if the plugin can be included without fatal error 87 89 88 90 wp_redirect("plugin-editor.php?file=$file&a=te&scrollto=$scrollto"); -
trunk/wp-admin/update.php
r14313 r14348 70 70 if ( ! isset($_GET['failure']) && ! isset($_GET['success']) ) { 71 71 wp_redirect( 'update.php?action=activate-plugin&failure=true&plugin=' . $plugin . '&_wpnonce=' . $_GET['_wpnonce'] ); 72 activate_plugin( $plugin);72 activate_plugin( $plugin, '', ! empty( $_GET['networkwide'] ) ); 73 73 wp_redirect( 'update.php?action=activate-plugin&success=true&plugin=' . $plugin . '&_wpnonce=' . $_GET['_wpnonce'] ); 74 74 die();
Note: See TracChangeset
for help on using the changeset viewer.