should fix bad handling of 404 by making up a non existent entry -- unless you've written one on 00/00/2000 at 00:00:00, and then you really should tell me on WHICH DAY and MONTH that happened because if I were in you I'd be scared :P

This commit is contained in:
real_nowhereman 2008-02-19 20:19:05 +00:00
parent cee2b6111a
commit 12ef0a7ecf

View File

@ -184,8 +184,13 @@ class Plugin_PrettyURLs {
function handle_entry($matches) {
if (PRETTYURLS_TITLES) {
if (isset($this->index[$_GET['y']][$_GET['m']][$_GET['d']][md5($matches[1])]))
if (isset($this->index[$_GET['y']][$_GET['m']][$_GET['d']][md5($matches[1])])) {
$_GET['entry'] = $this->index[$_GET['y']][$_GET['m']][$_GET['d']][md5($matches[1])];
} else {
// a bit hackish: we make up a fake url when there is no match,
// so that at the higher level the system will 404...
$_GET['entry'] = 'entry000000-000000';
}
} else {
$_GET['entry'] = $matches[1];
}