From: Florent Bruneau Date: Sun, 28 Feb 2010 16:01:15 +0000 (+0100) Subject: Fix symbol clash between $user->watch fetched by default query and X-Git-Tag: xorg/1.0.0~332^2~161 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=a87530eada179ec7a5eea8a6238ede8c1d442e52;p=platal.git Fix symbol clash between $user->watch fetched by default query and $user->watch() that check informations from the carnet. Signed-off-by: Florent Bruneau --- diff --git a/classes/user.php b/classes/user.php index b99bc3a..17ee862 100644 --- a/classes/user.php +++ b/classes/user.php @@ -432,7 +432,7 @@ class User extends PlUser $this->fillFromArray($watch); } - public function watch($type) + public function watchType($type) { $this->fetchWatchData(); return $this->watch_actions->hasFlag($type); diff --git a/classes/userfilter.php b/classes/userfilter.php index 3e89426..c76b93a 100644 --- a/classes/userfilter.php +++ b/classes/userfilter.php @@ -1253,7 +1253,7 @@ class UFC_WatchRegistration extends UFC_UserRelated { public function buildCondition(PlFilter &$uf) { - if (!$this->user->watch('registration')) { + if (!$this->user->watchType('registration')) { return PlFilterCondition::COND_FALSE; } $uids = $this->user->watchUsers(); diff --git a/include/notifs.inc.php b/include/notifs.inc.php index 1883e62..cda21a1 100644 --- a/include/notifs.inc.php +++ b/include/notifs.inc.php @@ -35,7 +35,7 @@ abstract class WatchOperation public function getCondition(PlUser &$user, $date) { $this->date = $date; - if (!$user->watch($this->flag)) { + if (!$user->watchType($this->flag)) { return new PFC_False(); } else { return $this->buildCondition($user);