mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-15 05:00:49 +08:00
migrate meilisearch config
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.3');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2023-05-11');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2023-05-12');
|
||||
defined('IN_TRACKER') || define('IN_TRACKER', false);
|
||||
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
||||
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
||||
|
||||
@@ -303,6 +303,21 @@ class Update extends Install
|
||||
$this->doLog("removeDuplicatePeer and migrate 2023_04_01_005409_add_unique_torrent_peer_user_to_peers_table");
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 1.8.3
|
||||
*/
|
||||
if (NexusDB::hasTable('settings')) {
|
||||
$updateSettings = [];
|
||||
if (get_setting("system.meilisearch_enabled") == 'yes') {
|
||||
$updateSettings["enabled"] = "yes";
|
||||
}
|
||||
if (get_setting("system.meilisearch_search_description") == 'yes') {
|
||||
$updateSettings["search_description"] = "yes";
|
||||
}
|
||||
if (!empty($updateSettings)) {
|
||||
$this->saveSettings(['meilisearch' => $updateSettings]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user