* @return array
*/
protected function pageInfo() {
- global $wgContLang, $wgRCMaxAge, $wgMemc,
+ global $wgContLang, $wgRCMaxAge, $wgMemc, $wgMiserMode,
$wgUnwatchedPageThreshold, $wgPageInfoTransclusionLimit;
$user = $this->getUser();
) {
$options = array( 'LIMIT' => $wgPageInfoTransclusionLimit );
$transcludedTemplates = $title->getTemplateLinksFrom( $options );
- $transcludedTargets = $title->getTemplateLinksTo( $options );
+ if ( $wgMiserMode ) {
+ $transcludedTargets = array();
+ } else {
+ $transcludedTargets = $title->getTemplateLinksTo( $options );
+ }
// Page properties
$pageInfo['header-properties'] = array();
);
}
- if ( $pageCounts['transclusion']['to'] > 0 ) {
+ if ( !$wgMiserMode && $pageCounts['transclusion']['to'] > 0 ) {
if ( $pageCounts['transclusion']['to'] > count( $transcludedTargets ) ) {
$more = Linker::link(
$whatLinksHere,
* @return array
*/
protected static function pageCounts( Title $title ) {
- global $wgRCMaxAge, $wgDisableCounters;
+ global $wgRCMaxAge, $wgDisableCounters, $wgMiserMode;
wfProfileIn( __METHOD__ );
$id = $title->getArticleID();
}
// Counts for the number of transclusion links (to/from)
- $result['transclusion']['to'] = (int)$dbr->selectField(
- 'templatelinks',
- 'COUNT(tl_from)',
- array(
- 'tl_namespace' => $title->getNamespace(),
- 'tl_title' => $title->getDBkey()
- ),
- __METHOD__
- );
+ if ( $wgMiserMode ) {
+ $result['transclusion']['to'] = 0;
+ } else {
+ $result['transclusion']['to'] = (int)$dbr->selectField(
+ 'templatelinks',
+ 'COUNT(tl_from)',
+ array(
+ 'tl_namespace' => $title->getNamespace(),
+ 'tl_title' => $title->getDBkey()
+ ),
+ __METHOD__
+ );
+ }
$result['transclusion']['from'] = (int)$dbr->selectField(
'templatelinks',