diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-01-25 23:22:38 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-01-25 23:22:38 +0000 |
commit | 832bba81fa6292eba20bc5ea15a5ce96c1f449a2 (patch) | |
tree | e955357418b68700c4771be7b0c19a08da2ab393 /phpBB/includes/page_header.php | |
parent | ba7200eb8fa325f3f9d42b5f1247cc3230d9d621 (diff) | |
download | forums-832bba81fa6292eba20bc5ea15a5ce96c1f449a2.tar forums-832bba81fa6292eba20bc5ea15a5ce96c1f449a2.tar.gz forums-832bba81fa6292eba20bc5ea15a5ce96c1f449a2.tar.bz2 forums-832bba81fa6292eba20bc5ea15a5ce96c1f449a2.tar.xz forums-832bba81fa6292eba20bc5ea15a5ce96c1f449a2.zip |
Removed INSERT code into separate routine, this separated update should be added to update_to before RC-3 is deemed final ...
git-svn-id: file:///svn/phpbb/trunk@1957 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/page_header.php')
-rw-r--r-- | phpBB/includes/page_header.php | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/phpBB/includes/page_header.php b/phpBB/includes/page_header.php index a2248a4ce0..37ad9d8e84 100644 --- a/phpBB/includes/page_header.php +++ b/phpBB/includes/page_header.php @@ -165,29 +165,7 @@ $online_userlist = $lang['Registered_users'] . " " . $online_userlist; $total_online_users = $logged_visible_online + $logged_hidden_online + $guests_online; -// -// This block of INSERTs is only here for people that are running RC1 or RC2 of phpBB2. -// Can be removed after most of those users have migrated to a version that has inserted -// the needed conifg keys. -// -if(!isset($board_config['record_online_users']) ) -{ - $sql = "INSERT INTO ". CONFIG_TABLE ." - (config_name, config_value) VALUES ('record_online_users', '".$total_online_users."')"; - if( !$result = $db->sql_query($sql) ) - { - message_die(GENERAL_ERROR, "Couldn't insert config key 'record_online_users'", "", __LINE__, __FILE__, $sql); - } - $sql = "INSERT INTO ". CONFIG_TABLE ." - (config_name, config_value) VALUES ('record_online_date', '".time()."')"; - if( !$result = $db->sql_query($sql) ) - { - message_die(GENERAL_ERROR, "Couldn't insert config key 'record_online_date'", "", __LINE__, __FILE__, $sql); - } - $board_config['record_online_users'] = $total_online_users; - $board_config['record_online_date'] = time(); -} -else if($total_online_users > $board_config['record_online_users']) +if($total_online_users > $board_config['record_online_users']) { $sql = "UPDATE " . CONFIG_TABLE . " SET config_value = '$total_online_users' @@ -196,6 +174,7 @@ else if($total_online_users > $board_config['record_online_users']) { message_die(GENERAL_ERROR, "Couldn't update online user record (nr of users)", "", __LINE__, __FILE__, $sql); } + $sql = "UPDATE " . CONFIG_TABLE . " SET config_value = '" . time() . "' WHERE config_name = 'record_online_date'"; @@ -203,6 +182,7 @@ else if($total_online_users > $board_config['record_online_users']) { message_die(GENERAL_ERROR, "Couldn't update online user record (date)", "", __LINE__, __FILE__, $sql); } + $board_config['record_online_users'] = $total_online_users; $board_config['record_online_date'] = time(); } |