mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-27 17:00:37 +00:00
Kill $wgEnablePopups
It's not a feature flag because it disables whole extension as opposed to a particular feature. It would result in weird situations where the extension is present in Special:Version but does not work for no obvious reason. If an extension needs to be disabled on WMF, its registration file should not be included, as opposed to "feature flags". This, however, does not mean that I'm opposed to real feature flags:) Change-Id: I09bae50241057f727881f33d6f97f69cec7c0a10
This commit is contained in:
parent
7cadfed0be
commit
6b0057a521
|
@ -21,11 +21,8 @@
|
|||
|
||||
class PopupsHooks {
|
||||
public static function onBeforePageDisplay( OutputPage &$out, Skin &$skin) {
|
||||
global $wgEnablePopups;
|
||||
|
||||
// Enable only if explicitly enabled. Also depends on PageImages & TextExtracts extensions
|
||||
if ( $wgEnablePopups
|
||||
&& class_exists( 'ApiQueryExtracts' )
|
||||
// Depends on PageImages & TextExtracts extensions
|
||||
if ( class_exists( 'ApiQueryExtracts' )
|
||||
&& class_exists( 'ApiQueryPageImages' )
|
||||
) {
|
||||
$out->addModules( array( 'ext.popups' ) );
|
||||
|
|
12
Popups.php
12
Popups.php
|
@ -22,15 +22,6 @@
|
|||
* @ingroup extensions
|
||||
*/
|
||||
|
||||
/**
|
||||
* Adds navigation popups to link on an article
|
||||
* @var bool
|
||||
*/
|
||||
$wgEnablePopups = true;
|
||||
|
||||
$localBasePath = dirname( __DIR__ ) . '/Popups';
|
||||
$remoteExtPath = 'Popups';
|
||||
|
||||
$wgExtensionCredits['other'][] = array(
|
||||
'author' => array( 'Prateek Saxena', 'Yair Rand' ),
|
||||
'descriptionmsg' => 'popups-desc',
|
||||
|
@ -39,6 +30,9 @@ $wgExtensionCredits['other'][] = array(
|
|||
'url' => 'https://www.mediawiki.org/wiki/Extension:Popups',
|
||||
);
|
||||
|
||||
$localBasePath = dirname( __DIR__ ) . '/Popups';
|
||||
$remoteExtPath = 'Popups';
|
||||
|
||||
$wgResourceModules = array_merge( $wgResourceModules, array(
|
||||
"ext.popups" => array(
|
||||
'scripts' => 'resources/ext.popups.core.js',
|
||||
|
|
Loading…
Reference in a new issue