Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2570
Modified Files:
NEWS serendipity_functions.inc.php
Log Message:
Minor bugfixes: comments rss feed, page counter
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- NEWS 29 Jan 2004 12:08:28 -0000 1.52
+++ NEWS 30 Jan 2004 12:53:29 -0000 1.53
@@ -2,6 +2,8 @@
Version 0.5 ()
------------------------------------
+ * Fixed RSS feed to only show comments when they are associated with an entry_id (garvinhicking)
+ * Fixed page counter to count pages depending on the entries per page, and not hardcoded 15 entries (garvinhicking)
* Atom 0.3 feed supported (with xml-stylesheet display) (garvinhicking)
* Fixed format of mail to not send invalid mails (garvinhicking)
* Added Yahoo! blog ping (garvinhicking)
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.192
retrieving revision 1.193
diff -u -d -r1.192 -r1.193
--- serendipity_functions.inc.php 29 Jan 2004 12:27:30 -0000 1.192
+++ serendipity_functions.inc.php 30 Jan 2004 12:53:29 -0000 1.193
@@ -470,6 +470,10 @@
if ($fetchDrafts == 'false') {
$drafts = "isdraft = 'false'";
}
+
+ if ($limit != '') {
+ $serendipity['fetchLimit'] = $limit;
+ }
if (is_numeric($range)) {
$year = (int)substr($range, 0, 4);
@@ -677,7 +681,7 @@
$query = serendipity_db_query($querystring);
$totalEntries = $query[0][0];
- $totalPages = ceil($totalEntries / 15);
+ $totalPages = ceil($totalEntries / ($serendipity['fetchLimit'] ? $serendipity['fetchLimit'] : 15));
if (!isset($serendipity['GET']['page'])) {
$serendipity['GET']['page'] = 1;
@@ -825,7 +829,7 @@
if (!isset($serendipity['GET']['id']) &&
(!isset($serendipity['GET']['hidefooter']) || $serendipity['GET']['hidefooter'] == false) &&
- count($entries) <= 15) {
+ count($entries) <= ($serendipity['fetchLimit'] ? $serendipity['fetchLimit'] : 15)) {
serendipity_printEntryFooter();
}
} else { // else short mode
@@ -899,7 +903,7 @@
{$serendipity['dbPrefix']}comments co
LEFT JOIN {$serendipity['dbPrefix']}entries e ON (co.entry_id = e.id)
LEFT JOIN {$serendipity['dbPrefix']}category c ON (e.categoryid = c.categoryid)
- WHERE co.type LIKE 'NORMAL' $and
+ WHERE co.type LIKE 'NORMAL' AND co.entry_id != '' $and
ORDER BY
co.id " . ($order != '' ? $order : '') . "
$limit";
|