Nik has submitted this change and it was merged.
Change subject: Moved code to namespace PubSubHubbub.
......................................................................
Moved code to namespace PubSubHubbub.
Change-Id: Id07b30e2cf62efa4b0d57795a9014d16fc158497
---
M PubSubHubbub.body.php
M PubSubHubbub.php
M PublishChangesJob.php
3 files changed, 14 insertions(+), 9 deletions(-)
Approvals:
Nik: Verified; Looks good to me, approved
Alexander.lehmann: Looks good to me, approved
diff --git a/PubSubHubbub.body.php b/PubSubHubbub.body.php
index 134317c..66f1424 100644
--- a/PubSubHubbub.body.php
+++ b/PubSubHubbub.body.php
@@ -22,6 +22,8 @@
* @file
*/
+namespace PubSubHubbub;
+
class PubSubHubbub {
public static function onPageContentSaveComplete( $article, $user,
$content, $summary,
@@ -30,7 +32,7 @@
$jobParams = array();
$title = $article->getTitle();
$job = new PublishChangesJob( $title, $jobParams );
- $jobQueueGroup = JobQueueGroup::singleton()->push( $job
);
+ $jobQueueGroup = \JobQueueGroup::singleton()->push(
$job );
if ( !$jobQueueGroup ) {
wfLogWarning( "Failed to acquire a
JobQueueGroup for $job" );
}
diff --git a/PubSubHubbub.php b/PubSubHubbub.php
index e48e1dc..514d169 100644
--- a/PubSubHubbub.php
+++ b/PubSubHubbub.php
@@ -27,6 +27,7 @@
}
global $wgExtensionCredits;
+global $wgExtensionMessagesFiles;
global $wgAutoloadClasses;
global $wgHooks;
global $wgJobClasses;
@@ -44,11 +45,11 @@
$wgExtensionMessagesFiles['PubSubHubbub'] = $dir . 'PubSubHubbub.i18n.php';
-$wgAutoloadClasses['PubSubHubbub'] = $dir . 'PubSubHubbub.body.php';
-$wgAutoloadClasses['PublishChangesJob'] = $dir . 'PublishChangesJob.php';
-$wgAutoloadClasses['Publisher'] = $dir . 'lib/publisher.php';
+$wgAutoloadClasses['PubSubHubbub\\PubSubHubbub'] = $dir .
'PubSubHubbub.body.php';
+$wgAutoloadClasses['PubSubHubbub\\PublishChangesJob'] = $dir .
'PublishChangesJob.php';
+$wgAutoloadClasses['PubSubHubbub\\Publisher'] = $dir . 'lib/publisher.php';
-$wgHooks['PageContentSaveComplete'][] =
'PubSubHubbub::onPageContentSaveComplete';
-$wgHooks['RawPageViewBeforeOutput'][] =
'PubSubHubbub::onRawPageViewBeforeOutput';
-$wgHooks['ArticlePageDataAfter'][] = 'PubSubHubbub::onArticlePageDataAfter';
-$wgJobClasses['PublishChanges'] = 'PublishChangesJob';
+$wgHooks['PageContentSaveComplete'][] =
'PubSubHubbub\\PubSubHubbub::onPageContentSaveComplete';
+$wgHooks['RawPageViewBeforeOutput'][] =
'PubSubHubbub\\PubSubHubbub::onRawPageViewBeforeOutput';
+$wgHooks['ArticlePageDataAfter'][] =
'PubSubHubbub\\PubSubHubbub::onArticlePageDataAfter';
+$wgJobClasses['PublishChanges'] = 'PubSubHubbub\\PublishChangesJob';
diff --git a/PublishChangesJob.php b/PublishChangesJob.php
index 19b00de..f50086c 100644
--- a/PublishChangesJob.php
+++ b/PublishChangesJob.php
@@ -22,7 +22,9 @@
* @file
*/
-class PublishChangesJob extends Job {
+namespace PubSubHubbub;
+
+class PublishChangesJob extends \Job {
public function __construct( $title, $params ) {
parent::__construct( 'PublishChanges', $title, $params
);
--
To view, visit https://gerrit.wikimedia.org/r/121048
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id07b30e2cf62efa4b0d57795a9014d16fc158497
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/PubSubHubbub
Gerrit-Branch: master
Gerrit-Owner: Nik <[email protected]>
Gerrit-Reviewer: Alexander.lehmann
<[email protected]>
Gerrit-Reviewer: Nik <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits