public function __construct($cond = null, $sort = null)
{
- if (empty(self::$joinMethods)) {
+ if (empty($this->joinMethods)) {
$class = new ReflectionClass('UserFilter');
foreach ($class->getMethods() as $method) {
$name = $method->getName();
if (substr($name, -5) == 'Joins' && $name != 'buildJoins') {
- self::$joinMethods[] = $name;
+ $this->joinMethods[] = $name;
}
}
}
if (!is_null($cond)) {
- if ($cond instanceof UserFilterCondition) {
+ if ($cond instanceof PlFilterCondition) {
$this->setCondition($cond);
}
}
{
$this->date = $date;
if (!$user->watch($this->flag)) {
- return new UFC_False();
+ return new PFC_False();
} else {
return $this->buildCondition($user);
}
protected function buildCondition(PlUser &$user)
{
- return new UFC_And(new UFC_Registered(false, '>', $this->date),
- new UFC_Or(new UFC_WatchContact($user),
+ return new PFC_And(new UFC_Registered(false, '>', $this->date),
+ new PFC_Or(new UFC_WatchContact($user),
new UFC_WatchPromo($user)));
}
protected function buildCondition(PlUser &$user)
{
- return new UFC_And(new UFC_Dead('>', $this->date, true),
- new UFC_Or(new UFC_WatchPromo($user),
+ return new PFC_And(new UFC_Dead('>', $this->date, true),
+ new PFC_Or(new UFC_WatchPromo($user),
new UFC_WatchContact($user)));
}
protected function buildCondition(PlUser &$user)
{
- return new UFC_And(new UFC_OR(new UFC_Birthday('=', time()),
- new UFC_And(new UFC_Birthday('<=', time() + self::WATCH_LIMIT),
+ return new PFC_And(new PFC_OR(new UFC_Birthday('=', time()),
+ new PFC_And(new UFC_Birthday('<=', time() + self::WATCH_LIMIT),
new UFC_Birthday('>', $this->date + self::WATCH_LIMIT))),
- new UFC_Or(new UFC_WatchPromo($user),
+ new PFC_Or(new UFC_WatchPromo($user),
new UFC_WatchContact($user)));
}