git.shiar.nl
/
minimedit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
48ed0c2
)
nieuws: ignore non-numeric month requests
author
Mischa POSLAWSKY
<perl@shiar.org>
Fri, 15 Jun 2018 11:26:17 +0000
(13:26 +0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Sat, 16 Jun 2018 03:33:48 +0000
(
05:33
+0200)
Minor code cleanup to prevent PHP warnings.
nieuws/index.php
patch
|
blob
|
history
diff --git
a/nieuws/index.php
b/nieuws/index.php
index 05c995af1a38b1f8b8646bd78f774848c22a335a..25efd2daf017882e6e3b49ac55c623e755457f5f 100644
(file)
--- a/
nieuws/index.php
+++ b/
nieuws/index.php
@@
-11,14
+11,18
@@
if ($page and !is_numeric($page)) {
if ($year) {
ob_clean();
if ($year) {
ob_clean();
+ $title = "Nieuws";
if (is_numeric($year)) {
if (is_numeric($year)) {
- $title = "Nieuws ".($page ? $monthname[$page].' ' : '').$year;
$match = "$Page/$year/";
$match = "$Page/$year/";
- if ($page) $match .= sprintf('%02d-', $page);
+ if (is_numeric($page)) {
+ $title .= ' '.$monthname[intval($page)];
+ $match .= sprintf('%02d-', $page);
+ }
+ $title .= ' '.$year;
}
else {
}
else {
- $title = "Nieuws vóór 2000";
$match = "$Page/19??/";
$match = "$Page/19??/";
+ $title .= " vóór 2000";
}
print "<h2>$title</h2>\n\n";
}
print "<h2>$title</h2>\n\n";