From: Mischa POSLAWSKY Date: Thu, 5 Jul 2018 13:29:41 +0000 (+0200) Subject: thumb: ?backend option to override resize callback X-Git-Tag: v3.3~13 X-Git-Url: http://git.shiar.net/minimedit.git/commitdiff_plain/e82cf405761c0c188f5e675f47ada92bd641ab34 thumb: ?backend option to override resize callback Prepare to implement and test different mkthumb options. --- diff --git a/thumb/index.php b/thumb/index.php index f7c36d9..066e88d 100644 --- a/thumb/index.php +++ b/thumb/index.php @@ -38,8 +38,16 @@ exit; function mkthumb($source, $target, $width, $height) { + if (isset($_GET['backend'])) { + $backend = $_GET['backend']; + } + else { + $backend = 'exec'; + } + $backend = "mkthumb_$backend"; + @mkdir(dirname($target), 0777, TRUE); - return mkthumb_exec($source, $target, $width, $height); + $backend($source, $target, $width, $height); } function mkthumb_exec($source, $target, $width, $height)