Merge "Tweaked TempFSFile::bind() param type docs"
[lhc/web/wiklou.git] / includes / actions / WatchAction.php
index 8c9a46a..9647340 100644 (file)
@@ -48,9 +48,7 @@ class WatchAction extends FormAction {
        }
 
        public function onSubmit( $data ) {
-               wfProfileIn( __METHOD__ );
                self::doWatch( $this->getTitle(), $this->getUser() );
-               wfProfileOut( __METHOD__ );
 
                return true;
        }
@@ -132,10 +130,10 @@ class WatchAction extends FormAction {
                $page = WikiPage::factory( $title );
 
                $status = Status::newFatal( 'hookaborted' );
-               if ( wfRunHooks( 'WatchArticle', array( &$user, &$page, &$status ) ) ) {
+               if ( Hooks::run( 'WatchArticle', array( &$user, &$page, &$status ) ) ) {
                        $status = Status::newGood();
                        $user->addWatch( $title, $checkRights );
-                       wfRunHooks( 'WatchArticleComplete', array( &$user, &$page ) );
+                       Hooks::run( 'WatchArticleComplete', array( &$user, &$page ) );
                }
 
                return $status;
@@ -156,10 +154,10 @@ class WatchAction extends FormAction {
                $page = WikiPage::factory( $title );
 
                $status = Status::newFatal( 'hookaborted' );
-               if ( wfRunHooks( 'UnwatchArticle', array( &$user, &$page, &$status ) ) ) {
+               if ( Hooks::run( 'UnwatchArticle', array( &$user, &$page, &$status ) ) ) {
                        $status = Status::newGood();
                        $user->removeWatch( $title );
-                       wfRunHooks( 'UnwatchArticleComplete', array( &$user, &$page ) );
+                       Hooks::run( 'UnwatchArticleComplete', array( &$user, &$page ) );
                }
 
                return $status;