X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;ds=sidebyside;f=macros%2Fgallery;h=edc6a39d1f2240198fb924f728c2940eb9138c82;hb=c482ab648dce89fd42b6110728e8b05df4073732;hp=3a05ee85ff06767334ae1ce74717c9337ec032aa;hpb=b28e964ff968431ed498c5a66a231db4d94799f3;p=shellwiki
diff --git a/macros/gallery b/macros/gallery
index 3a05ee8..edc6a39 100755
--- a/macros/gallery
+++ b/macros/gallery
@@ -1,5 +1,19 @@
#!/bin/sh
+# Copyright 2023 Paul Hänsch
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED âAS ISâ AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+# IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
. "$_EXEC/cgilite/cgilite.sh"
. "$_EXEC/acl.sh"
. "$_EXEC/tools.sh"
@@ -19,12 +33,14 @@ done \
| while read attachment; do
case $attachment in
*/*)
- printf '' \
- "${attachment%/*}/[attachment]/${attachment##*/}" "${attachment}"
+ printf '' \
+ "$(URL "${attachment%/*}/[attachment]/${attachment##*/}")" \
+ "$(URL "${attachment}")"
;;
*)
- printf '' \
- "[attachment]/${attachment}" "${attachment}"
+ printf '' \
+ "$(URL "[attachment]/${attachment}")" \
+ "$(URL "${attachment}")"
;;
esac
done