diff options
Diffstat (limited to 'bin/update-search-views.php')
-rw-r--r-- | bin/update-search-views.php | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/bin/update-search-views.php b/bin/update-search-views.php index f1ef504..c867123 100644 --- a/bin/update-search-views.php +++ b/bin/update-search-views.php @@ -81,9 +81,9 @@ $sql_commands[] = "INSERT INTO `text_search_summary` a.inactive AS inactive, a.averagerating AS averagerating, a.weeklydownloads AS weeklydownloads, - `tr_name`.localized_string AS name, - `tr_summary`.localized_string AS summary, - `tr_description`.localized_string AS description + CONCAT(`tr_name`.localized_string, '_') AS name, + CONCAT(`tr_summary`.localized_string, '_') AS summary, + CONCAT(`tr_description`.localized_string, '_') AS description FROM addons AS a LEFT JOIN translations AS `tr_name` ON (`tr_name`.id = a.`name`) LEFT JOIN translations AS `tr_summary` ON (`tr_summary`.id = a.`summary` AND `tr_name`.locale = `tr_summary`.locale) @@ -120,23 +120,6 @@ $sql_commands[] = "INSERT INTO `versions_summary` $sql_commands[] = "DROP TABLE `most_recent_version`"; -$sql_commands[] = "DELETE FROM `collections_search_summary`"; - -$sql_commands[] = "INSERT INTO `collections_search_summary` - SELECT `c`.`id` AS `id`, - `tr_name`.`locale` AS `locale`, - `tr_name`.`localized_string` AS `name`, - `tr_description`.`localized_string` AS `description` - FROM `collections` AS `c` - LEFT JOIN `translations` AS `tr_name` ON (`tr_name`.`id` = `c`.`name`) - LEFT JOIN `translations` AS `tr_description` - ON (`tr_description`.`id` = `c`.`description` AND `tr_name`.`locale` = `tr_description`.`locale`) - WHERE `tr_name`.`locale` IS NOT NULL AND ( - `tr_name`.`localized_string` IS NOT NULL - OR `tr_description`.`localized_string` IS NOT NULL - ) - ORDER BY `c`.`id` ASC, `locale` DESC"; - $sql_commands[] = "COMMIT"; // Connect to our database and execute the command list above. |