summaryrefslogtreecommitdiff
path: root/lib/tpl/dokuwiki/images/pagetools-build.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tpl/dokuwiki/images/pagetools-build.php')
-rw-r--r--lib/tpl/dokuwiki/images/pagetools-build.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/tpl/dokuwiki/images/pagetools-build.php b/lib/tpl/dokuwiki/images/pagetools-build.php
index 1b7262ad5..eaceeb257 100644
--- a/lib/tpl/dokuwiki/images/pagetools-build.php
+++ b/lib/tpl/dokuwiki/images/pagetools-build.php
@@ -15,6 +15,8 @@
$GAMMA = 0.8;
$OPTIPNG = '/usr/bin/optipng';
+if('cli' != php_sapi_name()) die('please run from commandline');
+
// load input images
$input = glob('pagetools/*.png');
sort($input);
@@ -92,7 +94,7 @@ function hex2rgb($hex) {
/**
* Scale (darken/lighten) a given image
*
- * @param ressource $img The truetype GD image to work on
+ * @param resource $img The truetype GD image to work on
* @param float $scale Scale the colors by this value ( <1 darkens, >1 lightens)
*/
function imagecolorscale(&$img, $scale){