mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-27 17:00:37 +00:00
Simplify if statement logic
"(A and B) or ~A" is the same as "~A or B", so use the latter. Change-Id: Ic2eb3eed31b311070f895e05523df433dea11579
This commit is contained in:
parent
ed01359078
commit
60a07564a7
|
@ -41,8 +41,7 @@ class PopupsHooks {
|
|||
public static function onBeforePageDisplay( OutputPage &$out, Skin &$skin) {
|
||||
// Enable only if the user has turned it on in Beta Preferences, or BetaFeatures is not installed.
|
||||
// Will only be loaded if PageImages & TextExtracts extensions are installed.
|
||||
if ( ( ( class_exists( 'BetaFeatures' ) && BetaFeatures::isFeatureEnabled( $skin->getUser(), 'popups' ) )
|
||||
|| !class_exists( 'BetaFeatures' ) )
|
||||
if ( ( !class_exists( 'BetaFeatures' ) || BetaFeatures::isFeatureEnabled( $skin->getUser(), 'popups' ) )
|
||||
&& class_exists( 'ApiQueryExtracts' )
|
||||
&& class_exists( 'ApiQueryPageImages' )
|
||||
) {
|
||||
|
|
Loading…
Reference in a new issue