forked from Cavemanon/cavepaintings
Avoid shadowing global variable
When we aren't referencing the current `global $user`, we should give it a different name to avoid confusion
This commit is contained in:
@@ -194,9 +194,9 @@ class Notes extends Extension
|
||||
$notes = $matches[2];
|
||||
$event->add_querylet(new Querylet("images.id IN (SELECT id FROM images WHERE notes $cmp $notes)"));
|
||||
} elseif (preg_match("/^notes_by[=|:](.*)$/i", $event->term, $matches)) {
|
||||
$user = User::by_name($matches[1]);
|
||||
if (!is_null($user)) {
|
||||
$user_id = $user->id;
|
||||
$my_user = User::by_name($matches[1]);
|
||||
if (!is_null($my_user)) {
|
||||
$user_id = $my_user->id;
|
||||
} else {
|
||||
$user_id = -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user