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
mediawiki.dic: Remove Zero-related stuff
[lhc/web/wiklou.git]
/
maintenance
/
populateIpChanges.php
diff --git
a/maintenance/populateIpChanges.php
b/maintenance/populateIpChanges.php
index
5174758
..
80f8d30
100644
(file)
--- a/
maintenance/populateIpChanges.php
+++ b/
maintenance/populateIpChanges.php
@@
-75,7
+75,13
@@
TEXT
$start = $this->getOption( 'rev-id', 0 );
$end = $maxRevId > 0
? $maxRevId
$start = $this->getOption( 'rev-id', 0 );
$end = $maxRevId > 0
? $maxRevId
- : $dbw->selectField( 'revision', 'MAX(rev_id)', false, __METHOD__ );
+ : $dbw->selectField( 'revision', 'MAX(rev_id)', '', __METHOD__ );
+
+ if ( empty( $end ) ) {
+ $this->output( "No revisions found, aborting.\n" );
+ return true;
+ }
+
$blockStart = $start;
$attempted = 0;
$inserted = 0;
$blockStart = $start;
$attempted = 0;
$inserted = 0;
@@
-122,7
+128,7
@@
TEXT
}
if ( $insertRows ) {
}
if ( $insertRows ) {
- $dbw->insert( 'ip_changes', $insertRows, __METHOD__,
'IGNORE'
);
+ $dbw->insert( 'ip_changes', $insertRows, __METHOD__,
[ 'IGNORE' ]
);
$inserted += $dbw->affectedRows();
}
$inserted += $dbw->affectedRows();
}