Update of /cvsroot/openfirst/news
In directory sc8-pr-cvs1:/tmp/cvs-serv7775/news
Modified Files:
comments.php
Log Message:
Minor bug fix
Index: comments.php
===================================================================
RCS file: /cvsroot/openfirst/news/comments.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** comments.php 23 Nov 2003 15:39:20 -0000 1.2
--- comments.php 23 Nov 2003 19:58:49 -0000 1.3
***************
*** 51,56 ****
$q=ofirst_dbquery("SELECT * FROM ofirst_news WHERE ID='$id'");
$newspost=ofirst_dbfetch_object($q);
! ofirst_dbquery("INSERT INTO ofirst_forumposts (forum,ReplyTo,Title,Author,Message,DatePosted) values ('".newsforum."','0','".$newspost->title."','".$newspost->poster."','".$newspost->news."','".date("Y-m-d H:i:s")."');");
! $query=ofirst_dbquery("SELECT ID FROM ofirst_forumposts WHERE forum='".newsforum."' AND ReplyTo=0 AND Title='".$newspost->title."' AND Author='".$newspost->poster."' AND Message='".$newspost->news."'");
$news=ofirst_dbfetch_object($query);
ofirst_dbquery("INSERT INTO ofirst_news_comments (StoryID,Author,Website,Comment,Date) values ('$id','".$newspost->poster."','".$basepath."/forum/thread.php?id=".$news->ID."','Discussion moved to forum','".date("Y-m-d H:i:s")."');");
--- 51,56 ----
$q=ofirst_dbquery("SELECT * FROM ofirst_news WHERE ID='$id'");
$newspost=ofirst_dbfetch_object($q);
! ofirst_dbquery("INSERT INTO ofirst_forumposts (forum,ReplyTo,Title,Author,Message,DatePosted) values ('".newsforum."','0','".$newspost->title."','".$newspost->poster."','".addslashes($newspost->news)."','".date("Y-m-d H:i:s")."');");
! $query=ofirst_dbquery("SELECT ID FROM ofirst_forumposts WHERE forum='".newsforum."' AND ReplyTo=0 AND Title='".$newspost->title."' AND Author='".$newspost->poster."' AND Message='".addslashes($newspost->news)."'");
$news=ofirst_dbfetch_object($query);
ofirst_dbquery("INSERT INTO ofirst_news_comments (StoryID,Author,Website,Comment,Date) values ('$id','".$newspost->poster."','".$basepath."/forum/thread.php?id=".$news->ID."','Discussion moved to forum','".date("Y-m-d H:i:s")."');");
|