From: Derk-Jan Hartman Date: Sun, 22 Jun 2014 14:04:22 +0000 (+0200) Subject: Toolbar: Only show on WikiText pages X-Git-Tag: 1.31.0-rc.0~14202^2~1 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22auteur_infos%22%2C%22id_auteur=%24connect_id_auteur%22%29%20.%20%22?a=commitdiff_plain;h=7263ef1e002786b27fa06db43aa7a6fca00461fb;p=lhc%2Fweb%2Fwiklou.git 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 --- 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() ); }