1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-09-24 11:38:24 +02:00

?/IP/: Don't show posts for board user doesn't have access to

This commit is contained in:
Michael Foster 2013-07-30 23:30:49 -04:00
parent fbc78f7632
commit 343397d561

View File

@ -744,6 +744,8 @@ function mod_page_ip($ip) {
$boards = listBoards();
foreach ($boards as $board) {
openBoard($board['uri']);
if (!hasPermission($config['mod']['show_ip'], $board['uri']))
continue;
$query = prepare(sprintf('SELECT * FROM `posts_%s` WHERE `ip` = :ip ORDER BY `sticky` DESC, `id` DESC LIMIT :limit', $board['uri']));
$query->bindValue(':ip', $ip);