the infamous "session bug" with antispam should be in fact a bug with prettyurls; some themes might refer their images (or, generally speaking, their resources) via relative paths, which are translated into wrong urls when prettyurls are enabled; this led to secondary requests to the same comment page, which made the plugin regenerate the question! the bug looked random because when those request came BEFORE the main page had been rendered the question stored in session would have been still correct; otherwise, if those came AFTER, the correct question was overwritten, and therefore the result would have been reported as wrong even though at a first glance it was not; now prettyurls correctly 404s when you point to a resource with a wrong path: update your themes if they are suffering from this bug (hey, really, you did not wondered why some images were not displayed sometimes??) :)
This commit is contained in:
parent
e201c260f2
commit
aa77e6edf1
@ -298,7 +298,7 @@ class Plugin_PrettyURLs {
|
||||
// static page
|
||||
$url = preg_replace_callback('|^/([a-zA-Z0-9_-]+)/$|', array(&$this, 'handle_static'), $url);
|
||||
if ($this->status == 2)
|
||||
return;
|
||||
return $this->check_url($url);
|
||||
}
|
||||
|
||||
|
||||
@ -307,7 +307,7 @@ class Plugin_PrettyURLs {
|
||||
|
||||
$url = preg_replace_callback('|page/([0-9]+)/$|', array(&$this, 'handle_page'), $url);
|
||||
if ($this->status == 2)
|
||||
return;
|
||||
return $this->check_url($url);
|
||||
|
||||
if ($this->date_handled){
|
||||
$url = preg_replace_callback('|^/([^/]+)|', array(&$this, 'handle_entry'), $url);
|
||||
@ -322,10 +322,14 @@ class Plugin_PrettyURLs {
|
||||
|
||||
$url = preg_replace_callback('|^/feed(/([^/]*))?|', array(&$this, 'handle_feed'), $url);
|
||||
|
||||
|
||||
$this->check_url($url);
|
||||
|
||||
}
|
||||
|
||||
function check_url($url) {
|
||||
if ($url != '/')
|
||||
$this->fp_params = array('entry'=>'entry000000-000000');
|
||||
}
|
||||
|
||||
function cache_delete_elem($id, $date) {
|
||||
|
||||
@ -555,4 +559,4 @@ STR;
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user