From 607449cb84e20c5b1035f4b6867b3d1ac6b26567 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Fri, 27 Dec 2013 14:49:56 +0100 Subject: [PATCH] Do not load special pages in WatchedItem::load WatchedItem::load was looking for a special page in the database: SELECT wl_notificationtimestamp FROM `watchlist` WHERE wl_user = '1' AND wl_namespace = '-1' AND wl_title = 'Log' LIMIT 1 But it is known that such a page never will stay in the database, so added a check to avoid the select. Change-Id: I8c65328a32aa93c351ac476ce79d12d2835128f6 --- includes/WatchedItem.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/WatchedItem.php b/includes/WatchedItem.php index d2fb468335..fe9784381e 100644 --- a/includes/WatchedItem.php +++ b/includes/WatchedItem.php @@ -113,6 +113,12 @@ class WatchedItem { return; } + // some pages cannot be watched + if ( !$this->getTitle()->isWatchable() ) { + $this->watched = false; + return; + } + # Pages and their talk pages are considered equivalent for watching; # remember that talk namespaces are numbered as page namespace+1. -- 2.20.1