[recipes] Match ingredients on the un-casefolded string



commit 1f7143f190b0e375aa355819bcf5d49c5c2f0bad
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Dec 31 16:50:29 2016 -0500

    Match ingredients on the un-casefolded string
    
    This will work better for recipes that contain ingredient ids.
    Ingredient matching still needs to be redone to not rely on
    the raw string.

 src/gr-recipe.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gr-recipe.c b/src/gr-recipe.c
index 88dd918..c1dcaef 100644
--- a/src/gr-recipe.c
+++ b/src/gr-recipe.c
@@ -645,13 +645,13 @@ gr_recipe_matches (GrRecipe    *recipe,
 
         for (i = 0; terms[i]; i++) {
                 if (g_str_has_prefix (terms[i], "i+:")) {
-                        if (!recipe->cf_ingredients || strstr (recipe->cf_ingredients, terms[i] + 3) == 
NULL) {
+                        if (!recipe->ingredients || strstr (recipe->ingredients, terms[i] + 3) == NULL) {
                                 return FALSE;
                         }
                         continue;
                 }
                 else if (g_str_has_prefix (terms[i], "i-:")) {
-                        if (recipe->cf_ingredients && strstr (recipe->cf_ingredients, terms[i] + 3) != NULL) 
{
+                        if (recipe->ingredients && strstr (recipe->ingredients, terms[i] + 3) != NULL) {
                                 return FALSE;
                         }
                         continue;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]