mirror of
https://github.com/Terranom674/Piwigo_Bratonien_Tools.git
synced 2026-09-19 22:14:33 +00:00
Compare commits
3 Commits
fix/09723-
...
fix/09724-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29990aee4f | ||
|
|
9c551c8dfc | ||
|
|
e5bc260622 |
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
Plugin Name: Bratonien Tools
|
||||
Version: 0.9.7.23
|
||||
Version: 0.9.7.24
|
||||
Description: Erweiterbare Administrationswerkzeuge fuer die Bratonien-Piwigo-Installation.
|
||||
Plugin URI: https://github.com/Terranom674/Piwigo_Bratonien_Tools
|
||||
Author: Bratonien
|
||||
|
||||
@@ -52,6 +52,18 @@ if (!pwg_db_num_rows($access_result)) bratonien_tools_webdav_image_abort(403, 'K
|
||||
$source = bratonien_tools_webdav_image_source_info($image_id);
|
||||
if (!$source) bratonien_tools_webdav_image_abort(404, 'Keine WebDAV-Quelle für dieses Bild gefunden.');
|
||||
|
||||
if (!empty($_GET['ajaxload']))
|
||||
{
|
||||
$preview = !empty($_GET['preview']);
|
||||
$final_url = bratonien_tools_webdav_image_url($image_id, $preview);
|
||||
if (!$final_url) bratonien_tools_webdav_image_abort(404, 'Keine WebDAV-Bild-URL verfügbar.');
|
||||
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
header('Cache-Control: no-store, max-age=0');
|
||||
echo json_encode(array('url'=>$final_url), JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!empty($_GET['preview']))
|
||||
{
|
||||
$preview = bratonien_tools_webdav_preview_path($source);
|
||||
@@ -121,7 +133,7 @@ $options = array(
|
||||
CURLOPT_USERPWD => $user.':'.$password,
|
||||
CURLOPT_RETURNTRANSFER => false,
|
||||
CURLOPT_FAILONERROR => false,
|
||||
CURLOPT_USERAGENT => 'Bratonien-Tools-WebDAV-Image/0.9.7.16',
|
||||
CURLOPT_USERAGENT => 'Bratonien-Tools-WebDAV-Image/0.9.7.24',
|
||||
CURLOPT_HEADERFUNCTION => function($ch, $line)
|
||||
{
|
||||
$length = strlen($line);
|
||||
|
||||
Reference in New Issue
Block a user