Move notice location data to Notice_location

Will probably take a _long_ time to do scripts/upgrade.php but don't
worry, it can be aborted and resumed.
This commit is contained in:
Mikael Nordfeldth
2015-09-04 22:25:11 +02:00
parent 476197569f
commit 3c86542a40
5 changed files with 126 additions and 66 deletions

View File

@@ -120,9 +120,11 @@ class MapAction extends Action
$jsonArray = array();
while ($this->notice->fetch()) {
if (!empty($this->notice->lat) && !empty($this->notice->lon)) {
$jsonNotice = $this->noticeAsJson($this->notice);
$jsonArray[] = $jsonNotice;
try {
$notloc = Notice_location::locFromStored($this->notice);
$jsonArray[] = $this->noticeAsJson($this->notice);
} catch (ServerException $e) {
// no location data
}
}