Prioritize limetech extra search results

This commit is contained in:
Squidly271 2021-03-28 09:32:02 -04:00
parent 7353736f0a
commit e4c6868ad9
4 changed files with 11 additions and 3 deletions

Binary file not shown.

View File

@ -11,7 +11,7 @@ b398273cf7daa62ab00d2de2336ca25f ./README.md
6e48a62b91bdd066f023f46c6b491afd ./images/discord-gray.svg
8e7dc33512b8a78f28d7179a972c7c34 ./images/discord-hover.svg
54e46db492ddb033dfeb2827c5efd4a8 ./images/discord-white.svg
1bac5e1e7a654e133d13e3641ea16da3 ./include/exec.php
deb660a22288039685e963f42296c091 ./include/exec.php
b170210649f9cb7396ba3ae64d346bf3 ./include/helpers.php
8f1129e0cdb994c6d1900192252433d8 ./include/paths.php
9ba7ea3ef8bad60cb8335da9c0daea4f ./javascript/libraries.js

View File

@ -715,7 +715,10 @@ function get_content() {
$template['Language'] = highlight($filter,$template['Language']);
$template['LanguageLocal'] = highlight($filter,$template['LanguageLocal']);
}
$searchResults['nameHit'][] = $template;
if ( filterMatch($filter,array($template['ExtraSearchTerms'])) && $template['Plugin'] && $template['Author'] == "limetech" )
$searchResults['extraHit'][] = $template;
else
$searchResults['nameHit'][] = $template;
} else if ( filterMatch($filter,array($template['Author'],$template['Description'],$template['translatedCategories'])) ) {
$template['Description'] = highlight($filter, $template['Description']);
$template['Author'] = highlight($filter, $template['Author']);
@ -752,7 +755,12 @@ function get_content() {
} else
$searchResults['favNameHit'] = array();
$displayApplications['community'] = array_merge($searchResults['favNameHit'],$searchResults['nameHit'],$searchResults['anyHit']);
if ( is_array($searchResults['extraHit']) )
usort($searchResults['extraHit'],"mySort");
else
$searchResults['extraHit'] = array();
$displayApplications['community'] = array_merge($searchResults['extraHit'],$searchResults['favNameHit'],$searchResults['nameHit'],$searchResults['anyHit']);
} else {
usort($display,"mySort");
$displayApplications['community'] = $display;