} else if (@$address['parsevalid']) {
$address = array_merge($address, cut_address(@$address['text']));
$address['checked'] = true;
- $mailer = new PlMailer('geoloc/mail_geoloc.tpl');
+ $mailer = new PlMailer('geoloc/geoloc.mail.tpl');
$mailer->assign('text', get_address_text($address));
$mailer->assign('geoloc', $geotxt);
$mailer->send();
$address['checked'] = true;
}
}
+ $address['precise_lat'] = rtrim($address['precise_lat'], '.0');
+ $address['precise_lon'] = rtrim($address['precise_lon'], '.0');
$address['text'] = get_address_text($address);
}
}
protected $settings = array(); // A set ProfileSetting objects
protected $errors = array(); // A set of boolean with the value check errors
protected $changed = array(); // A set of boolean indicating wether the value has been changed
+ protected $watched = array(); // A set of boolean indicating the fields that are watched
public $orig = array();
public $values = array();
protected function saveData()
{
+ require_once 'notifs.inc.php';
foreach ($this->settings as $field=>&$setting) {
if (!is_null($setting) && $this->changed[$field]) {
$setting->save($this, $field, $this->values[$field]);
}
+ if ($this->changed[$field] && @$this->watched[$field]) {
+ register_profile_update(S::i('uid'), $field);
+ }
}
$this->_saveData();
// Update the last modification date
XDB::execute('REPLACE INTO user_changes
SET user_id = {?}', S::v('uid'));
+ if (!S::has('suid')) {
+ register_watch_op(S::i('uid'), WATCH_FICHE);
+ }
global $platal;
$log =& $_SESSION['log'];
$log->log('profil', $platal->pl_self(1));