1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-23 06:33:22 +02:00

Issue #1356 - PHP7 Fixes.

This commit is contained in:
Cameron
2016-02-14 12:15:55 -08:00
parent 32636ec39d
commit 486f3d4961
54 changed files with 205 additions and 285 deletions

View File

@@ -693,7 +693,7 @@ function forum_track()
$data = array();
if($sql->gen($qry))
{
while($row = $sql->fetch(MYSQL_ASSOC))
while($row = $sql->fetch())
{
$row['thread_sef'] = eHelper::title2sef($row['thread_name'],'dashl');

View File

@@ -2007,7 +2007,7 @@ class forumAdmin
<th colspan='2'>".LAN_FORUM_1001."</th>
<th>".LAN_OPTIONS."</th>
</tr>";
while ($row = $sql->fetch(MYSQL_ASSOC))
while ($row = $sql->fetch())
{
$parentList[] = $row;
}
@@ -2049,7 +2049,7 @@ class forumAdmin
else
{
$forumList = array();
while ($row = $sql->fetch(MYSQL_ASSOC))
while ($row = $sql->fetch())
{
$forumList[] = $row;
}
@@ -2123,7 +2123,7 @@ class forumAdmin
{
if ($sql->select('forum', '*', "forum_id=$id"))
{
$row = $sql->fetch(MYSQL_ASSOC);
$row = $sql->fetch();
}
}
else
@@ -2188,7 +2188,7 @@ class forumAdmin
{
if ($sql->select('forum', '*', "forum_id=$id"))
{
$fInfo = $sql->fetch(MYSQL_ASSOC);
$fInfo = $sql->fetch();
}
}
else
@@ -2215,7 +2215,7 @@ class forumAdmin
$sql->select('forum', '*', 'forum_parent=0');
$text .= "<select name='forum_parent' class='tbox'>\n";
while (list($fid, $fname) = $sql->fetch(MYSQL_NUM))
while (list($fid, $fname) = $sql->fetch('num'))
{
$sel = ($fid == vartrue($fInfo['forum_parent']) ? "selected='selected'" : '');
$text .= "<option value='{$fid}' {$sel}>{$fname}</option>\n";

View File

@@ -867,7 +867,7 @@ class e107forum
}
if($sql->gen($qry))
{
$tmp = $sql->fetch(MYSQL_ASSOC);
$tmp = $sql->fetch();
if($tmp)
{
if(trim($tmp['thread_options']) != '')
@@ -923,7 +923,7 @@ class e107forum
if($sql->gen($qry))
{
$ret = array();
while($row = $sql->fetch(MYSQL_ASSOC))
while($row = $sql->fetch())
{
$row['thread_sef'] = eHelper::title2sef($row['thread_name'],'dashl');
$ret[] = $row;
@@ -983,7 +983,7 @@ class e107forum
if($sql->gen($qry))
{
$ret = array();
while($row = $sql->fetch(MYSQL_ASSOC))
while($row = $sql->fetch())
{
$ret[$row['post_user']] = $row['post_count'];
}
@@ -1029,7 +1029,7 @@ class e107forum
$postList = array();
while($row = $sql->Fetch(MYSQL_ASSOC))
while($row = $sql->Fetch())
{
$postList[] = $row['post_id'];
}
@@ -1049,7 +1049,7 @@ class e107forum
return true;
}
$tmp = $sql->fetch(MYSQL_ASSOC);
$tmp = $sql->fetch();
$attachment_array = e107::unserialize($tmp['post_attachments']);
$files = $attachment_array['file'];
@@ -1187,7 +1187,7 @@ class e107forum
{
if ($sql->select('forum', 'forum_id', 'forum_parent != 0'))
{
while ($row = $sql->fetch(MYSQL_ASSOC))
while ($row = $sql->fetch())
{
$parentList[] = $row['forum_id'];
}
@@ -1207,7 +1207,7 @@ class e107forum
{
if ($sql2->select('forum_t', 'thread_id', "thread_forum_id = $id AND thread_parent = 0")) // forum_t used in forum_update
{
while ($row = $sql2->fetch(MYSQL_ASSOC))
while ($row = $sql2->fetch())
{
set_time_limit(60);
$this->forumUpdateLastpost('thread', $row['thread_id']);
@@ -1216,7 +1216,7 @@ class e107forum
}
if ($sql->select('forum_thread', 'thread_id, thread_lastuser, thread_lastuser_anon, thread_datestamp', 'thread_forum_id='.$id.' ORDER BY thread_datestamp DESC LIMIT 1'))
{
$row = $sql->fetch(MYSQL_ASSOC);
$row = $sql->fetch();
$lp_info = $row['thread_datestamp'].'.'.$row['thread_id'];
$lp_user = $row['thread_lastuser'];
}
@@ -1258,7 +1258,7 @@ class e107forum
if ($sql->select('forum_thread', 'thread_id', $qry))
{
while ($row = $sql->fetch(MYSQL_ASSOC))
while ($row = $sql->fetch())
{
$newIdList[] = $row['thread_id'];
}
@@ -1294,7 +1294,7 @@ class e107forum
{
if (e107::getDb()->select('forum', '*', 'forum_parent=0 ORDER BY forum_order ASC'))
{
while ($row = e107::getDb()->fetch(MYSQL_ASSOC)) {
while ($row = e107::getDb()->fetch()) {
$ret[] = $row;
}
return $ret;
@@ -1314,7 +1314,7 @@ class e107forum
if($uclass == e_UC_ADMIN || trim($uclass) == '')
{
$sql->select('user', 'user_id, user_name','user_admin = 1 ORDER BY user_name ASC');
while($row = $sql->fetch(MYSQL_ASSOC))
while($row = $sql->fetch())
{
$this->modArray[$row['user_id']] = $row['user_name'];
}
@@ -1385,7 +1385,7 @@ class e107forum
";
if ($sql->gen($qry))
{
while ($row = $sql->fetch(MYSQL_ASSOC))
while ($row = $sql->fetch())
{
if($type == 'all')
{
@@ -1414,7 +1414,7 @@ class e107forum
";
if ($sql->gen($qry))
{
while ($row = $sql->fetch(MYSQL_ASSOC))
while ($row = $sql->fetch())
{
if($forum_id == '')
{
@@ -1462,7 +1462,7 @@ class e107forum
WHERE ft.thread_lastpost > '.USERLV.' '.$viewed;
if($sql->gen($_newqry))
{
while($row = $sql->fetch(MYSQL_ASSOC))
while($row = $sql->fetch())
{
$ret[] = $row['thread_forum_id'];
if($row['forum_sub'])
@@ -1653,7 +1653,7 @@ class e107forum
";
if ($sql->gen($qry))
{
return $sql->fetch(MYSQL_ASSOC);
return $sql->fetch();
}
return FALSE;
}
@@ -1706,7 +1706,7 @@ class e107forum
$ret = array();
if ($sql->gen($qry))
{
while ($row = $sql->fetch(MYSQL_ASSOC))
while ($row = $sql->fetch())
{
// $row['thread_sef'] = eHelper::title2sef($row['thread_name']);
$ret[] = $row;
@@ -1929,7 +1929,7 @@ class e107forum
if($sql->gen($qry))
{
$ret = array();
while($row = $sql->fetch(MYSQL_ASSOC))
while($row = $sql->fetch())
{
$ret[$row['post_user']] = $row['cnt'];
}
@@ -2110,7 +2110,7 @@ class e107forum
if($sql->select('forum_post', 'post_id', 'post_thread = '.$threadId))
{
$postList = array();
while($row = $sql->fetch(MYSQL_ASSOC))
while($row = $sql->fetch())
{
$postList[] = $row['post_id'];
}
@@ -2165,7 +2165,7 @@ class e107forum
}
$row = $sql->fetch(MYSQL_ASSOC);
$row = $sql->fetch();
//delete attachments if they exist
if($row['post_attachments'])

View File

@@ -615,7 +615,7 @@ class forumStats
<th style='width:25%; text-align:center' class='forumheader'>".LAN_5."</th>
</tr>\n";
while ($row = $sql->fetch(MYSQL_ASSOC))
while ($row = $sql->fetch())
{
if ($row['user_name'])
{

View File

@@ -373,7 +373,7 @@ function step4()
require_once (e_HANDLER . 'user_extended_class.php');
$ue = new e107_user_extended;
while ($row = $db -> fetch(MYSQL_ASSOC))
while ($row = $db -> fetch())
{
$result['usercount']++;
$userId = (int)$row['user_id'];
@@ -716,7 +716,7 @@ function step8_ajax()
if ($sql->select('forum', 'forum_id', 'forum_parent != 0 AND forum_id > '.$lastThread.' ORDER BY forum_id LIMIT 2'))
{
while ($row = $sql->fetch(MYSQL_ASSOC))
while ($row = $sql->fetch())
{
$parentList[] = $row['forum_id'];
}
@@ -766,7 +766,7 @@ function step9()
";
if ($sql -> gen($qry))
{
while ($row = $sql -> fetch(MYSQL_ASSOC))
while ($row = $sql -> fetch())
{
$threadList[] = $row['thread_id'];
}
@@ -774,7 +774,7 @@ function step9()
{
if ($sql -> select('forum_thread', 'thread_options', 'thread_id = ' . $threadId, 'default'))
{
$row = $sql -> fetch(MYSQL_ASSOC);
$row = $sql -> fetch();
if ($row['thread_options'])
{
$opts = unserialize($row['thread_options']);
@@ -880,7 +880,7 @@ function step10_ajax()//TODO
if ($sql->gen($qry))
{
while ($row = $sql->fetch(MYSQL_ASSOC))
while ($row = $sql->fetch())
{
$postList[] = $row;
}
@@ -1354,7 +1354,7 @@ class forumUpgrade
/*
if ($sql -> select('generic', '*', "gen_type = 'forumUpgrade'"))
{
$row = $sql -> fetch(MYSQL_ASSOC);
$row = $sql -> fetch();
$this -> updateInfo = unserialize($row['gen_chardata']);
}
else