From 11fb421c7cab324155407f7c6ad4c27c0a096523 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sun, 10 Nov 2013 07:39:27 +0100 Subject: [PATCH] Add content model to the page information This patch adds a new table row with the content model of the page, this is usally wikitext, can also be javascript or CSS. Bug: 56033 Change-Id: If91f6c20d79cd7b3b8924ab6c3df5f90acd8c7a1 --- RELEASE-NOTES-1.23 | 1 + includes/actions/InfoAction.php | 6 ++++++ languages/messages/MessagesEn.php | 1 + languages/messages/MessagesQqq.php | 7 +++++++ maintenance/language/messages.inc | 1 + 5 files changed, 16 insertions(+) diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23 index 7dad672b59..5ffb98f056 100644 --- a/RELEASE-NOTES-1.23 +++ b/RELEASE-NOTES-1.23 @@ -34,6 +34,7 @@ production. and {{REVISIONTIMESTAMP:}} (with friends). * Add "wgRelevantUserName" to mw.config containing the current Skin::getRelevantUser value. +* (bug 56033) Add content model to the page information. === Bug fixes in 1.23 === * (bug 41759) The "updated since last visit" markers (on history pages, recent diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php index 7fc903399d..701f6d45a4 100644 --- a/includes/actions/InfoAction.php +++ b/includes/actions/InfoAction.php @@ -277,6 +277,12 @@ class InfoAction extends FormlessAction { 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'] ) ) { diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 39f0b8a265..2baccf5097 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -3871,6 +3871,7 @@ Do '''NOT''' fill this in!", 'pageinfo-length' => 'Page length (in bytes)', 'pageinfo-article-id' => 'Page ID', 'pageinfo-language' => 'Page content language', +'pageinfo-content-model' => 'Page content model', 'pageinfo-robot-policy' => 'Indexing by robots', 'pageinfo-robot-index' => 'Allowed', 'pageinfo-robot-noindex' => 'Disallowed', diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index d7123a05df..e0ffcc169b 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -8010,6 +8010,13 @@ The label and the input box are always hidden.', 'pageinfo-length' => 'The length of the page, in bytes.', 'pageinfo-article-id' => 'The numeric identifier of the page.', 'pageinfo-language' => 'Language in which the page content is written.', +'pageinfo-content-model' => 'The model in which the page content is written. + +Used as label. Followed by one of the following messages: +* {{msg-mw|Content-model-wikitext}} +* {{msg-mw|Content-model-javascript}} +* {{msg-mw|Content-model-css}} +* {{msg-mw|Content-model-text}}', 'pageinfo-robot-policy' => 'The search engine status of the page. Used as label. Followed by any one of the following messages: diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 1ac9500164..17658a0629 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -2788,6 +2788,7 @@ $wgMessageStructure = array( 'pageinfo-length', 'pageinfo-article-id', 'pageinfo-language', + 'pageinfo-content-model', 'pageinfo-robot-policy', 'pageinfo-robot-index', 'pageinfo-robot-noindex', -- 2.20.1