Keep $user->mEditCount up to date
authorStephane Bisson <sbisson@wikimedia.org>
Wed, 3 Aug 2016 15:26:47 +0000 (11:26 -0400)
committerStephane Bisson <sbisson@wikimedia.org>
Fri, 5 Aug 2016 13:06:56 +0000 (09:06 -0400)
commit6e65053cc9eac6d94f1c7843cb0aef5dd09b5d3f
tree12160cbb645fa42decee27f4ef8a8914d894c870
parent37eb21112f63eaa9e94ed5df90f8a7a1adaa0eb7
Keep $user->mEditCount up to date

Whenever User::incEditCount() is called,
this tries to keep the user object up
to date so hooks can read the edit count
without reloading the user from the db.

Another option would be invalidate the
instance cache and let the read
repopulate it. It would add a db access
on each edit.

Bug: T128249
Change-Id: I79194c41d6b2fd84ad658909a2941d9d3d28d94e
includes/user/User.php
tests/phpunit/includes/user/UserTest.php