jenkins-bot has submitted this change and it was merged.
Change subject: Store Title as backing identifier for UploadWizardCampaign
......................................................................
Store Title as backing identifier for UploadWizardCampaign
Previously used WikiPage, which wasn't really what we wanted.
Plus, titles are easier to get hold of
Change-Id: I7b6a98fa2e7596ac400d947c819b61a97242a51e
---
M includes/UploadWizardCampaign.php
1 file changed, 8 insertions(+), 10 deletions(-)
Approvals:
MarkTraceur: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/UploadWizardCampaign.php
b/includes/UploadWizardCampaign.php
index 3d064a9..f6d4d84 100644
--- a/includes/UploadWizardCampaign.php
+++ b/includes/UploadWizardCampaign.php
@@ -37,12 +37,12 @@
/**
- * The WikiPage representing the current campaign
+ * The Title representing the current campaign
*
* @since 1.4
- * @var WikiPage
+ * @var Title
*/
- protected $page = null;
+ protected $title = null;
public static function newFromName( $name ) {
$campaignTitle = Title::makeTitleSafe( NS_CAMPAIGN, $name );
@@ -50,14 +50,12 @@
return false;
}
- $campaignPage = WikiPage::factory( Title::newFromText( $name,
NS_CAMPAIGN ) );
-
- return new UploadWizardCampaign( $campaignPage );
+ return new UploadWizardCampaign( $campaignTitle );
}
- private function __construct( $wikiPage ) {
- $this->page = $wikiPage;
- $this->config = $this->page->getContent()->getJsonData();
+ private function __construct( $title ) {
+ $this->title = $title;
+ $this->config = WikiPage::factory( $title
)->getContent()->getJsonData();
}
/**
@@ -79,7 +77,7 @@
* @return string
*/
public function getName() {
- return $this->page->getTitle()->getDBkey();
+ return $this->title->getDBkey();
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/81452
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7b6a98fa2e7596ac400d947c819b61a97242a51e
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda <[email protected]>
Gerrit-Reviewer: MarkTraceur <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits