mirror of
https://github.com/Terranom674/Piwigo_Bratonien_Tools.git
synced 2026-11-12 00:07:37 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ca670549f8 | ||
|
|
531bffa973 | ||
|
|
5ed53dca8d |
No files matched your search
@@ -14,14 +14,13 @@ function bratonien_tools_filter_webdav_gallery_derivative_url($url, $params, $sr
|
|||||||
return $url;
|
return $url;
|
||||||
}
|
}
|
||||||
|
|
||||||
$derivative_path = '';
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$derivative = new DerivativeImage($params, $src_image);
|
$derivative = new DerivativeImage($params, $src_image);
|
||||||
if (!$derivative->same_as_source())
|
if (!$derivative->same_as_source())
|
||||||
{
|
{
|
||||||
$derivative_path = $derivative->get_path();
|
$path = $derivative->get_path();
|
||||||
if ($derivative_path !== '' && is_file($derivative_path) && is_readable($derivative_path))
|
if ($path !== '' && is_file($path) && is_readable($path))
|
||||||
{
|
{
|
||||||
return $url;
|
return $url;
|
||||||
}
|
}
|
||||||
@@ -29,37 +28,7 @@ function bratonien_tools_filter_webdav_gallery_derivative_url($url, $params, $sr
|
|||||||
}
|
}
|
||||||
catch (Throwable $e)
|
catch (Throwable $e)
|
||||||
{
|
{
|
||||||
error_log('Bratonien WebDAV derivative lookup #'.(int)$src_image->id.': '.$e->getMessage());
|
error_log('Bratonien WebDAV gallery derivative lookup #'.(int)$src_image->id.': '.$e->getMessage());
|
||||||
}
|
|
||||||
|
|
||||||
$script_name = basename((string)($_SERVER['SCRIPT_NAME'] ?? ''));
|
|
||||||
if ($script_name === 'picture.php' && function_exists('bratonien_tools_webdav_generate_derivative'))
|
|
||||||
{
|
|
||||||
$detail = '';
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (bratonien_tools_webdav_generate_derivative($params, $src_image, $detail))
|
|
||||||
{
|
|
||||||
if ($derivative_path === '')
|
|
||||||
{
|
|
||||||
$probe = new DerivativeImage($params, $src_image);
|
|
||||||
if (!$probe->same_as_source()) $derivative_path = $probe->get_path();
|
|
||||||
}
|
|
||||||
if ($derivative_path !== '' && is_file($derivative_path) && is_readable($derivative_path))
|
|
||||||
{
|
|
||||||
return $url;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Throwable $e)
|
|
||||||
{
|
|
||||||
$detail = get_class($e).': '.$e->getMessage();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($detail !== '')
|
|
||||||
{
|
|
||||||
error_log('Bratonien WebDAV picture derivative #'.(int)$src_image->id.': '.$detail);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$preview_url = bratonien_tools_webdav_image_url((int)$src_image->id, true);
|
$preview_url = bratonien_tools_webdav_image_url((int)$src_image->id, true);
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
Plugin Name: Bratonien Tools
|
Plugin Name: Bratonien Tools
|
||||||
Version: 0.9.7.9
|
Version: 0.9.7.8
|
||||||
Description: Erweiterbare Administrationswerkzeuge fuer die Bratonien-Piwigo-Installation.
|
Description: Erweiterbare Administrationswerkzeuge fuer die Bratonien-Piwigo-Installation.
|
||||||
Plugin URI: https://github.com/Terranom674/Piwigo_Bratonien_Tools
|
Plugin URI: https://github.com/Terranom674/Piwigo_Bratonien_Tools
|
||||||
Author: Bratonien
|
Author: Bratonien
|
||||||
|
|||||||
Reference in new issue
Block a user