fix: 6926a6f912
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Baoshuo Ren 2022-09-20 18:25:48 +08:00
parent 02ef72b035
commit 0ab54aac78
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -16,10 +16,11 @@ class Paginator {
$this->cur_start = 0; $this->cur_start = 0;
$this->table = $config['data']; $this->table = $config['data'];
} elseif (!isset($config['echo_full'])) { } elseif (!isset($config['echo_full'])) {
if (!isset($config['pagination_table'])) { $table = $config['table_name'];
$config['pagination_table'] = $config['table']; if (isset($config['pagination_table'])) {
$table = $config['pagination_table'];
} }
$this->n_rows = DB::selectCount("select count(*) from {$config['pagination_table']} where {$config['cond']}"); $this->n_rows = DB::selectCount("select count(*) from {$table} where {$config['cond']}");
$this->page_len = isset($config['page_len']) ? $config['page_len'] : 10; $this->page_len = isset($config['page_len']) ? $config['page_len'] : 10;