X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Fprofil.func.inc.php;h=8a5edbf6a7618fcda33875150e118d85f25bd456;hb=361a5c1587c58b0e636eb1a31f451b5ffee93f95;hp=803dc301ebae0157289a48e4b1e6eef925d55953;hpb=a7de4ef724d1a3b0bf978a50ce7cc9d23412c7a0;p=platal.git diff --git a/include/profil.func.inc.php b/include/profil.func.inc.php index 803dc30..8a5edbf 100644 --- a/include/profil.func.inc.php +++ b/include/profil.func.inc.php @@ -1,6 +1,6 @@ $telb) $telids_b[$telb['telid']] = $i; + foreach ($bvar as $i => $telb) $telids_b[$telb['telid']] = $i; - if (isset($a['tels'])) + if (isset($a['tels'])) $avar = $a['tels']; else $avar = array(); @@ -161,7 +161,7 @@ function diff_user_address($a, $b) { } } } - + foreach ($telids_b as $telidb => $i) $ctels[] = array('telid' => $telidb, 'remove' => 1); @@ -183,8 +183,8 @@ function diff_user_address($a, $b) { function diff_user_addresses(&$a, &$b) { $c = $a; $adrids_b = array(); - foreach ($b as $i => $adrb) $adrids_b[$adrb['adrid']] = $i; - + foreach ($b as $i => $adrb) $adrids_b[$adrb['adrid']] = $i; + foreach ($a as $j => $adra) { if (isset($adra['adrid'])) { // if b has an address with the same adrid, compute diff