Beispiel #1
0
 /**
  * @action checkLikeExists
  * Action to check whether a user likes a specific entry
  * @param string $entryId
  * @param string $userId
  * @return bool
  */
 public function checkLikeExistsAction($entryId, $userId = null)
 {
     if (!$entryId) {
         throw new KalturaAPIException(KalturaErrors::MISSING_MANDATORY_PARAMETER, "entryId");
     }
     if (!$userId) {
         $userId = kCurrentContext::$ks_uid;
     }
     $existingKVote = kvotePeer::doSelectByEntryIdAndPuserId($entryId, $this->getPartnerId(), $userId);
     if (!$existingKVote || !count($existingKVote)) {
         return false;
     }
     return true;
 }