mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 06:53:15 +00:00
Download elements without watermark when pushed
This commit is contained in:
@@ -535,10 +535,8 @@ class set_export extends set_abstract
|
||||
'path' => $sd[$name]->get_path()
|
||||
, 'file' => $sd[$name]->get_file()
|
||||
);
|
||||
if (!$user->ACL()->has_right_on_base(
|
||||
$download_element->get_base_id()
|
||||
, "nowatermark"
|
||||
)
|
||||
if (!$user->ACL()->has_right_on_base($download_element->get_base_id(), "nowatermark")
|
||||
&& !$user->ACL()->has_preview_grant($download_element)
|
||||
&& $sd[$name]->get_type() == media_subdef::TYPE_IMAGE)
|
||||
{
|
||||
$path = recordutils_image::watermark(
|
||||
@@ -951,11 +949,12 @@ class set_export extends set_abstract
|
||||
|
||||
if (is_file($file))
|
||||
{
|
||||
$testPath = function($file, $registry){
|
||||
return strpos($file, $registry->get('GV_RootPath').'tmp/download/') !== false
|
||||
|| strpos($file, $registry->get('GV_RootPath').'tmp/lazaret/') !== false
|
||||
$testPath = function($file, $registry)
|
||||
{
|
||||
return strpos($file, $registry->get('GV_RootPath') . 'tmp/download/') !== false
|
||||
|| strpos($file, $registry->get('GV_RootPath') . 'tmp/lazaret/') !== false
|
||||
|| strpos($file, $registry->get('GV_X_Accel_Redirect')) !== false;
|
||||
};
|
||||
};
|
||||
|
||||
if ($registry->get('GV_modxsendfile') && $testPath($file, $registry))
|
||||
{
|
||||
|
Reference in New Issue
Block a user