MediaWiki  REL1_24
ApiClearHasMsg.php
Go to the documentation of this file.
00001 <?php
00002 
00030 class ApiClearHasMsg extends ApiBase {
00031     public function execute() {
00032         $user = $this->getUser();
00033         $user->setNewtalk( false );
00034         $this->getResult()->addValue( null, $this->getModuleName(), 'success' );
00035     }
00036 
00037     public function isWriteMode() {
00038         return true;
00039     }
00040 
00041     public function mustBePosted() {
00042         return false;
00043     }
00044 
00045     public function getDescription() {
00046         return array( 'Clears the hasmsg flag for current user.' );
00047     }
00048 
00049     public function getExamples() {
00050         return array(
00051             'api.php?action=clearhasmsg' => 'Clears the hasmsg flag for current user',
00052         );
00053     }
00054 
00055     public function getHelpUrls() {
00056         return 'https://www.mediawiki.org/wiki/API:ClearHasMsg';
00057     }
00058 }