permet la suppression et le retour JSON de contact avec l'option des infos étendues

This commit is contained in:
Romain Guerrero 2016-02-09 00:04:49 +01:00
parent f3d36cd8a4
commit c5c4288139
2 changed files with 26 additions and 4 deletions

View file

@ -243,6 +243,17 @@
{
global $db;
echo json_encode($db->getFromTableWhere('contacts'));
if (RASPISMS_SETTINGS_EXTENDED_CONTACTS_INFOS)
{
$contacts = $db->getFromTableWhere('contacts', array(), '', false, false, false, array(array(
'table' => 'contacts_infos',
'type' => 'LEFT',
'on' => 'contacts_infos.id_contact = contacts.id'
)));
} else {
$contacts = $db->getFromTableWhere('contacts');
}
echo json_encode($contacts);
}
}