From e0f5bb41790b90d442d1438bf6c807b51489c5b3 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sat, 17 Jan 2009 17:47:58 +0000 Subject: [PATCH] (bug 8065) Fix summary forcing for new pages --- includes/EditPage.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 154abbcbd9..90af9d2df7 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -868,6 +868,15 @@ class EditPage { wfProfileOut( $fname ); return self::AS_HOOK_ERROR; } + + # Handle the user preference to force summaries here. Check if it's not a redirect. + if ( !$this->allowBlankSummary && !Title::newFromRedirect( $this->textbox1 ) ) { + if ( md5( $this->summary ) == $this->autoSumm ) { + $this->missingSummary = true; + wfProfileOut( $fname ); + return self::AS_SUMMARY_NEEDED; + } + } $isComment = ( $this->section == 'new' ); @@ -949,9 +958,9 @@ class EditPage { } # Handle the user preference to force summaries here, but not for null edits - if ( $this->section != 'new' && !$this->allowBlankSummary && 0 != strcmp($oldtext, $text) && - !is_object( Title::newFromRedirect( $text ) ) # check if it's not a redirect - ) { + if ( $this->section != 'new' && !$this->allowBlankSummary && 0 != strcmp($oldtext,$text) + && !Title::newFromRedirect( $text ) ) # check if it's not a redirect + { if ( md5( $this->summary ) == $this->autoSumm ) { $this->missingSummary = true; wfProfileOut( $fname ); -- 2.20.1