// 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;