Merge "Updates for Interwiki.php"
[lhc/web/wiklou.git] / includes / installer / MysqlUpdater.php
index 0594073..cc5313a 100644 (file)
@@ -31,6 +31,8 @@ class MysqlUpdater extends DatabaseUpdater {
 
        protected function getCoreUpdateList() {
                return array(
+                       array( 'disableContentHandlerUseDB' ),
+
                        // 1.2
                        array( 'addField', 'ipblocks', 'ipb_id', 'patch-ipblocks.sql' ),
                        array( 'addField', 'ipblocks', 'ipb_expiry', 'patch-ipb_expiry.sql' ),
@@ -218,6 +220,7 @@ class MysqlUpdater extends DatabaseUpdater {
                        array( 'addField', 'archive', 'ar_content_format', 'patch-archive-ar_content_format.sql' ),
                        array( 'addField', 'archive', 'ar_content_model', 'patch-archive-ar_content_model.sql' ),
                        array( 'addField', 'page', 'page_content_model', 'patch-page-page_content_model.sql' ),
+                       array( 'enableContentHandlerUseDB' ),
                        array( 'dropField', 'site_stats', 'ss_admins', 'patch-drop-ss_admins.sql' ),
                        array( 'dropField', 'recentchanges', 'rc_moved_to_title', 'patch-rc_moved.sql' ),
                        array( 'addTable', 'sites', 'patch-sites.sql' ),
@@ -239,6 +242,8 @@ class MysqlUpdater extends DatabaseUpdater {
                                'patch-iwlinks-from-title-index.sql' ),
                        array( 'addField', 'archive', 'ar_id', 'patch-archive-ar_id.sql' ),
                        array( 'addField', 'externallinks', 'el_id', 'patch-externallinks-el_id.sql' ),
+
+                       // 1.23
                        array( 'addField', 'recentchanges', 'rc_source', 'patch-rc_source.sql' ),
                );
        }
@@ -247,15 +252,17 @@ class MysqlUpdater extends DatabaseUpdater {
         * 1.4 betas were missing the 'binary' marker from logging.log_title,
         * which causes a collation mismatch error on joins in MySQL 4.1.
         *
-        * @param string $table table name
-        * @param string $field field name to check
-        * @param string $patchFile path to the patch to correct the field
+        * @param string $table Table name
+        * @param string $field Field name to check
+        * @param string $patchFile Path to the patch to correct the field
+        * @return bool
         */
        protected function checkBin( $table, $field, $patchFile ) {
                if ( !$this->doTable( $table ) ) {
                        return true;
                }
 
+               /** @var MySQLField $fieldInfo */
                $fieldInfo = $this->db->fieldInfo( $table, $field );
                if ( $fieldInfo->isBinary() ) {
                        $this->output( "...$table table has correct $field encoding.\n" );
@@ -267,10 +274,10 @@ class MysqlUpdater extends DatabaseUpdater {
        /**
         * Check whether an index contain a field
         *
-        * @param string $table table name
-        * @param string $index index name to check
-        * @param string $field field that should be in the index
-        * @return Boolean
+        * @param string $table Table name
+        * @param string $index Index name to check
+        * @param string $field Field that should be in the index
+        * @return bool
         */
        protected function indexHasField( $table, $index, $field ) {
                if ( !$this->doTable( $table ) ) {
@@ -695,7 +702,7 @@ class MysqlUpdater extends DatabaseUpdater {
 
                if ( !$this->db->tableExists( 'user_rights', __METHOD__ ) ) {
                        if ( $this->db->fieldExists( 'user', 'user_rights', __METHOD__ ) ) {
-                               $this->db->applyPatch(
+                               $this->applyPatch(
                                        'patch-user_rights.sql',
                                        false,
                                        'Upgrading from a 1.3 or older database? Breaking out user_rights for conversion'