[geeklog-cvs] geeklog: CAPTCHA now only displays on comment form with save but...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Mon Mar 29 19:51:42 EDT 2010


changeset 7861:fedfb5dd5dbb
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/fedfb5dd5dbb
user: Tom <websitemaster at cogeco.net>
date: Mon Mar 29 19:45:07 2010 -0400
description:
CAPTCHA now only displays on comment form with save button (and not just a preview button).

diffstat:

 system/lib-comment.php |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r aa35484e45c8 -r fedfb5dd5dbb system/lib-comment.php
--- a/system/lib-comment.php	Sun Mar 28 18:48:46 2010 +0200
+++ b/system/lib-comment.php	Mon Mar 29 19:45:07 2010 -0400
@@ -14,7 +14,7 @@
 // |          Mark Limburg      - mlimburg AT users DOT sourceforge DOT net    |
 // |          Jason Whittenburg - jwhitten AT securitygeeks DOT com            |
 // |          Dirk Haun         - dirk AT haun-online DOT de                   |
-// |          Vincent Furia     - vinny01 AT users DOT sourceforge DOT net     |
+// |          Vincent Furia     - vinny01 AT users DOT sourceforge DOT net     |                                       
 // |          Jared Wenerd      - wenerd87 AT gmail DOT com                    |
 // +---------------------------------------------------------------------------+
 // |                                                                           |
@@ -995,18 +995,20 @@
                 $comment_template->set_var('lang_preview', $LANG03[14]);
             }
 
-            PLG_templateSetVars('comment', $comment_template); 
-            if ($mode == $LANG03[28] || ($mode == 'edit' && $_CONF['skip_preview'] == 1)) { 
+            if ($mode == $LANG03[28] || ($mode == 'edit' && $_CONF['skip_preview'] == 1)) {
+                PLG_templateSetVars('comment', $comment_template); // Only for a edit form with a save button displayed (CAPTCHA related issue)
                 // for editing
                 $comment_template->set_var('save_option',
                     '<input type="submit" name="mode" value="' . $LANG03[29]
                     . '"' . XHTML . '>');
             } elseif ($mode == $LANG03[34] || ($mode == 'editsubmission' && $_CONF['skip_preview'] == 1))  {
+                PLG_templateSetVars('comment', $comment_template);
                 // editing submission comment
                 $comment_template->set_var('save_option',
                     '<input type="submit" name="mode" value="' . $LANG03[35]
                     . '"' . XHTML . '>');
             } elseif (($_CONF['skip_preview'] == 1) || ($mode == $LANG03[14])) {
+                PLG_templateSetVars('comment', $comment_template);
                 $comment_template->set_var('save_option',
                     '<input type="submit" name="mode" value="' . $LANG03[11]
                     . '"' . XHTML . '>');



More information about the geeklog-cvs mailing list