mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-16 14:33:14 +00:00
Move URL etag from permalinks to media subdef urls
This commit is contained in:
@@ -146,15 +146,14 @@ class media_Permalink_Adapter implements media_Permalink_Interface, cache_cachea
|
||||
{
|
||||
$registry = registry::get_instance();
|
||||
|
||||
return sprintf('%spermalink/v1/%d/%d/%s/%s.%s?token=%s&etag=%s',
|
||||
return sprintf('%spermalink/v1/%d/%d/%s/%s.%s?token=%s',
|
||||
$registry->get('GV_ServerName'),
|
||||
$this->media_subdef->get_sbas_id(),
|
||||
$this->media_subdef->get_record_id(),
|
||||
$this->media_subdef->get_name(),
|
||||
$this->get_label(),
|
||||
pathinfo($this->media_subdef->get_file(), PATHINFO_EXTENSION),
|
||||
$this->get_token(),
|
||||
$this->media_subdef->getEtag()
|
||||
$this->get_token()
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -364,6 +364,14 @@ class media_subdef extends media_abstract implements cache_cacheableInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function get_url()
|
||||
{
|
||||
$url = parent::get_url();
|
||||
$etag = $this->getEtag();
|
||||
|
||||
return $url . ($etag ? '?etag=' . $etag : '');
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return int
|
||||
|
Reference in New Issue
Block a user