Moved update_row_exists() to install-utils.inc since extensions may use it in LoadExt...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Tue, 7 Sep 2010 20:42:47 +0000 (20:42 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Tue, 7 Sep 2010 20:42:47 +0000 (20:42 +0000)
maintenance/install-utils.inc
maintenance/updaters.inc

index 76cec61..f865aca 100644 (file)
@@ -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
  *
index 6057bf1..0b9bdf1 100644 (file)
@@ -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 ) ) {