[Logicampus-cvs] logicampus/src/logicreate/services/forum LC_forum.php, 1.2, 1.3 LC_object.php, 1.1
Brought to you by:
trilexcom
From: Mark K <har...@us...> - 2007-10-08 14:26:52
|
Update of /cvsroot/logicampus/logicampus/src/logicreate/services/forum In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv22194 Modified Files: LC_forum.php LC_object.php LcForum.php LcForumPost.php Log Message: Change function "next_record" to "nextRecord". Index: LcForumPost.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/forum/LcForumPost.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** LcForumPost.php 11 Feb 2007 05:31:20 -0000 1.5 --- LcForumPost.php 8 Oct 2007 14:26:49 -0000 1.6 *************** *** 299,303 **** WHERE (lc_forum_post_thread_id=".$this->lcForumPostId . ") AND (lc_forum_post_status=0 or lc_forum_post_status IS NULL)"); ! $this->lcForumReplyCount= $db->Record[0]; $db->queryOne("select max(lc_forum_post_id) as foo --- 299,303 ---- WHERE (lc_forum_post_thread_id=".$this->lcForumPostId . ") AND (lc_forum_post_status=0 or lc_forum_post_status IS NULL)"); ! $this->lcForumReplyCount= $db->record[0]; $db->queryOne("select max(lc_forum_post_id) as foo *************** *** 305,309 **** WHERE (lc_forum_post_id=".$this->lcForumPostId." or lc_forum_post_thread_id=".$this->lcForumPostId.") AND (lc_forum_post_status=0 or lc_forum_post_status IS NULL)"); ! $max = sprintf('%d',$db->Record['foo']); $db->queryOne("select * --- 305,309 ---- WHERE (lc_forum_post_id=".$this->lcForumPostId." or lc_forum_post_thread_id=".$this->lcForumPostId.") AND (lc_forum_post_status=0 or lc_forum_post_status IS NULL)"); ! $max = sprintf('%d',$db->record['foo']); $db->queryOne("select * *************** *** 311,316 **** WHERE lc_forum_post_id=$max AND (lc_forum_post_status=0 or lc_forum_post_status IS NULL)"); ! $this->lcForumRecentPostTimedate= $db->Record['lc_forum_post_timedate']; ! $this->lcForumRecentPoster = $db->Record['lc_forum_post_username']; $this->lcForumRecentPostId = $max; $this->save(); --- 311,316 ---- WHERE lc_forum_post_id=$max AND (lc_forum_post_status=0 or lc_forum_post_status IS NULL)"); ! $this->lcForumRecentPostTimedate= $db->record['lc_forum_post_timedate']; ! $this->lcForumRecentPoster = $db->record['lc_forum_post_username']; $this->lcForumRecentPostId = $max; $this->save(); Index: LcForum.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/forum/LcForum.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LcForum.php 11 Feb 2007 05:31:20 -0000 1.6 --- LcForum.php 8 Oct 2007 14:26:49 -0000 1.7 *************** *** 373,377 **** WHERE lc_forum_id=".$forumId." AND (lc_forum_post_status=0 OR lc_forum_post_status IS NULL)"); ! $this->lcForumPostCount = $db->Record[0]; $db->queryOne("SELECT count(lc_forum_post_id) --- 373,377 ---- WHERE lc_forum_id=".$forumId." AND (lc_forum_post_status=0 OR lc_forum_post_status IS NULL)"); ! $this->lcForumPostCount = $db->record[0]; $db->queryOne("SELECT count(lc_forum_post_id) *************** *** 380,384 **** AND lc_forum_post_parent_id=0 AND (lc_forum_post_status=0 OR lc_forum_post_status IS NULL)"); ! $this->lcForumThreadCount = $db->Record[0]; $db->queryOne("SELECT max(lc_forum_post_id) --- 380,384 ---- AND lc_forum_post_parent_id=0 AND (lc_forum_post_status=0 OR lc_forum_post_status IS NULL)"); ! $this->lcForumThreadCount = $db->record[0]; $db->queryOne("SELECT max(lc_forum_post_id) *************** *** 386,390 **** WHERE lc_forum_id=".$forumId. " AND (lc_forum_post_status=0 OR lc_forum_post_status IS NULL)"); ! $max = sprintf('%d',$db->Record[0]); $db->queryOne("SELECT * --- 386,390 ---- WHERE lc_forum_id=".$forumId. " AND (lc_forum_post_status=0 OR lc_forum_post_status IS NULL)"); ! $max = sprintf('%d',$db->record[0]); $db->queryOne("SELECT * *************** *** 392,397 **** WHERE lc_forum_post_id=$max AND (lc_forum_post_status=0 OR lc_forum_post_status IS NULL)"); ! $this->lcForumRecentPostTimedate= $db->Record['lc_forum_post_timedate']; ! $this->lcForumRecentPoster = $db->Record['lc_forum_post_username']; $this->lcForumRecentPostId = $max; $this->save(); --- 392,397 ---- WHERE lc_forum_post_id=$max AND (lc_forum_post_status=0 OR lc_forum_post_status IS NULL)"); ! $this->lcForumRecentPostTimedate= $db->record['lc_forum_post_timedate']; ! $this->lcForumRecentPoster = $db->record['lc_forum_post_username']; $this->lcForumRecentPostId = $max; $this->save(); Index: LC_object.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/forum/LC_object.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** LC_object.php 21 Nov 2003 23:14:09 -0000 1.1.1.1 --- LC_object.php 8 Oct 2007 14:26:49 -0000 1.2 *************** *** 22,27 **** $db->query($sql); ! while($db->next_record()) { ! arrayIntoObject($this,$db->Record); } } --- 22,27 ---- $db->query($sql); ! while($db->nextRecord()) { ! arrayIntoObject($this,$db->record); } } *************** *** 40,45 **** ! while($db->next_record()) { ! $idarray[] = $db->Record; } $this->_Array = $idarray; --- 40,45 ---- ! while($db->nextRecord()) { ! $idarray[] = $db->record; } $this->_Array = $idarray; *************** *** 51,56 **** $sql = "select pkey,".$this->_name." from ".$this->_tableName." where ".$this->_tablePrefix."username = '$username' $o"; $db->query($sql); ! while($db->next_record()) { ! $idarray[$db->Record[0]] = $db->Record[1]; } $this->_Array = $idarray; --- 51,56 ---- $sql = "select pkey,".$this->_name." from ".$this->_tableName." where ".$this->_tablePrefix."username = '$username' $o"; $db->query($sql); ! while($db->nextRecord()) { ! $idarray[$db->record[0]] = $db->record[1]; } $this->_Array = $idarray; *************** *** 62,67 **** $sql = "select pkey,".$this->_name." from ".$this->_tableName." where schoolID = '$schoolID' $o"; $db->query($sql); ! while($db->next_record()) { ! $idarray[$db->Record[0]] = $db->Record[1]; } --- 62,67 ---- $sql = "select pkey,".$this->_name." from ".$this->_tableName." where schoolID = '$schoolID' $o"; $db->query($sql); ! while($db->nextRecord()) { ! $idarray[$db->record[0]] = $db->record[1]; } *************** *** 80,85 **** $db->query($sql); ! while($db->next_record()) { ! $idarray[] = $db->Record; } $this->_Array = $idarray; --- 80,85 ---- $db->query($sql); ! while($db->nextRecord()) { ! $idarray[] = $db->record; } $this->_Array = $idarray; *************** *** 97,102 **** $sql = $this->_getAllSQL." $where ".$this->_extrawhere." $o"; $db->query($sql); ! while($db->next_record()) { ! $idarray[] = $db->Record; } $this->_Array = $idarray; --- 97,102 ---- $sql = $this->_getAllSQL." $where ".$this->_extrawhere." $o"; $db->query($sql); ! while($db->nextRecord()) { ! $idarray[] = $db->record; } $this->_Array = $idarray; Index: LC_forum.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/forum/LC_forum.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LC_forum.php 11 Feb 2007 05:31:20 -0000 1.2 --- LC_forum.php 8 Oct 2007 14:26:49 -0000 1.3 *************** *** 28,32 **** $fid = $this->fid; $db->queryOne("select count(fid) AS total from forumPerms where perm='$perm' and fid='$fid' and (groups='$g')"); ! $x = $db->Record['total']; unset($db); if ($x>0) { return true; } else { return false; } --- 28,32 ---- $fid = $this->fid; $db->queryOne("select count(fid) AS total from forumPerms where perm='$perm' and fid='$fid' and (groups='$g')"); ! $x = $db->record['total']; unset($db); if ($x>0) { return true; } else { return false; } *************** *** 40,44 **** $sql = "select * from forumPrefs where username = '$username' and pref_key = 'sendEmail' and pref_val = '".$this->fid."'"; $db->query($sql); ! if ($db->next_record() ) { return true; } else { --- 40,44 ---- $sql = "select * from forumPrefs where username = '$username' and pref_key = 'sendEmail' and pref_val = '".$this->fid."'"; $db->query($sql); ! if ($db->nextRecord() ) { return true; } else { *************** *** 52,56 **** if (!$fid) { $fid = $this->fid; } $db->queryOne("select * from forums where fid='$fid'"); ! $j = $db->Record; unset($db); return $j; --- 52,56 ---- if (!$fid) { $fid = $this->fid; } $db->queryOne("select * from forums where fid='$fid'"); ! $j = $db->record; unset($db); return $j; *************** *** 66,77 **** function getmessage($db,$sql) { $db->query($sql); ! while ($db->next_record()) { ! $message = $db->Record["message"]; ! $body = $db->Record["body"]; ! $pkey = $db->Record["pkey"]; ! $timedate = date("m/d/Y h:i:s A",$db->Record["stamptime"]); ! $parent = $db->Record["parent"]; ! $fid = $db->Record["fid"]; ! $username = $db->Record["username"]; if (!$username) { $username="Anonymous"; } $messageshow .= "<h2>$message</h2>\n"; --- 66,77 ---- function getmessage($db,$sql) { $db->query($sql); ! while ($db->nextRecord()) { ! $message = $db->record["message"]; ! $body = $db->record["body"]; ! $pkey = $db->record["pkey"]; ! $timedate = date("m/d/Y h:i:s A",$db->record["stamptime"]); ! $parent = $db->record["parent"]; ! $fid = $db->record["fid"]; ! $username = $db->record["username"]; if (!$username) { $username="Anonymous"; } $messageshow .= "<h2>$message</h2>\n"; *************** *** 90,95 **** $sql = "select forumname,fid,forumdesc from forums $where"; $db->query($sql); ! while ($db->next_record()) { ! extract($db->Record); $this->forumList["forumid"][] = $fid; $this->forumList["forumname"][] = $forumname; --- 90,95 ---- $sql = "select forumname,fid,forumdesc from forums $where"; $db->query($sql); ! while ($db->nextRecord()) { ! extract($db->record); $this->forumList["forumid"][] = $fid; $this->forumList["forumname"][] = $forumname; *************** *** 116,132 **** $sql = "select * from forums where fid = '$fid'"; $db->query($sql); ! while($db->next_record()) { $sql = "select count(pkey) AS total from forumPosts where fid='$fid' and status<>'y'"; $db2->query($sql); ! $db2->next_record(); ! $count = intval($db2->Record['total']); $this->off = $count; ! $this->forumname = $db->Record["forumname"]; ! $this->forumdesc = $db->Record["forumdesc"]; ! $this->forumemail = $db->Record["email"]; ! $this->uploadmaxk = $db->Record["uploadmaxk"]; ! $this->uploadcount = $db->Record["uploadcount"]; ! $this->defaultstatus = $db->Record["defaultstatus"]; ! $this->groups = explode("|",$db->Record["groups"]); } } --- 116,132 ---- $sql = "select * from forums where fid = '$fid'"; $db->query($sql); ! while($db->nextRecord()) { $sql = "select count(pkey) AS total from forumPosts where fid='$fid' and status<>'y'"; $db2->query($sql); ! $db2->nextRecord(); ! $count = intval($db2->record['total']); $this->off = $count; ! $this->forumname = $db->record["forumname"]; ! $this->forumdesc = $db->record["forumdesc"]; ! $this->forumemail = $db->record["email"]; ! $this->uploadmaxk = $db->record["uploadmaxk"]; ! $this->uploadcount = $db->record["uploadcount"]; ! $this->defaultstatus = $db->record["defaultstatus"]; ! $this->groups = explode("|",$db->record["groups"]); } } *************** *** 136,141 **** $sql = "select count(fid) AS total from forums where fid='".$this->fid."'"; $db->query($sql); ! $db->next_record(); ! $count = intval($db->Record['total']); if ($count>0) { return false; --- 136,141 ---- $sql = "select count(fid) AS total from forums where fid='".$this->fid."'"; $db->query($sql); ! $db->nextRecord(); ! $count = intval($db->record['total']); if ($count>0) { return false; *************** *** 163,167 **** $sql = "select count(fid) existance_count from forums where fid='".$this->fid."'"; $db->queryOne($sql); ! if ((int)$db->Record['existance_count'] > 0) { $sql = ' --- 163,167 ---- $sql = "select count(fid) existance_count from forums where fid='".$this->fid."'"; $db->queryOne($sql); ! if ((int)$db->record['existance_count'] > 0) { $sql = ' *************** *** 207,212 **** } $db->query("select pkey from forumPosts where stamptime = $stamp and username='".$this->username."' and body='".$this->body."'"); ! $db->next_record(); ! $this->messageid = $db->Record['pkey']; } --- 207,212 ---- } $db->query("select pkey from forumPosts where stamptime = $stamp and username='".$this->username."' and body='".$this->body."'"); ! $db->nextRecord(); ! $this->messageid = $db->record['pkey']; } *************** *** 234,240 **** unset($name); unset($desc); ! while ($db->next_record()) { ! $name[] = $db->Record["filename"]; ! $desc[] = $db->Record["filedesc"]; } $this->filename = $name; --- 234,240 ---- unset($name); unset($desc); ! while ($db->nextRecord()) { ! $name[] = $db->record["filename"]; ! $desc[] = $db->record["filedesc"]; } $this->filename = $name; *************** *** 277,284 **** } $db->queryOne("select * from forumPosts where pkey=$message and parent=0 and fid='$forumID' $st"); ! $results[] = $db->Record; $db->query("select * from forumPosts where parent=$message $st"); ! while($db->next_record()) { ! $results[] = $db->Record; } return $results; --- 277,284 ---- } $db->queryOne("select * from forumPosts where pkey=$message and parent=0 and fid='$forumID' $st"); ! $results[] = $db->record; $db->query("select * from forumPosts where parent=$message $st"); ! while($db->nextRecord()) { ! $results[] = $db->record; } return $results; *************** *** 371,376 **** if (intval($count)==0) { $db->query("select count(pkey) AS total from forumPosts where parent=$pkey and status='y'"); ! $db->next_record(); ! $count = intval($db->Record['total']); } --- 371,376 ---- if (intval($count)==0) { $db->query("select count(pkey) AS total from forumPosts where parent=$pkey and status='y'"); ! $db->nextRecord(); ! $count = intval($db->record['total']); } *************** *** 444,448 **** $db = DB::getHandle(); $db->queryOne("select count(fid) AS total from forums where 1=1 and ".createGroupCheck($groups)." and fid='$forumID'"); ! return $db->Record['total']; } --- 444,448 ---- $db = DB::getHandle(); $db->queryOne("select count(fid) AS total from forums where 1=1 and ".createGroupCheck($groups)." and fid='$forumID'"); ! return $db->record['total']; } |