dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3a73fb0
)
Use ID instead of (namespace,title) for the update statement, fix reporting
author
Jens Frank
<jeluf@users.mediawiki.org>
Tue, 18 May 2010 20:35:25 +0000
(20:35 +0000)
committer
Jens Frank
<jeluf@users.mediawiki.org>
Tue, 18 May 2010 20:35:25 +0000
(20:35 +0000)
maintenance/namespaceDupes.php
patch
|
blob
|
history
diff --git
a/maintenance/namespaceDupes.php
b/maintenance/namespaceDupes.php
index
dee2d28
..
5cb331d
100644
(file)
--- a/
maintenance/namespaceDupes.php
+++ b/
maintenance/namespaceDupes.php
@@
-200,7
+200,8
@@
class NamespaceConflictChecker extends Maintenance {
$sql = "SELECT {$page}_id AS id,
{$page}_title AS oldtitle,
$encNamespace + {$page}_namespace AS namespace,
$sql = "SELECT {$page}_id AS id,
{$page}_title AS oldtitle,
$encNamespace + {$page}_namespace AS namespace,
- $titleSql AS title
+ $titleSql AS title,
+ {$page}_namespace AS oldnamespace
FROM {$table}
WHERE ( {$page}_namespace=0 OR {$page}_namespace=1 )
AND {$page}_title " . $this->db->buildLike( $name . ':', $this->db->anyString() );
FROM {$table}
WHERE ( {$page}_namespace=0 OR {$page}_namespace=1 )
AND {$page}_title " . $this->db->buildLike( $name . ':', $this->db->anyString() );
@@
-224,15
+225,17
@@
class NamespaceConflictChecker extends Maintenance {
if( is_null($newTitle) || !$newTitle->canExist() ) {
// Title is also an illegal title...
// For the moment we'll let these slide to cleanupTitles or whoever.
if( is_null($newTitle) || !$newTitle->canExist() ) {
// Title is also an illegal title...
// For the moment we'll let these slide to cleanupTitles or whoever.
- $this->output( sprintf( "... %d (
0
,\"%s\")\n",
+ $this->output( sprintf( "... %d (
%d
,\"%s\")\n",
$row->id,
$row->id,
+ $row->oldnamespace,
$row->oldtitle ) );
$this->output( "... *** cannot resolve automatically; illegal title ***\n" );
return false;
}
$row->oldtitle ) );
$this->output( "... *** cannot resolve automatically; illegal title ***\n" );
return false;
}
- $this->output( sprintf( "... %d (
0
,\"%s\") -> (%d,\"%s\") [[%s]]\n",
+ $this->output( sprintf( "... %d (
%d
,\"%s\") -> (%d,\"%s\") [[%s]]\n",
$row->id,
$row->id,
+ $row->oldnamespace,
$row->oldtitle,
$newTitle->getNamespace(),
$newTitle->getDBkey(),
$row->oldtitle,
$newTitle->getNamespace(),
$newTitle->getDBkey(),
@@
-291,8
+294,9
@@
class NamespaceConflictChecker extends Maintenance {
"{$prefix}_title" => $newTitle->getDBkey(),
),
array(
"{$prefix}_title" => $newTitle->getDBkey(),
),
array(
- "{$prefix}_namespace" => 0,
- "{$prefix}_title" => $row->oldtitle,
+ // "{$prefix}_namespace" => 0,
+ // "{$prefix}_title" => $row->oldtitle,
+ "{$prefix}_id" => $row->id,
),
__METHOD__ );
$this->output( "ok.\n" );
),
__METHOD__ );
$this->output( "ok.\n" );