git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nieuws: treat years before 2000 as single page
[minimedit.git]
/
nieuws.inc.php
diff --git
a/nieuws.inc.php
b/nieuws.inc.php
index 25952ef189a35f7a076d7385caf9789262ea02e3..3d88a263810e58205354a7459f65890fe64505a7 100644
(file)
--- a/
nieuws.inc.php
+++ b/
nieuws.inc.php
@@
-43,10
+43,11
@@
function shownews($root, $limit = 5)
}
}
}
}
-function printtoc($
roo
t)
+function printtoc($
inpu
t)
{
{
+ if (!is_array($input)) $input = glob("$input/*.html");
print '<ul>';
print '<ul>';
- foreach (array_reverse(
glob("$root/*.html")
) as $page) {
+ foreach (array_reverse(
$input
) as $page) {
$title = fgets(fopen($page, 'r'));
$title = strip_tags($title);
$linkurl = preg_replace('/\.html$/', '', $page);
$title = fgets(fopen($page, 'r'));
$title = strip_tags($title);
$linkurl = preg_replace('/\.html$/', '', $page);