if ($format['format'] == '') {
// If the country does not have a phone number format, the number will be displayed
// as "+prefix ## ## ## ##...".
- $format['format'] = '+p';
+ $format['format'] = '(+p)';
}
/* Formats the phone number according t the template with these rules:
$phone, $country);
}
+$res = XDB::iterator('SELECT pid, link_type, link_id, tel_id AS id, search_tel AS search, search_tel AS display
+ FROM profile_phones
+ WHERE search_tel LIKE \'33%\'');
+while ($item = $res->next()) {
+ $phone = new Phone($item);
+ $phone->format();
+ XDB::execute('UPDATE profile_phones
+ SET display_tel = {?}
+ WHERE pid = {?} AND link_type = {?}
+ AND link_id = {?} AND tel_id = {?}',
+ $phone->display, $phone->pid(), $phone->linkType(),
+ $phone->linkId(), $phone->id());
+}
+
/* vim:set et sw=4 sts=4 ts=4: */
?>