Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

Changed search with like for better autocomplete matching.

givanzbf92825ca1ae
diff --git a/admin/controller/editor/autocomplete.php b/admin/controller/editor/autocomplete.php
index d063bc7..4567ec2 100755
--- a/admin/controller/editor/autocomplete.php
+++ b/admin/controller/editor/autocomplete.php
@@ -34,7 +34,7 @@ class Autocomplete extends Base {
$options = [
'start' => 0,
'limit' => 10,
- 'search' => '%' . $text . '%',
+ 'like' => $text,
] + $this->global;
unset($options['admin_id']);
@@ -105,8 +105,8 @@ class Autocomplete extends Base {
'start' => 0,
'limit' => 10,
'type' => $type,
- 'search' => $text,
- //s'like' => '%' . $text . '%',
+ 'like' => $text,
+ //'like' => '%' . $text . '%',
] + $this->global;
unset($options['admin_id']);
@@ -114,7 +114,7 @@ class Autocomplete extends Base {
$results = $posts->getAll($options);
$search = [];
-
+
if (isset($results['posts'])) {
foreach ($results['posts'] as $post) {
$search[$post['post_id']] = substr($post['name'],0, 50);