git.shiar.nl
/
minimedit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
33080d9
)
thumb: ?backend option to override resize callback
author
Mischa POSLAWSKY
<perl@shiar.org>
Thu, 5 Jul 2018 13:29:41 +0000
(15:29 +0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Sat, 7 Jul 2018 11:42:39 +0000
(13:42 +0200)
Prepare to implement and test different mkthumb options.
thumb/index.php
patch
|
blob
|
history
diff --git
a/thumb/index.php
b/thumb/index.php
index f7c36d9d0a6d776bde1a4ff3008b2f401958e770..066e88d7cf9561227d96f8b6a2fe9ff80afacc21 100644
(file)
--- 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)