From 9b71bae4a1f9ab073724c7ec1290a8de6311ee86 Mon Sep 17 00:00:00 2001 From: Nils Asmussen Date: Sat, 6 Aug 2016 16:00:48 +0200 Subject: [PATCH] Added warning if Imagick is not installed/enabled. If GD is used instead of Imagick, rotating uploaded pictures leads to a loss of their metadata. Since this is unexpected and maybe a problem, the diagnostics should show a warning. This commit displays a warning if it's either not installed or not enabled in settings. --- plugins/Diagnostics/index.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/Diagnostics/index.php b/plugins/Diagnostics/index.php index ff4cd4d..eee1058 100644 --- a/plugins/Diagnostics/index.php +++ b/plugins/Diagnostics/index.php @@ -99,6 +99,10 @@ if (empty(ini_get('allow_url_fopen'))) echo('Warning: You may experience problem // Check mysql version if ($database->server_version<50500) echo('Warning: Lychee uses the GBK charset to avoid sql injections on your MySQL version. Please update to MySQL 5.5 or higher to enable UTF-8 support.' . PHP_EOL); +// Check imagick +if (!extension_loaded('imagick')) echo('Warning: Pictures that are rotated lose their metadata! Please install Imagick to avoid that.' . PHP_EOL); +else if (!$settings['imagick']) echo('Warning: Pictures that are rotated lose their metadata! Please enable Imagick in settings to avoid that.' . PHP_EOL); + // Output if ($error==='') echo('No critical problems found. Lychee should work without problems!' . PHP_EOL); else echo $error;