Fix symbol clash between $user->watch fetched by default query and
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 28 Feb 2010 16:01:15 +0000 (17:01 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 28 Feb 2010 16:03:47 +0000 (17:03 +0100)
$user->watch() that check informations from the carnet.

Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
classes/user.php
classes/userfilter.php
include/notifs.inc.php

index b99bc3a..17ee862 100644 (file)
@@ -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);
index 3e89426..c76b93a 100644 (file)
@@ -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();
index 1883e62..cda21a1 100644 (file)
@@ -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);