Merge "Remove return bool from MysqlUpdater::doInterwikiUpdate"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 19 Sep 2017 16:41:31 +0000 (16:41 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 19 Sep 2017 16:41:31 +0000 (16:41 +0000)
1  2 
includes/installer/MysqlUpdater.php

@@@ -267,7 -267,7 +267,7 @@@ class MysqlUpdater extends DatabaseUpda
  
                        // 1.25
                        // note this patch covers other _comment and _description fields too
 -                      [ 'modifyField', 'recentchanges', 'rc_comment', 'patch-editsummary-length.sql' ],
 +                      [ 'doExtendCommentLengths' ],
  
                        // 1.26
                        [ 'dropTable', 'hitcounter' ],
                global $IP;
  
                if ( !$this->doTable( 'interwiki' ) ) {
-                       return true;
+                       return;
                }
  
                if ( $this->db->tableExists( "interwiki", __METHOD__ ) ) {
                );
        }
  
 +      protected function doExtendCommentLengths() {
 +              $table = $this->db->tableName( 'revision' );
 +              $res = $this->db->query( "SHOW COLUMNS FROM $table LIKE 'rev_comment'" );
 +              $row = $this->db->fetchObject( $res );
 +
 +              if ( $row && ( $row->Type !== "varbinary(767)" || $row->Default !== "" ) ) {
 +                      $this->applyPatch(
 +                              'patch-editsummary-length.sql',
 +                              false,
 +                              'Extending edit summary lengths (and setting defaults)'
 +                      );
 +              } else {
 +                      $this->output( '...comment fields are up to date' );
 +              }
 +      }
 +
        public function getSchemaVars() {
                global $wgDBTableOptions;