Robmoen has uploaded a new change for review.
https://gerrit.wikimedia.org/r/186378
Change subject: Remove deprecated wfRunHooks
......................................................................
Remove deprecated wfRunHooks
Change-Id: Iea31e988b39c9896ef8419df4d3be4a35440ce4a
---
M includes/MobileContext.php
M includes/MobileFrontend.body.php
M includes/skins/MinervaTemplate.php
M includes/skins/SkinMinerva.php
M includes/skins/SkinMinervaBeta.php
M includes/specials/SpecialMobileDiff.php
M includes/specials/SpecialMobileEditWatchlist.php
M includes/specials/SpecialMobileWatchlist.php
8 files changed, 13 insertions(+), 13 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/78/186378/1
diff --git a/includes/MobileContext.php b/includes/MobileContext.php
index f8d575c..b69c04d 100644
--- a/includes/MobileContext.php
+++ b/includes/MobileContext.php
@@ -366,7 +366,7 @@
$this->mobileView = $this->shouldDisplayMobileViewInternal();
if ( $this->mobileView ) {
$this->redirectMobileEnabledPages();
- wfRunHooks( 'EnterMobileMode', array( $this ) );
+ Hooks::run( 'EnterMobileMode', array( $this ) );
}
return $this->mobileView;
}
@@ -730,7 +730,7 @@
if ( $this->shouldDisplayMobileView() ) {
$subdomainTokenReplacement = null;
- if ( wfRunHooks( 'GetMobileUrl', array(
&$subdomainTokenReplacement, $this ) ) ) {
+ if ( Hooks::run( 'GetMobileUrl', array(
&$subdomainTokenReplacement, $this ) ) ) {
if ( !empty( $subdomainTokenReplacement ) ) {
global $wgMobileUrlTemplate;
$mobileUrlHostTemplate =
$this->parseMobileUrlTemplate( 'host' );
diff --git a/includes/MobileFrontend.body.php b/includes/MobileFrontend.body.php
index 28f2abc..8479d6c 100644
--- a/includes/MobileFrontend.body.php
+++ b/includes/MobileFrontend.body.php
@@ -37,7 +37,7 @@
$formatter = MobileFormatter::newFromContext( $context, $html );
- wfRunHooks( 'MobileFrontendBeforeDOM', array( $context,
$formatter ) );
+ Hooks::run( 'MobileFrontendBeforeDOM', array( $context,
$formatter ) );
$title = $out->getTitle();
$isSpecialPage = $title->isSpecialPage();
diff --git a/includes/skins/MinervaTemplate.php
b/includes/skins/MinervaTemplate.php
index 60371f4..9704a9d 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -54,7 +54,7 @@
public function execute() {
$this->isSpecialPage =
$this->getSkin()->getTitle()->isSpecialPage();
$this->isMainPage = $this->getSkin()->getTitle()->isMainPage();
- wfRunHooks( 'MinervaPreRender', array( $this ) );
+ Hooks::run( 'MinervaPreRender', array( $this ) );
$this->render( $this->data );
}
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index a0c6f50..76af4ef 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -945,7 +945,7 @@
$modules['site'] = 'mobile.site';
// FIXME: Upstream?
- wfRunHooks( 'SkinMinervaDefaultModules', array( $this,
&$modules ) );
+ Hooks::run( 'SkinMinervaDefaultModules', array( $this,
&$modules ) );
return $modules;
}
@@ -1007,8 +1007,8 @@
// FIXME: Merge these hooks?
// EnableMobileModules is deprecated; Use
ResourceLoader instead,
// see
https://www.mediawiki.org/wiki/ResourceLoader#Mobile
- wfRunHooks( 'EnableMobileModules', array( $out,
$this->getMode() ) );
- wfRunHooks( 'BeforePageDisplayMobile', array( &$out ) );
+ Hooks::run( 'EnableMobileModules', array( $out,
$this->getMode() ) );
+ Hooks::run( 'BeforePageDisplayMobile', array( &$out ) );
}
parent::outputPage();
}
@@ -1086,7 +1086,7 @@
}
// Enable extensions to add links to footer in Mobile view, too
- bug 66350
- wfRunHooks( 'SkinMinervaOutputPageBeforeExec', array( &$this,
&$tpl ) );
+ Hooks::run( 'SkinMinervaOutputPageBeforeExec', array( &$this,
&$tpl ) );
$tpl->set( 'mobile-switcher', $switcherHtml );
$tpl->set( 'mobile-license', $licenseText );
@@ -1141,7 +1141,7 @@
}
// Allow other extensions (for example, WikimediaMessages) to
override
- wfRunHooks( 'MobileLicenseLink', array( &$link, $context,
$attribs ) );
+ Hooks::run( 'MobileLicenseLink', array( &$link, $context,
$attribs ) );
return $link;
}
diff --git a/includes/skins/SkinMinervaBeta.php
b/includes/skins/SkinMinervaBeta.php
index 1b0fc55..e33c037 100644
--- a/includes/skins/SkinMinervaBeta.php
+++ b/includes/skins/SkinMinervaBeta.php
@@ -58,7 +58,7 @@
public function getDefaultModules() {
$modules = parent::getDefaultModules();
$modules['beta'] = array( 'mobile.beta' );
- wfRunHooks( 'SkinMinervaDefaultModules', array( $this,
&$modules ) );
+ Hooks::run( 'SkinMinervaDefaultModules', array( $this,
&$modules ) );
// Disable CentralNotice modules in beta
if ( array_key_exists( 'centralnotice', $modules ) ) {
diff --git a/includes/specials/SpecialMobileDiff.php
b/includes/specials/SpecialMobileDiff.php
index ac6d91f..11b2be3 100644
--- a/includes/specials/SpecialMobileDiff.php
+++ b/includes/specials/SpecialMobileDiff.php
@@ -117,7 +117,7 @@
$output->addModuleStyles( 'mobile.special.pagefeed.styles' );
// Allow other extensions to load more stuff here
- wfRunHooks( 'BeforeSpecialMobileDiffDisplay', array( &$output,
$ctx, $revisions ) );
+ Hooks::run( 'BeforeSpecialMobileDiffDisplay', array( &$output,
$ctx, $revisions ) );
$output->addHtml( '<div id="mw-mf-diffview"><div
id="mw-mf-diffarea">' );
diff --git a/includes/specials/SpecialMobileEditWatchlist.php
b/includes/specials/SpecialMobileEditWatchlist.php
index 0a00314..9412e17 100644
--- a/includes/specials/SpecialMobileEditWatchlist.php
+++ b/includes/specials/SpecialMobileEditWatchlist.php
@@ -165,7 +165,7 @@
// Begin rendering of watchlist.
$watchlist = array( $ns => $allPages );
if ( !MobileContext::singleton()->imagesDisabled() ) {
- wfRunHooks( 'SpecialMobileEditWatchlist::images', array(
+ Hooks::run( 'SpecialMobileEditWatchlist::images', array(
$this->getContext(),
&$watchlist,
&$images
diff --git a/includes/specials/SpecialMobileWatchlist.php
b/includes/specials/SpecialMobileWatchlist.php
index 6a8741f..0921719 100644
--- a/includes/specials/SpecialMobileWatchlist.php
+++ b/includes/specials/SpecialMobileWatchlist.php
@@ -247,7 +247,7 @@
// object (which implements array-like interface ArrayAccess).
// Let's keep using an array and hope any new extensions are
compatible with both styles...
$values = array();
- wfRunHooks(
+ Hooks::run(
'SpecialWatchlistQuery',
array( &$conds, &$tables, &$join_conds, &$fields,
&$values )
);
--
To view, visit https://gerrit.wikimedia.org/r/186378
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iea31e988b39c9896ef8419df4d3be4a35440ce4a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Robmoen <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits