From 2456395c419df4319e74ecafe5f0402558214a3c Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Tue, 3 Jan 2017 14:23:32 -0500 Subject: [PATCH] ApiClearHasMsg: Clean up after I341b395e Since I341b395e, $this->getRequest()->wasPosted() should never be false. So don't bother testing for it. Change-Id: Iccc60424ed5442d950f4968297fdd18001b3a02a --- includes/api/ApiClearHasMsg.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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' ); } -- 2.20.1