r59624 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59623‎ | r59624 | r59625 >
Date:12:12, 1 December 2009
Author:werdna
Status:deferred (Comments)
Tags:
Comment:
Only try to grab parser output if the article actually exists.
Modified paths:
  • /trunk/extensions/LiquidThreads/pages/TalkpageView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/pages/TalkpageView.php
@@ -370,11 +370,12 @@
371371 function getPageLimit() {
372372 $article = $this->article;
373373
374 - $pout = $article->getParserOutput();
375 - $setLimit = $pout->getProperty('lqt-page-limit');
 374+ if ( $article->exists() ) {
 375+ $pout = $article->getParserOutput();
 376+ $setLimit = $pout->getProperty('lqt-page-limit');
 377+ if ($setLimit) return $setLimit;
 378+ }
376379
377 - if ($setLimit) return $setLimit;
378 -
379380 global $wgLiquidThreadsDefaultPageLimit;
380381 return $wgLiquidThreadsDefaultPageLimit;
381382 }

Comments

#Comment by Locos epraix (talk | contribs)   16:36, 1 December 2009

is if ($setLimit) necessary?

#Comment by Werdna (talk | contribs)   16:39, 1 December 2009

Yes.

Status & tagging log