X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2Fstorage%2FresolveStubs.php;h=290f1649de4c2fae19e968e96ce1f2ae0ff08171;hb=48d433b102e636644d833e408ba028880f90f62a;hp=414eab81c76b7f4732052171b7393aa87179ad43;hpb=88066420004931111290ed42ce9ee8f6e3a76c90;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/storage/resolveStubs.php b/maintenance/storage/resolveStubs.php index 414eab81c7..290f1649de 100644 --- a/maintenance/storage/resolveStubs.php +++ b/maintenance/storage/resolveStubs.php @@ -27,7 +27,7 @@ define( 'REPORTING_INTERVAL', 100 ); if ( !defined( 'MEDIAWIKI' ) ) { $optionsWithArgs = array( 'm' ); - require_once( __DIR__ . '/../commandLine.inc' ); + require_once __DIR__ . '/../commandLine.inc'; resolveStubs(); } @@ -65,6 +65,9 @@ function resolveStubs() { /** * Resolve a history stub + * @param int $id + * @param string $stubText + * @param string $flags */ function resolveStub( $id, $stubText, $flags ) { $fname = 'resolveStub'; @@ -77,12 +80,18 @@ function resolveStub( $id, $stubText, $flags ) { if ( strtolower( get_class( $stub ) ) !== 'historyblobstub' ) { print "Error found object of class " . get_class( $stub ) . ", expecting historyblobstub\n"; + return; } # Get the (maybe) external row - $externalRow = $dbr->selectRow( 'text', array( 'old_text' ), - array( 'old_id' => $stub->mOldId, 'old_flags' . $dbr->buildLike( $dbr->anyString(), 'external', $dbr->anyString() ) ), + $externalRow = $dbr->selectRow( + 'text', + array( 'old_text' ), + array( + 'old_id' => $stub->mOldId, + 'old_flags' . $dbr->buildLike( $dbr->anyString(), 'external', $dbr->anyString() ) + ), $fname );