From: Alexandre Emsenhuber Date: Tue, 7 Sep 2010 20:42:47 +0000 (+0000) Subject: Moved update_row_exists() to install-utils.inc since extensions may use it in LoadExt... X-Git-Tag: 1.31.0-rc.0~35113 X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=commitdiff_plain;h=e64dde7a75d65df77e4361d4c09e75bf0807c78f;p=lhc%2Fweb%2Fwiklou.git 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 --- diff --git a/maintenance/install-utils.inc b/maintenance/install-utils.inc index 76cec61f8d..f865aca326 100644 --- a/maintenance/install-utils.inc +++ b/maintenance/install-utils.inc @@ -196,6 +196,21 @@ function dbsource( $fname, $db = false ) { } } +/** + * Helper function: check if the given key is present in the updatelog table. + * Obviously, only use this for updates that occur after the updatelog table was + * created! + */ +function update_row_exists( $key ) { + $row = wfGetDB( DB_MASTER )->selectRow( + 'updatelog', + '1', + array( 'ul_key' => $key ), + __FUNCTION__ + ); + return (bool)$row; +} + /** * Get the value of session.save_path * diff --git a/maintenance/updaters.inc b/maintenance/updaters.inc index 6057bf191b..0b9bdf1dbb 100644 --- a/maintenance/updaters.inc +++ b/maintenance/updaters.inc @@ -9,20 +9,6 @@ if ( !defined( 'MEDIAWIKI' ) ) { exit( 1 ); } -# Helper function: check if the given key is present in the updatelog table. -# Obviously, only use this for updates that occur after the updatelog table was -# created! -function update_row_exists( $key ) { - global $wgDatabase; - $row = $wgDatabase->selectRow( - 'updatelog', - '1', - array( 'ul_key' => $key ), - __FUNCTION__ - ); - return (bool)$row; -} - function modify_field( $table, $field, $patch, $fullpath = false ) { global $wgDatabase; if ( !$wgDatabase->tableExists( $table ) ) {