mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
Update media subdef
This commit is contained in:
@@ -280,7 +280,7 @@ class media_subdef extends media_abstract implements cache_cacheableInterface
|
|||||||
$this->height = 256;
|
$this->height = 256;
|
||||||
$this->path = $registry->get('GV_RootPath') . 'www/skins/icons/substitution/';
|
$this->path = $registry->get('GV_RootPath') . 'www/skins/icons/substitution/';
|
||||||
$this->file = 'regroup_thumb.png';
|
$this->file = 'regroup_thumb.png';
|
||||||
$this->is_substituted = true;
|
$this->url = '/skins/icons/substitution/regroup_thumb.png';
|
||||||
} else {
|
} else {
|
||||||
$mime = $this->record->get_mime();
|
$mime = $this->record->get_mime();
|
||||||
$mime = trim($mime) != '' ? str_replace('/', '_', $mime) : 'application_octet-stream';
|
$mime = trim($mime) != '' ? str_replace('/', '_', $mime) : 'application_octet-stream';
|
||||||
@@ -290,7 +290,7 @@ class media_subdef extends media_abstract implements cache_cacheableInterface
|
|||||||
$this->height = 256;
|
$this->height = 256;
|
||||||
$this->path = $registry->get('GV_RootPath') . 'www/skins/icons/substitution/';
|
$this->path = $registry->get('GV_RootPath') . 'www/skins/icons/substitution/';
|
||||||
$this->file = str_replace('+', '%20', $mime) . '.png';
|
$this->file = str_replace('+', '%20', $mime) . '.png';
|
||||||
$this->is_substituted = true;
|
$this->url = '/skins/icons/substitution/' . $this->file;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->is_physically_present = false;
|
$this->is_physically_present = false;
|
||||||
@@ -298,7 +298,7 @@ class media_subdef extends media_abstract implements cache_cacheableInterface
|
|||||||
if ( ! file_exists($this->path . $this->file)) {
|
if ( ! file_exists($this->path . $this->file)) {
|
||||||
$this->path = $registry->get('GV_RootPath') . 'www/skins/icons/';
|
$this->path = $registry->get('GV_RootPath') . 'www/skins/icons/';
|
||||||
$this->file = 'substitution.png';
|
$this->file = 'substitution.png';
|
||||||
$this->is_substituted = true;
|
$this->url = '/skins/icons/substitution/' . $this->file;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
@@ -716,6 +716,10 @@ class media_subdef extends media_abstract implements cache_cacheableInterface
|
|||||||
*/
|
*/
|
||||||
protected function generate_url()
|
protected function generate_url()
|
||||||
{
|
{
|
||||||
|
if ( ! $this->is_physically_present()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (in_array($this->mime, array('video/mp4'))) {
|
if (in_array($this->mime, array('video/mp4'))) {
|
||||||
$token = p4file::apache_tokenize($this->get_pathfile());
|
$token = p4file::apache_tokenize($this->get_pathfile());
|
||||||
if ($token) {
|
if ($token) {
|
||||||
|
Reference in New Issue
Block a user