From 0ec7e21419af7c9c1ccb880516b4f09fbc1ed737 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 5 Jun 2007 21:17:59 +0000 Subject: [PATCH] * (bug 10149) Don't show full template list on section-0 edit Oh PHP, how do I loathe thee? Let me count the ways: 1) 0 == '0' 2) 0 == '' 3) '0' != '' Q.E.D. --- RELEASE-NOTES | 2 ++ includes/EditPage.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 1877c6d5a0..ca20d16817 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -132,6 +132,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN installation * (bug 9383) Don't set a default value for BLOB column in rc-deleted database patch +* (bug 10149) Don't show full template list on section-0 edit + == MediaWiki API changes since 1.10 == diff --git a/includes/EditPage.php b/includes/EditPage.php index 74286844e2..888726ccd5 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1118,7 +1118,7 @@ class EditPage { if( !$this->preview && !$this->diff ) { $wgOut->setOnloadHandler( 'document.editform.wpTextbox1.focus()' ); } - $templates = ($this->preview || $this->section) ? $this->mPreviewTemplates : $this->mArticle->getUsedTemplates(); + $templates = ($this->preview || $this->section != '') ? $this->mPreviewTemplates : $this->mArticle->getUsedTemplates(); $formattedtemplates = $sk->formatTemplates( $templates, $this->preview, $this->section != ''); global $wgUseMetadataEdit ; -- 2.20.1