Jack Phoenix has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/76282


Change subject: Correctly nest comments.
......................................................................

Correctly nest comments.

Fixes bug #46636.

This was caused by 817a74bc3792f409c9b66eac9a894ef6777c24b5, where
commentData()'s middle parameter ($review) was removed, but the call to
commentData() in saveComment() was not updated accordingly.

Based on my very limited tests, $review seems to be 0 always, whereas
$parent is the parent comment's ID when we're replying to a comment.
Because the parameter order was changed when one parameter was removed,
$review unintentionally became the new $parent, and as a result, all
comments were treated as new top-level comments, even if they were replies
to other comments.

Also bumped version number.

Change-Id: I8d6d576fa9f3c15bef2e19310efc0b2265f8a618
---
M CodeReview.php
M backend/CodeRevision.php
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeReview 
refs/changes/82/76282/1

diff --git a/CodeReview.php b/CodeReview.php
index 5df9b88..019c6fd 100644
--- a/CodeReview.php
+++ b/CodeReview.php
@@ -34,7 +34,7 @@
 $wgExtensionCredits['specialpage'][] = array(
        'path' => __FILE__,
        'name' => 'CodeReview',
-       'version' => '1.13',
+       'version' => '1.14',
        'url' => 'https://www.mediawiki.org/wiki/Extension:CodeReview',
        'author' => array( 'Brion Vibber', 'Aaron Schulz', 'Alexandre 
Emsenhuber', 'Chad Horohoe', 'Sam Reed', 'Roan Kattouw' ),
        'descriptionmsg' => 'codereview-desc',
diff --git a/backend/CodeRevision.php b/backend/CodeRevision.php
index 0fa141b..3b1f4a9 100644
--- a/backend/CodeRevision.php
+++ b/backend/CodeRevision.php
@@ -662,7 +662,7 @@
                        return 0;
                }
                $dbw = wfGetDB( DB_MASTER );
-               $data = $this->commentData( $text, $review, $parent );
+               $data = $this->commentData( $text, $parent );
 
                $dbw->begin();
                $data['cc_id'] = $dbw->nextSequenceValue( 'code_comment_cc_id' 
);

-- 
To view, visit https://gerrit.wikimedia.org/r/76282
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d6d576fa9f3c15bef2e19310efc0b2265f8a618
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeReview
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to