]> 91.132.146.200 Git - insipid.git/commitdiff
code cleanup
authorBanana <banana@optimus.de>
Mon, 21 Oct 2019 22:21:24 +0000 (00:21 +0200)
committerBanana <banana@optimus.de>
Mon, 21 Oct 2019 22:21:24 +0000 (00:21 +0200)
webroot/view/home.inc.php

index 2a068461636bb476c7540f167f1f0e0395c07a94..9dec91e4481084dcf27eaf7f6fcd3b78699f42d3 100644 (file)
@@ -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) {