|
From: Paul S. O. <ps...@us...> - 2002-01-25 23:22:41
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv28594/includes
Modified Files:
page_header.php
Log Message:
Removed INSERT code into separate routine, this separated update should be added to update_to before RC-3 is deemed final ...
Index: page_header.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/page_header.php,v
retrieving revision 1.92
retrieving revision 1.93
diff -C2 -r1.92 -r1.93
*** page_header.php 2002/01/25 22:16:08 1.92
--- page_header.php 2002/01/25 23:22:38 1.93
***************
*** 166,193 ****
$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'])
- {
$sql = "UPDATE " . CONFIG_TABLE . "
SET config_value = '$total_online_users'
--- 166,171 ----
$total_online_users = $logged_visible_online + $logged_hidden_online + $guests_online;
! if($total_online_users > $board_config['record_online_users'])
{
$sql = "UPDATE " . CONFIG_TABLE . "
SET config_value = '$total_online_users'
***************
*** 197,200 ****
--- 175,179 ----
message_die(GENERAL_ERROR, "Couldn't update online user record (nr of users)", "", __LINE__, __FILE__, $sql);
}
+
$sql = "UPDATE " . CONFIG_TABLE . "
SET config_value = '" . time() . "'
***************
*** 204,207 ****
--- 183,187 ----
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();
|