|
@@ -340,7 +340,7 @@ class mojeek{
|
|
|
"zm" => "Zambia",
|
|
"zm" => "Zambia",
|
|
|
"zw" => "Zimbabwe"
|
|
"zw" => "Zimbabwe"
|
|
|
]
|
|
]
|
|
|
- ],
|
|
|
|
|
|
|
+ ],/*
|
|
|
"region" => [
|
|
"region" => [
|
|
|
"display" => "Region",
|
|
"display" => "Region",
|
|
|
"option" => [
|
|
"option" => [
|
|
@@ -350,7 +350,7 @@ class mojeek{
|
|
|
"fr" => "France",
|
|
"fr" => "France",
|
|
|
"uk" => "United Kingdom"
|
|
"uk" => "United Kingdom"
|
|
|
]
|
|
]
|
|
|
- ],
|
|
|
|
|
|
|
+ ],*/
|
|
|
"domain" => [
|
|
"domain" => [
|
|
|
"display" => "Results per domain",
|
|
"display" => "Results per domain",
|
|
|
"option" => [
|
|
"option" => [
|
|
@@ -458,7 +458,7 @@ class mojeek{
|
|
|
"date" => 1, // show date
|
|
"date" => 1, // show date
|
|
|
"tlen" => 128, // max length of title
|
|
"tlen" => 128, // max length of title
|
|
|
//"dlen" => 511, // max length of description
|
|
//"dlen" => 511, // max length of description
|
|
|
- "arc" => ($country == "any" ? "none" : $country) // location. don't use autodetect!
|
|
|
|
|
|
|
+ //"arc" => ($country == "any" ? "none" : $country) // location. don't use autodetect!
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
switch($focus){
|
|
switch($focus){
|
|
@@ -503,6 +503,11 @@ class mojeek{
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if(strlen($html) === 0){
|
|
|
|
|
+
|
|
|
|
|
+ throw new Exception("Mojeek returned an empty page (probably a homepage redirect)");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
$out = [
|
|
$out = [
|
|
|
"status" => "ok",
|
|
"status" => "ok",
|
|
|
"spelling" => [
|
|
"spelling" => [
|