Changeset 11371
- Timestamp:
- 05/17/2009 09:39:32 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/plugins.php
r11368 r11371 12 12 if ( isset($_POST['clear-recent-list']) ) 13 13 $action = 'clear-recent-list'; 14 elseif ( isset($_GET['action']) ) 15 $action = $_GET['action']; 16 elseif ( isset($_POST['action']) ) 17 $action = $_POST['action']; 14 elseif ( isset($_REQUEST['action']) ) 15 $action = $_REQUEST['action']; 18 16 else 19 17 $action = false; … … 31 29 32 30 $page = isset($_REQUEST['paged']) ? $_REQUEST['paged'] : 1; 31 32 //Clean up request URI from temporary args for screen options/paging uri's to work as expected. 33 $_SERVER['REQUEST_URI'] = remove_query_arg(array('error', 'deleted', 'activate', 'activate-multi', 'deactivate', 'deactivate-multi', '_error_nonce'), $_SERVER['REQUEST_URI']); 33 34 34 35 if ( !empty($action) ) { … … 164 165 $delete_result = delete_plugins($plugins); 165 166 166 wp_cache_delete('plugins', 'plugins'); 167 set_transient('plugins_delete_result_'.$user_ID, $delete_result); //Store the result in a cache rather than a URL param due to object type & length 168 wp_redirect("plugins.php?deleted=true&plugin_status=$status&paged=$page"); 169 exit; 167 170 break; 168 171 case 'clear-recent-list': … … 199 202 ?> 200 203 </div> 201 <?php elseif ( 'delete-selected' == $action ) : 204 <?php elseif ( isset($_GET['deleted']) ) : 205 $delete_result = get_transient('plugins_delete_result_'.$user_ID); 206 delete_transient('plugins_delete_result'); //Delete it once we're done. 207 202 208 if ( is_wp_error($delete_result) ) : ?> 203 209 <div id="message" class="updated fade"><p><?php printf( __('Plugin could not be deleted due to an error: %s'), $delete_result->get_error_message() ); ?></p></div> … … 286 292 287 293 $plugin_array_name = "${status}_plugins"; 294 if ( empty($$plugin_array_name) && $status != 'all' ) { 295 $status = 'all'; 296 $plugin_array_name = "${status}_plugins"; 297 } 298 288 299 $plugins = &$$plugin_array_name; 289 300 … … 362 373 $actions[] = '<a href="' . $plugin_data['PluginURI'] . '" title="' . __( 'Visit plugin homepage' ) . '">' . __('View Site') . '</a>'; 363 374 } 375 376 if ( ! $is_active && current_user_can('delete_plugins') ) 377 $actions[] = '<a href="' . wp_nonce_url('plugins.php?action=delete-selected&checked[]=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page, 'bulk-manage-plugins') . '" title="' . __('Delete this plugin') . '" class="delete">' . __('Delete') . '</a>'; 364 378 365 379 $actions = apply_filters( 'plugin_action_links', $actions, $plugin_file, $plugin_data, $context );
Note: See TracChangeset
for help on using the changeset viewer.