Skip to content

Commit

Permalink
Fix autocompletion with empty queries
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianheine committed Jun 15, 2011
1 parent ff98361 commit decc347
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion action.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'] !== '') {
Expand Down

0 comments on commit decc347

Please sign in to comment.