dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Type hinting
[lhc/web/wiklou.git]
/
maintenance
/
importUseModWikipedia.php
diff --git
a/maintenance/importUseModWikipedia.php
b/maintenance/importUseModWikipedia.php
index
a14c4f4
..
c4b8112
100644
(file)
--- a/
maintenance/importUseModWikipedia.php
+++ b/
maintenance/importUseModWikipedia.php
@@
-377,7
+377,6
@@
EOT
}
function revisionCallback( $params ) {
}
function revisionCallback( $params ) {
- $origTitle = $params['title'];
$title = $params['rctitle'];
$editTime = $params['timestamp'];
$title = $params['rctitle'];
$editTime = $params['timestamp'];
@@
-481,7
+480,6
@@
EOT
function resolveFailedDiff( $origText, $diff ) {
$context = array();
function resolveFailedDiff( $origText, $diff ) {
$context = array();
- $rxRange = '\d+(?:,(\d+))?';
$diffLines = explode( "\n", $diff );
for ( $i = 0; $i < count( $diffLines ); $i++ ) {
$diffLine = $diffLines[$i];
$diffLines = explode( "\n", $diff );
for ( $i = 0; $i < count( $diffLines ); $i++ ) {
$diffLine = $diffLines[$i];
@@
-526,10
+524,10
@@
EOT
$removedLinks = array_diff( $sourceLinks, $destLinks );
// Match up the removed links with the new links
$removedLinks = array_diff( $sourceLinks, $destLinks );
// Match up the removed links with the new links
- foreach ( $newLinks as $
j => $
newLink ) {
+ foreach ( $newLinks as $newLink ) {
$minDistance = 100000000;
$bestRemovedLink = false;
$minDistance = 100000000;
$bestRemovedLink = false;
- foreach ( $removedLinks as $
k => $
removedLink ) {
+ foreach ( $removedLinks as $removedLink ) {
$editDistance = levenshtein( $newLink, $removedLink );
if ( $editDistance < $minDistance ) {
$minDistance = $editDistance;
$editDistance = levenshtein( $newLink, $removedLink );
if ( $editDistance < $minDistance ) {
$minDistance = $editDistance;