changeset 288:cad9e459e12f

Cleanup.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 21 May 2019 14:01:07 +0300
parents 290a42c52e35
children 13cff35dfbec
files mgallery.php
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mgallery.php	Tue May 21 14:00:36 2019 +0300
+++ b/mgallery.php	Tue May 21 14:01:07 2019 +0300
@@ -327,7 +327,7 @@
         $atmp = mgCleanPathStr($galImageURL.implode("/", mgCleanPathArray(TRUE, 0, count($ptmp), $ptmp)).".".$galTNFormat);
       }
       else
-      // No album cover, use default
+        // No album cover, use default
         $atmp = $galAlbumIcon;
 
       echo
@@ -563,6 +563,7 @@
   if ($ctrlFlags & MGF_BREADCRUMBS)
     mgPrintBreadCrumbs($galData);
 
+  $gpath = isset($data["path"]) ? $data["path"] : $galPath;
   echo
     mgGetPageInfoHeaderEnd().
     "\n".
@@ -575,7 +576,7 @@
       mgGetNaviControlImageBox($galPath, $galImagesIndex, $galEntries, $index, "prev", -1)."\n".
       "<div id=\"imageImageBox\" class=\"imageBox\">".
         "<img id=\"imageImage\" src=\"".
-        mgGetImageURL(isset($data["path"]) ? $data["path"] : $galPath, $galMedPath, $galImage, $galMedFormat).
+        mgGetImageURL($gpath, $galMedPath, $galImage, $galMedFormat).
         "\" alt=\"".chentities($galImage)."\">".
       "</div>\n".
       mgGetNaviControlImageBoxJS($galPath, $galImagesIndex, $galEntries, $index, "nextBtm", 1)."\n".
@@ -586,7 +587,8 @@
     "<div id=\"infoBox\">\n".
       mgGetArr($data, "datetime", "<span class=\"infoDateTime\">%1</span>\n", "", "mgTimeStr").
       implode(",\n", array_filter($list, function($a) { return $a !== NULL; }))."\n".
-      "<a id=\"imageLink\" href=\"".$galImageURL.$galPath."/".$galImage."\">".
+      "<a id=\"imageLink\" href=\"".
+      mgCleanPathStr($galImageURL.$gpath."/".$galImage)."\">".
       mgQM("view_best_quality")."</a>\n".
     "</div>\n"; // infoBox