mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 22:03:49 -07:00
Prevent issue with empty $disallowed_id removing (#692)
This commit is contained in:
parent
10d6fe320f
commit
2f2df932c0
1 changed files with 10 additions and 8 deletions
|
@ -38,6 +38,7 @@ if (isset($_POST['add_name'])) {
|
|||
} elseif (isset($_POST['delete_name'])) {
|
||||
$disallowed_id = isset($_POST['disallowed_id']) ? (int)$_POST['disallowed_id'] : (int)$_GET['disallowed_id'];
|
||||
|
||||
if (!empty($disallowed_id)) {
|
||||
$sql = 'DELETE FROM ' . BB_DISALLOW . " WHERE disallow_id = $disallowed_id";
|
||||
$result = DB()->sql_query($sql);
|
||||
if (!$result) {
|
||||
|
@ -48,6 +49,7 @@ if (isset($_POST['add_name'])) {
|
|||
|
||||
bb_die($message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Grab the current list of disallowed usernames
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue