mirror of
https://github.com/Terranom674/Piwigo_Bratonien_Tools.git
synced 2026-09-19 16:24:33 +00:00
Compare commits
13 Commits
fix/09723-
...
fix/09727-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e8f733646 | ||
|
|
de39d5849a | ||
|
|
73707433c5 | ||
|
|
dbc5e27693 | ||
|
|
91f0d0cac1 | ||
|
|
2c1c7ff499 | ||
|
|
3a15c2d03d | ||
|
|
2acdbc65a2 | ||
|
|
8510d9faad | ||
|
|
f21f19bd30 | ||
|
|
29990aee4f | ||
|
|
9c551c8dfc | ||
|
|
e5bc260622 |
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
Plugin Name: Bratonien Tools
|
||||
Version: 0.9.7.23
|
||||
Version: 0.9.7.27
|
||||
Description: Erweiterbare Administrationswerkzeuge fuer die Bratonien-Piwigo-Installation.
|
||||
Plugin URI: https://github.com/Terranom674/Piwigo_Bratonien_Tools
|
||||
Author: Bratonien
|
||||
|
||||
0
runtime/lib/piwigo-sync.php
Executable file → Normal file
0
runtime/lib/piwigo-sync.php
Executable file → Normal file
@@ -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