- ';
- 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);
X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/7b8cc4b0de9d5c69f52a36cef7270b66f68100f2..33080d973223a1f322f2c1248bc896efe8b59dfc:/nieuws.inc.php?ds=sidebyside diff --git a/nieuws.inc.php b/nieuws.inc.php index 25952ef..8af5694 100644 --- a/nieuws.inc.php +++ b/nieuws.inc.php @@ -1,4 +1,5 @@ ', $url, $parts)) return; + if (!preg_match('(\d{4})/(\d{2})-(\d{2})->', $url, $parts)) return; global $monthname; return implode(' ', array_filter([ intval($parts[3]), $parts[2] > 0 ? $monthname[intval($parts[2])] : '', $parts[1], @@ -29,10 +30,10 @@ function shownewsarticle($url, $link = TRUE, $title = NULL) return preg_replace('{