git.shiar.nl
/
sheet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9495204
)
source: subdirectory index for tools/
author
Mischa POSLAWSKY
<perl@shiar.org>
Wed, 24 Nov 2021 23:58:19 +0000
(
00:58
+0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Mon, 6 Dec 2021 11:07:29 +0000
(12:07 +0100)
source.plp
patch
|
blob
|
history
diff --git
a/source.plp
b/source.plp
index 9c183205e45336e4ec08acd1d1900d34bb80495e..358bf8475f7355eecc190b76399483aa69d92f18 100644
(file)
--- a/
source.plp
+++ b/
source.plp
@@
-43,13
+43,18
@@
Html({
say '';
say '';
-if (not $source) {
- print "<h1>Source files</h1>";
+if (not $source or -d $source) {
+ PLP_START {
+ print "<h1>Source files</h1>";
+ };
+
+ if ($source and $source ne 'tools') {
+ Abort("Directory index not permitted", '403 source not allowed');
+ }
print "<p>Project code distributed under the AGPL. Please contribute back.</p>";
say '<ul>';
print "<p>Project code distributed under the AGPL. Please contribute back.</p>";
say '<ul>';
- for (glob '*.plp') {
- chomp;
+ for (glob($source ? "$source/*" : '*.plp')) {
say '<li>', showlink($_, "/source/$_");
}
say "</ul>\n";
say '<li>', showlink($_, "/source/$_");
}
say "</ul>\n";