mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-12-01 18:47:20 +01:00
paginate moderation log
This commit is contained in:
parent
ca48d1394b
commit
2befac8169
@ -79,7 +79,11 @@ function mod_log($page_no = 1) {
|
|||||||
$query->execute() or error(db_error($query));
|
$query->execute() or error(db_error($query));
|
||||||
$logs = $query->fetchAll(PDO::FETCH_ASSOC);
|
$logs = $query->fetchAll(PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
mod_page('Moderation log', 'mod/log.html', array('logs' => $logs));
|
$query = prepare("SELECT COUNT(*) AS `count` FROM `modlogs`");
|
||||||
|
$query->execute() or error(db_error($query));
|
||||||
|
$count = $query->fetchColumn(0);
|
||||||
|
|
||||||
|
mod_page('Moderation log', 'mod/log.html', array('logs' => $logs, 'count' => $count));
|
||||||
}
|
}
|
||||||
|
|
||||||
function mod_view_board($boardName, $page_no = 1) {
|
function mod_view_board($boardName, $page_no = 1) {
|
||||||
|
2
mod.php
2
mod.php
@ -24,7 +24,7 @@ $pages = array(
|
|||||||
'!^$!' => ':?/', // redirect to dashboard
|
'!^$!' => ':?/', // redirect to dashboard
|
||||||
'!^/$!' => 'dashboard', // dashboard
|
'!^/$!' => 'dashboard', // dashboard
|
||||||
'!^/log$!' => 'log', // modlog
|
'!^/log$!' => 'log', // modlog
|
||||||
'!^/log/(\d+)/$!' => 'log', // modlog
|
'!^/log/(\d+)$!' => 'log', // modlog
|
||||||
|
|
||||||
'!^/confirm/(.+)$!' => 'confirm', // confirm action (if javascript didn't work)
|
'!^/confirm/(.+)$!' => 'confirm', // confirm action (if javascript didn't work)
|
||||||
|
|
||||||
|
@ -31,3 +31,9 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<p class="unimportant" style="text-align:center;word-wrap:break-word">
|
||||||
|
{% for i in range(0, count / config.mod.modlog_page) %}
|
||||||
|
<a href="?/log/{{ i + 1 }}">[{{ i + 1 }}]</a>
|
||||||
|
{% endfor %}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user