Plugin Directory

Changeset 471356


Ignore:
Timestamp:
12/05/2011 11:50:39 PM (14 years ago)
Author:
rrolfe
Message:

Fixed bug in bulk empty trash. Now it deletes all trashed URLs not just first page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 404-redirected/trunk/includes/admin.php

    r471354 r471356  
    283283}
    284284
    285 function wbz404_getRecords($sub, $tableOptions) {
     285function wbz404_getRecords($sub, $tableOptions, $limitEnforced = 1) {
    286286    global $wpdb;
    287287    $rows = array();
     
    306306
    307307    $query .= "order by " . $tableOptions['orderby'] . " " . $tableOptions['order'] . " ";
    308     $start = ($tableOptions['paged'] - 1) * $tableOptions['perpage'];
    309     $query .= "limit " . $start . ", " . $tableOptions['perpage'];
     308   
     309    if ($limitEnforced == 1) {
     310        $start = ($tableOptions['paged'] - 1) * $tableOptions['perpage'];
     311        $query .= "limit " . $start . ", " . $tableOptions['perpage'];
     312    }
    310313
    311314    $rows = $wpdb->get_results($query, ARRAY_A);
     
    809812    $tableOptions = wbz404_getTableOptions();
    810813
    811     $rows = wbz404_getRecords($sub, $tableOptions);
     814    $rows = wbz404_getRecords($sub, $tableOptions, 0);
    812815    foreach ($rows as $row) {
    813816        wbz404_cleanRedirect($row['id']);
Note: See TracChangeset for help on using the changeset viewer.