mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 07:38:42 +00:00
fix: pagination count table
This commit is contained in:
parent
7b4fb77260
commit
6926a6f912
@ -78,7 +78,8 @@ EOD;
|
||||
$new_group_form->printHTML();
|
||||
}
|
||||
},
|
||||
'head_pagination' => true
|
||||
'head_pagination' => true,
|
||||
'pagination_table' => "`groups`"
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
@ -99,7 +99,8 @@ EOD;
|
||||
'print_after_table' => function() {
|
||||
global $myUser;
|
||||
},
|
||||
'head_pagination' => true
|
||||
'head_pagination' => true,
|
||||
'pagination_table' => 'lists'
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
@ -16,7 +16,10 @@ class Paginator {
|
||||
$this->cur_start = 0;
|
||||
$this->table = $config['data'];
|
||||
} elseif (!isset($config['echo_full'])) {
|
||||
$this->n_rows = DB::selectCount("select count(*) from {$config['table_name']} where {$config['cond']}");
|
||||
if (!isset($config['pagination_table'])) {
|
||||
$config['pagination_table'] = $config['table'];
|
||||
}
|
||||
$this->n_rows = DB::selectCount("select count(*) from {$config['pagination_table']} where {$config['cond']}");
|
||||
|
||||
$this->page_len = isset($config['page_len']) ? $config['page_len'] : 10;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user