diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2006-10-11 20:21:25 +0000 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2006-10-11 20:21:25 +0000 |
commit | d81f562b712f2387fa02290bf2ca86392ab356f2 (patch) | |
tree | d666cdefbe6ac320827a2c6cb473581b46e22c4c /maintenance/namespaceDupes.php | |
parent | 183851b06bd6c52f3cae5375f433da720d410447 (diff) |
Aktualisierung auf Version 1.8.1
Diffstat (limited to 'maintenance/namespaceDupes.php')
-rw-r--r-- | maintenance/namespaceDupes.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/maintenance/namespaceDupes.php b/maintenance/namespaceDupes.php index ad56eee7..acd3a708 100644 --- a/maintenance/namespaceDupes.php +++ b/maintenance/namespaceDupes.php @@ -111,12 +111,12 @@ class NamespaceConflictChecker { } function reportConflict( $row, $suffix ) { - $newTitle = Title::makeTitle( $row->namespace, $row->title ); + $newTitle = Title::makeTitleSafe( $row->namespace, $row->title ); printf( "... %d (0,\"%s\") -> (%d,\"%s\") [[%s]]\n", $row->id, $row->oldtitle, - $row->namespace, - $row->title, + $newTitle->getNamespace(), + $newTitle->getDbKey(), $newTitle->getPrefixedText() ); $id = $newTitle->getArticleId(); @@ -131,7 +131,7 @@ class NamespaceConflictChecker { function resolveConflict( $row, $resolvable, $suffix ) { if( !$resolvable ) { $row->title .= $suffix; - $title = Title::makeTitle( $row->namespace, $row->title ); + $title = Title::makeTitleSafe( $row->namespace, $row->title ); echo "... *** using suffixed form [[" . $title->getPrefixedText() . "]] ***\n"; } $tables = $this->newSchema() @@ -146,10 +146,11 @@ class NamespaceConflictChecker { function resolveConflictOn( $row, $table ) { $fname = 'NamespaceConflictChecker::resolveConflictOn'; echo "... resolving on $table... "; + $newTitle = Title::makeTitleSafe( $row->namespace, $row->title ); $this->db->update( $table, array( - "{$table}_namespace" => $row->namespace, - "{$table}_title" => $row->title, + "{$table}_namespace" => $newTitle->getNamespace(), + "{$table}_title" => $newTitle->getDbKey(), ), array( "{$table}_namespace" => 0, |