Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix autocompletion with empty queries

  • Loading branch information...
commit decc34755cc5349f29a611ee3a10f4700e128dbf 1 parent ff98361
@adrianheine adrianheine authored
Showing with 9 additions and 1 deletion.
  1. +9 −1 action.php
View
10 action.php
@@ -124,7 +124,15 @@ function _handle_ajax($event) {
}
$search = $_POST['search'];
- $pages = ft_pageLookup($search, false, false);
+
+ $c_search = $search;
+ $in_ns = false;
+ if (!$search) {
+ // No search given, so we just want all pages in the prefix
+ $c_search = $aliases[$type]['prefix'];
+ $in_ns = true;
+ }
+ $pages = ft_pageLookup($c_search, $in_ns, false);
$regexp = '/^';
if ($aliases[$type]['prefix'] !== '') {
Please sign in to comment.
Something went wrong with that request. Please try again.