indenting fix (whitespace)

This commit is contained in:
towards-a-new-leftypol 2023-12-07 06:24:48 +00:00
parent 8478ee430f
commit 6021d41d39
1 changed files with 24 additions and 23 deletions

View File

@ -157,30 +157,31 @@ class Filter {
$query->execute() or error(db_error($query)); $query->execute() or error(db_error($query));
} }
if (isset ($this->action)) switch($this->action) { if (isset ($this->action))
case 'reject': switch($this->action) {
error(isset($this->message) ? $this->message : 'Posting blocked by filter.'); case 'reject':
case 'ban': error(isset($this->message) ? $this->message : 'Posting blocked by filter.');
if (!isset($this->reason)) case 'ban':
error('The ban action requires a reason.'); if (!isset($this->reason))
error('The ban action requires a reason.');
$this->expires = isset($this->expires) ? $this->expires : false; $this->expires = isset($this->expires) ? $this->expires : false;
$this->reject = isset($this->reject) ? $this->reject : true; $this->reject = isset($this->reject) ? $this->reject : true;
$this->all_boards = isset($this->all_boards) ? $this->all_boards : false; $this->all_boards = isset($this->all_boards) ? $this->all_boards : false;
Bans::new_ban($_SERVER['REMOTE_ADDR'], $this->reason, $this->expires, $this->all_boards ? false : $board['uri'], -1); Bans::new_ban($_SERVER['REMOTE_ADDR'], $this->reason, $this->expires, $this->all_boards ? false : $board['uri'], -1);
if ($this->reject) { if ($this->reject) {
if (isset($this->message)) if (isset($this->message))
error($message); error($message);
checkBan($board['uri']); checkBan($board['uri']);
exit; exit;
} }
break; break;
default: default:
error('Unknown filter action: ' . $this->action); error('Unknown filter action: ' . $this->action);
} }
} }