|
|
@@ -186,22 +186,39 @@ class BxBaseModGeneralTemplate extends BxDolModuleTemplate
|
|
|
));
|
|
|
}
|
|
|
|
|
|
- protected function getAttachments ($sStorage, $aData, $aParams = array())
|
|
|
+ protected function getAttachmentsImagesTranscoders ()
|
|
|
{
|
|
|
$CNF = &$this->getModule()->_oConfig->CNF;
|
|
|
|
|
|
- $oStorage = BxDolStorage::getObjectInstance($sStorage);
|
|
|
$oTranscoder = BxDolTranscoderImage::getObjectInstance($CNF['OBJECT_IMAGES_TRANSCODER_PREVIEW']);
|
|
|
$oTranscoderPreview = isset($CNF['OBJECT_IMAGES_TRANSCODER_PICTURE']) && $CNF['OBJECT_IMAGES_TRANSCODER_PICTURE'] ? BxDolTranscoderImage::getObjectInstance($CNF['OBJECT_IMAGES_TRANSCODER_PICTURE']) : null;
|
|
|
- $aTranscodersVideo = false;
|
|
|
+
|
|
|
+ return array($oTranscoder, $oTranscoderPreview);
|
|
|
+ }
|
|
|
+
|
|
|
+ protected function getAttachmentsVideoTranscoders ()
|
|
|
+ {
|
|
|
+ $CNF = &$this->getModule()->_oConfig->CNF;
|
|
|
|
|
|
if (isset($CNF['OBJECT_VIDEOS_TRANSCODERS']) && $CNF['OBJECT_VIDEOS_TRANSCODERS'])
|
|
|
- $aTranscodersVideo = array (
|
|
|
+ return array (
|
|
|
'poster' => BxDolTranscoderImage::getObjectInstance($CNF['OBJECT_VIDEOS_TRANSCODERS']['poster']),
|
|
|
'mp4' => BxDolTranscoderImage::getObjectInstance($CNF['OBJECT_VIDEOS_TRANSCODERS']['mp4']),
|
|
|
'webm' => BxDolTranscoderImage::getObjectInstance($CNF['OBJECT_VIDEOS_TRANSCODERS']['webm']),
|
|
|
);
|
|
|
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ protected function getAttachments ($sStorage, $aData, $aParams = array())
|
|
|
+ {
|
|
|
+ $CNF = &$this->getModule()->_oConfig->CNF;
|
|
|
+
|
|
|
+ $oStorage = BxDolStorage::getObjectInstance($sStorage);
|
|
|
+
|
|
|
+ list($oTranscoder, $oTranscoderPreview) = $this->getAttachmentsImagesTranscoders();
|
|
|
+ $aTranscodersVideo = $this->getAttachmentsVideoTranscoders();
|
|
|
+
|
|
|
$aGhostFiles = $oStorage->getGhosts ($this->getModule()->serviceGetContentOwnerProfileId($aData[$CNF['FIELD_ID']]), $aData[$CNF['FIELD_ID']]);
|
|
|
if (!$aGhostFiles)
|
|
|
return false;
|