mirror of
https://github.com/mosbth/cimage.git
synced 2025-08-30 19:09:51 +02:00
Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
4c0ac8ed23 | ||
|
39b86628db | ||
|
5f4280d387 | ||
|
dd315dbd21 | ||
|
493118e1c5 | ||
|
e41b3d9877 | ||
|
bb60001c36 | ||
|
adeca3f9f9 | ||
|
a5662690fe | ||
|
3cfa9a6a98 | ||
|
4ecebcd5b4 | ||
|
9196d1ee41 | ||
|
0249056761 |
@@ -2793,18 +2793,18 @@ class CImage
|
|||||||
$lastModified = filemtime($this->pathToImage);
|
$lastModified = filemtime($this->pathToImage);
|
||||||
$details['srcGmdate'] = gmdate("D, d M Y H:i:s", $lastModified);
|
$details['srcGmdate'] = gmdate("D, d M Y H:i:s", $lastModified);
|
||||||
|
|
||||||
$details['cache'] = basename($this->cacheFileName);
|
$details['cache'] = basename($this->cacheFileName ?? "");
|
||||||
$lastModified = filemtime($this->cacheFileName);
|
$lastModified = filemtime($this->cacheFileName ?? "");
|
||||||
$details['cacheGmdate'] = gmdate("D, d M Y H:i:s", $lastModified);
|
$details['cacheGmdate'] = gmdate("D, d M Y H:i:s", $lastModified);
|
||||||
|
|
||||||
$this->load($file);
|
$this->load($file);
|
||||||
|
|
||||||
$details['filename'] = basename($file);
|
$details['filename'] = basename($file ?? "");
|
||||||
$details['mimeType'] = $this->getMimeType($this->fileType);
|
$details['mimeType'] = $this->getMimeType($this->fileType);
|
||||||
$details['width'] = $this->width;
|
$details['width'] = $this->width;
|
||||||
$details['height'] = $this->height;
|
$details['height'] = $this->height;
|
||||||
$details['aspectRatio'] = round($this->width / $this->height, 3);
|
$details['aspectRatio'] = round($this->width / $this->height, 3);
|
||||||
$details['size'] = filesize($file);
|
$details['size'] = filesize($file ?? "");
|
||||||
$details['colors'] = $this->colorsTotal($this->image);
|
$details['colors'] = $this->colorsTotal($this->image);
|
||||||
$details['includedFiles'] = count(get_included_files());
|
$details['includedFiles'] = count(get_included_files());
|
||||||
$details['memoryPeek'] = round(memory_get_peak_usage()/1024/1024, 3) . " MB" ;
|
$details['memoryPeek'] = round(memory_get_peak_usage()/1024/1024, 3) . " MB" ;
|
||||||
|
26
REVISION.md
26
REVISION.md
@@ -5,6 +5,32 @@ Revision history
|
|||||||
[](https://scrutinizer-ci.com/g/mosbth/cimage/build-status/master)
|
[](https://scrutinizer-ci.com/g/mosbth/cimage/build-status/master)
|
||||||
|
|
||||||
|
|
||||||
|
v0.8.3 (2022-05-24)
|
||||||
|
-------------------------------------
|
||||||
|
|
||||||
|
* Support PHP 8.1 and remove deprecated messages when run in in development mode.
|
||||||
|
* Generate prebuilt all include files for various settings
|
||||||
|
* Fix deprecated for PHP 8.1
|
||||||
|
* Fix deprecated for PHP 8.1
|
||||||
|
* Add php version as output in verbose mode
|
||||||
|
* Add PHP 81 as test environment
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
v0.8.2 (2021-10-27)
|
||||||
|
-------------------------------------
|
||||||
|
|
||||||
|
* Remove bad configuration.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
v0.8.1 (2020-06-08)
|
||||||
|
-------------------------------------
|
||||||
|
|
||||||
|
* Updated version number in define.php.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
v0.8.0 (2020-06-08)
|
v0.8.0 (2020-06-08)
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
|
|
||||||
|
6
SECURITY.md
Normal file
6
SECURITY.md
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
Security policy
|
||||||
|
======================
|
||||||
|
|
||||||
|
To report security vulnerabilities in the project, send en email to mikael.t.h.roos@gmail.com.
|
||||||
|
|
||||||
|
For other security related issues, please open an issue on the project.
|
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
// Version of cimage and img.php
|
// Version of cimage and img.php
|
||||||
define("CIMAGE_VERSION", "v0.7.23 (2020-05-06)");
|
define("CIMAGE_VERSION", "v0.8.3 (2022-05-24)");
|
||||||
|
|
||||||
// For CRemoteImage
|
// For CRemoteImage
|
||||||
define("CIMAGE_USER_AGENT", "CImage/" . CIMAGE_VERSION);
|
define("CIMAGE_USER_AGENT", "CImage/" . CIMAGE_VERSION);
|
||||||
|
88
docker-compose.yaml
Normal file
88
docker-compose.yaml
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
version: "3"
|
||||||
|
services:
|
||||||
|
cli:
|
||||||
|
image: anax/dev
|
||||||
|
volumes: [ ".:/home/anax/repo" ]
|
||||||
|
|
||||||
|
apache:
|
||||||
|
image: anax/dev:apache
|
||||||
|
volumes: [ ".:/home/anax/repo" ]
|
||||||
|
ports: [ "11000:80" ]
|
||||||
|
|
||||||
|
remserver:
|
||||||
|
image: anax/dev:apache
|
||||||
|
ports:
|
||||||
|
- "8090:80"
|
||||||
|
volumes: [ ".:/home/anax/repo" ]
|
||||||
|
|
||||||
|
php81:
|
||||||
|
image: anax/dev:php81
|
||||||
|
volumes: [ ".:/home/anax/repo" ]
|
||||||
|
|
||||||
|
php81-apache:
|
||||||
|
image: anax/dev:php81-apache
|
||||||
|
ports: [ "11081:80" ]
|
||||||
|
volumes: [ ".:/home/anax/repo" ]
|
||||||
|
|
||||||
|
php80:
|
||||||
|
image: anax/dev:php80
|
||||||
|
volumes: [ ".:/home/anax/repo" ]
|
||||||
|
|
||||||
|
php80-apache:
|
||||||
|
image: anax/dev:php80-apache
|
||||||
|
ports: [ "11080:80" ]
|
||||||
|
volumes: [ ".:/home/anax/repo" ]
|
||||||
|
|
||||||
|
php74:
|
||||||
|
image: anax/dev:php74
|
||||||
|
volumes: [ ".:/home/anax/repo" ]
|
||||||
|
|
||||||
|
php74-apache:
|
||||||
|
image: anax/dev:php74-apache
|
||||||
|
ports: [ "11074:80" ]
|
||||||
|
volumes: [ ".:/home/anax/repo" ]
|
||||||
|
|
||||||
|
php73:
|
||||||
|
image: anax/dev:php73
|
||||||
|
volumes: [ ".:/home/anax/repo" ]
|
||||||
|
|
||||||
|
php73-apache:
|
||||||
|
image: anax/dev:php73-apache
|
||||||
|
ports: [ "11073:80" ]
|
||||||
|
volumes: [ ".:/home/anax/repo" ]
|
||||||
|
|
||||||
|
php72:
|
||||||
|
image: anax/dev:php72
|
||||||
|
volumes: [ ".:/home/anax/repo" ]
|
||||||
|
|
||||||
|
php72-apache:
|
||||||
|
image: anax/dev:php72-apache
|
||||||
|
ports: [ "11072:80" ]
|
||||||
|
volumes: [ ".:/home/anax/repo" ]
|
||||||
|
|
||||||
|
php71:
|
||||||
|
image: anax/dev:php71
|
||||||
|
volumes: [ ".:/home/anax/repo" ]
|
||||||
|
|
||||||
|
php71-apache:
|
||||||
|
image: anax/dev:php71-apache
|
||||||
|
ports: [ "11071:80" ]
|
||||||
|
volumes: [ ".:/home/anax/repo" ]
|
||||||
|
|
||||||
|
php70:
|
||||||
|
image: anax/dev:php70
|
||||||
|
volumes: [ ".:/home/anax/repo" ]
|
||||||
|
|
||||||
|
php70:
|
||||||
|
image: anax/dev:php70-apache
|
||||||
|
ports: [ "11070:80" ]
|
||||||
|
volumes: [ ".:/home/anax/repo" ]
|
||||||
|
|
||||||
|
php56:
|
||||||
|
image: anax/dev:php56
|
||||||
|
volumes: [ ".:/home/anax/repo" ]
|
||||||
|
|
||||||
|
php56:
|
||||||
|
image: anax/dev:php56-apache
|
||||||
|
ports: [ "11056:80" ]
|
||||||
|
volumes: [ ".:/home/anax/repo" ]
|
@@ -1,30 +0,0 @@
|
|||||||
version: "3"
|
|
||||||
services:
|
|
||||||
php74:
|
|
||||||
image: anax/dev:php74-apache
|
|
||||||
ports:
|
|
||||||
- "8074:80"
|
|
||||||
volumes:
|
|
||||||
- .:/home/anax/repo
|
|
||||||
|
|
||||||
php71:
|
|
||||||
image: cimage/php71-apache:latest
|
|
||||||
#build: .
|
|
||||||
ports:
|
|
||||||
- "8071:80"
|
|
||||||
volumes:
|
|
||||||
- ./:/var/www/html/
|
|
||||||
php70:
|
|
||||||
image: cimage/php70-apache:latest
|
|
||||||
#build: .
|
|
||||||
ports:
|
|
||||||
- "8070:80"
|
|
||||||
volumes:
|
|
||||||
- .:/var/www/html
|
|
||||||
php56:
|
|
||||||
image: cimage/php56-apache:latest
|
|
||||||
#build: .
|
|
||||||
ports:
|
|
||||||
- "8056:80"
|
|
||||||
volumes:
|
|
||||||
- .:/var/www/html
|
|
@@ -3,6 +3,12 @@
|
|||||||
<head>
|
<head>
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
function e($str) {
|
||||||
|
return htmlspecialchars($str, ENT_QUOTES, 'UTF-8');
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
body {
|
body {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,15 +134,15 @@ if (isset($_GET['input1'])) {
|
|||||||
// Use incoming from querystring as defaults
|
// Use incoming from querystring as defaults
|
||||||
?>
|
?>
|
||||||
CImage.compare({
|
CImage.compare({
|
||||||
"input1": "<?=$_GET['input1']?>",
|
"input1": "<?=e($_GET['input1'])?>",
|
||||||
"input2": "<?=$_GET['input2']?>",
|
"input2": "<?=e($_GET['input2'])?>",
|
||||||
"input3": "<?=$_GET['input3']?>",
|
"input3": "<?=e($_GET['input3'])?>",
|
||||||
"input4": "<?=$_GET['input4']?>",
|
"input4": "<?=e($_GET['input4'])?>",
|
||||||
"input5": "<?=$_GET['input5']?>",
|
"input5": "<?=e($_GET['input5'])?>",
|
||||||
"input6": "<?=$_GET['input6']?>",
|
"input6": "<?=e($_GET['input6'])?>",
|
||||||
"json": <?=$_GET['json']?>,
|
"json": <?=e($_GET['json'])?>,
|
||||||
"stack": <?=$_GET['stack']?>,
|
"stack": <?=e($_GET['stack'])?>,
|
||||||
"bg": <?=$_GET['bg']?>
|
"bg": <?=e($_GET['bg'])?>
|
||||||
});
|
});
|
||||||
<?php
|
<?php
|
||||||
} elseif (isset($script)) {
|
} elseif (isset($script)) {
|
||||||
|
@@ -186,7 +186,7 @@ $hotlinkingWhitelist = getConfig('hotlinking_whitelist', array());
|
|||||||
|
|
||||||
$serverName = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : null;
|
$serverName = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : null;
|
||||||
$referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null;
|
$referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null;
|
||||||
$refererHost = parse_url($referer, PHP_URL_HOST);
|
$refererHost = parse_url($referer ?? "", PHP_URL_HOST);
|
||||||
|
|
||||||
if (!$allowHotlinking) {
|
if (!$allowHotlinking) {
|
||||||
if ($passwordMatch) {
|
if ($passwordMatch) {
|
||||||
@@ -323,7 +323,7 @@ $srcImage = urldecode(get('src'))
|
|||||||
or errorPage('Must set src-attribute.', 404);
|
or errorPage('Must set src-attribute.', 404);
|
||||||
|
|
||||||
// Get settings for src-alt as backup image
|
// Get settings for src-alt as backup image
|
||||||
$srcAltImage = urldecode(get('src-alt', null));
|
$srcAltImage = urldecode(get('src-alt', ""));
|
||||||
$srcAltConfig = getConfig('src_alt', null);
|
$srcAltConfig = getConfig('src_alt', null);
|
||||||
if (empty($srcAltImage)) {
|
if (empty($srcAltImage)) {
|
||||||
$srcAltImage = $srcAltConfig;
|
$srcAltImage = $srcAltConfig;
|
||||||
@@ -1149,7 +1149,8 @@ EOD;
|
|||||||
/**
|
/**
|
||||||
* Load, process and output the image
|
* Load, process and output the image
|
||||||
*/
|
*/
|
||||||
$img->log("Incoming arguments: " . print_r(verbose(), 1))
|
$img->log("PHP version: " . phpversion())
|
||||||
|
->log("Incoming arguments: " . print_r(verbose(), 1))
|
||||||
->setSaveFolder($cachePath)
|
->setSaveFolder($cachePath)
|
||||||
->useCache($useCache)
|
->useCache($useCache)
|
||||||
->setSource($srcImage, $imagePath)
|
->setSource($srcImage, $imagePath)
|
||||||
|
@@ -116,7 +116,7 @@ return array(
|
|||||||
* password_type: 'text' // use plain password, not encoded,
|
* password_type: 'text' // use plain password, not encoded,
|
||||||
*/
|
*/
|
||||||
//'password_always' => false, // always require password,
|
//'password_always' => false, // always require password,
|
||||||
'password' => "moped", // "secret-password",
|
//'password' => "moped", // "secret-password",
|
||||||
//'password_type' => 'text', // supports 'text', 'md5', 'hash',
|
//'password_type' => 'text', // supports 'text', 'md5', 'hash',
|
||||||
|
|
||||||
|
|
||||||
@@ -490,9 +490,10 @@ return array(
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default options using interlaced progressive JPEG images. Set to true to
|
* Default options for creating interlaced progressive JPEG images. Set
|
||||||
* always render jpeg images as interlaced. This setting can be overridden
|
* to true to always render jpeg images as interlaced. This setting can
|
||||||
* by using `?interlace=true` or `?interlace=false`.
|
* be overridden by using `?interlace`, `?interlace=true` or
|
||||||
|
* `?interlace=false`.
|
||||||
*
|
*
|
||||||
* Default values are:
|
* Default values are:
|
||||||
* interlace: false
|
* interlace: false
|
||||||
|
@@ -38,7 +38,7 @@ $config = array(
|
|||||||
|
|
||||||
|
|
||||||
// Version of cimage and img.php
|
// Version of cimage and img.php
|
||||||
define("CIMAGE_VERSION", "v0.7.23 (2020-05-06)");
|
define("CIMAGE_VERSION", "v0.8.3 (2022-05-24)");
|
||||||
|
|
||||||
// For CRemoteImage
|
// For CRemoteImage
|
||||||
define("CIMAGE_USER_AGENT", "CImage/" . CIMAGE_VERSION);
|
define("CIMAGE_USER_AGENT", "CImage/" . CIMAGE_VERSION);
|
||||||
@@ -3930,18 +3930,18 @@ class CImage
|
|||||||
$lastModified = filemtime($this->pathToImage);
|
$lastModified = filemtime($this->pathToImage);
|
||||||
$details['srcGmdate'] = gmdate("D, d M Y H:i:s", $lastModified);
|
$details['srcGmdate'] = gmdate("D, d M Y H:i:s", $lastModified);
|
||||||
|
|
||||||
$details['cache'] = basename($this->cacheFileName);
|
$details['cache'] = basename($this->cacheFileName ?? "");
|
||||||
$lastModified = filemtime($this->cacheFileName);
|
$lastModified = filemtime($this->cacheFileName ?? "");
|
||||||
$details['cacheGmdate'] = gmdate("D, d M Y H:i:s", $lastModified);
|
$details['cacheGmdate'] = gmdate("D, d M Y H:i:s", $lastModified);
|
||||||
|
|
||||||
$this->load($file);
|
$this->load($file);
|
||||||
|
|
||||||
$details['filename'] = basename($file);
|
$details['filename'] = basename($file ?? "");
|
||||||
$details['mimeType'] = $this->getMimeType($this->fileType);
|
$details['mimeType'] = $this->getMimeType($this->fileType);
|
||||||
$details['width'] = $this->width;
|
$details['width'] = $this->width;
|
||||||
$details['height'] = $this->height;
|
$details['height'] = $this->height;
|
||||||
$details['aspectRatio'] = round($this->width / $this->height, 3);
|
$details['aspectRatio'] = round($this->width / $this->height, 3);
|
||||||
$details['size'] = filesize($file);
|
$details['size'] = filesize($file ?? "");
|
||||||
$details['colors'] = $this->colorsTotal($this->image);
|
$details['colors'] = $this->colorsTotal($this->image);
|
||||||
$details['includedFiles'] = count(get_included_files());
|
$details['includedFiles'] = count(get_included_files());
|
||||||
$details['memoryPeek'] = round(memory_get_peak_usage()/1024/1024, 3) . " MB" ;
|
$details['memoryPeek'] = round(memory_get_peak_usage()/1024/1024, 3) . " MB" ;
|
||||||
@@ -4624,7 +4624,7 @@ $hotlinkingWhitelist = getConfig('hotlinking_whitelist', array());
|
|||||||
|
|
||||||
$serverName = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : null;
|
$serverName = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : null;
|
||||||
$referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null;
|
$referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null;
|
||||||
$refererHost = parse_url($referer, PHP_URL_HOST);
|
$refererHost = parse_url($referer ?? "", PHP_URL_HOST);
|
||||||
|
|
||||||
if (!$allowHotlinking) {
|
if (!$allowHotlinking) {
|
||||||
if ($passwordMatch) {
|
if ($passwordMatch) {
|
||||||
@@ -4761,7 +4761,7 @@ $srcImage = urldecode(get('src'))
|
|||||||
or errorPage('Must set src-attribute.', 404);
|
or errorPage('Must set src-attribute.', 404);
|
||||||
|
|
||||||
// Get settings for src-alt as backup image
|
// Get settings for src-alt as backup image
|
||||||
$srcAltImage = urldecode(get('src-alt', null));
|
$srcAltImage = urldecode(get('src-alt', ""));
|
||||||
$srcAltConfig = getConfig('src_alt', null);
|
$srcAltConfig = getConfig('src_alt', null);
|
||||||
if (empty($srcAltImage)) {
|
if (empty($srcAltImage)) {
|
||||||
$srcAltImage = $srcAltConfig;
|
$srcAltImage = $srcAltConfig;
|
||||||
@@ -5587,7 +5587,8 @@ EOD;
|
|||||||
/**
|
/**
|
||||||
* Load, process and output the image
|
* Load, process and output the image
|
||||||
*/
|
*/
|
||||||
$img->log("Incoming arguments: " . print_r(verbose(), 1))
|
$img->log("PHP version: " . phpversion())
|
||||||
|
->log("Incoming arguments: " . print_r(verbose(), 1))
|
||||||
->setSaveFolder($cachePath)
|
->setSaveFolder($cachePath)
|
||||||
->useCache($useCache)
|
->useCache($useCache)
|
||||||
->setSource($srcImage, $imagePath)
|
->setSource($srcImage, $imagePath)
|
||||||
|
@@ -38,7 +38,7 @@ $config = array(
|
|||||||
|
|
||||||
|
|
||||||
// Version of cimage and img.php
|
// Version of cimage and img.php
|
||||||
define("CIMAGE_VERSION", "v0.7.23 (2020-05-06)");
|
define("CIMAGE_VERSION", "v0.8.3 (2022-05-24)");
|
||||||
|
|
||||||
// For CRemoteImage
|
// For CRemoteImage
|
||||||
define("CIMAGE_USER_AGENT", "CImage/" . CIMAGE_VERSION);
|
define("CIMAGE_USER_AGENT", "CImage/" . CIMAGE_VERSION);
|
||||||
@@ -3930,18 +3930,18 @@ class CImage
|
|||||||
$lastModified = filemtime($this->pathToImage);
|
$lastModified = filemtime($this->pathToImage);
|
||||||
$details['srcGmdate'] = gmdate("D, d M Y H:i:s", $lastModified);
|
$details['srcGmdate'] = gmdate("D, d M Y H:i:s", $lastModified);
|
||||||
|
|
||||||
$details['cache'] = basename($this->cacheFileName);
|
$details['cache'] = basename($this->cacheFileName ?? "");
|
||||||
$lastModified = filemtime($this->cacheFileName);
|
$lastModified = filemtime($this->cacheFileName ?? "");
|
||||||
$details['cacheGmdate'] = gmdate("D, d M Y H:i:s", $lastModified);
|
$details['cacheGmdate'] = gmdate("D, d M Y H:i:s", $lastModified);
|
||||||
|
|
||||||
$this->load($file);
|
$this->load($file);
|
||||||
|
|
||||||
$details['filename'] = basename($file);
|
$details['filename'] = basename($file ?? "");
|
||||||
$details['mimeType'] = $this->getMimeType($this->fileType);
|
$details['mimeType'] = $this->getMimeType($this->fileType);
|
||||||
$details['width'] = $this->width;
|
$details['width'] = $this->width;
|
||||||
$details['height'] = $this->height;
|
$details['height'] = $this->height;
|
||||||
$details['aspectRatio'] = round($this->width / $this->height, 3);
|
$details['aspectRatio'] = round($this->width / $this->height, 3);
|
||||||
$details['size'] = filesize($file);
|
$details['size'] = filesize($file ?? "");
|
||||||
$details['colors'] = $this->colorsTotal($this->image);
|
$details['colors'] = $this->colorsTotal($this->image);
|
||||||
$details['includedFiles'] = count(get_included_files());
|
$details['includedFiles'] = count(get_included_files());
|
||||||
$details['memoryPeek'] = round(memory_get_peak_usage()/1024/1024, 3) . " MB" ;
|
$details['memoryPeek'] = round(memory_get_peak_usage()/1024/1024, 3) . " MB" ;
|
||||||
@@ -4624,7 +4624,7 @@ $hotlinkingWhitelist = getConfig('hotlinking_whitelist', array());
|
|||||||
|
|
||||||
$serverName = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : null;
|
$serverName = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : null;
|
||||||
$referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null;
|
$referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null;
|
||||||
$refererHost = parse_url($referer, PHP_URL_HOST);
|
$refererHost = parse_url($referer ?? "", PHP_URL_HOST);
|
||||||
|
|
||||||
if (!$allowHotlinking) {
|
if (!$allowHotlinking) {
|
||||||
if ($passwordMatch) {
|
if ($passwordMatch) {
|
||||||
@@ -4761,7 +4761,7 @@ $srcImage = urldecode(get('src'))
|
|||||||
or errorPage('Must set src-attribute.', 404);
|
or errorPage('Must set src-attribute.', 404);
|
||||||
|
|
||||||
// Get settings for src-alt as backup image
|
// Get settings for src-alt as backup image
|
||||||
$srcAltImage = urldecode(get('src-alt', null));
|
$srcAltImage = urldecode(get('src-alt', ""));
|
||||||
$srcAltConfig = getConfig('src_alt', null);
|
$srcAltConfig = getConfig('src_alt', null);
|
||||||
if (empty($srcAltImage)) {
|
if (empty($srcAltImage)) {
|
||||||
$srcAltImage = $srcAltConfig;
|
$srcAltImage = $srcAltConfig;
|
||||||
@@ -5587,7 +5587,8 @@ EOD;
|
|||||||
/**
|
/**
|
||||||
* Load, process and output the image
|
* Load, process and output the image
|
||||||
*/
|
*/
|
||||||
$img->log("Incoming arguments: " . print_r(verbose(), 1))
|
$img->log("PHP version: " . phpversion())
|
||||||
|
->log("Incoming arguments: " . print_r(verbose(), 1))
|
||||||
->setSaveFolder($cachePath)
|
->setSaveFolder($cachePath)
|
||||||
->useCache($useCache)
|
->useCache($useCache)
|
||||||
->setSource($srcImage, $imagePath)
|
->setSource($srcImage, $imagePath)
|
||||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user