don't send UPBE for null user
git-svn-id: file:///home/shish/svn/shimmie2/trunk@367 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
25a355a51a
commit
446c3a3579
@ -67,8 +67,15 @@ class UserPage extends Extension {
|
||||
}
|
||||
else { // view
|
||||
$duser = ($event->count_args() == 0) ? $user : $database->get_user_by_name($event->get_arg(0));
|
||||
if(!is_null($duser)) {
|
||||
send_event(new UserPageBuildingEvent($event->page, $duser));
|
||||
}
|
||||
else {
|
||||
$this->theme->display_error($page, "No Such User",
|
||||
"If you typed the ID by hand, try again; if you came from a link on this ".
|
||||
"site, it might be bug report time...");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(is_a($event, 'UserPageBuildingEvent')) {
|
||||
|
@ -75,7 +75,6 @@ class UserPageTheme extends Themelet {
|
||||
}
|
||||
|
||||
public function display_user_page($page, $duser, $user) {
|
||||
if(!is_null($duser)) {
|
||||
$page->set_title("{$duser->name}'s Page");
|
||||
$page->set_heading("{$duser->name}'s Page");
|
||||
$page->add_block(new NavBlock());
|
||||
@ -90,12 +89,6 @@ class UserPageTheme extends Themelet {
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$this->display_error($page, "No Such User",
|
||||
"If you typed the ID by hand, try again; if you came from a link on this ".
|
||||
"site, it might be bug report time...");
|
||||
}
|
||||
}
|
||||
|
||||
private function build_stats($duser) {
|
||||
global $database;
|
||||
|
Loading…
x
Reference in New Issue
Block a user