From 6e9bc6b0fccd529904d7e4ccc1e04c4c0c5967e2 Mon Sep 17 00:00:00 2001
From: James Atkinson <thefinn@users.sourceforge.net>
Date: Thu, 21 Jun 2001 03:20:37 +0000
Subject: Working on getting Oracle functional. Almost there, need to deal with
 the 'AUTO INCREMENT' issue

git-svn-id: file:///svn/phpbb/trunk@520 89ea8834-ac86-4346-8a33-228a782c2dd0
---
 phpBB/includes/page_header.php | 11 ++++++++---
 phpBB/includes/sessions.php    |  6 ++++--
 2 files changed, 12 insertions(+), 5 deletions(-)

(limited to 'phpBB/includes')

diff --git a/phpBB/includes/page_header.php b/phpBB/includes/page_header.php
index bd22993a4e..0864aeeea3 100644
--- a/phpBB/includes/page_header.php
+++ b/phpBB/includes/page_header.php
@@ -86,11 +86,15 @@ if(!$result)
 
 $logged_online = 0;
 $guests_online = 0;
-while($row = $db->sql_fetchrow($result))
+
+$row = $db->sql_fetchrowset($result);
+$num_rows = $db->sql_numrows($result);
+for($x = 0; $x < $num_rows; $x++)
 {
-	if($row['session_logged_in'])
+	
+	if($row[$x]['session_logged_in'])
 	{
-		$userlist_ary[] = "<a href=\"".append_sid("profile." . $phpEx . "?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . "\">" . $row['username'] . "</a>";
+		$userlist_ary[] = "<a href=\"".append_sid("profile." . $phpEx . "?mode=viewprofile&" . POST_USERS_URL . "=" . $row[$x]['user_id']) . "\">" . $row[$x]['username'] . "</a>";
 		$logged_online++;
 	}
 	else
@@ -98,6 +102,7 @@ while($row = $db->sql_fetchrow($result))
 		$guests_online++;
 	}
 }
+
 $userlist = "";
 for($i = 0; $i < $logged_online; $i++)
 {
diff --git a/phpBB/includes/sessions.php b/phpBB/includes/sessions.php
index 1957479473..92e0e50f20 100644
--- a/phpBB/includes/sessions.php
+++ b/phpBB/includes/sessions.php
@@ -59,6 +59,7 @@ function session_begin($user_id, $user_ip, $page_id, $session_length, $login = 0
 	{
 		error_die(SQL_QUERY, "Couldn't obtain ban information.", __LINE__, __FILE__);
 	}
+
 	$ban_info = $db->sql_fetchrow($result);
 
 	//
@@ -244,9 +245,9 @@ function session_pagestart($user_ip, $thispage_id, $session_length)
 				error_die(SESSION_CREATE);
 			}
 		}
-
+		
 		$userdata = $db->sql_fetchrow($result);
-
+		
 		//
 		// Did the session exist in the DB?
 		// 
@@ -327,6 +328,7 @@ function session_pagestart($user_ip, $thispage_id, $session_length)
 				error_die(SESSION_CREATE);
 			}
 		}
+		
 		$userdata = $db->sql_fetchrow($result);
 
 		if($userdata['user_autologin_key'])
-- 
cgit v1.2.1