From: Erik Bernhardson Date: Fri, 7 Mar 2014 20:32:27 +0000 (-0800) Subject: Method to identify if a ChangesList is watchlist or normal X-Git-Tag: 1.31.0-rc.0~16589^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=1b8db29ed538c9370a75d344f91dfd30acbad788;p=lhc%2Fweb%2Fwiklou.git Method to identify if a ChangesList is watchlist or normal There are differences, like grouping, between watchlist and normal rendering that hook recipients need to know about. This exposes if the setWatchlistDivs method has been called which currently happens immediatly after instantiation in SpecialWatchlist Change-Id: Ibc06c6d9b878cad3f5da92cfbe3f650ad3f63efa --- diff --git a/includes/changes/ChangesList.php b/includes/changes/ChangesList.php index b996894088..ca9efc3934 100644 --- a/includes/changes/ChangesList.php +++ b/includes/changes/ChangesList.php @@ -80,6 +80,14 @@ class ChangesList extends ContextSource { $this->watchlist = $value; } + /** + * @return bool true when setWatchlistDivs has been called + * @since 1.23 + */ + public function isWatchlist() { + return (bool)$this->watchlist; + } + /** * As we use the same small set of messages in various methods and that * they are called often, we call them once and save them in $this->message