Skip to content

Commit 6a00b25

Browse files
author
root
committed
Fixes #74
1 parent 938248f commit 6a00b25

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

lib/Db/RecipeDb.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ public function indexRecipeFile(File $file, string $userId) {
195195
if(isset($json['keywords'])) {
196196
foreach(explode(',', $json['keywords']) as $keyword) {
197197
$keyword = trim($keyword);
198-
$keyword = strtolower($keyword);
199198

200199
$qb->insert('cookbook_keywords')
201200
->values([

lib/Service/RecipeService.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,10 @@ public function checkRecipe($json) {
135135
$json['recipeYield'] = 1;
136136
}
137137

138-
// Make sure that "keywords" is an array of unique, lowercase strings
138+
// Make sure that "keywords" is an array of unique strings
139139
if(isset($json['keywords']) && is_string($json['keywords'])) {
140140
$keywords = $json['keywords'];
141-
$keywords = strtolower($keywords);
142141
$keywords = strip_tags($keywords);
143-
$keywords = str_replace(' and', '', $keywords);
144-
$keywords = str_replace(' ', ',', $keywords);
145142
$keywords = str_replace(',,', ',', $keywords);
146143
$keywords = explode(',', $keywords);
147144
$keywords = array_unique($keywords);

0 commit comments

Comments
 (0)