[geeklog-hg] geeklog: Owner of article could not view his own draft article i...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Fri Mar 22 13:32:27 EDT 2013


changeset 9003:bc079f08a84a
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/bc079f08a84a
user: Tom <websitemaster at cogeco.net>
date: Fri Mar 22 13:30:41 2013 -0400
description:
Owner of article could not view his own draft article if comments set to display on same page (bug #0001568)

diffstat:

 system/lib-comment.php |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r 817aae7b57c8 -r bc079f08a84a system/lib-comment.php
--- a/system/lib-comment.php	Mon Mar 18 19:39:46 2013 +0100
+++ b/system/lib-comment.php	Fri Mar 22 13:30:41 2013 -0400
@@ -2559,8 +2559,13 @@
                 $retval .= CMT_commentForm ($title, '', $sid, $pid, $type, $commentmode,
                                             $postmode, $format, $order, $cpage);
             } else {
-                echo COM_refresh($_CONF['site_url'] . '/index.php');
-                exit;
+                if (COMMENT_ON_SAME_PAGE) {
+                    // Do nothing and do not show comment form (happens most likely when admin viewing draft article)                    
+                } else {
+                    // For comments not displayed on same page (probably owner pushed the post comment button on a draft article)
+                    echo COM_refresh($_CONF['site_url'] . '/index.php');
+                    exit;
+                }
             }
             if ($is_comment_page) {
                 $noindex = '<meta name="robots" content="noindex"' . XHTML . '>';



More information about the geeklog-cvs mailing list