Fewer Defaults
This commit is contained in:
parent
8700d2a8ad
commit
c42c121e51
1 changed files with 6 additions and 7 deletions
|
@ -1302,7 +1302,7 @@ class PortableContact
|
||||||
if (isset($data->version)) {
|
if (isset($data->version)) {
|
||||||
$network = NETWORK_DFRN;
|
$network = NETWORK_DFRN;
|
||||||
|
|
||||||
$noscrape = $data->no_scrape_url;
|
$noscrape = defaults($data->no_scrape_url, '');
|
||||||
$version = $data->version;
|
$version = $data->version;
|
||||||
$site_name = $data->site_name;
|
$site_name = $data->site_name;
|
||||||
$info = $data->info;
|
$info = $data->info;
|
||||||
|
@ -1355,12 +1355,11 @@ class PortableContact
|
||||||
$info = strip_tags($info);
|
$info = strip_tags($info);
|
||||||
$platform = strip_tags($platform);
|
$platform = strip_tags($platform);
|
||||||
|
|
||||||
$fields = ['url' => $server_url, 'version' => defaults($version, ''),
|
$fields = ['url' => $server_url, 'version' => $version,
|
||||||
'site_name' => defaults($site_name, ''), 'info' => defaults($info, ''),
|
'site_name' => $site_name, 'info' => $info, 'register_policy' => $register_policy,
|
||||||
'register_policy' => defaults($register_policy, 0), 'poco' => defaults($poco, ''),
|
'poco' => $poco, 'noscrape' => $noscrape, 'network' => $network,
|
||||||
'noscrape' => defaults($noscrape, ''), 'network' => defaults($network, ''),
|
'platform' => $platform, 'registered-users' => $registered_users,
|
||||||
'platform' => defaults($platform, ''), 'registered-users' => defaults($registered_users, 0),
|
'last_contact' => $last_contact, 'last_failure' => $last_failure];
|
||||||
'last_contact' => defaults($last_contact, ''), 'last_failure' => defaults($last_failure, '')];
|
|
||||||
|
|
||||||
if ($found) {
|
if ($found) {
|
||||||
dba::update('gserver', $fields, ['nurl' => normalise_link($server_url)]);
|
dba::update('gserver', $fields, ['nurl' => normalise_link($server_url)]);
|
||||||
|
|
Loading…
Reference in a new issue