https://www.mediawiki.org/wiki/Special:Code/MediaWiki/103471

Revision: 103471
Author:   mah
Date:     2011-11-17 16:00:41 +0000 (Thu, 17 Nov 2011)
Log Message:
-----------
Apply cryptocoryne's patch from Bug 32454 - ArticlePurge hook is broken after 
r86041

Modified Paths:
--------------
    trunk/phase3/CREDITS
    trunk/phase3/includes/WikiPage.php
    trunk/phase3/includes/actions/PurgeAction.php

Modified: trunk/phase3/CREDITS
===================================================================
--- trunk/phase3/CREDITS        2011-11-17 15:43:31 UTC (rev 103470)
+++ trunk/phase3/CREDITS        2011-11-17 16:00:41 UTC (rev 103471)
@@ -91,6 +91,7 @@
 * Carlin
 * Carsten Nielsen
 * Conrad Irwin
+* cryptocoryne
 * Dan Barrett
 * Dan Collins
 * Dan Nessett

Modified: trunk/phase3/includes/WikiPage.php
===================================================================
--- trunk/phase3/includes/WikiPage.php  2011-11-17 15:43:31 UTC (rev 103470)
+++ trunk/phase3/includes/WikiPage.php  2011-11-17 16:00:41 UTC (rev 103471)
@@ -755,6 +755,7 @@
 
                        MessageCache::singleton()->replace( 
$this->mTitle->getDBkey(), $text );
                }
+               return true;
        }
 
        /**

Modified: trunk/phase3/includes/actions/PurgeAction.php
===================================================================
--- trunk/phase3/includes/actions/PurgeAction.php       2011-11-17 15:43:31 UTC 
(rev 103470)
+++ trunk/phase3/includes/actions/PurgeAction.php       2011-11-17 16:00:41 UTC 
(rev 103471)
@@ -52,8 +52,7 @@
        }
 
        public function onSubmit( $data ) {
-               $this->page->doPurge();
-               return true;
+               return $this->page->doPurge();
        }
 
        /**
@@ -71,8 +70,9 @@
                                $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();


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to