projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixes sending of homonyms emails (previously, emails for "pre-robot" and "robot"...
[platal.git]
/
include
/
profil.func.inc.php
diff --git
a/include/profil.func.inc.php
b/include/profil.func.inc.php
index
803dc30
..
8a5edbf
100644
(file)
--- a/
include/profil.func.inc.php
+++ b/
include/profil.func.inc.php
@@
-1,6
+1,6
@@
<?php
/***************************************************************************
<?php
/***************************************************************************
- * Copyright (C) 2003-200
7
Polytechnique.org *
+ * Copyright (C) 2003-200
8
Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-46,7
+46,7
@@
function put_in_db($string){
}
// example of use for diff_user_details : get $b from database, $a from other site
}
// example of use for diff_user_details : get $b from database, $a from other site
-// calculate diff $c and add $c in database (with set_user_details)
+// calculate diff $c and add $c in database (with set_user_details)
function diff_user_details(&$a, &$b, $view = 'private') { // compute $c = $a - $b
// if (!isset($b) || !$b || !is_array($b) || count($b) == 0)
// return $a;
function diff_user_details(&$a, &$b, $view = 'private') { // compute $c = $a - $b
// if (!isset($b) || !$b || !is_array($b) || count($b) == 0)
// return $a;
@@
-131,11
+131,11
@@
function diff_user_address($a, $b) {
$a['pub'] = $b['pub'];
if (isset($b['tels'])) {
$bvar = $b['tels'];
$a['pub'] = $b['pub'];
if (isset($b['tels'])) {
$bvar = $b['tels'];
-
+
$telids_b = array();
$telids_b = array();
- foreach ($bvar as $i => $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();
$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);
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();
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
foreach ($a as $j => $adra) {
if (isset($adra['adrid'])) {
// if b has an address with the same adrid, compute diff