diff --git a/alpha/apps/kaltura/modules/extwidget/actions/playManifestAction.class.php b/alpha/apps/kaltura/modules/extwidget/actions/playManifestAction.class.php index b7a96388da3..87e4ff21594 100644 --- a/alpha/apps/kaltura/modules/extwidget/actions/playManifestAction.class.php +++ b/alpha/apps/kaltura/modules/extwidget/actions/playManifestAction.class.php @@ -722,10 +722,9 @@ private function serveHDNetwork() private function getLiveEntryBaseUrls() { $tag = null; - if(count($this->deliveryAttributes->getTags()) == 1) { - $tags = $this->deliveryAttributes->getTags(); + $tags = $this->deliveryAttributes->getTags(); + if(count($tags) == 1) $tag = reset($tags); - } $protocol = $this->deliveryAttributes->getMediaProtocol(); if(in_array($this->deliveryAttributes->getFormat(), self::$httpFormats) && !in_array($protocol, self::$httpProtocols)) @@ -953,5 +952,4 @@ public function execute() KExternalErrors::terminateDispatch(); $renderer->output($deliveryCode, $playbackContext); } - } diff --git a/alpha/lib/model/DeliveryProfilePeer.php b/alpha/lib/model/DeliveryProfilePeer.php index b7e44fc38d2..fd07e9b15a4 100644 --- a/alpha/lib/model/DeliveryProfilePeer.php +++ b/alpha/lib/model/DeliveryProfilePeer.php @@ -205,9 +205,9 @@ public static function getDeliveryByPartner(Partner $partner, $streamerType = Pl $delivery = self::selectByMediaProtocol($deliveries, $mediaProtocol); if($delivery) { - KalturaLog::debug('Delivery ID for partnerId: '. $partnerId . ' and streamer type: ' . $streamerType . ' is ' . $delivery->getId()); + KalturaLog::debug("Delivery ID for partnerId [$partnerId] and streamer type [$streamerType] is " . $delivery->getId()); } else { - KalturaLog::err('Delivery ID can\'t be determined for partnerId: '. $partnerId . ' ,streamer type: ' . $streamerType . " and media protocol : " . $mediaProtocol); + KalturaLog::err("Delivery ID can't be determined for partnerId [$partnerId] streamer type [$streamerType] and media protocol [$mediaProtocol]"); } return $delivery; } @@ -243,20 +243,20 @@ public static function getRemoteDeliveryByStorageId($storageProfileId, $entryId, $deliveryIds = $storageProfile->getDeliveryProfileIds(); if(!array_key_exists($streamerType, $deliveryIds)) { - KalturaLog::err('Delivery ID can\'t be determined for storageId: '. $storageProfileId . '( PartnerId:' . $storageProfile->getPartnerId() . ' ) and streamer type: ' . $streamerType); + KalturaLog::err("Delivery ID can't be determined for storageId [$storageProfileId] ( PartnerId [" . $storageProfile->getPartnerId() . "] ) and streamer type [ $streamerType ]"); return null; } $deliveries = DeliveryProfilePeer::retrieveByPKs($deliveryIds[$streamerType]); $delivery = self::selectByMediaProtocol($deliveries, $mediaProtocol); if($delivery) { - KalturaLog::debug('Delivery ID for storageId: '. $storageProfileId . '( PartnerId:' . $storageProfile->getPartnerId() . ' ) and streamer type:' . $streamerType . ' is ' . $delivery->getId()); + KalturaLog::debug("Delivery ID for storageId [$storageProfileId] ( PartnerId [" . $storageProfile->getPartnerId() . "] ) and streamer type [$streamerType] is " . $delivery->getId()); $delivery->setEntryId($entryId); $delivery->setStorageProfileId($storageProfileId); $delivery->initDeliveryDynamicAttributes($fileSync, $asset); } else { - KalturaLog::err('Delivery ID can\'t be determined for storageId: '. $storageProfileId . '( PartnerId:' . $storageProfile->getPartnerId() . ' ) ,streamer type: ' . $streamerType . " and media protocol : " . $mediaProtocol); + KalturaLog::err("Delivery ID can't be determined for storageId [$storageProfileId] ( PartnerId [" . $storageProfile->getPartnerId() . "] ) streamer type [$streamerType] and media protocol [$mediaProtocol]"); } return $delivery; @@ -317,10 +317,10 @@ public static function getLiveDeliveryProfileByHostName($cdnHost, $entryId, $str $deliveries = self::doSelect($c); $delivery = self::selectByMediaProtocol($deliveries, $mediaProtocol); if($delivery) { - KalturaLog::debug('Delivery ID for Host Name: '. $cdnHost . ' and streamer type: ' . $streamerType . ' is ' . $delivery->getId()); + KalturaLog::debug("Delivery ID for Host Name: [$cdnHost] and streamer type: [$streamerType] is [" . $delivery->getId()); $delivery->setEntryId($entryId); } else { - KalturaLog::err('Delivery ID can\'t be determined for Host Name: '. $cdnHost . ' and streamer type: ' . $streamerType); + KalturaLog::err("Delivery ID can't be determined for Host Name [$cdnHost] and streamer type [$streamerType]"); } return $delivery; @@ -374,9 +374,10 @@ protected static function getAllLiveDeliveryProfileTypes() $deliveryProfileTypes = array_merge($deliveryProfileTypes, self::$LIVE_DELIVERY_PROFILES); return $deliveryProfileTypes; } + public static function getCacheInvalidationKeys() { - return array(array("deliveryProfile:id=%s", self::ID), array("deliveryProfile:partnerId=%s", self::PARTNER_ID)); + return array(array("deliveryProfile:id=%s", self::ID), array("deliveryProfile:partnerId=%s", self::PARTNER_ID)); } } // DeliveryProfilePeer