more tweaks guess semantics, a=chris

Chris Pollett [2019-06-26 21:Jun:th]
more tweaks guess semantics, a=chris
Filename
src/models/PhraseModel.php
diff --git a/src/models/PhraseModel.php b/src/models/PhraseModel.php
index 358c7a98b..c732227e8 100755
--- a/src/models/PhraseModel.php
+++ b/src/models/PhraseModel.php
@@ -877,14 +877,13 @@ class PhraseModel extends ParallelModel
                 $phrase = $generated_question['RAW'][0];
             }
         }
-        if ($len > 0) {
-            if (!preg_match("/safe\:|site\:/", $phrase)) {
+        if ($len > 0 && !preg_match("/site\:|info\:|path\:|ip\:/", $phrase)) {
+            if (!preg_match("/safe\:/", $phrase)) {
                 $phrase .= " " . ((!isset($_SESSION['SAFE_SEARCH']) ||
                     $_SESSION['SAFE_SEARCH'] == "true") ? "safe:true" :
                     "safe:all") . " ";
             }
-            if (!preg_match("/media\:image|lang\:/", $phrase) ||
-                $_REQUEST['s'] == 'images') {
+            if (!preg_match("/media\:image|lang\:/", $phrase)) {
                 $phrase .= " " . "lang:" . $main_tag . " ";
             }
         }
ViewGit