Merge pull request #2825 from fentman/patch-1

Provide NotFound and Error return values
This commit is contained in:
Juanjo Menent 2015-05-13 21:23:56 +02:00
commit 3d1c0752d3

View File

@ -32,7 +32,8 @@
include '../master.inc.php';
$phone = GETPOST('phone');
$notfound = "Not found";
$error = "Error"
// Security check
if (empty($conf->clicktodial->enabled)) {
@ -64,13 +65,15 @@ if ($resql)
if ($obj)
{
$found = $obj->name;
} else {
$found = $notfound;
}
$db->free($resql);
}
else
{
dol_print_error($db,'Error');
$found = $error;
}
echo $found;