- ';
- 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/328e964708c7e9dc479a25f9358b2d03e9d7f66c..dde4370bbccc727390ced098abfed22cfbab6534:/nieuws.inc.php?ds=sidebyside diff --git a/nieuws.inc.php b/nieuws.inc.php index 7e723e4..8af5694 100644 --- a/nieuws.inc.php +++ b/nieuws.inc.php @@ -1,4 +1,5 @@ ', $url, $parts)) return; global $monthname; - return sprintf('%s %s %s', - intval($day), $monthname[intval($month)], $year); + return implode(' ', array_filter([ + intval($parts[3]), $parts[2] > 0 ? $monthname[intval($parts[2])] : '', $parts[1], + ])); } function shownewsarticle($url, $link = TRUE, $title = NULL) @@ -30,10 +30,10 @@ function shownewsarticle($url, $link = TRUE, $title = NULL) return preg_replace('{