diff options
Diffstat (limited to 'cgi/manage.py')
-rw-r--r-- | cgi/manage.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cgi/manage.py b/cgi/manage.py index d1de264..bf28768 100644 --- a/cgi/manage.py +++ b/cgi/manage.py @@ -711,13 +711,12 @@ def manage(self, path_split): if 'edit' in self.formdata: UpdateDb("DELETE FROM `bans` WHERE `id` = '" + _mysql.escape_string(self.formdata['edit']) + "' LIMIT 1") - """else: # TODO : Duplicate check - ban = FetchOne("SELECT `id` FROM `bans` WHERE `ip` = '" + _mysql.escape_string( - ip) + "' AND `boards` = '" + _mysql.escape_string(where) + "' LIMIT 1") + else: # Duplicate check + ban = addressIsBanned(ip) if ban: self.error(_('There is already an identical ban for this IP.') + '<a href="' + - Settings.CGI_URL+'manage/ban/' + ip + '?edit=' + ban['id']+'">' + _('Edit') + '</a>') - return""" + Settings.CGI_URL+'manage/ban/' + ip + '?edit=' + str(ban['id'])+'">' + _('Edit') + '</a>') + return # Blind mode blind = self.formdata.get('blind', 0) |