Merge "Sync PG version in INSTALL" into REL1_31
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 18 Apr 2018 18:07:10 +0000 (18:07 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 18 Apr 2018 18:07:10 +0000 (18:07 +0000)
includes/import/ImportableUploadRevisionImporter.php
includes/installer/WebInstallerOptions.php
mw-config/config.js

index 495b3d6..b64114c 100644 (file)
@@ -50,7 +50,7 @@ class ImportableUploadRevisionImporter implements UploadRevisionImporter {
                        $file->load( File::READ_LATEST );
                        $this->logger->debug( __METHOD__ . 'Importing new file as ' . $file->getName() . "\n" );
                        if ( $file->exists() && $file->getTimestamp() > $importableRevision->getTimestamp() ) {
-                               $archiveName = $file->getTimestamp() . '!' . $file->getName();
+                               $archiveName = $importableRevision->getTimestamp() . '!' . $file->getName();
                                $file = OldLocalFile::newFromArchiveName( $importableRevision->getTitle(),
                                        RepoGroup::singleton()->getLocalRepo(), $archiveName );
                                $this->logger->debug( __METHOD__ . "File already exists; importing as $archiveName\n" );
index 2027c97..d798ea1 100644 (file)
@@ -175,7 +175,10 @@ class WebInstallerOptions extends WebInstallerPage {
                                        if ( isset( $info['url'] ) ) {
                                                $urlText = ' ' . Html::element( 'a', [ 'href' => $info['url'] ], '(more information)' );
                                        }
-                                       $attribs = [ 'data-name' => $ext ];
+                                       $attribs = [
+                                               'data-name' => $ext,
+                                               'class' => 'config-ext-input'
+                                       ];
                                        $labelAttribs = [];
                                        $fullDepList = [];
                                        if ( isset( $info['requires']['extensions'] ) ) {
index ab57b7b..bb62067 100644 (file)
@@ -87,7 +87,7 @@
                } );
 
                // Synchronize radio button label for sitename with textbox
-               $label = $( 'label[for=config__NamespaceType_site-name]' );
+               $label = $( 'label[for="config__NamespaceType_site-name"]' );
                labelText = $label.text();
                $label.text( labelText.replace( '$1', '' ) );
                $( '#config_wgSitename' ).on( 'keyup change', syncText ).each( syncText );
 
                // Disable checkboxes if the extension has dependencies
                $( '.mw-ext-with-dependencies input' ).prop( 'disabled', true );
-               $( 'input[data-name]' ).change( function () {
+               $( '.config-ext-input[data-name]' ).on( 'change', function () {
                        $( '.mw-ext-with-dependencies input' ).each( function () {
-                               var $this = $( this ),
-                                       name = $this.data( 'name' );
+                               var name = this.getAttribute( 'data-name' );
                                if ( areReqsSatisfied( name ) ) {
-                                       // Un-disable it!
-                                       $this.prop( 'disabled', false );
+                                       // Re-enable it!
+                                       this.disabled = false;
                                } else {
-                                       // Disable the checkbox, and uncheck it if it is checked
-                                       $this.prop( 'disabled', true );
-                                       if ( $this.prop( 'checked' ) ) {
-                                               $this.prop( 'checked', false );
-                                       }
+                                       // Uncheck and disable the checkbox
+                                       this.checked = false;
+                                       this.disabled = true;
                                }
                        } );
                } );