Update of /cvsroot/php-blog/serendipity/plugins/serendipity_plugin_comments
In directory sc8-pr-cvs1:/tmp/cvs-serv1186
Modified Files:
serendipity_plugin_comments.php
Log Message:
Fixed dateformat not working in comment plugin
Fixed comment-plugin dumping PHP errors when no comments has ever been made to a blog
Index: serendipity_plugin_comments.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- serendipity_plugin_comments.php 8 Oct 2003 17:10:00 -0000 1.7
+++ serendipity_plugin_comments.php 11 Oct 2003 16:51:01 -0000 1.8
@@ -63,7 +63,7 @@
$max_entries = $this->get_config('max_entries');
$max_chars = $this->get_config('max_chars');
$wordwrap = $this->get_config('wordwrap');
- $date_format = $this->get_config('dateformat');
+ $dateformat = $this->get_config('dateformat');
if (!$max_entries || !is_numeric($max_entries) || $max_entries < 1) {
$max_entries = 15;
@@ -113,7 +113,7 @@
<?php
$sql = serendipity_db_query($q);
- if ($sql) {
+ if ($sql && is_array($sql)) {
foreach($sql AS $key => $row) {
$comments = wordwrap(strip_tags($row['comment']), $max_chars, '@@@', 1);
$aComment = explode('@@@', $comments);
|