@@ -626,6 +626,7 @@ We have the following which are either unlikely to be useful, or potentially uns
- [tt]force_memory_sort__<catalogue-name>[/tt] -- set this to '1' to force an in-memory sort on a particular catalogue (this is slower, but it will sort more accurately by resolving language string fallback and Comcode fully before sorting)
- [tt]search_do_days_fallback[/tt] -- set this to '0' if you don't want to re-search without a recency filter if no results were found
- [tt]sitemap_orphans_to_pages[/tt] -- set this to '0' if you don't want orphaned pages to be put under the default Pages page grouping of the Sitemap
- [tt]time_sensitive_rankings__<catalogue_name>[/tt] -- set this to a number for catalogue rating sorting to only consider this number of records. This is useful for a upvote/downvote system that is responsive to change in voting pattern.
- Performance tuning (positive) [not official options as will break normal expectations of how the system will behave / complicate things]
- [tt]slow_php_dns[/tt] -- set this to '1' if the server has very slow DNS resolution on the web server's main network interface, and therefore to do DNS resolution via the command line instead
- [tt]lots_of_data_in_*[/tt] -- set this to '1', with '*' replaced with a database table name, if you want the Selectcode mechanism to work with recursive DB lookups rather than one huge flat lookup
$clause='(SELECT SUM(rating-1) FROM '.$db->get_table_prefix().'rating rat WHERE '.db_string_equal_to('rat.rating_for_type',$matches[1]).' AND rat.rating_for_id='.db_cast($table_join_code.'.'.$first_id_field,'CHAR').')';
$extra_select[$filter_key]=', '.$clause.' AS compound_rating_'.fix_id($matches[1]);
$table_and_where=$db->get_table_prefix().'rating rat WHERE '.db_string_equal_to('rat.rating_for_type',$matches[1]).' AND rat.rating_for_id='.db_cast($table_join_code.'.'.$first_id_field,'CHAR');
$table_and_where='(SELECT * FROM '.$table_and_where.' LIMIT '.strval(intval($time_sensitivity)).') '.uniqid('');// TODO: MySQL-only, fix in v11
}
}
$clause='(SELECT AVG('.db_cast('rating','FLOAT').')/2 FROM '.$db->get_table_prefix().'rating rat WHERE '.db_string_equal_to('rat.rating_for_type',$matches[1]).' AND rat.rating_for_id='.db_cast($table_join_code.'.'.$first_id_field,'CHAR').')';
$clause='(SELECT AVG('.db_cast('rating','FLOAT').')/2 FROM '.$table_and_where.')';