In includes/Namespace.php there is:
/**
- Can pages in a namespace be watched? *
- @param $index Int
- @return bool
*/
public static function isWatchable( $index ) {
return $index >= NS_MAIN;
}
However, things are not so simple these days.
Now that there is $wgNamespaceProtection, administrators also need a
similar mechanism to say e.g., "don't encourage the user to watch a
page that is not even allowed to ever be created." Or who knows what
might be on the admin's mind.
You don't want to just "do they have read permission according to
$wgNamespaceProtection etc." as the basis for deciding if they can
watch a page. It is more complicated than that.
E.g., a NS_CATEGORY page that they are looking at because it has
members, but will never have content, because the admin has set
$wgNamespaceProtection[NS_CATEGORY]=$wgNamespaceProtection[NS_CATEGORY_TALK]=array('editinterface');
The admin doesn't want them thinking that watching it will notify them
when a new member is added to the category, etc. (As I bet it
currently doesn't.)
So anyways, you still need to offer the admin an array
($wgNamespaceNoWatch?)that he can tinker with like
$wgNamespaceProtection, so he can have the flexibility to institute
whatever devious watchlist restrictions he has in mind.
No rush, but will come in handy one day.
Version: 1.15.x
Severity: enhancement