diff --git a/phpBB/common.php b/phpBB/common.php
index 09dcdb6e6e..b9e2d46cce 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -96,7 +96,7 @@ if(!$result = $db->sql_query($sql))
else
{
$config = $db->sql_fetchrow($result);
-
+
$board_config['sitename'] = stripslashes($config['sitename']);
$board_config['allow_html'] = $config['allow_html'];
$board_config['allow_bbcode'] = $config['allow_bbcode'];
diff --git a/phpBB/db/oracle.php b/phpBB/db/oracle.php
index f67ab24ced..948c5e1949 100644
--- a/phpBB/db/oracle.php
+++ b/phpBB/db/oracle.php
@@ -45,11 +45,11 @@ class sql_db
if($this->persistency)
{
- $this->db_connect_id = OCIPLogon($this->user, $this->password, $this->server);
+ $this->db_connect_id = @OCIPLogon($this->user, $this->password, $this->server);
}
else
{
- $this->db_connect_id = OCINLogon($this->user, $this->password, $this->server);
+ $this->db_connect_id = @OCINLogon($this->user, $this->password, $this->server);
}
if($this->db_connect_id)
{
@@ -70,9 +70,9 @@ class sql_db
{
if($this->query_result)
{
- OCIFreeStatement($this->query_result);
+ @OCIFreeStatement($this->query_result);
}
- $result = OCILogoff($this->db_connect_id);
+ $result = @OCILogoff($this->db_connect_id);
return $result;
}
else
@@ -107,8 +107,8 @@ class sql_db
}
}
- $this->query_result = OCIParse($this->db_connect_id, $query);
- $success = OCIExecute($this->query_result);
+ $this->query_result = @OCIParse($this->db_connect_id, $query);
+ $success = @OCIExecute($this->query_result);
}
if($success)
{
@@ -133,10 +133,10 @@ class sql_db
}
if($query_id)
{
- $result = OCIFetchStatement($query_id, $this->rowset);
+ $result = @OCIFetchStatement($query_id, $this->rowset);
// OCIFetchStatment kills our query result so we have to execute the statment again
// if we ever want to use the query_id again.
- OCIExecute($query_id);
+ @OCIExecute($query_id);
return $result;
}
else
@@ -168,7 +168,7 @@ class sql_db
}
if($query_id)
{
- $result = OCINumCols($query_id);
+ $result = @OCINumCols($query_id);
return $result;
}
else
@@ -187,7 +187,7 @@ class sql_db
}
if($query_id)
{
- $result = strtolower(OCIColumnName($query_id, $offset));
+ $result = strtolower(@OCIColumnName($query_id, $offset));
return $result;
}
else
@@ -205,7 +205,7 @@ class sql_db
}
if($query_id)
{
- $result = OCIColumnType($query_id, $offset);
+ $result = @OCIColumnType($query_id, $offset);
return $result;
}
else
@@ -221,12 +221,13 @@ class sql_db
}
if($query_id)
{
- $result = OCIFetchInto($query_id, &$this->row[$query_id], OCI_ASSOC);
+
+ $result = @OCIFetchInto($query_id, &$this->row[$query_id], OCI_ASSOC);
for($i = 0; $i < count($this->row[$query_id]); $i++)
- {
- list($key, $val) = each($this->row[$query_id]);
- $return_arr[strtolower($key)] = $val;
- }
+ {
+ list($key, $val) = each($this->row[$query_id]);
+ $return_arr[strtolower($key)] = $val;
+ }
$this->row[$query_id] = $return_arr;
return $this->row[$query_id];
}
@@ -245,11 +246,11 @@ class sql_db
}
if($query_id)
{
- $rows = OCIFetchStatement($query_id, $results);
- OCIExecute($query_id);
+ $rows = @OCIFetchStatement($query_id, $results);
+ @OCIExecute($query_id);
for($i = 0; $i <= $rows; $i++)
{
- OCIFetchInto($query_id, $tmp_result, OCI_ASSOC+OCI_RETURN_NULLS);
+ @OCIFetchInto($query_id, $tmp_result, OCI_ASSOC+OCI_RETURN_NULLS);
for($j = 0; $j < count($tmp_result); $j++)
{
@@ -276,20 +277,20 @@ class sql_db
if($rownum > -1)
{
// Reset the internal rownum pointer.
- OCIExecute($query_id);
+ @OCIExecute($query_id);
for($i = 0; $i < $rownum; $i++)
{
// Move the interal pointer to the row we want
- OCIFetch($query_id);
+ @OCIFetch($query_id);
}
// Get the field data.
- $result = OCIResult($query_id, strtoupper($field));
+ $result = @OCIResult($query_id, strtoupper($field));
}
else
{
// The internal pointer should be where we want it
// so we just grab the field out of the current row.
- $result = OCIResult($query_id, strtoupper($field));
+ $result = @OCIResult($query_id, strtoupper($field));
}
return $result;
}
@@ -306,12 +307,12 @@ class sql_db
}
if($query_id)
{
- OCIExecute($query_id);
+ @OCIExecute($query_id);
for($i = 0; $i < $rownum; $i++)
{
- OCIFetch($query_id);
+ @OCIFetch($query_id);
}
- $result = OCIFetch($query_id);
+ $result = @OCIFetch($query_id);
return $result;
}
else
@@ -339,7 +340,7 @@ class sql_db
}
if($query_id)
{
- $result = OCIFreeStatement($query_id);
+ $result = @OCIFreeStatement($query_id);
return $result;
}
else
@@ -353,7 +354,7 @@ class sql_db
{
$query_id = $this->query_result;
}
- $result = OCIError($query_id);
+ $result = @OCIError($query_id);
return $result;
}
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[] = "" . $row['username'] . "";
+ $userlist_ary[] = "" . $row[$x]['username'] . "";
$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'])