jenkins-bot has submitted this change and it was merged.
Change subject: Create a fresh Title object in the job
......................................................................
Create a fresh Title object in the job
If a namespace does not exist on the submission site,
it is stored as NS_MAIN. When the job is executed
on the target site, Title::getNamespace() will return
NS_MAIN even though it now exists, causing errors since
it appears to be in the wrong namespace.
Bug: 57464
Change-Id: I6e7d970473a86a1c6b2fb4f0f54019a2a2407458
---
M MassMessageJob.php
1 file changed, 4 insertions(+), 0 deletions(-)
Approvals:
Aaron Schulz: Looks good to me, approved
jenkins-bot: Verified
diff --git a/MassMessageJob.php b/MassMessageJob.php
index 21b1ec9..07d9414 100644
--- a/MassMessageJob.php
+++ b/MassMessageJob.php
@@ -13,6 +13,10 @@
class MassMessageJob extends Job {
public function __construct( Title $title, array $params, $id = 0 ) {
parent::__construct( 'MassMessageJob', $title, $params, $id );
+ // Create a fresh Title object so namespaces are evaluated
+ // in the context of the target site. Bug 57464
+ $this->title = Title::newFromText(
$this->title->getPrefixedText() );
+
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/97162
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6e7d970473a86a1c6b2fb4f0f54019a2a2407458
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits