public function findNextSection(BOL_QuestionSection $section)
 {
     if ($section === null) {
         return null;
     }
     $example = new OW_Example();
     $example->andFieldGreaterThenOrEqual('sortOrder', $section->sortOrder);
     $example->andFieldEqual('isHidden', 0);
     $example->andFieldNotEqual('name', 'about_my_match');
     $example->andFieldNotEqual('name', $section->name);
     $example->setOrder(' sortOrder ');
     return $this->findObjectByExample($example);
 }
Beispiel #2
0
 public function countUserDraft($userId)
 {
     $ex = new OW_Example();
     $ex->andFieldEqual('authorId', $userId);
     $ex->andFieldNotEqual('isDraft', 0);
     $cacheLifeTime = self::CACHE_LIFE_TIME;
     $tags = array(self::CACHE_TAG_POST_COUNT);
     return $this->countByExample($ex, $cacheLifeTime, $tags);
 }
 public function resetAllUsersLastData()
 {
     $example = new OW_Example();
     $example->andFieldNotEqual('userId', 0);
     $this->userLastDataDao->deleteByExample($example);
 }
Beispiel #4
0
 /**
  * Returns user received gifts count
  * 
  * @param int $userId
  * @param boolean $publicOnly
  */
 public function countReceivedGifts($userId, $publicOnly)
 {
     $example = new OW_Example();
     $example->andFieldEqual('recipientId', $userId);
     if ($publicOnly) {
         $example->andFieldNotEqual('private', 1);
     }
     return $this->countByExample($example);
 }
Beispiel #5
0
 /**
  * Get user vwls clips list
  *
  * @param int $userId
  * @param int $itemsNum
  * @param int $exclude 
  * @return array of VWLS_BOL_Clip
  */
 public function getUserClipsList($userId, $page, $itemsNum, $exclude)
 {
     $first = ($page - 1) * $itemsNum;
     $example = new OW_Example();
     $example->andFieldEqual('status', 'approved');
     $example->andFieldEqual('userId', $userId);
     if ($exclude) {
         $example->andFieldNotEqual('id', $exclude);
     }
     $example->setOrder('`addDatetime` DESC');
     $example->setLimitClause($first, $itemsNum);
     return $this->findListByExample($example);
 }
Beispiel #6
0
 public function getUncachedThumbsClipsList($limit, $plugin = 'video')
 {
     $example = new OW_Example();
     $example->andFieldIsNull('thumbUrl');
     $example->andFieldEqual('plugin', $plugin);
     $example->andFieldNotEqual('provider', 'undefined');
     $example->setOrder('`thumbCheckStamp` ASC');
     $example->setLimitClause(0, $limit);
     return $this->findListByExample($example);
 }
 public function findNonGuestRoleList()
 {
     $ex = new OW_Example();
     $ex->andFieldNotEqual('id', $this->getGuestRoleId())->setOrder('sortOrder ASC');
     return $this->findListByExample($ex);
 }