MediaWiki
REL1_24
|
00001 <?php 00028 class UnwatchAction extends WatchAction { 00029 00030 public function getName() { 00031 return 'unwatch'; 00032 } 00033 00034 protected function getDescription() { 00035 return $this->msg( 'removewatch' )->escaped(); 00036 } 00037 00038 public function onSubmit( $data ) { 00039 wfProfileIn( __METHOD__ ); 00040 self::doUnwatch( $this->getTitle(), $this->getUser() ); 00041 wfProfileOut( __METHOD__ ); 00042 00043 return true; 00044 } 00045 00046 protected function alterForm( HTMLForm $form ) { 00047 $form->setSubmitTextMsg( 'confirm-unwatch-button' ); 00048 } 00049 00050 protected function preText() { 00051 return $this->msg( 'confirm-unwatch-top' )->parse(); 00052 } 00053 00054 public function onSuccess() { 00055 $this->getOutput()->addWikiMsg( 'removedwatchtext', $this->getTitle()->getPrefixedText() ); 00056 } 00057 }