From 7263ef1e002786b27fa06db43aa7a6fca00461fb Mon Sep 17 00:00:00 2001 From: Derk-Jan Hartman Date: Sun, 22 Jun 2014 16:04:22 +0200 Subject: [PATCH] Toolbar: Only show on WikiText pages The toolbar is highly specific to Wikitext anyway. It was already not added to JS and CSS subpages, but still visible on site css/js pages and on Lua pages. This was inconsistent. Ideally at some point, we might want a 'toolbar api' where you can configure a 'toolbar' per content model, but let's first make it consistent and then iterate from there when required. Bug: 29908 Change-Id: If0853e9faf640f93b7030c4937137149d3f08cf5 --- includes/EditPage.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 98e0ec4b5a..84545b13f9 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -2531,7 +2531,9 @@ class EditPage { $wgOut->addHTML( $this->editFormTextBeforeContent ); - if ( !$this->isCssJsSubpage && $showToolbar && $wgUser->getOption( 'showtoolbar' ) ) { + if ( $this->contentModel === CONTENT_MODEL_WIKITEXT && + $showToolbar && $wgUser->getOption( 'showtoolbar' ) ) + { $wgOut->addHTML( EditPage::getEditToolbar() ); } -- 2.20.1