1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-17 20:11:46 +02:00

added a verbose debug method

that can be called manually on every imagevariation and with individual options array.
This commit is contained in:
horst-n
2019-04-27 00:36:42 +02:00
parent ebe7a5d80f
commit 8da54040d4

View File

@@ -1942,12 +1942,12 @@ class Pageimage extends Pagefile {
$indents = array_map('strlen', $lines);
if($indents) $m = max($indents) + 1;
$content = preg_replace_callback(
'#^(.*)=>\\n\s+(\S)#Um',
function($match) use ($m) {
return $match[1] . str_repeat(' ', ($m - strlen($match[1]) > 1 ? $m - strlen($match[1]) : 1)) . $match[2];
},
$content
);
'#^(.*)=>\\n\s+(\S)#Um',
function($match) use ($m) {
return $match[1] . str_repeat(' ', ($m - strlen($match[1]) > 1 ? $m - strlen($match[1]) : 1)) . $match[2];
},
$content
);
$content = preg_replace('#^((\s*).*){$#m', "\\1\n\\2{", $content);
$content = str_replace(array('<pre>', '</pre>'), '', $content);
if(isset($_SERVER['HTTP_HOST'])) {