Skip to content
Permalink
Browse files

Updated SVG detection for Giovanni

  • Loading branch information...
markseu committed Mar 13, 2019
1 parent 5fa00ce commit 5345052a0bab4ac3a9e4476ab536cfc4d9f3baef
Showing with 4 additions and 4 deletions.
  1. +3 −3 features/core/core.php
  2. +1 −1 features/core/extension.ini
  3. BIN zip/core.zip
@@ -2976,9 +2976,9 @@ public function detectImageInformation($fileName, $fileType = "") {
$dataBufferSizeMax = filesize($fileName);
$dataBufferSize = min($dataBufferSizeMax, 4096);
if ($dataBufferSize) $dataBuffer = fread($fileHandle, $dataBufferSize);
if (!feof($fileHandle) && preg_match("/<svg (.*?)>/", $dataBuffer, $matches)) {
if (preg_match("/ width=\"(\d+)\"/", $matches[1], $tokens)) $width = $tokens[1];
if (preg_match("/ height=\"(\d+)\"/", $matches[1], $tokens)) $height = $tokens[1];
if (!feof($fileHandle) && preg_match("/<svg\s(.*?)>/s", $dataBuffer, $matches)) {
if (preg_match("/\swidth=\"(\d+)\"/s", $matches[1], $tokens)) $width = $tokens[1];
if (preg_match("/\sheight=\"(\d+)\"/s", $matches[1], $tokens)) $height = $tokens[1];
$type = $fileType;
}
}
@@ -3,7 +3,7 @@
Extension: Core
Version: 0.8.2
Description: Core functionality for your website.
Published: 2019-02-25 21:07:37
Published: 2019-03-13 09:45:35
Developer: Datenstrom

Core/core.php: system/extensions/core.php,create,update
BIN +1 Byte (100%) zip/core.zip
Binary file not shown.

0 comments on commit 5345052

Please sign in to comment.
You can’t perform that action at this time.