diff mgallery.php @ 195:f3098855ad58

Add debug option setting.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 19 Mar 2018 13:44:12 +0200
parents 3562c43727e5
children cd09052cf5db
line wrap: on
line diff
--- a/mgallery.php	Mon Mar 19 13:17:14 2018 +0200
+++ b/mgallery.php	Mon Mar 19 13:44:12 2018 +0200
@@ -105,7 +105,8 @@
 
 function mgMangleURI($filename)
 {
-  return $filename; //."?".sha1(time());
+  global $pageDebug;
+  return $filename.($pageDebug ? "?".sha1(time()) : "");
 }
 
 
@@ -449,6 +450,7 @@
 //
 mgReadSettings();
 
+$pageDebug = mgGetSetting("debug");
 $pageCSS = mgGetSetting("css");
 $pageJSFile = mgGetSetting("js_file");
 $pageUrchin = mgGetSetting("urchin_file");