function collect($module) { $pager = new RE_Pager($_GET, admin_url('redirection.php'), 'created', 'DESC', 'log'); $pager->per_page = 100; $this->name = $module->name; $this->items = RE_Log::get_by_module($pager, $module->id); }
function collect($module) { $pager = new RE_Pager($_GET, $_SERVER['REQUEST_URI'], 'created', 'DESC', 'log'); $pager->per_page = 100; $this->name = $module->name; $this->items = RE_Log::get_by_module($pager, $module->id); }
function collect($module) { $this->name = $module->name; $this->items = RE_Log::get_by_module($module->id); }
function admin_screen_log() { include dirname(__FILE__) . '/models/pager.php'; if (isset($_POST['deleteall']) && check_admin_referer('redirection-process_logs')) { if (isset($_GET['module'])) { RE_Log::delete_all(array('module_id' => intval($_GET['module'])), new RE_Pager($_GET, $_SERVER['REQUEST_URI'], 'created', 'DESC', 'log')); } else { if (isset($_GET['group'])) { RE_Log::delete_all(array('group_id' => intval($_GET['group'])), new RE_Pager($_GET, $_SERVER['REQUEST_URI'], 'created', 'DESC', 'log')); } else { RE_Log::delete_all(array(), new RE_Pager($_GET, $_SERVER['REQUEST_URI'], 'created', 'DESC', 'log')); } } $this->render_message(__('Your logs have been deleted', 'redirection')); } $pager = new RE_Pager($_GET, $_SERVER['REQUEST_URI'], 'created', 'DESC', 'log'); if (isset($_GET['module'])) { $logs = RE_Log::get_by_module($pager, intval($_GET['module'])); } else { if (isset($_GET['group'])) { $logs = RE_Log::get_by_group($pager, intval($_GET['group'])); } else { if (isset($_GET['redirect'])) { $logs = RE_Log::get_by_redirect($pager, intval($_GET['redirect'])); } else { $logs = RE_Log::get($pager); } } } $options = $this->get_options(); $this->render_admin('log', array('logs' => $logs, 'pager' => $pager, 'lookup' => $options['lookup'])); }