Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //Comment all the code given below
- //Test FTS Settings
- if (empty($_SESSION['setup_fts_type'])) {
- installLog("ERROR:: Elastic Search is required.");
- $errors['ERR_FTS'] = $mod_strings['LBL_FTS_REQUIRED'];
- } else {
- installLog("Begining to check FTS Settings.");
- $engine = SearchEngine::newEngine($_SESSION['setup_fts_type'], getFtsSettings());
- $ftsStatus = $engine->verifyConnectivity(false);
- switch ($ftsStatus) {
- case Client::CONN_ERROR:
- case Client::CONN_FAILURE:
- $errors['ERR_FTS'] = $mod_strings['LBL_FTS_CONN_ERROR'];
- installLog("ERROR:: Unable to connect to FTS." . $_SESSION['setup_fts_type']);
- break;
- case Client::CONN_NO_VERSION_AVAILABLE:
- $errors['ERR_FTS'] = $mod_strings['LBL_FTS_NO_VERSION_AVAILABLE'];
- installLog("ERROR:: No FTS version available." . $_SESSION['setup_fts_type']);
- break;
- case Client::CONN_VERSION_NOT_SUPPORTED:
- $errors['ERR_FTS'] = sprintf(
- $mod_strings['LBL_FTS_UNSUPPORTED_VERSION'],
- implode(', ', $engine->getContainer()->client->getAllowedVersions())
- );
- installLog("ERROR:: Unsupported version of Elastic search." . $_SESSION['setup_fts_type']);
- break;
- }
- installLog("FTS connection results: $ftsStatus");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement