|
@@ -33,11 +33,14 @@ if (!$sRemoteId) {
|
|
|
$aObject = $oStorage->getObjectData();
|
|
$aObject = $oStorage->getObjectData();
|
|
|
if ('Local' != $aObject['engine']) {
|
|
if ('Local' != $aObject['engine']) {
|
|
|
if (!($sUrl = $oStorage->getFileUrlByRemoteId($sFile))) {
|
|
if (!($sUrl = $oStorage->getFileUrlByRemoteId($sFile))) {
|
|
|
|
|
+
|
|
|
|
|
+ $sFile = preg_replace("/\.[A-Za-z0-9]+$/", '', $sFile);
|
|
|
|
|
+ $sUrl = $oStorage->getFileUrlByRemoteId($sFile);
|
|
|
|
|
+
|
|
|
// Tmp fix for storages renaming in the past
|
|
// Tmp fix for storages renaming in the past
|
|
|
- if ('bx_posts_files' == $sStorageObject && ($oStorage = BxDolStorage::getObjectInstance('bx_posts_covers'))) {
|
|
|
|
|
- $sFile = preg_replace("/\.[A-Za-z0-9]+$/", '', $sFile);
|
|
|
|
|
|
|
+ if (!$sUrl && 'bx_posts_files' == $sStorageObject && ($oStorage = BxDolStorage::getObjectInstance('bx_posts_covers')))
|
|
|
$sUrl = $oStorage->getFileUrlByRemoteId($sFile);
|
|
$sUrl = $oStorage->getFileUrlByRemoteId($sFile);
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
if (!$sUrl) {
|
|
if (!$sUrl) {
|
|
|
bx_storage_download_error_occured();
|
|
bx_storage_download_error_occured();
|
|
|
exit;
|
|
exit;
|