diff --git a/home.php b/home.php index 4aa9443..ad7ed1c 100644 --- a/home.php +++ b/home.php @@ -2,7 +2,6 @@
-
diff --git a/index.php b/index.php index 3694408..879f9cc 100644 --- a/index.php +++ b/index.php @@ -255,19 +255,13 @@ foreach($_SESSION['index'] as $path) { - $tags = ''; $name = basename($path); if (!str_ends_with($name, '.del')) { - if (($_GET['param'] && isset($_GET['search'])) || isset($_GET['tags'])) + if (($_GET['param'] && isset($_GET['search']))) { $content = file_get_contents($path . '.md'); - if ( - // param does not match content or title - (isset($_GET['search']) && !str_contains(cleanstring($content), cleanstring($param)) && !str_contains(cleanstring($name), cleanstring($param))) || - // param does not match tags - (isset($_GET['tags']) && !preg_match('/tags:.*' . $param . '/i', $content)) - ) + if (isset($_GET['search']) && !str_contains(cleanstring($content), cleanstring($param)) && !str_contains(cleanstring($name), cleanstring($param))) { continue; } @@ -278,23 +272,7 @@ } } echo '
' . $name .''; - if (isset($content) && isset($_GET['tags'])) - { - $tags = array(); - $hastags = preg_match_all('/tags:(.*)/i', $content, $tags, PREG_SET_ORDER); - if ($hastags) - { - $tagslist = explode(',', $tags[0][1]); - echo ' '; - foreach ($tagslist as $tag) - { - $tag = trim($tag); - echo('' . $tag . ' '); - } - echo ''; - } - } - else if (isset($_GET['search']) && str_contains(cleanstring($content), cleanstring($param))) + if (isset($_GET['search']) && str_contains(cleanstring($content), cleanstring($param))) { $pos = strpos(cleanstring($content), cleanstring($param)); echo ' ' . $param . substr($content, $pos + strlen($param), 42) . ''; diff --git a/readme.md b/readme.md index d9c696e..6bf4f87 100644 --- a/readme.md +++ b/readme.md @@ -14,7 +14,6 @@ No javascript. |------------------------|----------------------------------|-------------------------------|--------| | search (default action)| full text search | reload home | alt-s | | open | open if exists, or create | create with timestamp as title| alt-o | -| tag | filter list by tag | show all tags in list | alt-t | | clip | insert in todo | | alt-c | | download | download all notes in a zip file | | alt-d | @@ -27,14 +26,9 @@ No javascript. | stats | save and show stats | alt-i | | delete | delete (rename as .del) | alt-d | -| On list | action | -|------------------------|--------------------------| -| clic on tag | filter list by tag (home with tags+param) | - | Url params | action | |------------------------|--------------------------| | reindex | force notes reindex | | clip+param | same as button | | open+param | same as button | -| tags+param | same as button | | search+param | same as button | \ No newline at end of file