protected function approveEntry($entryId, $entryType = null) { $dbEntry = entryPeer::retrieveByPK($entryId); if (!$dbEntry || $entryType !== null && $dbEntry->getType() != $entryType) { throw new KalturaAPIException(KalturaErrors::ENTRY_ID_NOT_FOUND, $entryId); } $dbEntry->setModerationStatus(KalturaEntryModerationStatus::APPROVED); $dbEntry->setModerationCount(0); $updateOccurred = $dbEntry->save(); if ($updateOccurred) { myNotificationMgr::createNotification(kNotificationJobData::NOTIFICATION_TYPE_ENTRY_UPDATE, $dbEntry, null, null, null, null, $dbEntry->getId()); } // myNotificationMgr::createNotification(kNotificationJobData::NOTIFICATION_TYPE_ENTRY_BLOCK , $dbEntry->getId()); moderationFlagPeer::markAsModeratedByEntryId($this->getPartnerId(), $dbEntry->getId()); }