X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fprofil.func.inc.php;h=7b418d7c92296466ae0581beb785807adf2cc470;hb=ced003168bf3b75a29313c727fe28d65cb03057c;hp=04d7f3a6968aab361a64378116c4c195dd5d8aef;hpb=5e2307dcebc38ebb0ffe469967a377eb3baed571;p=platal.git diff --git a/include/profil.func.inc.php b/include/profil.func.inc.php index 04d7f3a..7b418d7 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 @@ -284,4 +284,5 @@ function diff_user_pros(&$a, &$b, $view = 'private') { return $c; } +// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: ?>