Deprecated Title::userIsWatching(); use User::isWatched() instead.
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Sat, 9 Jun 2012 21:16:15 +0000 (23:16 +0200)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Fri, 29 Jun 2012 21:22:35 +0000 (23:22 +0200)
commit58852d882752b46a1c2b79d2476489dfbc978f5f
treed676b7aa53f90ddb6a00fd8b8140668855823815
parent5fec675c80858b1ed7c356b96e11c6d700c5e0c5
Deprecated Title::userIsWatching(); use User::isWatched() instead.

* The problem is that Title::userIsWatching() relies on $wgUser,
  which is not suitable on every case. Instead User::isWatched()
  requires both an User and a Title object.
* Replaced all core calls from the former to the latter
* Added a cache in User for the WatchedItem instances so we do not
  need to do a database request every time something want to know
  whether a page is watched or not, which can happen several times
  per request.

Change-Id: Ifa9c55b7ffb487ce6893c74df233eedc7654dc5e
12 files changed:
includes/Article.php
includes/EditPage.php
includes/FileDeleteForm.php
includes/ProtectionForm.php
includes/SkinLegacy.php
includes/SkinTemplate.php
includes/Title.php
includes/User.php
includes/api/ApiBase.php
includes/specials/SpecialMovepage.php
includes/specials/SpecialUpload.php
skins/Vector.php