diff options
author | Jesús <heckyel@hyperbola.info> | 2019-04-27 14:49:06 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2019-04-27 14:49:06 -0500 |
commit | 16703c9cea84fe8c1be16aeefe6514c91ce5d273 (patch) | |
tree | c4e41518da249e7d47100c8b757852a964a0c44a | |
parent | e4b891bed64e09afff555cc551d6c1ca6a879855 (diff) | |
download | cl-16703c9cea84fe8c1be16aeefe6514c91ce5d273.tar.lz cl-16703c9cea84fe8c1be16aeefe6514c91ce5d273.tar.xz cl-16703c9cea84fe8c1be16aeefe6514c91ce5d273.zip |
fix count paragraph search
-rw-r--r-- | content/pages/buscar.php.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/content/pages/buscar.php.md b/content/pages/buscar.php.md index accc6d8..f0ae57b 100644 --- a/content/pages/buscar.php.md +++ b/content/pages/buscar.php.md @@ -32,7 +32,7 @@ $STOP_WORDS = ['a', 'un', 'una', 'unas', 'unos', 'uno', 'sobre', 'todo', 'trabajas', 'trabaja', 'trabajamos', 'trabajais', 'trabajan', 'podria', 'podrias', 'podriamos', 'podrian', 'podriais', 'yo', 'aquel']; -$DESCRIPTION_LENGTH = 20; +$DESCRIPTION_LENGTH = 25; $HALF_DESCRIPTION_LENGTH = floor($DESCRIPTION_LENGTH / 2); $web_content = json_decode(file_get_contents('tipuesearch_content.json'), true); @@ -158,7 +158,7 @@ if (isset($_GET['q'])) { break; } else { echo '<div class="tipue_search_content_text">'; - for ($i = 0; $i < $description_words_count - floor($description_words_count/2); $i++) { + for ($i = 0; $i < $DESCRIPTION_LENGTH; $i++) { echo $description_words[$i] . ' '; } if ($description_words_count > $DESCRIPTION_LENGTH) { |