<?php
/**
* @todo document
- * @package MediaWiki
- * @subpackage Maintenance
+ * @addtogroup Maintenance
*/
/** */
global $wgUser, $wgParser, $wgUseImageResize, $wgUseTidy;
$fname = 'refreshLinks';
- $dbr =& wfGetDB( DB_SLAVE );
- $dbw =& wfGetDB( DB_MASTER );
+ $dbr = wfGetDB( DB_SLAVE );
$start = intval( $start );
# Don't generate TeX PNGs (lack of a sensible current directory causes errors anyway)
}
fixLinksFromArticle( $id );
}
-
-
}
}
function fixLinksFromArticle( $id ) {
- global $wgTitle, $wgArticle, $wgOut, $wgParser;
+ global $wgTitle, $wgParser;
$wgTitle = Title::newFromID( $id );
- $dbw =& wfGetDB( DB_MASTER );
+ $dbw = wfGetDB( DB_MASTER );
$linkCache =& LinkCache::singleton();
$linkCache->clear();
$options = new ParserOptions;
$parserOutput = $wgParser->parse( $revision->getText(), $wgTitle, $options, true, true, $revision->getId() );
- $update = new LinksUpdate( $wgTitle, $parserOutput );
+ $update = new LinksUpdate( $wgTitle, $parserOutput, false );
$update->doUpdate();
$dbw->immediateCommit();
}
wfWaitForSlaves( $maxLag );
- $dbw =& wfGetDB( DB_WRITE );
+ $dbw = wfGetDB( DB_WRITE );
$linksTables = array(
'pagelinks' => 'pl_from',