From 171ac0a31b4cb18ed7bac0cf3faf121272790103 Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Thu, 17 Nov 2011 16:00:41 +0000 Subject: [PATCH] Apply cryptocoryne's patch from Bug 32454 - ArticlePurge hook is broken after r86041 --- CREDITS | 1 + includes/WikiPage.php | 1 + includes/actions/PurgeAction.php | 8 ++++---- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CREDITS b/CREDITS index 00d1fd86fb..a176e4961b 100644 --- a/CREDITS +++ b/CREDITS @@ -91,6 +91,7 @@ following names for their contribution to the product. * Carlin * Carsten Nielsen * Conrad Irwin +* cryptocoryne * Dan Barrett * Dan Collins * Dan Nessett diff --git a/includes/WikiPage.php b/includes/WikiPage.php index 3acabf5ed4..3f0183e5e5 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -755,6 +755,7 @@ class WikiPage extends Page { MessageCache::singleton()->replace( $this->mTitle->getDBkey(), $text ); } + return true; } /** diff --git a/includes/actions/PurgeAction.php b/includes/actions/PurgeAction.php index 29cbf3ae5b..e288785f3d 100644 --- a/includes/actions/PurgeAction.php +++ b/includes/actions/PurgeAction.php @@ -52,8 +52,7 @@ class PurgeAction extends FormAction { } public function onSubmit( $data ) { - $this->page->doPurge(); - return true; + return $this->page->doPurge(); } /** @@ -71,8 +70,9 @@ class PurgeAction extends FormAction { $this->getRequest()->getQueryValues(), array( 'title' => null, 'action' => null ) ) ); - $this->onSubmit( array() ); - $this->onSuccess(); + if( $this->onSubmit( array() ) ) { + $this->onSuccess(); + } } else { $this->redirectParams = $this->getRequest()->getVal( 'redirectparams', '' ); $form = $this->getForm(); -- 2.20.1