/**
* Returns the name of the action this object responds to.
*
- * @return string lowercase
+ * @return string Lowercase name
*/
public function getName() {
return 'info';
*/
protected function pageInfo() {
global $wgContLang, $wgRCMaxAge, $wgMemc, $wgMiserMode,
- $wgUnwatchedPageThreshold, $wgPageInfoTransclusionLimit;
+ $wgUnwatchedPageThreshold, $wgPageInfoTransclusionLimit, $wgPageLanguageUseDB;
$user = $this->getUser();
$lang = $this->getLanguage();
$sortKey = $pageProperties['defaultsort'];
}
+ $sortKey = htmlspecialchars( $sortKey );
$pageInfo['header-basic'][] = array( $this->msg( 'pageinfo-default-sort' ), $sortKey );
// Page length (in bytes)
// Language in which the page content is (supposed to be) written
$pageLang = $title->getPageLanguage()->getCode();
- $pageInfo['header-basic'][] = array( $this->msg( 'pageinfo-language' ),
+
+ if ( $wgPageLanguageUseDB && $this->getTitle()->userCan( 'pagelang' ) ) {
+ // Link to Special:PageLanguage with pre-filled page title if user has permissions
+ $titleObj = SpecialPage::getTitleFor( 'PageLanguage', $title->getPrefixedText() );
+ $langDisp = Linker::link(
+ $titleObj,
+ $this->msg( 'pageinfo-language' )->escaped()
+ );
+ } else {
+ // Display just the message
+ $langDisp = $this->msg( 'pageinfo-language' )->escaped();
+ }
+
+ $pageInfo['header-basic'][] = array( $langDisp,
Language::fetchLanguageName( $pageLang, $lang->getCode() )
. ' ' . $this->msg( 'parentheses', $pageLang ) );
if ( isset( $pageProperties['noindex'] ) ) {
$pOutput->setIndexPolicy( 'noindex' );
}
+ if ( isset( $pageProperties['index'] ) ) {
+ $pOutput->setIndexPolicy( 'index' );
+ }
// Use robot policy logic
$policy = $this->page->getRobotPolicy( 'view', $pOutput );
/**
* Get a list of contributors of $article
- * @return string: html
+ * @return string Html
*/
protected function getContributors() {
global $wgHiddenPrefs;