diff mgallery.inc.php @ 285:25324e33fc78

Refactor gallery path handling somewhat.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 20 May 2019 14:06:59 +0300
parents 8297c895f22e
children 13cff35dfbec
line wrap: on
line diff
--- a/mgallery.inc.php	Fri May 17 03:15:53 2019 +0300
+++ b/mgallery.inc.php	Mon May 20 14:06:59 2019 +0300
@@ -246,6 +246,12 @@
 }
 
 
+function mgCleanPathStr($path)
+{
+  return str_replace("//", "/", $path);
+}
+
+
 function mgCleanPathArray($refs, $start, $argc, $argv)
 {
   $path = [];
@@ -274,7 +280,7 @@
       $first = FALSE;
     }
   }
-  return $path;
+  return mgCleanPathStr($path);
 }