$this->setupGlobals();
$dbr =& wfGetDB( DB_SLAVE );
- $categorylinks = $dbr->tableName( 'categorylinks' );
print "Selecting categories...";
- $sql = 'SELECT DISTINCT cl_to FROM categorylinks';
+ $sql = 'SELECT DISTINCT cl_to FROM ' . $dbr->tableName( 'categorylinks' );
$res = $dbr->query( $sql, $fname );
print "\nWriting " . $dbr->numRows( $res ). " category pages\n";
/** Set up globals required for parsing */
function setupGlobals( $currentDepth = NULL ) {
- global $wgUser, $wgTitle, $wgStylePath, $wgArticlePath;
+ global $wgUser, $wgTitle, $wgStylePath, $wgArticlePath, $wgMathPath;
global $wgUploadPath, $wgLogo, $wgMaxCredits, $wgSharedUploadPath;
global $wgHideInterlanguageLinks, $wgUploadDirectory, $wgThumbnailScriptPath;
global $wgSharedThumbnailScriptPath, $wgEnableParserCache, $wgHooks, $wgServer;
$wgUploadPath = "$wgScriptPath/{$this->imageRel}";
$wgSharedUploadPath = "$wgUploadPath/shared";
$wgMaxCredits = -1;
- $wgHideInterlangageLinks = !$this->interwiki;
+ $wgHideInterlanguageLinks = !$this->interwiki;
$wgThumbnailScriptPath = $wgSharedThumbnailScriptPath = false;
$wgEnableParserCache = false;
$wgMathPath = "$wgScriptPath/math";
$wgOut->setParserOptions( new ParserOptions );
SpecialPage::executePath( $wgTitle );
} else {
+ /** @todo merge with Wiki.php code */
if ( $ns == NS_IMAGE ) {
$wgArticle = new ImagePage( $wgTitle );
} elseif ( $ns == NS_CATEGORY ) {