restructure the conditions if gnetwork and gaddr is empty
This commit is contained in:
parent
a726056c5f
commit
8806688d68
1 changed files with 6 additions and 6 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue