changeset 115:a3bf93b85758

Cosmetics.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 09 May 2017 12:58:11 +0300
parents c803235bd0f9
children 7964b6a27f8a
files mgallery.php
diffstat 1 files changed, 11 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/mgallery.php	Mon Mar 20 15:37:19 2017 +0200
+++ b/mgallery.php	Tue May 09 12:58:11 2017 +0300
@@ -250,12 +250,15 @@
 
 function mgGetNaviControlImageBoxJS(&$galIndex, $index, $class, $delta)
 {
+  $str = mgGetNaviControlImageBox($galIndex, $index, $class, $delta);
+
+  if ($str != "")
   return
     "<script type=\"text/javascript\">".
-    "document.write(\"".str_replace("\"", "\\\"",
-    mgGetNaviControlImageBox($galIndex, $index, $class, $delta)).
-    "\");".
+    "document.write(\"".str_replace("\"", "\\\"", $str)."\");".
     "</script>";
+  else
+    return "";
 }
 
 
@@ -587,22 +590,22 @@
     mgPrintBreadCrumbs($galData);
 
   echo
-    mgGetPageInfoHeaderEnd().
+    mgGetPageInfoHeaderEnd()."\n".
     "<div id=\"imageCBox\">\n".
     mgGetNaviControlImageBoxJS($galImagesIndex, $index, "prevBtm", -1)."\n".
     mgGetNaviControlImageBox($galImagesIndex, $index, "prev", -1)."\n".
-    "<div class=\"imageBox\">\n".
+    "<div class=\"imageBox\">".
     "<img id=\"imageImage\" src=\"".mgGetImageURL($galTNPath, $data["base"].$galMedSuffix.$data["ext"])."\" alt=\"".chentities($data["base"].$galMedSuffix.$data["ext"])."\">".
     "</div>\n".
     mgGetNaviControlImageBoxJS($galImagesIndex, $index, "nextBtm", 1)."\n".
     mgGetNaviControlImageBox($galImagesIndex, $index, "next", 1)."\n".
     "<div class=\"imageCaption\">".mgGetArr($data, "caption", "%1", "")."</div>\n".
     "<div class=\"infoBox\">\n".
-    mgGetArr($data, "datetime", "<span class=\"infoDateTime\">%1</span>", "", "mgTimeStr").
-    implode(", ", array_filter($list, function($a) { return $a !== NULL; })).
+    mgGetArr($data, "datetime", "<span class=\"infoDateTime\">%1</span>\n", "", "mgTimeStr").
+    implode(",\n", array_filter($list, function($a) { return $a !== NULL; }))."\n".
     "<a id=\"imageLink\" target=\"_blank\" href=\"".$galImageURL.$galPath."/".$galImage."\">".
     mgQM("view_best_quality")."</a>\n".
-    "</div>".
+    "</div>\n".
     "</div>\n";
 
   // Javascript navigation