?/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);