mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-02-21 21:19:36 +01:00
Fix misleading modLog() message in dismiss
This commit is contained in:
parent
4951aab67a
commit
dac1fbb36c
@ -2629,7 +2629,6 @@ function mod_report_dismiss() {
|
|||||||
$query->bindValue(':post', $post);
|
$query->bindValue(':post', $post);
|
||||||
$query->execute() or error(db_error($query));
|
$query->execute() or error(db_error($query));
|
||||||
if( count( $reports = $query->fetchAll(PDO::FETCH_ASSOC) ) > 0 ) {
|
if( count( $reports = $query->fetchAll(PDO::FETCH_ASSOC) ) > 0 ) {
|
||||||
|
|
||||||
$report_ids = array();
|
$report_ids = array();
|
||||||
foreach( $reports as $report ) {
|
foreach( $reports as $report ) {
|
||||||
$report_ids[ $report['id'] ] = $report['id'];
|
$report_ids[ $report['id'] ] = $report['id'];
|
||||||
@ -2645,7 +2644,11 @@ function mod_report_dismiss() {
|
|||||||
$query = prepare("UPDATE ``reports`` SET {$scope} WHERE `id` IN (".implode(',', array_map('intval', $report_ids)).")");
|
$query = prepare("UPDATE ``reports`` SET {$scope} WHERE `id` IN (".implode(',', array_map('intval', $report_ids)).")");
|
||||||
$query->execute() or error(db_error($query));
|
$query->execute() or error(db_error($query));
|
||||||
|
|
||||||
modLog("Promoted " . count($report_ids) . " local report(s) for post #{$post}", $board);
|
// Cleanup - Remove reports that have been completely dismissed.
|
||||||
|
$query = prepare("DELETE FROM `reports` WHERE `local` = FALSE AND `global` = FALSE");
|
||||||
|
$query->execute() or error(db_error($query));
|
||||||
|
|
||||||
|
modLog("Dismissed " . count($report_ids) . " local report(s) for post #{$post}", $board);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
error($config['error']['404']);
|
error($config['error']['404']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user