Prevent PHP notice on undefined $subjectpreview and $summarypreview variables in...
authorNick Jenkins <nickj@users.mediawiki.org>
Tue, 14 Nov 2006 06:57:46 +0000 (06:57 +0000)
committerNick Jenkins <nickj@users.mediawiki.org>
Tue, 14 Nov 2006 06:57:46 +0000 (06:57 +0000)
includes/EditPage.php

index 5775e1a..30cb281 100644 (file)
@@ -1022,10 +1022,12 @@ class EditPage {
                        $commentsubject="<span id='wpSummaryLabel'><label for='wpSummary'>{$subject}:</label></span>\n<div class='editOptions'>\n<input tabindex='1' type='text' value=\"$summarytext\" name='wpSummary' id='wpSummary' maxlength='200' size='60' /><br />";
                        $editsummary = '';
                        $subjectpreview = $summarytext && $this->preview ? "<div class=\"mw-summary-preview\">".wfMsg('subject-preview').':'.$sk->commentBlock( $this->summary, $this->mTitle )."</div>\n" : '';
+                       $summarypreview = '';
                } else {
                        $commentsubject = '';
                        $editsummary="<span id='wpSummaryLabel'><label for='wpSummary'>{$summary}:</label></span>\n<div class='editOptions'>\n<input tabindex='2' type='text' value=\"$summarytext\" name='wpSummary' id='wpSummary' maxlength='200' size='60' /><br />";
                        $summarypreview = $summarytext && $this->preview ? "<div class=\"mw-summary-preview\">".wfMsg('summary-preview').':'.$sk->commentBlock( $this->summary, $this->mTitle )."</div>\n" : '';
+                       $subjectpreview = '';
                }
 
                # Set focus to the edit box on load, except on preview or diff, where it would interfere with the display