Merge "SpecialMostlinkedCategories: Use LinkRenderer instead of Linker::link()"
[lhc/web/wiklou.git] / includes / actions / UnwatchAction.php
index e2e5a1d..7f043e4 100644 (file)
@@ -36,9 +36,7 @@ class UnwatchAction extends WatchAction {
        }
 
        public function onSubmit( $data ) {
-               wfProfileIn( __METHOD__ );
                self::doUnwatch( $this->getTitle(), $this->getUser() );
-               wfProfileOut( __METHOD__ );
 
                return true;
        }
@@ -52,6 +50,11 @@ class UnwatchAction extends WatchAction {
        }
 
        public function onSuccess() {
-               $this->getOutput()->addWikiMsg( 'removedwatchtext', $this->getTitle()->getPrefixedText() );
+               $msgKey = $this->getTitle()->isTalkPage() ? 'removedwatchtext-talk' : 'removedwatchtext';
+               $this->getOutput()->addWikiMsg( $msgKey, $this->getTitle()->getPrefixedText() );
+       }
+
+       public function doesWrites() {
+               return true;
        }
 }