}
# Update text row
- $dbw->update( 'text',
+ $dbw->update( 'text',
array( /* SET */
'old_flags' => $flags,
'old_text' => $compress
define( 'LS_CHUNKED', 1 );
/** @todo document */
-function compressWithConcat( $startId, $maxChunkSize, $maxChunkFactor, $factorThreshold, $beginDate,
+function compressWithConcat( $startId, $maxChunkSize, $maxChunkFactor, $factorThreshold, $beginDate,
$endDate, $extdb="", $maxPageId = false )
{
$fname = 'compressWithConcat';
# Get all articles by page_id
if ( !$maxPageId ) {
$maxPageId = $dbr->selectField( 'page', 'max(page_id)', '', $fname );
- }
+ }
print "Starting from $startId of $maxPageId\n";
$pageConds = array();
if ( $beginDate ) {
$conds[] = "rev_timestamp>'" . $beginDate . "'";
- }
+ }
if ( $endDate ) {
$conds[] = "rev_timestamp<'" . $endDate . "'";
}
for ( $pageId = $startId; $pageId <= $maxPageId; $pageId++ ) {
wfWaitForSlaves( 10 );
- $pageRes = $dbr->select( 'page', array('page_id', 'page_namespace', 'page_title'),
+ $pageRes = $dbr->select( 'page', array('page_id', 'page_namespace', 'page_title'),
$pageConds + array('page_id' => $pageId), $fname );
if ( $dbr->numRows( $pageRes ) == 0 ) {
continue;
# Load revisions
$revRes = $dbw->select( $tables, $fields,
- array( 'rev_page' => $pageRow->page_id ) + $conds,
+ array( 'rev_page' => $pageRow->page_id ) + $conds,
$fname,
$revLoadOptions
);
# Get text
if ( $loadStyle == LS_INDIVIDUAL ) {
- $textRow = $dbw->selectRow( 'text',
+ $textRow = $dbw->selectRow( 'text',
array( 'old_flags', 'old_text' ),
array( 'old_id' => $oldid ),
$fname,
}
# Store External Storage URLs instead of Stub placeholders
foreach ($stubs as $stub) {
- if ($stub===false)
+ if ($stub===false)
continue;
# $stored should provide base path to a BLOB
$url = $stored."/".$stub->getHash();