summaryrefslogtreecommitdiff
path: root/maintenance/orphans.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
committerPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
commitd9022f63880ce039446fba8364f68e656b7bf4cb (patch)
tree16b40fbf17bf7c9ee6f4ead25b16dd192378050a /maintenance/orphans.php
parent27cf83d177256813e2e802241085fce5dd0f3fb9 (diff)
Update to MediaWiki 1.19.0
Diffstat (limited to 'maintenance/orphans.php')
-rw-r--r--maintenance/orphans.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/maintenance/orphans.php b/maintenance/orphans.php
index 1986ff35..faaadd37 100644
--- a/maintenance/orphans.php
+++ b/maintenance/orphans.php
@@ -53,10 +53,11 @@ class Orphans extends Maintenance {
* @param $db DatabaseBase object
* @param $extraTable String The name of any extra tables to lock (eg: text)
*/
- private function lockTables( &$db, $extraTable = null ) {
+ private function lockTables( $db, $extraTable = array() ) {
$tbls = array( 'page', 'revision', 'redirect' );
- if ( $extraTable )
- $tbls[] = $extraTable;
+ if ( $extraTable ) {
+ $tbls = array_merge( $tbls, $extraTable );
+ }
$db->lockTables( array(), $tbls, __METHOD__, false );
}
@@ -167,7 +168,7 @@ class Orphans extends Maintenance {
$revision = $dbw->tableName( 'revision' );
if ( $fix ) {
- $dbw->lockTables( $dbw, 'text', __METHOD__ );
+ $this->lockTables( $dbw, array( 'user', 'text' ) );
}
$this->output( "\nChecking for pages whose page_latest links are incorrect... (this may take a while on a large wiki)\n" );
@@ -206,7 +207,7 @@ class Orphans extends Maintenance {
$this->output( "... updating to revision $maxId\n" );
$maxRev = Revision::newFromId( $maxId );
$title = Title::makeTitle( $row->page_namespace, $row->page_title );
- $article = new Article( $title );
+ $article = WikiPage::factory( $title );
$article->updateRevisionOn( $dbw, $maxRev );
}
}