[geeklog-hg] geeklog: Comments and Captcha now work together for both comment...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Wed Jan 2 14:51:31 EST 2013
changeset 8908:7d190eceecf2
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/7d190eceecf2
user: Tom <websitemaster at cogeco.net>
date: Wed Jan 02 14:39:54 2013 -0500
description:
Comments and Captcha now work together for both comments on the same page and not, for stories, polls and staticpages (bug #0001527)
diffstat:
plugins/polls/functions.inc | 9 ++++++++-
plugins/staticpages/functions.inc | 9 ++++++++-
system/lib-story.php | 4 ++++
3 files changed, 20 insertions(+), 2 deletions(-)
diffs (52 lines):
diff -r b9e27b3641fb -r 7d190eceecf2 plugins/polls/functions.inc
--- a/plugins/polls/functions.inc Fri Dec 28 19:53:50 2012 +0900
+++ b/plugins/polls/functions.inc Wed Jan 02 14:39:54 2013 -0500
@@ -120,7 +120,14 @@
if ($ret > 0) { // failure //FIXME: some failures should not return to comment form
$retval .= CMT_commentForm ($title, $comment, $id, $pid, 'polls',
$LANG03[14], $postmode);
- $retval = COM_createHTMLDocument($retval, array('pagetitle' => $LANG03[1]));
+
+ if (!defined('COMMENT_ON_SAME_PAGE')) {
+ $retval = COM_createHTMLDocument($retval, array('pagetitle' => $LANG03[1]));
+ } else {
+ if (!COMMENT_ON_SAME_PAGE) {
+ $retval = COM_createHTMLDocument($retval, array('pagetitle' => $LANG03[1]));
+ }
+ }
} else { // success
$retval = COM_refresh ($_CONF['site_url']
. "/polls/index.php?pid=$id");
diff -r b9e27b3641fb -r 7d190eceecf2 plugins/staticpages/functions.inc
--- a/plugins/staticpages/functions.inc Fri Dec 28 19:53:50 2012 +0900
+++ b/plugins/staticpages/functions.inc Wed Jan 02 14:39:54 2013 -0500
@@ -215,7 +215,14 @@
if ($ret > 0) { // failure //FIXME: some failures should not return to comment form
$retval .= CMT_commentForm($title, $comment, $id, $pid, 'staticpages',
$LANG03[14], $postmode);
- $retval = COM_createHTMLDocument($retval, array('pagetitle' => $LANG03[1]));
+
+ if (!defined('COMMENT_ON_SAME_PAGE')) {
+ $retval = COM_createHTMLDocument($retval, array('pagetitle' => $LANG03[1]));
+ } else {
+ if (!COMMENT_ON_SAME_PAGE) {
+ $retval = COM_createHTMLDocument($retval, array('pagetitle' => $LANG03[1]));
+ }
+ }
} else { // success
$url = COM_buildUrl($_CONF['site_url'] . '/staticpages/index.php?page='
. $id);
diff -r b9e27b3641fb -r 7d190eceecf2 system/lib-story.php
--- a/system/lib-story.php Fri Dec 28 19:53:50 2012 +0900
+++ b/system/lib-story.php Wed Jan 02 14:39:54 2013 -0500
@@ -1327,6 +1327,10 @@
if (!defined('COMMENT_ON_SAME_PAGE')) {
$retval = COM_createHTMLDocument($retval, array('pagetitle' => $LANG03[1]));
+ } else {
+ if (!COMMENT_ON_SAME_PAGE) {
+ $retval = COM_createHTMLDocument($retval, array('pagetitle' => $LANG03[1]));
+ }
}
} else { // success
$comments = DB_count($_TABLES['comments'], array('type', 'sid'), array('article', $id));
More information about the geeklog-cvs
mailing list