changeset 275:bc7bda1d1410

Comments and cleanups.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 15 May 2019 01:24:18 +0300
parents b1d004a6d3f1
children be152168d945
files mgallery.inc.php mgtool.php
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mgallery.inc.php	Tue May 14 14:06:26 2019 +0300
+++ b/mgallery.inc.php	Wed May 15 01:24:18 2019 +0300
@@ -13,6 +13,7 @@
 
 $mgalDebug = FALSE;
 
+
 //
 // Navigation control defines
 //
@@ -89,7 +90,7 @@
   "tn_format"        => [MG_STR, "jpeg"],
   "tn_width"         => [MG_INT, 140],  // In pixels, applies as bounding box for w/h
   "tn_height"        => [MG_INT, 100],
-  "tn_quality"       => [MG_INT, 85],   // JPEG quality percent
+  "tn_quality"       => [MG_INT, 85],   // JPEG/WEBP quality percent
 
   "med_format"       => [MG_STR, "jpeg"],
   "med_width"        => [MG_INT, 960],
@@ -104,7 +105,7 @@
   global $mgalDebug;
   if ($mgalDebug)
   {
-    echo "MGAL[debug]: ".$msg;
+    echo "<p>MGAL[debug]: ".htmlspecialchars($msg)."</p>";
     error_log("MGAL[debug]: ".$msg);
   }
 }
@@ -118,7 +119,7 @@
 
 function mgError($msg)
 {
-  echo "MGAL[error]: ".$msg;
+  error_log("MGAL[error]: ".$msg);
   return FALSE;
 }
 
--- a/mgtool.php	Tue May 14 14:06:26 2019 +0300
+++ b/mgtool.php	Wed May 15 01:24:18 2019 +0300
@@ -29,6 +29,10 @@
   [ MG_INT,   "filesize"    , "FileSize" ],
 ];
 
+
+//
+// Operating modes and update flags
+//
 define("GCMD_UPDATE"      , 1);
 define("GCMD_RESCAN"      , 2);
 define("GCMD_CLEAN"       , 3);