From: Stéphane Jacob Date: Sun, 12 Apr 2009 13:47:13 +0000 (+0200) Subject: Fixes address edition: only notifies an address modification if it is actually modified. X-Git-Tag: xorg/1.0.0~332^2~313^2~14 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=7f5418fd5e2a50a9c6c51a501167079ae6a501dc;p=platal.git Fixes address edition: only notifies an address modification if it is actually modified. --- diff --git a/modules/profile/addresses.inc.php b/modules/profile/addresses.inc.php index 49b7f95..c6cb2c2 100644 --- a/modules/profile/addresses.inc.php +++ b/modules/profile/addresses.inc.php @@ -207,9 +207,18 @@ class ProfileAddresses extends ProfilePage } foreach ($this->values['addresses'] as $id => &$address) { if (!isset($address['tel'])) { - $address['tel'] = array(); + $address['tel'] = array( + 0 => array( + 'type' => 'fixed', + 'tel' => '', + 'pub' => 'private', + 'comment' => '', + ) + ); } unset($address['id']); + $address['changed'] = 0; + $address['removed'] = 0; } } } diff --git a/templates/geoloc/form.address.tpl b/templates/geoloc/form.address.tpl index 50ecdf3..229d1e8 100644 --- a/templates/geoloc/form.address.tpl +++ b/templates/geoloc/form.address.tpl @@ -49,19 +49,11 @@ {/if} - - - - - - - -