Make WordPress Core

Ticket #9454: 9454.diff

File 9454.diff, 1.5 KB (added by DD32, 17 years ago)
  • wp-admin/plugins.php

     
    99/** WordPress Administration Bootstrap */
    1010require_once('admin.php');
    1111
    12 $action = '';
    13 foreach( array('activate-selected', 'deactivate-selected', 'delete-selected', 'clear-recent-list') as $action_key ) {
    14         if( isset($_POST[$action_key]) ) {
    15                 $action = $action_key;
    16                 break;
    17         }
    18 }
     12if ( isset($_POST['clear-recent-list']) )
     13        $action = 'clear-recent-list';
     14elseif ( isset($_GET['action']) )
     15        $action = $_GET['action'];
     16elseif ( isset($_POST['action']) )
     17        $action = $_POST['action'];
     18else
     19        $action = false;
    1920
    20 if( isset($_REQUEST['action']) && !empty($_REQUEST['action']) )
    21         $action = $_REQUEST['action'];
    22 
    2321$plugin = isset($_REQUEST['plugin']) ? $_REQUEST['plugin'] : '';
    2422
    2523if( !empty($action) ) {
     
    127125                                <p><?php _e('Are you sure you wish to delete these files?') ?></p>
    128126                                <form method="post" action="<?php echo clean_url($_SERVER['REQUEST_URI']); ?>" style="display:inline;">
    129127                                        <input type="hidden" name="verify-delete" value="1" />
    130                                         <input type="hidden" name="delete-selected" value="1" />
     128                                        <input type="hidden" name="action" value="delete-selected" />
    131129                                        <?php
    132130                                                foreach ( (array)$plugins as $plugin )
    133131                                                        echo '<input type="hidden" name="checked[]" value="' . attribute_escape($plugin) . '" />';
     
    395393
    396394<?php
    397395include('admin-footer.php');
    398 ?>
    399  No newline at end of file
     396?>