fixes a bug in the interaction between site:doc and materialized metas, a=chris

Chris Pollett [2015-08-06 17:Aug:th]
fixes a bug in the interaction between site:doc and materialized metas, a=chris
Filename
src/models/PhraseModel.php
diff --git a/src/models/PhraseModel.php b/src/models/PhraseModel.php
index d4129f261..299d4ee92 100755
--- a/src/models/PhraseModel.php
+++ b/src/models/PhraseModel.php
@@ -781,6 +781,10 @@ class PhraseModel extends ParallelModel
         }
         $found_metas = array_unique($found_metas);
         $found_materialized_metas = array_unique($found_materialized_metas);
+        if(count($found_metas) == 2 && in_array("site:doc", $found_metas)) {
+            //site:doc doesn't work with materialized metas by itself
+            array_pop($found_materialized_metas);
+        }
         $disallow_phrases = array_unique($disallow_phrases);
         $phrase_string = mb_ereg_replace("&", "_and_", $phrase_string);
         $query_string = mb_ereg_replace(C\PUNCT, " ", $phrase_string);
ViewGit