diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-07-26 17:20:55 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-07-26 17:20:55 +0000 |
commit | dbf4ea97af9731e0efb88b5ce2ced131c06e8161 (patch) | |
tree | 93c74cf5b4fba0a8718f90c1226aee302c1d527d /phpBB/admin/admin_ban.php | |
parent | 46bfc70d6d4aa2370658a80d5ad792f4ee7a5e43 (diff) | |
download | forums-dbf4ea97af9731e0efb88b5ce2ced131c06e8161.tar forums-dbf4ea97af9731e0efb88b5ce2ced131c06e8161.tar.gz forums-dbf4ea97af9731e0efb88b5ce2ced131c06e8161.tar.bz2 forums-dbf4ea97af9731e0efb88b5ce2ced131c06e8161.tar.xz forums-dbf4ea97af9731e0efb88b5ce2ced131c06e8161.zip |
Doh ... a deer a ... yes, well, uhm
git-svn-id: file:///svn/phpbb/trunk@2746 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/admin/admin_ban.php')
-rw-r--r-- | phpBB/admin/admin_ban.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/phpBB/admin/admin_ban.php b/phpBB/admin/admin_ban.php index cced9a1d1a..0540a3521a 100644 --- a/phpBB/admin/admin_ban.php +++ b/phpBB/admin/admin_ban.php @@ -70,7 +70,7 @@ $current_time = time(); // if ( isset($HTTP_POST_VARS['bansubmit']) ) { - $ban_end = ( isset($HTTP_POST_VARS['banlength']) ) ? $current_time + ( intval($HTTP_POST_VARS['banlength']) * 60 ) : 0; + $ban_end = ( !empty($HTTP_POST_VARS['banlength']) ) ? $current_time + ( intval($HTTP_POST_VARS['banlength']) * 60 ) : 0; $ban_reason = ( isset($HTTP_POST_VARS['banreason']) ) ? $HTTP_POST_VARS['banreason'] : ''; $ban_list = array_unique(explode("\n", $HTTP_POST_VARS['ban'])); @@ -207,8 +207,9 @@ if ( isset($HTTP_POST_VARS['bansubmit']) ) break; } - $sql = "SELECT ban_userid, ban_ip, ban_email - FROM " . BANLIST_TABLE; + $sql = "SELECT $type + FROM " . BANLIST_TABLE . " + WHERE $type <> ''"; $result = $db->sql_query($sql); if ( $row = $db->sql_fetchrow($result) ) @@ -235,9 +236,7 @@ if ( isset($HTTP_POST_VARS['bansubmit']) ) $banlist = array_unique(array_diff($banlist, $banlist_tmp)); unset($banlist_tmp); - } - - $current_time = time(); + } if ( sizeof($banlist) ) { |