Follow-up r84814: revert redundant summary message addition.
[lhc/web/wiklou.git] / includes / FileDeleteForm.php
index 030330b..f77d697 100644 (file)
@@ -121,22 +121,20 @@ class FileDeleteForm {
                        $error = '';
                        $dbw = wfGetDB( DB_MASTER );
                        try {
-                               if( wfRunHooks( 'ArticleDelete', array( &$article, &$wgUser, &$reason, &$error ) ) ) {
-                                       // delete the associated article first
-                                       if( $article->doDeleteArticle( $reason, $suppress, $id, false ) ) {
-                                               global $wgRequest;
-                                               if( $wgRequest->getCheck( 'wpWatch' ) && $wgUser->isLoggedIn() ) {
-                                                       $article->doWatch();
-                                               } elseif( $title->userIsWatching() ) {
-                                                       $article->doUnwatch();
-                                               }
-                                               $status = $file->delete( $reason, $suppress );
-                                               if( $status->ok ) {
-                                                       $dbw->commit();
-                                                       wfRunHooks( 'ArticleDeleteComplete', array( &$article, &$wgUser, $reason, $id ) );
-                                               } else {
-                                                       $dbw->rollback();
-                                               }
+                               // delete the associated article first
+                               if( $article->doDeleteArticle( $reason, $suppress, $id, false ) ) {
+                                       global $wgRequest;
+                                       if( $wgRequest->getCheck( 'wpWatch' ) && $wgUser->isLoggedIn() ) {
+                                               $article->doWatch();
+                                       } elseif( $title->userIsWatching() ) {
+                                               $article->doUnwatch();
+                                       }
+                                       $status = $file->delete( $reason, $suppress );
+                                       if( $status->ok ) {
+                                               $dbw->commit();
+                                               wfRunHooks( 'ArticleDeleteComplete', array( &$article, &$wgUser, $reason, $id ) );
+                                       } else {
+                                               $dbw->rollback();
                                        }
                                }
                        } catch ( MWException $e ) {