-function add_user_tel($uid, $adrid, $telid, $tel) {
- XDB::execute(
- "INSERT INTO tels SET uid = {?}, adrid = {?}, telid = {?}, tel = {?}, tel_type = {?}, tel_pub = {?}",
- $uid, $adrid, $telid, $tel['tel'], $tel['tel_type'], $tel['tel_pub']);
+function add_user_tel($uid, $link_type, $link_id, $telid, $tel) {
+ require('profil.func.inc.php');
+ $fmt_phone = format_phone_number($tel['tel']);
+ $disp_phone = format_display_number($fmt_phone, $error);
+ XDB::execute("INSERT INTO profile_phones (uid, link_type, link_id, tel_id, tel_type, search_tel, display_tel, pub)
+ VALUES ({?}, {?}, {?}, {?}, {?}, {?}, {?}, {?})",
+ $uid, $link_type, $link_id, $telid, $tel['tel_type'], $fmt_phone, $disp_phone, $tel['tel_pub']);