projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adds verification for 'Prénom' and 'Nom patronymique' so that they remain close enoug...
[platal.git]
/
include
/
profil.func.inc.php
diff --git
a/include/profil.func.inc.php
b/include/profil.func.inc.php
index
5e084be
..
4e332e2
100644
(file)
--- a/
include/profil.func.inc.php
+++ b/
include/profil.func.inc.php
@@
-1,6
+1,6
@@
<?php
/***************************************************************************
<?php
/***************************************************************************
- * Copyright (C) 2003-200
8
Polytechnique.org *
+ * Copyright (C) 2003-200
9
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 *
@@
-20,7
+20,6
@@
***************************************************************************/
***************************************************************************/
-require_once('applis.func.inc.php');
function replace_ifset(&$var,$req) {
if (Env::has($req)){
function replace_ifset(&$var,$req) {
if (Env::has($req)){
@@
-76,15
+75,15
@@
function diff_user_details(&$a, &$b, $view = 'private') { // compute $c = $a - $
}
function same_tel(&$a, &$b) {
}
function same_tel(&$a, &$b) {
- $numbera =
preg_replace('/[^0-9]/', '',
(string) $a);
- $numberb =
preg_replace('/[^0-9]/', '',
(string) $b);
+ $numbera =
format_phone_number(
(string) $a);
+ $numberb =
format_phone_number(
(string) $b);
return $numbera === $numberb;
}
function same_address(&$a, &$b) {
return
(same_field($a['adr1'],$b['adr1'])) &&
return $numbera === $numberb;
}
function same_address(&$a, &$b) {
return
(same_field($a['adr1'],$b['adr1'])) &&
- (same_field($a['adr
1'],$b['adr1
'])) &&
- (same_field($a['adr
1'],$b['adr1
'])) &&
+ (same_field($a['adr
2'],$b['adr2
'])) &&
+ (same_field($a['adr
3'],$b['adr3
'])) &&
(same_field($a['postcode'],$b['postcode'])) &&
(same_field($a['city'],$b['city'])) &&
(same_field($a['countrytxt'],$b['countrytxt'])) &&
(same_field($a['postcode'],$b['postcode'])) &&
(same_field($a['city'],$b['city'])) &&
(same_field($a['countrytxt'],$b['countrytxt'])) &&
@@
-322,7
+321,7
@@
function format_display_number($tel, &$error, $format = array('format'=>'','phon
substr($tel, 0, 1), substr($tel, 0, 2), substr($tel, 0, 3));
if ($res->numRows() == 0) {
$error = true;
substr($tel, 0, 1), substr($tel, 0, 2), substr($tel, 0, 3));
if ($res->numRows() == 0) {
$error = true;
- return '
*
+' . $tel;
+ return '+' . $tel;
}
$format = $res->fetchOneAssoc();
}
}
$format = $res->fetchOneAssoc();
}