[geeklog-cvs] geeklog: comments work
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Tue Jan 26 15:53:35 EST 2010
changeset 7627:bc39111476d6
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/bc39111476d6
user: stan <yankees26an at gmail.com>
date: Mon Jul 06 21:59:44 2009 -0400
description:
comments work
diffstat:
system/lib-comment.php | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (55 lines):
diff -r 7a9577237f9f -r bc39111476d6 system/lib-comment.php
--- a/system/lib-comment.php Sun Jul 05 19:07:41 2009 -0400
+++ b/system/lib-comment.php Mon Jul 06 21:59:44 2009 -0400
@@ -222,7 +222,7 @@
$template = new Template( $_CONF['path_layout'] . 'comment' );
$template->set_file( array( 'comment' => 'comment.thtml',
- 'thread' => 'thread.thtml' ));
+ 'thread' => 'thread.thtml' ));
// generic template variables
$template->set_var( 'xhtml', XHTML );
@@ -555,7 +555,7 @@
$retval .= $template->parse( 'output', 'comment' );
}
$row++;
- } while( $A = DB_fetchArray( $comments ));
+ } while( $A = ($preview)?0:DB_fetchArray( $comments ));
return $retval;
}
@@ -1123,11 +1123,11 @@
} elseif ( $_CONF['commentsubmission'] == 1 && !SEC_hasRights('comment.submit') ) {
//comment into comment submission table enabled
if (isset($name)) {
- DB_save ( $_TABLES['commentsubmissions'], 'sid,uid,name,comment,date,title,pid,ipaddress',
- "'$sid',$uid,'$name','$comment',now(),'$title',$pid,'{$_SERVER['REMOTE_ADDR']}'");
+ DB_query ( "INSERT INTO {$_TABLES['commentsubmissions']} (sid,uid,name,comment,date,title,pid,ipaddress) VALUES
+ ($sid',$uid,'$name','$comment',now(),'$title',$pid,'{$_SERVER['REMOTE_ADDR']}')");
} else {
- DB_save ( $_TABLES['commentsubmissions'], 'sid,uid,comment,date,title,pid,ipaddress',
- "'$sid',$uid,'$comment',now(),'$title',$pid,'{$_SERVER['REMOTE_ADDR']}'");
+ DB_query ( "INSERT INTO {$_TABLES['commentsubmissions']} (sid,uid,comment,date,title,pid,ipaddress) VALUES
+ ($sid',$uid,$comment',now(),'$title',$pid,'{$_SERVER['REMOTE_ADDR']}')");
}
$ret = -1;
@@ -1174,7 +1174,7 @@
}
- $cid = DB_insertId();
+ $cid = DB_insertId('','comments_cid_seq');
DB_unlockTable($_TABLES['comments']);
// notify of new comment
@@ -1730,7 +1730,7 @@
"'{$A['type']}','{$A['sid']}','{$A['date']}','{$A['title']}','{$A['comment']}','{$A['uid']}',".
"'{$A['pid']}','{$A['ipaddress']}',$indent");
}
- $newcid = DB_insertId();
+ $newcid = DB_insertId('','comments_cid_seq');
DB_delete($_TABLES['commentsubmissions'], 'cid', $cid);
More information about the geeklog-cvs
mailing list