1
0
Fork 0

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,13 +850,13 @@ 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'] == "") {
$arr['gnetwork'] = $ret['network'];
}
if ($arr['gaddr'] == "") {
$arr['gaddr'] = $ret['addr'];
if ($arr['gnetwork'] == "" && $ret['network'] != "") {
$arr['gnetwork'] = $ret['network'];
}
if ($arr['gaddr'] == "" && $ret['addr'] != "") {
$arr['gaddr'] = $ret['addr'];
}
}
return $arr;