From de4bd834b797163444455f8219cd2d7ae49bd63f Mon Sep 17 00:00:00 2001 From: Banana Date: Tue, 22 Oct 2019 00:21:24 +0200 Subject: [PATCH] code cleanup --- webroot/view/home.inc.php | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/webroot/view/home.inc.php b/webroot/view/home.inc.php index 2a06846..9dec91e 100644 --- a/webroot/view/home.inc.php +++ b/webroot/view/home.inc.php @@ -57,32 +57,15 @@ if(isset($_POST['data']) && !empty($_POST['data']) && isset($_POST['submitsearch $isUrl = Summoner::validate($searchValue,'url'); if($isUrl === true) { # search for URL - $queryStr = "SELECT * FROM `".DB_PREFIX."_link` - WHERE `link` = '".$DB->real_escape_string($searchValue)."'"; - $searchResult = $Management->searchForLinkByURL($searchValue); } elseif(Summoner::validate($searchValue,'text')) { - $queryStr = "SELECT *, - MATCH (`search`) AGAINST ('".$DB->real_escape_string($searchValue)."' IN BOOLEAN MODE) AS score - FROM `".DB_PREFIX."_link` - WHERE MATCH (`search`) AGAINST ('".$DB->real_escape_string($searchValue)."' IN BOOLEAN MODE) - ORDER BY score DESC"; - $searchResult = $Management->searchForLinkBySearchData($searchValue); } else { $submitFeedback['message'] = 'Invalid input'; $submitFeedback['status'] = 'error'; } -/* - if(!empty($queryStr)) { - $query = $DB->query($queryStr); - if(!empty($query) && $query->num_rows > 0) { - $searchResult = $query->fetch_all(MYSQLI_ASSOC); - } - } -*/ # new one? if(empty($searchResult) && $isUrl === true && Summoner::simpleAuthCheck() === true) { -- 2.39.5