{
return new PFC_And(new UFC_Registered(false, '>', $watch->date()),
new PFC_Or($watch->contactCondition(),
- $watch->promoCondition()));
+ $watch->promoCondition(),
+ $watch->groupCondition()));
}
public function getOrder()
{
return new PFC_And(new UFC_Dead('>', $watch->date(), true),
new PFC_Or($watch->contactCondition(),
- $watch->promoCondition()));
+ $watch->promoCondition(),
+ $watch->groupCondition()));
}
public function getOrder()
$cond = new PFC_Or($cond,
new PFC_And($watch->promoCondition(),
new UFC_Promo('>=', $profile->mainGrade(), $profile->yearpromo() - 1),
- new UFC_Promo('<=', $profile->mainGrade(), $profile->yearpromo() + 1)));
+ new UFC_Promo('<=', $profile->mainGrade(), $profile->yearpromo() + 1)),
+ $watch->groupCondition());
}
return new PFC_And($select_date, $cond);
}
private $date = null;
private $contactCond = null;
private $promoCond = null;
+ private $groupCond = null;
private $filters = array();
return $this->promoCond;
}
+ public function groupCondition()
+ {
+ if (!$this->groupCond) {
+ $this->groupCond = new UFC_WatchGroup($this->user);
+ }
+ return $this->groupCond;
+ }
+
private function fetchEventWatch($class)
{
if (!isset(self::$events[$class])) {
if (!isset($this->filters[$class])) {
$event = $this->fetchEventWatch($class);
$this->filters[$class] = new UserFilter($event->getCondition($this),
- array($event->getOrder(), new UFO_Name(Profile::DN_SORT)));
+ array($event->getOrder(), new UFO_Name()));
}
return $this->filters[$class];
}