* (bug 10149) Don't show full template list on section-0 edit
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 5 Jun 2007 21:17:59 +0000 (21:17 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 5 Jun 2007 21:17:59 +0000 (21:17 +0000)
Oh PHP, how do I loathe thee? Let me count the ways:
1)  0  == '0'
2)  0  == ''
3) '0' != ''
Q.E.D.

RELEASE-NOTES
includes/EditPage.php

index 1877c6d..ca20d16 100644 (file)
@@ -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 ==
 
index 7428684..888726c 100644 (file)
@@ -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 ;