LIMIT 1 when fetching a wiki page
This commit is contained in:
parent
1d10baa719
commit
6313ebc339
@ -213,7 +213,7 @@ class Wiki extends Extension
|
||||
return false;
|
||||
}
|
||||
|
||||
private function get_page(string $title, int $revision=-1): WikiPage
|
||||
private function get_page(string $title): WikiPage
|
||||
{
|
||||
global $database;
|
||||
// first try and get the actual page
|
||||
@ -222,7 +222,9 @@ class Wiki extends Extension
|
||||
SELECT *
|
||||
FROM wiki_pages
|
||||
WHERE SCORE_STRNORM(title) LIKE SCORE_STRNORM(:title)
|
||||
ORDER BY revision DESC"),
|
||||
ORDER BY revision DESC
|
||||
LIMIT 1
|
||||
"),
|
||||
["title"=>$title]
|
||||
);
|
||||
|
||||
@ -232,7 +234,9 @@ class Wiki extends Extension
|
||||
SELECT *
|
||||
FROM wiki_pages
|
||||
WHERE title LIKE :title
|
||||
ORDER BY revision DESC", ["title"=>"wiki:default"]);
|
||||
ORDER BY revision DESC
|
||||
LIMIT 1
|
||||
", ["title"=>"wiki:default"]);
|
||||
|
||||
// fall further back to manual
|
||||
if (empty($row)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user