X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fprofil.func.inc.php;h=8a5edbf6a7618fcda33875150e118d85f25bd456;hb=b2c6bf975ecf150db121ffd72f4cdf8cb084e33b;hp=a20ce4cc6111904745d4a068b8644ceb5c18ef29;hpb=dd502514e4c52ed460753060b847df8ef155661e;p=platal.git diff --git a/include/profil.func.inc.php b/include/profil.func.inc.php index a20ce4c..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 @@ -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: ?>