X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28%27votes%27%2C%20votes=%27waiting%27%29%20%7D%7D?a=blobdiff_plain;f=includes%2Fapi%2FApiClearHasMsg.php;h=a5474b5823a026a0b4f8d021aaaa3c7b462f23fa;hb=2456395c419df4319e74ecafe5f0402558214a3c;hp=99242a8b0dba32542bfab650b229e5d43adcc5ce;hpb=8e337da65b111ddbcd63beef6440e9c1cdbe7b69;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiClearHasMsg.php b/includes/api/ApiClearHasMsg.php index 99242a8b0d..a5474b5823 100644 --- a/includes/api/ApiClearHasMsg.php +++ b/includes/api/ApiClearHasMsg.php @@ -30,13 +30,7 @@ class ApiClearHasMsg extends ApiBase { public function execute() { $user = $this->getUser(); - if ( $this->getRequest()->wasPosted() ) { - $user->setNewtalk( false ); - } else { - DeferredUpdates::addCallableUpdate( function () use ( $user ) { - $user->setNewtalk( false ); - } ); - } + $user->setNewtalk( false ); $this->getResult()->addValue( null, $this->getModuleName(), 'success' ); }