*/
protected function makeHeader( $header ) {
$spanAttribs = array( 'class' => 'mw-headline', 'id' => Sanitizer::escapeId( $header ) );
+
return Html::rawElement( 'h2', array(), Html::element( 'span', $spanAttribs, $header ) );
}
* @return array
*/
protected function pageInfo() {
- global $wgContLang, $wgRCMaxAge, $wgMemc,
+ global $wgContLang, $wgRCMaxAge, $wgMemc, $wgMiserMode,
$wgUnwatchedPageThreshold, $wgPageInfoTransclusionLimit;
$user = $this->getUser();
Language::fetchLanguageName( $pageLang, $lang->getCode() )
. ' ' . $this->msg( 'parentheses', $pageLang ) );
+ // Content model of the page
+ $pageInfo['header-basic'][] = array(
+ $this->msg( 'pageinfo-content-model' ),
+ ContentHandler::getLocalizedName( $title->getContentModel() )
+ );
+
// Search engine status
$pOutput = new ParserOutput();
if ( isset( $pageProperties['noindex'] ) ) {
if (
$user->isAllowed( 'unwatchedpages' ) ||
( $wgUnwatchedPageThreshold !== false &&
- $pageCounts['watchers'] >= $wgUnwatchedPageThreshold )
+ $pageCounts['watchers'] >= $wgUnwatchedPageThreshold )
) {
// Number of page watchers
$pageInfo['header-basic'][] = array(
) {
$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',
);
wfProfileOut( __METHOD__ );
+
return $result;
}
$anon_ips = array();
# Sift for real versus user names
+ /** @var $user User */
foreach ( $contributors as $user ) {
$page = $user->isAnon()
? SpecialPage::getTitleFor( 'Contributions', $user->getName() )
}
$count = count( $fulllist );
+
# "Based on work by ..."
return $count
? $this->msg( 'othercontribs' )->rawParams(