Admin app queue page was only displaying like matches for a submitted app.

Factor like and fuzzy searches out in to a function and call that function
from normal search and from the app queue page so admins see fuzzy matches
for submitted apps.
This commit is contained in:
Chris Morgan
2005-06-08 00:35:30 +00:00
committed by WineHQ
parent 4d8a1492df
commit 97513244c4
3 changed files with 14 additions and 12 deletions

View File

@@ -99,8 +99,7 @@ if ($_REQUEST['sub'])
} else // application
{
echo html_frame_start("Potential duplicate applications in the database","90%","",0);
$hResult = searchForApplication($oApp->sName);
outputSearchTableForhResult($oApp->sName, $hResult);
perform_search_and_output_results($oApp->sName);
echo html_frame_end(" ");
//help

View File

@@ -585,4 +585,16 @@ function process_app_version_changes($isVersion)
}
}
function perform_search_and_output_results($search_words)
{
echo "<center><b>Like matches</b></center>";
$hResult = searchForApplication($search_words);
outputSearchTableForhResult($search_words, $hResult);
$minMatchingPercent = 60;
echo "<center><b>Fuzzy matches - minimum ".$minMatchingPercent."% match</b></center>";
$hResult = searchForApplicationFuzzy($search_words, $minMatchingPercent);
outputSearchTableForhResult($search_words, $hResult);
}
?>

View File

@@ -12,15 +12,6 @@ require(BASE."include/application.php");
apidb_header("Search Results");
echo "<center><b>Like matches</b></center>";
$hResult = searchForApplication($_REQUEST['q']);
outputSearchTableForhResult($_REQUEST['q'], $hResult);
$minMatchingPercent = 60;
echo "<center><b>Fuzzy matches - minimum ".$minMatchingPercent."% match</b></center>";
$hResult = searchForApplicationFuzzy($_REQUEST['q'], $minMatchingPercent);
outputSearchTableForhResult($_REQUEST['q'], $hResult);
perform_search_and_output_results($_REQUEST['q']);
apidb_footer();
?>