restructure the conditions if gnetwork and gaddr is empty

This commit is contained in:
rabuzarus 2017-06-01 12:47:47 +02:00
parent a726056c5f
commit 8806688d68

View File

@ -850,14 +850,14 @@ class NotificationsManager {
// get the missing data data from other sources
if ($arr['gnetwork'] == "" || $arr['gaddr'] == "") {
$ret = get_contact_details_by_url($arr['url']);
}
if ($arr['gnetwork'] == "") {
if ($arr['gnetwork'] == "" && $ret['network'] != "") {
$arr['gnetwork'] = $ret['network'];
}
if ($arr['gaddr'] == "") {
if ($arr['gaddr'] == "" && $ret['addr'] != "") {
$arr['gaddr'] = $ret['addr'];
}
}
return $arr;
}