|
@@ -41,7 +41,7 @@ class Info
|
|
|
if ($type == 1) {
|
|
|
|
|
|
$data = $this->fetch(false, $city, $lng, $lat, 10, $name, $method);
|
|
|
- if ($data) {
|
|
|
+ if ($data && $method == 'fetch') {
|
|
|
|
|
|
$data['alert'] = 2;
|
|
|
}
|
|
@@ -49,7 +49,7 @@ class Info
|
|
|
} elseif ($type == 2) {
|
|
|
|
|
|
$data = $this->fetch(false, false, $lng, $lat, 1, $name, $method);
|
|
|
- if ($data) {
|
|
|
+ if ($data && $method == 'fetch') {
|
|
|
|
|
|
$data['alert'] = 4;
|
|
|
}
|
|
@@ -60,16 +60,16 @@ class Info
|
|
|
if (!$data) {
|
|
|
|
|
|
$data = $this->fetch(false, $city, $lng, $lat, 10, $name, $method);
|
|
|
- if ($data) {
|
|
|
+ if ($data && $method == 'fetch') {
|
|
|
|
|
|
$data['alert'] = 2;
|
|
|
}
|
|
|
- } else {
|
|
|
+ } elseif ($method == 'fetch') {
|
|
|
|
|
|
$data['alert'] = 3;
|
|
|
}
|
|
|
}
|
|
|
- } else {
|
|
|
+ } elseif ($method == 'fetch') {
|
|
|
|
|
|
$data['alert'] = 1;
|
|
|
}
|