https://bugzilla.wikimedia.org/show_bug.cgi?id=46611
--- Comment #3 from Alexia E. Smith <[email protected]> --- (In reply to comment #2) > This line does not seem right: > > +if (!isset($wgSphinxSearch_port) and !is_numeric($wgSphinxSearch_port)) { > > Perhaps it should be: > > +if (!isset($wgSphinxSearch_port) || !is_numeric($wgSphinxSearch_port)) { > > But in general I would rather let the local administrator make sure if they > are > setting the port at all to make it correct. Quietly ignoring a bad setting is > usually not a good idea. > > These may cause notices on stricter configurations: > > +if (!$wgSphinxSearch_index) { > +if (!$wgSphinxSearch_index_list) { > > Should probably use isset like other suggested changes. > > Finally, not sure why we would change default for > $wgEnableSphinxPrefixSearch. > Does that help with compatibility with 1.19 or 1.20 somehow? Sorry about that, I forgot to sanitize the code for Mediawiki's syntax rules. It should be the && operator. With || it could allow a setting slip through for the port that is not a numeric number thus passing bad information to the sphinxapi.php library. Granted, you can pass garbage for the port to sphinxapi.php and it will automatically default to 9312 for the port. Having the check at the extension level is so that the extension is acting on proper data. I pushed out a new change that changes the default back for $wgEnableSphinxPrefixSearch and changes it to a isset() setting check. We found that having this enabled to true improves search performance overall, but it makes more sense to keep it the old default with a setting check. -- You are receiving this mail because: You are on the CC list for the bug. You are watching all bug changes. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
