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: support zero month for unknown dates
[minimedit.git]
/
nieuws.inc.php
diff --git
a/nieuws.inc.php
b/nieuws.inc.php
index f9fec6ad3f4b0ebd290d9241c8d488cd371f88b6..25952ef189a35f7a076d7385caf9789262ea02e3 100644
(file)
--- a/
nieuws.inc.php
+++ b/
nieuws.inc.php
@@
-9,7
+9,7
@@
function shownewsdate($url)
if (!preg_match('</(\d{4})/(\d{2})/(\d{2})->', $url, $parts)) return;
global $monthname;
return implode(' ', array_filter([
if (!preg_match('</(\d{4})/(\d{2})/(\d{2})->', $url, $parts)) return;
global $monthname;
return implode(' ', array_filter([
- intval($parts[3]), $
monthname[intval($parts[2])]
, $parts[1],
+ intval($parts[3]), $
parts[2] > 0 ? $monthname[intval($parts[2])] : ''
, $parts[1],
]));
}
]));
}