Apply cryptocoryne's patch from Bug 32454 - ArticlePurge hook is broken after r86041
authorMark A. Hershberger <mah@users.mediawiki.org>
Thu, 17 Nov 2011 16:00:41 +0000 (16:00 +0000)
committerMark A. Hershberger <mah@users.mediawiki.org>
Thu, 17 Nov 2011 16:00:41 +0000 (16:00 +0000)
CREDITS
includes/WikiPage.php
includes/actions/PurgeAction.php

diff --git a/CREDITS b/CREDITS
index 00d1fd8..a176e49 100644 (file)
--- 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
index 3acabf5..3f0183e 100644 (file)
@@ -755,6 +755,7 @@ class WikiPage extends Page {
 
                        MessageCache::singleton()->replace( $this->mTitle->getDBkey(), $text );
                }
+               return true;
        }
 
        /**
index 29cbf3a..e288785 100644 (file)
@@ -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();