fallback for broken assets
This commit is contained in:
parent
4973f1087f
commit
852741cb6e
|
|
@ -5110,14 +5110,18 @@ function getAssetRender($id)
|
||||||
if ($assetinfo->AssetTypeId == 1 || $assetinfo->AssetTypeId == 22) //images and group emblems
|
if ($assetinfo->AssetTypeId == 1 || $assetinfo->AssetTypeId == 22) //images and group emblems
|
||||||
{
|
{
|
||||||
$assethash = $assetinfo->Hash;
|
$assethash = $assetinfo->Hash;
|
||||||
return constructThumbnailHashUrl($assethash);
|
if (file_exists($GLOBALS['thumbnailCDNPath'].$assethash)) {
|
||||||
|
return constructThumbnailHashUrl($assethash);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else //default to grab the assets ThumbHash
|
else //default to grab the assets ThumbHash
|
||||||
{
|
{
|
||||||
if (!empty($assetinfo->ThumbHash)) //if a render was ever performed
|
if (!empty($assetinfo->ThumbHash)) //if a render was ever performed
|
||||||
{
|
{
|
||||||
$thumbhash = $assetinfo->ThumbHash;
|
$thumbhash = $assetinfo->ThumbHash;
|
||||||
return constructRenderHashUrl($thumbhash);
|
if (file_exists($GLOBALS['renderCDNPath'].$thumbhash)) {
|
||||||
|
return constructRenderHashUrl($thumbhash);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue