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:
Jackmcbarn 2014-09-10 21:27:11 -04:00
parent ed01359078
commit 60a07564a7

View file

@ -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' )
) {