changeset 274:b1d004a6d3f1

Remove obsolete debug setting.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 14 May 2019 14:06:26 +0300
parents 8ce9474f41f5
children bc7bda1d1410
files mgallery.inc.php mgallery.php
diffstat 2 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mgallery.inc.php	Tue May 14 13:58:46 2019 +0300
+++ b/mgallery.inc.php	Tue May 14 14:06:26 2019 +0300
@@ -11,6 +11,7 @@
 $mgProgEmail = "<ccr@tnsp.org>";
 $mgProgCopyright = "2015-2019 Tecnic Software productions (TNSP)";
 
+$mgalDebug = FALSE;
 
 //
 // Navigation control defines
@@ -95,13 +96,17 @@
   "med_height"       => [MG_INT, 640],
   "med_quality"      => [MG_INT, 90],
 
-  "debug"            => [MG_BOOL, FALSE],
 ];
 
 
 function mgDebug($msg)
 {
-//  echo "MGAL[debug]: ".$msg;
+  global $mgalDebug;
+  if ($mgalDebug)
+  {
+    echo "MGAL[debug]: ".$msg;
+    error_log("MGAL[debug]: ".$msg);
+  }
 }
 
 
--- a/mgallery.php	Tue May 14 13:58:46 2019 +0300
+++ b/mgallery.php	Tue May 14 14:06:26 2019 +0300
@@ -127,8 +127,8 @@
 
 function mgMangleURI($filename)
 {
-  global $pageDebug;
-  return $filename.($pageDebug ? "?".sha1(time()) : "");
+  global $mgalDebug;
+  return $filename.($mgalDebug ? "?".sha1(time()) : "");
 }
 
 
@@ -442,7 +442,6 @@
 //
 mgReadSettings();
 
-$pageDebug = mgGetSetting("debug");
 $pageCSS = mgGetSetting("css");
 $pageJSFile = mgGetSetting("js_file");
 $pageUrchin = mgGetSetting("urchin_file");