From: Mark A. Hershberger Date: Thu, 17 Nov 2011 16:00:41 +0000 (+0000) Subject: Apply cryptocoryne's patch from Bug 32454 - ArticlePurge hook is broken after r86041 X-Git-Tag: 1.31.0-rc.0~26443 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=171ac0a31b4cb18ed7bac0cf3faf121272790103;p=lhc%2Fweb%2Fwiklou.git Apply cryptocoryne's patch from Bug 32454 - ArticlePurge hook is broken after r86041 --- 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();