X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=bin%2Fcron%2Fphones.check.php;h=b661e5eec8281389d5f82539897cc7c03e46ab87;hb=c3b581dc531c40960509e3115d8c61ebd5897ee3;hp=62fa4e56704579200e73fe62065a45fc73699212;hpb=3f5cf357e7ab02c9cbf616bc8cc3a70278af62cc;p=platal.git diff --git a/bin/cron/phones.check.php b/bin/cron/phones.check.php index 62fa4e5..b661e5e 100755 --- a/bin/cron/phones.check.php +++ b/bin/cron/phones.check.php @@ -13,7 +13,7 @@ function do_update_by_block($values) // Because there is no mysql update syntax for multiple updates in one query // we use a multiple insert syntax which will fail because the key already exist // and then update the display_tel - XDB::execute("INSERT INTO profile_phones (uid, link_type, link_id, tel_id ,tel_type, + XDB::execute("INSERT INTO profile_phones (pid, link_type, link_id, tel_id ,tel_type, search_tel, display_tel, pub, comment) VALUES " . $values . " ON DUPLICATE KEY UPDATE display_tel = VALUES(display_tel)"); @@ -65,7 +65,7 @@ foreach ($prefixes as $i => $prefix) { $regexp .= ')?'; } $regexp .= '$'; - $res = XDB::iterator("SELECT uid, link_type, link_id, tel_id, tel_type, search_tel, + $res = XDB::iterator("SELECT pid, link_type, link_id, tel_id, tel_type, search_tel, display_tel, pub, comment FROM profile_phones WHERE search_tel LIKE {?} AND display_tel NOT REGEXP {?}", @@ -80,7 +80,7 @@ foreach ($prefixes as $i => $prefix) { if ($values != '') { $values .= ",\n"; } - $values .= "('" . addslashes($phone['uid']) . "', '" . addslashes($phone['link_type']) + $values .= "('" . addslashes($phone['pid']) . "', '" . addslashes($phone['link_type']) . "', '" . addslashes($phone['link_id']) . "', '" . addslashes($phone['tel_id']) . "', '" . addslashes($phone['tel_type']) . "', '" . addslashes($phone['search_tel']) . "', '" . addslashes($disp)