]> 91.132.146.200 Git - insipid.git/commitdiff
fixed URL handling in search and add
authorBanana <mail@bananas-playground.net>
Tue, 12 Sep 2023 10:32:30 +0000 (12:32 +0200)
committerBanana <mail@bananas-playground.net>
Tue, 12 Sep 2023 10:32:30 +0000 (12:32 +0200)
ChangeLog
webroot/view/home.inc.php

index 66c2ed299c98f934a3706414020d3417214b95d2..91ff1213968160c760745bb6aa56b5f08cf50294 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 version 2.x - Dragon Chapel ()
 
        + Added LOGFILE and QUERY_DEBUG const to config.php. See update.txt for more details
+    * Fixed URL handling at creation
        + Improved DB queries.
        + Add top 5 tag or category relation stats in the tag and category overview
        + Update license to GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
index c91c8c4b4769ca8f838fc8e9b8016feb635cb458..18f9e7abc588116e704f2a053e5b0717e9c7f8e6 100644 (file)
@@ -54,15 +54,13 @@ if((isset($_POST['password']) && !empty($_POST['password'])) || (isset($_POST['u
 # search or new one.
 if(isset($_POST['data']) && !empty($_POST['data']) && isset($_POST['submitsearch']) && $honeypotCheck === false) {
        $searchValue = trim($_POST['data']['searchfield']);
-       $searchValue = strtolower($searchValue);
        $isUrl = Summoner::validate($searchValue,'url');
        if($isUrl === true) {
                # search for URL
-               $searchValue = trim($searchValue, "/");
                $searchResult = $Management->searchForLinkByURL($searchValue);
        }
        elseif(Summoner::validate($searchValue,'text')) {
-               $searchResult = $Management->searchForLinkBySearchData($searchValue);
+               $searchResult = $Management->searchForLinkBySearchData(strtolower($searchValue));
        }
        else {
                $submitFeedback['message'] = $T->t('home.input.invalid');