* Updates templatelinks if it is out of date.
*
* @param string $text
- * @param Article $article
* @param bool $cache
*/
public function outputWikiText( $text, $cache = true ) {
$parserOutput = $wgParser->parse( $text, $this->mTitle,
$popts, true, true, $this->getRevIdFetched() );
$popts->setTidy(false);
- if ( $cache && $article && $parserOutput->getCacheTime() != -1 ) {
+ if ( $cache && $this && $parserOutput->getCacheTime() != -1 ) {
$parserCache =& ParserCache::singleton();
- $parserCache->save( $parserOutput, $article, $wgUser );
+ $parserCache->save( $parserOutput, $this, $wgUser );
}
if ( !wfReadOnly() ) {
array( 'tl_from' => $id ),
'Article:getUsedTemplates' );
+ global $wgContLang;
+
if ( false !== $res ) {
if ( $dbr->numRows( $res ) ) {
while ( $row = $dbr->fetchObject( $res ) ) {
$wgDatabase->insert( 'page_restrictions', array ( 'pr_page' => $id,
'pr_type' => $restriction_type,
'pr_level' => $restriction_level,
- 'pr_cascade' => 0 ), __METHOD );
+ 'pr_cascade' => 0 ), __METHOD__ );
}
}
}