diff --git a/home.php b/home.php index 348ad44..521e325 100644 --- a/home.php +++ b/home.php @@ -2,7 +2,6 @@
- diff --git a/index.php b/index.php index 60580b1..b866826 100644 --- a/index.php +++ b/index.php @@ -25,10 +25,6 @@ { $action = 'open'; } - else if (isset($_GET['filter'])) - { - $action = 'filter'; - } else if (isset($_GET['search'])) { $action = 'search'; @@ -181,14 +177,14 @@ { $tags = ''; $name = basename($path); - if (!str_ends_with($name, '.del') && ($action != 'filter' || str_contains(strtolower($name), strtolower($param)))) + if (!str_ends_with($name, '.del')) { if ($action == 'search' || $action == 'tags') { $content = file_get_contents($path); - if (($action == 'search' && !str_contains(strtolower($content), strtolower($param))) || - ($action == 'tags' && !preg_match('/tags:.*' . $param . '/i', $content))) + if (($action == 'search' && !str_contains(strtolower($content), strtolower($param)) && !str_contains(strtolower($name), strtolower($param))) + || ($action == 'tags' && !preg_match('/tags:.*' . $param . '/i', $content))) { continue; } @@ -210,10 +206,10 @@ echo ''; } } - else if ($action == 'search') + else if ($action == 'search' && str_contains(strtolower($content), strtolower($param))) { $pos = strpos(strtolower($content), strtolower($param)); - echo ' ' . $param . '' . substr($content, $pos + strlen($param), 42) . ''; + echo ' ' . $param . substr($content, $pos + strlen($param), 42) . ''; } echo'
'; }