Open
Conversation
Drop data and log path in favor of a base path which now contains all the files and logs. The old logic should appear if a older sphinx version is detected
live627
reviewed
Mar 31, 2024
Comment on lines
+165
to
+182
| // Change settings for older sphinxs | ||
| if (!empty($context['sphinx_version']) && version_compare($context['sphinx_version'], '3.5', '>')) | ||
| { | ||
| $part1 = array_slice($local_config_vars, 0, 3); | ||
| $part2 = array_slice($local_config_vars, 4, 5); | ||
| $part3 = array_slice($local_config_vars, 7); | ||
|
|
||
| $local_config_vars = array_merge( | ||
| $part1, | ||
| array( | ||
| array('text', 'sphinx_data_path', 65, 'default_value' => '/var/sphinx/data', 'subtext' => $txt['sphinx_data_path_subtext']), | ||
| array('text', 'sphinx_log_path', 65, 'default_value' => '/var/sphinx/log', 'subtext' => $txt['sphinx_log_path_subtext']), | ||
| array('text', 'sphinx_stopword_path', 65, 'default_value' => '', 'subtext' => $txt['sphinx_stopword_path_subtext']), | ||
| ), | ||
| $part2, | ||
| $part3 | ||
| ); | ||
| } |
There was a problem hiding this comment.
perhaps you could add named keys to the old settings and unset() them as needed. Easier to maintain in the future and no index juggling should they ever be rearranged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Drop data and log path in favor of a base path which now contains all the files and logs. The old logic should appear if a older sphinx version is detected
Fixes #31