X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fprofil.func.inc.php;h=72579e68f019e480ca46543eb06ec910e5499545;hb=9e1816c7666767755abbc24f6a0df290efff81b6;hp=04d7f3a6968aab361a64378116c4c195dd5d8aef;hpb=5e2307dcebc38ebb0ffe469967a377eb3baed571;p=platal.git diff --git a/include/profil.func.inc.php b/include/profil.func.inc.php index 04d7f3a..72579e6 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: ?>