user names no longer have spaces
This commit is contained in:
parent
115d992ff0
commit
d892e59966
@ -101,14 +101,9 @@ class Favorites extends SimpleExtension {
|
|||||||
|
|
||||||
public function onUserBlockBuilding($event) {
|
public function onUserBlockBuilding($event) {
|
||||||
global $user;
|
global $user;
|
||||||
if(strpos($user->name, ' ') === false) {
|
|
||||||
$username = url_escape($user->name);
|
$username = url_escape($user->name);
|
||||||
$link = make_link("post/list/favorited_by=$username/1");
|
$event->add_link("My Favorites", make_link("post/list/favorited_by=$username/1"), 20);
|
||||||
} else {
|
|
||||||
$userid = $user->id;
|
|
||||||
$link = make_link("post/list/favorited_by_userno=$userid/1");
|
|
||||||
}
|
|
||||||
$event->add_link("My Favorites", $link);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function onSearchTermParse($event) {
|
public function onSearchTermParse($event) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user