All pastes #612523 Raw Edit

hp

public php v1 · immutable
·published 2007-07-10 13:40 UTC
rendered paste body
    // check if the user has already rated    $c = new Criteria();    $criterion = $c->getNewCriterion(MediaVotesPeer::IP, $_SERVER['REMOTE_ADDR']);    $criterion->addOr(MediaVotesPeer::USER, $this->rateUser);    $c->add($criterion);    $c->add(MediaVotesPeer::MEDIA_ID, $this->rateMediaId);    $comment = MediaVotesPeer::doSelect($c);