Tbleher has uploaded a new change for review.

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

Change subject: Execute edit in the context of the page where the comment 
should be added.
......................................................................

Execute edit in the context of the page where the comment should be added.

This ensures that SpamBlacklist sees the correct context when querying
information about the page.

Change-Id: Ifd30e10b4101f32cfaa44d7f62e1d9dea52564f4
---
M SpecialAddComment_body.php
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Commentbox 
refs/changes/35/273835/1

diff --git a/SpecialAddComment_body.php b/SpecialAddComment_body.php
index bb8ae29..49ae7a9 100644
--- a/SpecialAddComment_body.php
+++ b/SpecialAddComment_body.php
@@ -81,6 +81,12 @@
                        'wpEdittime' => $article->getTimestamp(),
                );
                $request = new FauxRequest( $reqArr, true );
+               $context = new RequestContext();
+               $context->setRequest($request);
+               $context->setTitle($title);
+               $context->setUser($user);
+               $context->setSkin($this->getSkin());
+               $article->setContext($context);
                $ep = new EditPage( $article );
                $ep->setContextTitle( $title );
                $ep->importFormData( $request );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd30e10b4101f32cfaa44d7f62e1d9dea52564f4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Commentbox
Gerrit-Branch: master
Gerrit-Owner: Tbleher <[email protected]>

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

Reply via email to