r72872 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72871‎ | r72872 | r72873 >
Date:16:48, 12 September 2010
Author:ialex
Status:ok (Comments)
Tags:
Comment:
Let's just kill $wgUpdates since OpenID was converted in r72798.

I hope I was the only one that has the idea to use $wgUpdates in an extension :)
Modified paths:
  • /trunk/phase3/includes/installer/DatabaseUpdater.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/DatabaseUpdater.php
@@ -54,12 +54,9 @@
5555 * something much nicer
5656 */
5757 private function initOldGlobals() {
58 - global $wgUpdates, $wgExtNewTables, $wgExtNewFields, $wgExtPGNewFields,
 58+ global $wgExtNewTables, $wgExtNewFields, $wgExtPGNewFields,
5959 $wgExtPGAlteredFields, $wgExtNewIndexes, $wgExtModifiedFields;
6060
61 - // Deprecated. Do not use, ever.
62 - $wgUpdates = array();
63 -
6461 # For extensions only, should be populated via hooks
6562 # $wgDBtype should be checked to specifiy the proper file
6663 $wgExtNewTables = array(); // table, dir
@@ -197,14 +194,14 @@
198195 }
199196
200197 /**
201 - * Before 1.17, we used to handle updates via stuff like $wgUpdates,
 198+ * Before 1.17, we used to handle updates via stuff like
202199 * $wgExtNewTables/Fields/Indexes. This is nasty :) We refactored a lot
203200 * of this in 1.17 but we want to remain back-compatible for awhile. So
204201 * load up these old global-based things into our update list.
205202 */
206203 protected function getOldGlobalUpdates() {
207 - global $wgUpdates, $wgExtNewFields, $wgExtNewTables,
208 - $wgExtModifiedFields, $wgExtNewIndexes, $wgSharedDB, $wgSharedTables;
 204+ global $wgExtNewFields, $wgExtNewTables, $wgExtModifiedFields,
 205+ $wgExtNewIndexes, $wgSharedDB, $wgSharedTables;
209206
210207 $doUser = $this->shared ?
211208 $wgSharedDB && in_array( 'user', $wgSharedTables ) :
@@ -212,12 +209,6 @@
213210
214211 $updates = array();
215212
216 - if( isset( $wgUpdates[ $this->db->getType() ] ) ) {
217 - foreach( $wgUpdates[ $this->db->getType() ] as $upd ) {
218 - $updates[] = $upd;
219 - }
220 - }
221 -
222213 foreach ( $wgExtNewTables as $tableRecord ) {
223214 $updates[] = array(
224215 'addTable', $tableRecord[0], $tableRecord[1], true

Follow-up revisions

RevisionCommit summaryAuthorDate
r74090Follow-up r72872: added RELEASE-NOTES entryialex19:29, 1 October 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r72798Converted OpenID's LoadExtensionSchemaUpdates hook to use the DatabaseUpdater...ialex10:39, 11 September 2010

Comments

#Comment by Platonides (talk | contribs)   17:41, 12 September 2010

Would need release notes.

I thought $wgUpdates was the standard way for extension updating. It was added in r45764, there since 1.15.

I would keep $wgUpdates and $wgExt* for 1.17 with wfWarn() and remove them in 1.18.

#Comment by 😂 (talk | contribs)   19:33, 1 October 2010

No point in keeping $wgUpdates at all. OpenID was the only extension to ever use it, and I don't want to keep it around and risk people starting to use it. The idea wasn't new anyway, it was the same logic as $wgMysqlUpdates before it, it just contained Sqlite updates now too.

#Comment by Platonides (talk | contribs)   20:19, 2 October 2010

Ok then.

Status & tagging log