jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/374031 )

Change subject: Bug: a Composer extension could not be deactivated
......................................................................


Bug: a Composer extension could not be deactivated

In the case of a Composer extension was marked as not to be activated
(value false), this value was not taken into account and the extension
was activated. It worked (a Composer extension not wanted is deactivated)
when it was never marked in the configuration.

Change-Id: Ida82bbc45c9cb2ad094e6cd416044a995f1304cf
---
M src/MediaWikiFarmConfiguration.php
1 file changed, 6 insertions(+), 2 deletions(-)

Approvals:
  Seb35: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/MediaWikiFarmConfiguration.php 
b/src/MediaWikiFarmConfiguration.php
index 4da1b5d..458a247 100644
--- a/src/MediaWikiFarmConfiguration.php
+++ b/src/MediaWikiFarmConfiguration.php
@@ -424,7 +424,10 @@
                        $setting = 'wgUse' . preg_replace( 
'/[^a-zA-Z0-9_\x7f\xff]/', '', $key );
                        $value =& $this->configuration['settings'][$setting];
 
-                       if( $ExtensionRegistry === null || $value === 
'composer' ) {
+                       if( $value === false ) {
+                               $status = null;
+                               unset( $this->configuration['extensions'][$key] 
);
+                       } elseif( $ExtensionRegistry === null || $value === 
'composer' ) {
                                if( $this->detectComposer( $type, $name ) ) {
                                        $status = 'composer';
                                        $value = true;
@@ -436,7 +439,7 @@
                                $status = $value;
                                $value = true;
                        // @codingStandardsIgnoreLine 
MediaWiki.ControlStructures.AssignmentInControlStructures.AssignmentInControlStructures
-                       } elseif( $value !== false && ( $status = 
$this->detectLoadingMechanism( $type, $name ) ) ) {
+                       } elseif( $status = $this->detectLoadingMechanism( 
$type, $name ) ) {
                                $value = true;
                        } elseif( $key != 'ExtensionMediaWikiFarm' ) {
                                if( $value ) {
@@ -445,6 +448,7 @@
                                                $this->farm->getVariable( 
'$VERSION' );
                                }
                                $value = false;
+                               $status = null;
                                unset( $this->configuration['extensions'][$key] 
);
                        } else {
                                $status = $ExtensionRegistry ? 
'wfLoadExtension' : 'require_once';

-- 
To view, visit https://gerrit.wikimedia.org/r/374031
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ida82bbc45c9cb2ad094e6cd416044a995f1304cf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiFarm
Gerrit-Branch: master
Gerrit-Owner: Seb35 <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Seb35 <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to