From: Sam Reed Date: Sat, 30 Jul 2011 15:41:39 +0000 (+0000) Subject: Followup r93530 X-Git-Tag: 1.31.0-rc.0~28533 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=e253003486226c3cf949def3b9dfb7039cd0d670;p=lhc%2Fweb%2Fwiklou.git Followup r93530 Fix SqliteUpdater Fix Undefined index: globaltemplatelinks in LinksUpdate --- diff --git a/includes/LinksUpdate.php b/includes/LinksUpdate.php index 23c30cd973..e5990a3eff 100644 --- a/includes/LinksUpdate.php +++ b/includes/LinksUpdate.php @@ -378,9 +378,15 @@ class LinksUpdate { $this->mDb->delete( $table, $where, __METHOD__ ); } if ( count( $insertions ) ) { - $this->mDb->insert( 'globaltemplatelinks', $insertions['globaltemplatelinks'], __METHOD__, 'IGNORE' ); - $this->mDb->insert( 'globalnamespaces', $insertions['globalnamespaces'], __METHOD__, 'IGNORE' ); - $this->mDb->insert( 'globalinterwiki', $insertions['globalinterwiki'], __METHOD__, 'IGNORE' ); + if ( isset( $insertions['globaltemplatelinks'] ) ) { + $this->mDb->insert( 'globaltemplatelinks', $insertions['globaltemplatelinks'], __METHOD__, 'IGNORE' ); + } + if ( isset( $insertions['globalnamespaces'] ) ) { + $this->mDb->insert( 'globalnamespaces', $insertions['globalnamespaces'], __METHOD__, 'IGNORE' ); + } + if ( isset( $insertions['globalinterwiki'] ) ) { + $this->mDb->insert( 'globalinterwiki', $insertions['globalinterwiki'], __METHOD__, 'IGNORE' ); + } } } diff --git a/includes/installer/MysqlUpdater.php b/includes/installer/MysqlUpdater.php index c096b84620..91a59ae1cc 100644 --- a/includes/installer/MysqlUpdater.php +++ b/includes/installer/MysqlUpdater.php @@ -186,8 +186,6 @@ class MysqlUpdater extends DatabaseUpdater { // 1.19 array( 'addTable', 'config', 'patch-config.sql' ), array( 'addIndex', 'logging', 'type_action', 'patch-logging-type-action-index.sql'), - - // 1.19 array( 'addTable', 'globaltemplatelinks', 'patch-globaltemplatelinks.sql' ), array( 'addTable', 'globalnamespaces', 'patch-globalnamespaces.sql' ), array( 'addTable', 'globalinterwiki', 'patch-globalinterwiki.sql' ), diff --git a/includes/installer/SqliteUpdater.php b/includes/installer/SqliteUpdater.php index 3b6df6e273..548e116eef 100644 --- a/includes/installer/SqliteUpdater.php +++ b/includes/installer/SqliteUpdater.php @@ -63,6 +63,9 @@ class SqliteUpdater extends DatabaseUpdater { // 1.19 array( 'addTable', 'config', 'patch-config.sql' ), array( 'addIndex', 'logging', 'type_action', 'patch-logging-type-action-index.sql'), + array( 'addTable', 'globaltemplatelinks', 'patch-globaltemplatelinks.sql' ), + array( 'addTable', 'globalnamespaces', 'patch-globalnamespaces.sql' ), + array( 'addTable', 'globalinterwiki', 'patch-globalinterwiki.sql' ), ); }