aboutsummaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/pages/buscar.php.md8
1 files changed, 7 insertions, 1 deletions
diff --git a/content/pages/buscar.php.md b/content/pages/buscar.php.md
index 5443e89..e9de76a 100644
--- a/content/pages/buscar.php.md
+++ b/content/pages/buscar.php.md
@@ -65,6 +65,9 @@ if (isset($_GET['q']) && !empty($_GET['q'])) {
$score = 0;
$page['description'] = htmlentities($page['description']);
+ // convert keyworks_tags to strings
+ $tags = implode(", ", $page['keywords']);
+
foreach ($keywords as $word) {
if (preg_match("/$word/i", $page['url'])) {
$score += 35;
@@ -72,7 +75,10 @@ if (isset($_GET['q']) && !empty($_GET['q'])) {
if (preg_match("/$word/i", $page['title'])) {
$score += 35;
}
- if (preg_match("/$word/i", $page['tags'])) {
+ if (preg_match("/$word/i", $tags)) {
+ $score += 35;
+ }
+ if (preg_match("/$word/i", $page['category'])) {
$score += 30;
}
// It replaces uppercase matches with lowercase matches, but it's fine for now.