r17661 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r17660‎ | r17661 | r17662 >
Date:06:57, 14 November 2006
Author:nickj
Status:old
Tags:
Comment:
Prevent PHP notice on undefined $subjectpreview and $summarypreview variables in error_reporting(E_ALL) mode.
Modified paths:
  • /trunk/phase3/includes/EditPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -1022,10 +1022,12 @@
10231023 $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 />";
10241024 $editsummary = '';
10251025 $subjectpreview = $summarytext && $this->preview ? "<div class=\"mw-summary-preview\">".wfMsg('subject-preview').':'.$sk->commentBlock( $this->summary, $this->mTitle )."</div>\n" : '';
 1026+ $summarypreview = '';
10261027 } else {
10271028 $commentsubject = '';
10281029 $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 />";
10291030 $summarypreview = $summarytext && $this->preview ? "<div class=\"mw-summary-preview\">".wfMsg('summary-preview').':'.$sk->commentBlock( $this->summary, $this->mTitle )."</div>\n" : '';
 1031+ $subjectpreview = '';
10301032 }
10311033
10321034 # Set focus to the edit box on load, except on preview or diff, where it would interfere with the display