diff options
| author | Savetheinternet <savetheinternet@tinyboard.org> | 2011-08-04 15:47:34 +1000 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@tinyboard.org> | 2011-08-04 15:47:34 +1000 |
| commit | c4c6a9839645c49a981de6f9dcf82fe0c7a0c739 (patch) | |
| tree | 08ca02da3f80f2830bd8aba1937a77ee0a6eda43 /inc/mod.php | |
| parent | 1fe672fed203c30772b7959050648ed9d75a4c42 (diff) | |
various bug fixed, introduced ban ID, temporarily broke caching bans with memcached
Diffstat (limited to 'inc/mod.php')
| -rw-r--r-- | inc/mod.php | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/inc/mod.php b/inc/mod.php index ff89ecf5..a6c2c9cc 100644 --- a/inc/mod.php +++ b/inc/mod.php @@ -273,5 +273,20 @@ '</form>' . '</fieldset>'; } - + + + function removeBan($id) { + global $config; + + $query = prepare("DELETE FROM `bans` WHERE `id` = :id"); + $query->bindValue(':id', $id, PDO::PARAM_INT); + $query->execute() or error(db_error($query)); + + if($config['memcached']['enabled']) { + // Remove cached ban + // TODO + $memcached->delete("ban_{$id}"); + } + } + ?> |
