From 2d296f8c8ab54f38c005cf0891ec5ebb0b5fb469 Mon Sep 17 00:00:00 2001 From: 8chan Date: Wed, 22 Oct 2014 21:01:02 -0700 Subject: [PATCH] use constants --- inc/mod/pages.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/inc/mod/pages.php b/inc/mod/pages.php index 26f7d227..76734641 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -102,7 +102,7 @@ function mod_dashboard() { $query = prepare('SELECT COUNT(*) AS `total_reports` FROM ``reports``' . ($mod["type"] == "20" ? " WHERE board = :board" : "")); - if ($mod['type'] == '20') { + if ($mod['type'] == MOD) { $query->bindValue(':board', $mod['boards'][0]); } else { $query = prepare('SELECT (SELECT COUNT(id) FROM reports WHERE global = 0) AS total_reports, (SELECT COUNT(id) FROM reports WHERE global = 1) AS global_reports'); @@ -2298,7 +2298,7 @@ function mod_reports() { error($config['error']['noaccess']); } - if( $mod['type'] == '20' and $global ) { + if( $mod['type'] == MOD and $global) { error($config['error']['noaccess']); } @@ -2306,10 +2306,10 @@ function mod_reports() { $report_scope = $global ? "global" : "local"; // Get REPORTS. - $query = prepare("SELECT * FROM ``reports`` WHERE " . ($mod["type"] == "20" ? "board = :board AND" : "") . " ``".($global ? "global" : "local")."`` = TRUE LIMIT :limit"); + $query = prepare("SELECT * FROM ``reports`` WHERE " . ($mod["type"] == MOD ? "board = :board AND" : "") . " ``".($global ? "global" : "local")."`` = TRUE LIMIT :limit"); // Limit reports by board if the moderator is local. - if( $mod['type'] == '20' ) { + if( $mod['type'] == MOD ) { $query->bindValue(':board', $mod['boards'][0]); } @@ -2527,7 +2527,7 @@ function mod_report_dismiss() { $global = in_array( "global", $arguments ); $content = in_array( "content", $arguments ); - if( $mod['type'] == '20' and $global ) { + if( $mod['type'] == MOD and $global ) { error($config['error']['noaccess']); } @@ -2649,7 +2649,7 @@ function mod_report_dismiss() { function mod_report_demote() { global $config, $mod; - if( $mod['type'] == '20' ) { + if( $mod['type'] == MOD ) { error($config['error']['noaccess']); }