public function hasFlag($flag)
{
- return $this->flags->hasFlag($flag);
+ return ($this->flags != null && $this->flags->hasFlag($flag));
}
public function format(array $format = array())
return true;
}
- require_once 'geocoding.inc.php';
if ($format['requireGeocoding'] || $this->changed == 1) {
$gmapsGeocoder = new GMapsGeocoder();
$gmapsGeocoder->getGeocodedAddress($this);
$mailer->send();
}
}
+ if ($this->countryId == '') {
+ $this->countryId = null;
+ }
$this->geocodeChosen = null;
$this->phones = Phone::formatFormArray($this->phones, $this->error);
return !$this->error;
$this->format();
if (!$this->isEmpty()) {
- require_once 'geocoding.inc.php';
foreach ($areas as $area) {
Geocoder::getAreaId($this, $area);
}
XDB::execute('INSERT INTO profile_addresses (pid, jobid, type, id, flags, accuracy,
text, postalText, postalCode, localityId,
subAdministrativeAreaId, administrativeAreaId,
- countryId, latitude, longitude, updateTime, pub, comment,
+ countryId, latitude, longitude, pub, comment,
north, south, east, west)
- VALUES ({?}, {?}, {?}, {?}, {?}, {?}, {?}, {?}, {?}, {?}, {?}, {?},
- {?}, {?}, {?}, FROM_UNIXTIME({?}), {?}, {?}, {?}, {?}, {?}, {?})',
+ VALUES ({?}, {?}, {?}, {?}, {?}, {?}, {?}, {?}, {?}, {?}, {?},
+ {?}, {?}, {?}, {?}, {?}, {?}, {?}, {?}, {?}, {?})',
$this->pid, $this->jobid, $this->type, $this->id, $this->flags, $this->accuracy,
$this->text, $this->postalText, $this->postalCode, $this->localityId,
$this->subAdministrativeAreaId, $this->administrativeAreaId,
$this->countryId, $this->latitude, $this->longitude,
- time(), $this->pub, $this->comment,
+ $this->pub, $this->comment,
$this->north, $this->south, $this->east, $this->west);
if ($this->type == self::LINK_PROFILE) {