Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -182,6 +182,12 @@ |
183 | 183 | * @var ParserOutput |
184 | 184 | */ |
185 | 185 | var $mParserOutput; |
| 186 | + |
| 187 | + /** |
| 188 | + * Has a summary been preset using GET parameter &summary= ? |
| 189 | + * @var Bool |
| 190 | + */ |
| 191 | + var $hasPresetSummary = false; |
186 | 192 | |
187 | 193 | var $mBaseRevision = false; |
188 | 194 | var $mShowSummaryField = true; |
— | — | @@ -679,6 +685,9 @@ |
680 | 686 | } |
681 | 687 | elseif ( $this->section != 'new' && $request->getVal( 'summary' ) ) { |
682 | 688 | $this->summary = $request->getText( 'summary' ); |
| 689 | + if ( $this->summary !== '' ) { |
| 690 | + $this->hasPresetSummary = true; |
| 691 | + } |
683 | 692 | } |
684 | 693 | |
685 | 694 | if ( $request->getVal( 'minor' ) ) { |
— | — | @@ -1795,6 +1804,13 @@ |
1796 | 1805 | $wgOut->addHTML( Html::hidden( 'wpIgnoreBlankSummary', true ) ); |
1797 | 1806 | } |
1798 | 1807 | |
| 1808 | + if ( $this->hasPresetSummary ) { |
| 1809 | + // If a summary has been preset using &summary= we dont want to prompt for |
| 1810 | + // a different summary. Only prompt for a summary if the summary is blanked. |
| 1811 | + // (Bug 17416) |
| 1812 | + $this->autoSumm = 'd41d8cd98f00b204e9800998ecf8427e'; # == md5('') |
| 1813 | + } |
| 1814 | + |
1799 | 1815 | $autosumm = $this->autoSumm ? $this->autoSumm : md5( $this->summary ); |
1800 | 1816 | $wgOut->addHTML( Html::hidden( 'wpAutoSummary', $autosumm ) ); |
1801 | 1817 | |