r72550 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72549‎ | r72550 | r72551 >
Date:20:42, 7 September 2010
Author:ialex
Status:reverted (Comments)
Tags:
Comment:
Moved update_row_exists() to install-utils.inc since extensions may use it in LoadExtensionSchemaUpdates hook (such ad CodeReview) and updaters.inc is no more loaded at this time since r72539
Modified paths:
  • /trunk/phase3/maintenance/install-utils.inc (modified) (history)
  • /trunk/phase3/maintenance/updaters.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/updaters.inc
@@ -9,20 +9,6 @@
1010 exit( 1 );
1111 }
1212
13 -# Helper function: check if the given key is present in the updatelog table.
14 -# Obviously, only use this for updates that occur after the updatelog table was
15 -# created!
16 -function update_row_exists( $key ) {
17 - global $wgDatabase;
18 - $row = $wgDatabase->selectRow(
19 - 'updatelog',
20 - '1',
21 - array( 'ul_key' => $key ),
22 - __FUNCTION__
23 - );
24 - return (bool)$row;
25 -}
26 -
2713 function modify_field( $table, $field, $patch, $fullpath = false ) {
2814 global $wgDatabase;
2915 if ( !$wgDatabase->tableExists( $table ) ) {
Index: trunk/phase3/maintenance/install-utils.inc
@@ -197,6 +197,21 @@
198198 }
199199
200200 /**
 201+ * Helper function: check if the given key is present in the updatelog table.
 202+ * Obviously, only use this for updates that occur after the updatelog table was
 203+ * created!
 204+ */
 205+function update_row_exists( $key ) {
 206+ $row = wfGetDB( DB_MASTER )->selectRow(
 207+ 'updatelog',
 208+ '1',
 209+ array( 'ul_key' => $key ),
 210+ __FUNCTION__
 211+ );
 212+ return (bool)$row;
 213+}
 214+
 215+/**
201216 * Get the value of session.save_path
202217 *
203218 * Per http://www.php.net/manual/en/ref.session.php#ini.session.save-path,

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r72539* do_all_updates() is dead...demon14:33, 7 September 2010

Comments

#Comment by 😂 (talk | contribs)   12:15, 14 December 2010

Was this reverted somewhere? I figured we'd keep this in install-utils for a release for back-compat.

#Comment by IAlex (talk | contribs)   12:20, 14 December 2010

I removed that function in r72870 since it wasn't used anywhere in core or extensions in SVN.

#Comment by 😂 (talk | contribs)   12:45, 14 December 2010

I can't find it used in REL1_17 or 1_16, so it should be fine removing it.

Status & tagging log