Merge remote-tracking branch 'holly/master'
This commit is contained in:
commit
3cb0a6a2c0
@ -31,7 +31,7 @@ class RSSImages extends Extension
|
|||||||
$images = Image::find_images(($page_number-1)*$page_size, $page_size, $search_terms);
|
$images = Image::find_images(($page_number-1)*$page_size, $page_size, $search_terms);
|
||||||
$this->do_rss($images, $search_terms, $page_number);
|
$this->do_rss($images, $search_terms, $page_number);
|
||||||
} catch (SearchTermParseException $stpe) {
|
} catch (SearchTermParseException $stpe) {
|
||||||
$this->theme->display_error(400, "Search parse error", $pde->error);
|
$this->theme->display_error(400, "Search parse error", $stpe->error);
|
||||||
} catch (PermissionDeniedException $pde) {
|
} catch (PermissionDeniedException $pde) {
|
||||||
$this->theme->display_error(403, "Permission denied", $pde->error);
|
$this->theme->display_error(403, "Permission denied", $pde->error);
|
||||||
}
|
}
|
||||||
|
@ -385,10 +385,10 @@ class UserPage extends Extension
|
|||||||
|
|
||||||
$matches = [];
|
$matches = [];
|
||||||
if (preg_match(self::USER_SEARCH_REGEX, $event->term, $matches)) {
|
if (preg_match(self::USER_SEARCH_REGEX, $event->term, $matches)) {
|
||||||
$duser = User::by_name($matches[1]);
|
$duser = User::by_name($matches[2]);
|
||||||
if (is_null($duser)) {
|
if (is_null($duser)) {
|
||||||
throw new SearchTermParseException(
|
throw new SearchTermParseException(
|
||||||
"Can't find the user named ".html_escape($matches[1])
|
"Can't find the user named ".html_escape($matches[2])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$event->add_querylet(new Querylet("images.owner_id ${matches[1]}= {$duser->id}"));
|
$event->add_querylet(new Querylet("images.owner_id ${matches[1]}= {$duser->id}"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user