--- scanner.module-old 2009-06-10 00:46:55.000000000 -0700 +++ scanner.module 2009-06-10 00:47:09.000000000 -0700 @@ -529,10 +529,21 @@ function scanner_confirm_form_submit($fo } function scanner_undo_page() { - $header = array(t('Date'), t('Searched'), t('Replaced'), t('Count'), t('Operation')); - $sandrs = db_query('SELECT undo_id, time, searched, replaced, count, undone FROM {scanner} ORDER BY undo_id DESC'); + $pager_limit = 20; + $header = array( + array('data' => t('Date'), 'field' => 'time', 'sort' => 'desc'), + array('data' => t('Searched'), 'field' => 'searched'), + array('data' => t('Replaced'), 'field' => 'replaced'), + array('data' => t('Count'), 'field' => 'count'), + array('data' => t('Operation')), + ); + + $filter = node_build_filter_query(); + + $sandrs = pager_query('SELECT undo_id, time, searched, replaced, count, undone FROM {scanner}' . tablesort_sql($header), $pager_limit); + while ($sandr = db_fetch_object($sandrs)) { $query = 'undo_id='. $sandr->undo_id; @@ -551,8 +562,11 @@ function scanner_undo_page() { $operation, ); } + + $output = theme('table', $header, $rows, NULL, 'Prior Search and Replace Events'); + $output .= theme('pager', NULL, $pager_limit); - return theme('table', $header, $rows, NULL, 'Prior Search and Replace Events'); + return $output; } function scanner_undo_confirm_form() {