From: Banana Date: Mon, 21 Oct 2019 22:21:24 +0000 (+0200) Subject: code cleanup X-Git-Tag: 2.2_2019-12-27~18 X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=de4bd834b797163444455f8219cd2d7ae49bd63f;p=insipid.git code cleanup --- 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) {