[geeklog-cvs] geeklog: Comments spanning more than 1 page now works for plugins.
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Tue Feb 16 11:26:13 EST 2010
changeset 7724:9cb9ec9d1341
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/9cb9ec9d1341
user: Tom <websitemaster at cogeco.net>
date: Tue Feb 16 11:17:53 2010 -0500
description:
Comments spanning more than 1 page now works for plugins.
diffstat:
public_html/article.php | 8 ++++----
system/lib-comment.php | 12 ++++++++++--
2 files changed, 14 insertions(+), 6 deletions(-)
diffs (48 lines):
diff -r 37141ece518b -r 9cb9ec9d1341 public_html/article.php
--- a/public_html/article.php Mon Feb 15 10:18:46 2010 +0100
+++ b/public_html/article.php Tue Feb 16 11:17:53 2010 -0500
@@ -77,8 +77,8 @@
if (isset ($_POST['reply'])) {
$reply = COM_applyFilter ($_POST['reply']);
}
- if (isset ($_POST['page'])) {
- $page = COM_applyFilter ($_REQUEST['page'], true);
+ if (isset ($_POST['cpage'])) {
+ $page = COM_applyFilter ($_POST['cpage'], true);
}
} else {
COM_setArgNames (array ('story', 'mode'));
@@ -93,8 +93,8 @@
if (isset ($_GET['reply'])) {
$reply = COM_applyFilter ($_GET['reply']);
}
- if (isset ($_GET['page'])) {
- $page = COM_applyFilter ($_REQUEST['page'], true);
+ if (isset ($_GET['cpage'])) {
+ $page = COM_applyFilter ($_GET['cpage'], true);
}
}
diff -r 37141ece518b -r 9cb9ec9d1341 system/lib-comment.php
--- a/system/lib-comment.php Mon Feb 15 10:18:46 2010 +0100
+++ b/system/lib-comment.php Tue Feb 16 11:17:53 2010 -0500
@@ -710,9 +710,17 @@
// Pagination
$tot_pages = ceil($count / $limit);
- $pLink = $_CONF['site_url'] . "/article.php?story=$sid&type=$type&order=$order&mode=$mode";
+ if ($type == 'article') {
+ $pLink = $_CONF['site_url'] . "/article.php?story=$sid";
+ } else {
+ list($plgurl, $plgid) = PLG_getCommentUrlId($type);
+ $pLink = "$plgurl?$plgid=$sid";
+ }
+ $pLink .= "&type=$type&order=$order&mode=$mode";
+
+ $page_str = "cpage=";
$template->set_var('pagenav',
- COM_printPageNavigation($pLink, $page, $tot_pages));
+ COM_printPageNavigation($pLink, $page, $tot_pages, $page_str, false));
$template->set_var('comments', $thecomments);
$retval = $template->finish($template->parse('output', 'commentarea'));
More information about the geeklog-cvs
mailing list