Update of /cvsroot/php-blog/serendipity/plugins/serendipity_plugin_comments
In directory sc8-pr-cvs1:/tmp/cvs-serv32697
Modified Files:
serendipity_plugin_comments.php
Log Message:
* Rename some variables, lets try and keep them in english, okay?
* Made array from query return lowercase array-keys
Index: serendipity_plugin_comments.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- serendipity_plugin_comments.php 3 Oct 2003 16:05:47 -0000 1.5
+++ serendipity_plugin_comments.php 8 Oct 2003 17:08:16 -0000 1.6
@@ -97,11 +97,12 @@
break;
}
- $q = 'SELECT c.body AS Comment,
- c.timestamp AS Stamp,
- c.author AS User,
- e.title AS Subject,
- e.id AS entry_id
+ $q = 'SELECT c.body AS comment,
+ c.timestamp AS stamp,
+ c.author AS user,
+ e.title AS subject,
+ e.id AS entry_id,
+ c.id AS comment_id
FROM serendipity_comments AS c,
serendipity_entries AS e
WHERE e.id = c.entry_id
@@ -114,22 +115,21 @@
if ($sql) {
foreach($sql AS $key => $row) {
- $Kommentare = wordwrap(strip_tags($row['Comment']), $max_chars, '@@@', 1);
- $aKommentar = explode('@@@', $Kommentare);
- $Kommentar = $aKommentar[0];
-
- if (count($aKommentar) > 1) {
- $Kommentar .= ' [...]';
+ $comments = wordwrap(strip_tags($row['comment']), $max_chars, '@@@', 1);
+ $aComment = explode('@@@', $comments);
+ $comment = $aComment[0];
+ if (count($aComment) > 1) {
+ $commentar .= ' [...]';
}
printf(
$out,
- htmlentities($row['User']),
- ' <a class="highlight" href="' . serendipity_archiveURL($row['entry_id'], $row['Subject']) .'" title="' . htmlentities($row['Subject']) . '">'
- . htmlentities($row['Subject'])
+ htmlentities($row['user']),
+ ' <a class="highlight" href="' . serendipity_archiveURL($row['entry_id'], $row['subject']) ,'" title="' . htmlentities($row['subject']) . '">'
+ . htmlentities($row['subject'])
. '</a><br />' . "\n"
- . htmlentities(strftime($dateformat, $row['Stamp'])) . '<br />' . "\n"
- . serendipity_emoticate(serendipity_markup_text(wordwrap(htmlentities($Kommentar), $wordwrap, "<br />\n", 1)))
+ . htmlentities(strftime($dateformat, $row['stamp'])) . '<br />' . "\n"
+ . serendipity_emoticate(serendipity_markup_text(wordwrap(htmlentities($comment), $wordwrap, "<br />\n", 1)))
. '<br /><br /><br />' . "\n\n"
);
}
|