*Don't call ArticleSaveComplete if the edit did not go through and no updates (even...
authorAaron Schulz <aaron@users.mediawiki.org>
Mon, 3 Sep 2007 04:19:53 +0000 (04:19 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Mon, 3 Sep 2007 04:19:53 +0000 (04:19 +0000)
includes/Article.php

index 5c242cc..7ba55c5 100644 (file)
@@ -1473,8 +1473,10 @@ class Article {
                        wfDoUpdates();
                }
 
-               wfRunHooks( 'ArticleSaveComplete', array( &$this, &$wgUser, $text, $summary,
-                       $flags & EDIT_MINOR, null, null, &$flags, $revision ) );
+               if ( $good ) {
+                       wfRunHooks( 'ArticleSaveComplete', array( &$this, &$wgUser, $text, $summary,
+                               $flags & EDIT_MINOR, null, null, &$flags, $revision ) );
+               }
 
                wfProfileOut( __METHOD__ );
                return $good;