X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FFileDeleteForm.php;h=65d82b8782c1235fca19569f90a6fbbd3b5a2b69;hb=9a3b6e5639d0fae23c721ed803a3feb0a0462c14;hp=9fc70ebe02fcc5e635ae46d133849c0f28d1e6a2;hpb=ef30e0b49d7743174f6fcc38b4d208d3c751ef48;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/FileDeleteForm.php b/includes/FileDeleteForm.php index 9fc70ebe02..65d82b8782 100644 --- a/includes/FileDeleteForm.php +++ b/includes/FileDeleteForm.php @@ -120,13 +120,7 @@ class FileDeleteForm { // file, otherwise go back to the description page $wgOut->addReturnTo( $this->oldimage ? $this->title : Title::newMainPage() ); - if ( $wgUser->isLoggedIn() && $wgRequest->getCheck( 'wpWatch' ) != $wgUser->isWatched( $this->title ) ) { - if ( $wgRequest->getCheck( 'wpWatch' ) ) { - WatchAction::doWatch( $this->title, $wgUser ); - } else { - WatchAction::doUnwatch( $this->title, $wgUser ); - } - } + WatchAction::doWatchOrUnwatch( $wgRequest->getCheck( 'wpWatch' ), $this->title, $wgUser ); } return; }