1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-01-19 01:24:05 +01:00

Fix chained WHERE, fix permissions

This commit is contained in:
8chan 2014-10-22 20:12:26 -07:00
parent 61f61457a0
commit 2edd6282f2
2 changed files with 3 additions and 1 deletions

View File

@ -82,6 +82,7 @@
$config['mod']['manageusers'] = SUPERMOD;
$config['mod']['noticeboard_post'] = SUPERMOD;
$config['mod']['search'] = SUPERMOD;
$config['mod']['clean_global'] = SUPERMOD;
$config['mod']['debug_recent'] = ADMIN;
$config['mod']['debug_antispam'] = ADMIN;
$config['mod']['modlog'] = SUPERMOD;
@ -89,6 +90,7 @@
$config['mod']['edit_banners'] = MOD;
$config['mod']['edit_flags'] = MOD;
$config['mod']['edit_settings'] = MOD;
$config['mod']['clean'] = MOD;
$config['mod']['recent_reports'] = 65535;
$config['mod']['ip_less_recentposts'] = 75;
$config['ban_show_post'] = true;

View File

@ -2306,7 +2306,7 @@ function mod_reports() {
$report_scope = $global ? "global" : "local";
// Get REPORTS.
$query = prepare("SELECT * FROM ``reports`` " . ($mod["type"] == "20" ? "WHERE board = :board" : "") . " WHERE ``".($global ? "global" : "local")."`` = TRUE LIMIT :limit");
$query = prepare("SELECT * FROM ``reports`` WHERE " . ($mod["type"] == "20" ? "board = :board AND" : "") . " ``".($global ? "global" : "local")."`` = TRUE LIMIT :limit");
// Limit reports by board if the moderator is local.
if( $mod['type'] == '20' ) {