mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 20:17:24 +08:00
finish migrate meilisearch to single tab
This commit is contained in:
@@ -91,7 +91,7 @@ class MeiliSearchRepository extends BaseRepository
|
|||||||
|
|
||||||
public function isEnabled(): bool
|
public function isEnabled(): bool
|
||||||
{
|
{
|
||||||
return Setting::get('system.meilisearch_enabled') == 'yes';
|
return Setting::get('meilisearch.enabled') == 'yes';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function import()
|
public function import()
|
||||||
@@ -555,7 +555,7 @@ class MeiliSearchRepository extends BaseRepository
|
|||||||
private function getSearchableAttributes(): array
|
private function getSearchableAttributes(): array
|
||||||
{
|
{
|
||||||
$attributes = ["name", "small_descr", "url"];
|
$attributes = ["name", "small_descr", "url"];
|
||||||
if (Setting::get("system.meilisearch_search_description") == 'yes') {
|
if (Setting::get("meilisearch.search_description") == 'yes') {
|
||||||
$attributes[] = "descr";
|
$attributes[] = "descr";
|
||||||
}
|
}
|
||||||
return $attributes;
|
return $attributes;
|
||||||
|
|||||||
+1
-1
@@ -28,7 +28,7 @@ if (!isset($CURUSER) || !user_can('seebanned')) {
|
|||||||
$banned = "no";
|
$banned = "no";
|
||||||
}
|
}
|
||||||
|
|
||||||
$meilisearchEnabled = get_setting('system.meilisearch_enabled') == 'yes';
|
$meilisearchEnabled = get_setting('meilisearch.enabled') == 'yes';
|
||||||
$shouldUseMeili = $meilisearchEnabled && !empty($search);
|
$shouldUseMeili = $meilisearchEnabled && !empty($search);
|
||||||
|
|
||||||
$count = 0;
|
$count = 0;
|
||||||
|
|||||||
+1
-1
@@ -60,7 +60,7 @@ if (empty($searchstr)) {
|
|||||||
unset($searchstr);
|
unset($searchstr);
|
||||||
}
|
}
|
||||||
|
|
||||||
$meilisearchEnabled = get_setting('system.meilisearch_enabled') == 'yes';
|
$meilisearchEnabled = get_setting('meilisearch.enabled') == 'yes';
|
||||||
$shouldUseMeili = $meilisearchEnabled && !empty($searchstr);
|
$shouldUseMeili = $meilisearchEnabled && !empty($searchstr);
|
||||||
do_log("[SHOULD_USE_MEILI]: $shouldUseMeili");
|
do_log("[SHOULD_USE_MEILI]: $shouldUseMeili");
|
||||||
// sorting by MarkoStamcar
|
// sorting by MarkoStamcar
|
||||||
|
|||||||
Reference in New Issue
Block a user