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:
parent
cee2b6111a
commit
12ef0a7ecf
@ -184,8 +184,13 @@ class Plugin_PrettyURLs {
|
|||||||
function handle_entry($matches) {
|
function handle_entry($matches) {
|
||||||
|
|
||||||
if (PRETTYURLS_TITLES) {
|
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])];
|
$_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 {
|
} else {
|
||||||
$_GET['entry'] = $matches[1];
|
$_GET['entry'] = $matches[1];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user