dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "action=history should return 404 if there is no such page"
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiClearHasMsg.php
diff --git
a/includes/api/ApiClearHasMsg.php
b/includes/api/ApiClearHasMsg.php
index
4ddbd04
..
13b3577
100644
(file)
--- a/
includes/api/ApiClearHasMsg.php
+++ b/
includes/api/ApiClearHasMsg.php
@@
-30,7
+30,13
@@
class ApiClearHasMsg extends ApiBase {
public function execute() {
$user = $this->getUser();
class ApiClearHasMsg extends ApiBase {
public function execute() {
$user = $this->getUser();
- $user->setNewtalk( false );
+ if ( $this->getRequest()->wasPosted() ) {
+ $user->setNewtalk( false );
+ } else {
+ DeferredUpdates::addCallableUpdate( function () use ( $user ) {
+ $user->setNewtalk( false );
+ } );
+ }
$this->getResult()->addValue( null, $this->getModuleName(), 'success' );
}
$this->getResult()->addValue( null, $this->getModuleName(), 'success' );
}