hide anonymous's user page - having made a million comments, it was taking upwards of 60 seconds to process that one page, triggering the DOS defences...
This commit is contained in:
parent
a55eca4462
commit
0b13db8ed7
@ -144,12 +144,17 @@ class CommentListTheme extends Themelet {
|
||||
$i_comment_id = int_escape($comment->comment_id);
|
||||
$i_image_id = int_escape($comment->image_id);
|
||||
|
||||
$anoncode = "";
|
||||
if($h_name == "Anonymous" && $this->anon_id >= 0) {
|
||||
$anoncode = '<sup>'.$this->anon_id.'</sup>';
|
||||
$this->anon_id++;
|
||||
if($h_name == "Anonymous") {
|
||||
$anoncode = "";
|
||||
if($this->anon_id >= 0) {
|
||||
$anoncode = '<sup>'.$this->anon_id.'</sup>';
|
||||
$this->anon_id++;
|
||||
}
|
||||
$h_userlink = $h_name . $anoncode;
|
||||
}
|
||||
else {
|
||||
$h_userlink = '<a href="'.make_link('user/'.$h_name).'">'.$h_name.'</a>';
|
||||
}
|
||||
$h_userlink = '<a href="'.make_link('user/'.$h_name).'">'.$h_name.'</a>'.$anoncode;
|
||||
$stripped_nonl = str_replace("\n", "\\n", substr($tfe->stripped, 0, 50));
|
||||
$stripped_nonl = str_replace("\r", "\\r", $stripped_nonl);
|
||||
$h_dellink = $user->is_admin() ?
|
||||
|
@ -158,7 +158,7 @@ class UserPage extends SimpleExtension {
|
||||
$this->theme->display_error($page, "Not Logged In",
|
||||
"You aren't logged in. First do that, then you can see your stats.");
|
||||
}
|
||||
else if(!is_null($display_user)) {
|
||||
else if(!is_null($display_user) && ($display_user->id != $config->get_int("anon_id"))) {
|
||||
send_event(new UserPageBuildingEvent($display_user));
|
||||
}
|
||||
else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user