Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27753
Modified Files:
comment.php
Log Message:
fix comment.php popup to not loop through an array of all comments.
Index: comment.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/comment.php,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- comment.php 22 Nov 2004 14:34:43 -0000 1.53
+++ comment.php 23 Nov 2004 16:38:58 -0000 1.54
@@ -1,7 +1,6 @@
<?php # $Id$
# Copyright (c) 2003-2004, Jannis Hermanns
# All rights reserved. See LICENSE file for licensing details
-
session_start();
include_once('serendipity_config.inc.php');
header('Content-Type: text/html; charset=' . LANG_CHARSET);
@@ -79,10 +78,17 @@
}
} else {
$id = (int)(!empty($serendipity['POST']['entry_id']) ? $serendipity['POST']['entry_id'] : $serendipity['GET']['entry_id']);
+
$serendipity['head_subtitle'] = COMMENTS;
$serendipity['smarty_file'] = 'commentpopup.tpl';
serendipity_smarty_init();
+ if ($id == 0) {
+ return false;
+ } else {
+ $serendipity['smarty']->assign('entry_id', $id);
+ }
+
if (isset($_GET['success']) && $_GET['success'] == 'true') {
$serendipity['smarty']->assign(
array(
@@ -115,10 +121,8 @@
)
);
- serendipity_printComments(serendipity_fetchComments($id));
-
if ($comment_allowed) {
- serendipity_displayCommentForm($id, '?', $comments, $serendipity['POST'], true, serendipity_db_bool($ca['moderate_comments']), $ca);
+ serendipity_displayCommentForm($id, '?', NULL, $serendipity['POST'], true, serendipity_db_bool($ca['moderate_comments']), $ca);
}
}
} else {
|