|
|
@ -29,14 +29,14 @@ function ostatus_subscribe_content(App $a) |
|
|
|
if (DI::pConfig()->get($uid, 'ostatus', 'legacy_friends') == '') { |
|
|
|
|
|
|
|
if ($_REQUEST['url'] == '') { |
|
|
|
PConfig::delete($uid, 'ostatus', 'legacy_contact'); |
|
|
|
DI::pConfig()->delete($uid, 'ostatus', 'legacy_contact'); |
|
|
|
return $o . L10n::t('No contact provided.'); |
|
|
|
} |
|
|
|
|
|
|
|
$contact = Probe::uri($_REQUEST['url']); |
|
|
|
|
|
|
|
if (!$contact) { |
|
|
|
PConfig::delete($uid, 'ostatus', 'legacy_contact'); |
|
|
|
DI::pConfig()->delete($uid, 'ostatus', 'legacy_contact'); |
|
|
|
return $o . L10n::t('Couldn\'t fetch information for contact.'); |
|
|
|
} |
|
|
|
|
|
|
@ -46,7 +46,7 @@ function ostatus_subscribe_content(App $a) |
|
|
|
$curlResult = Network::curl($api . 'statuses/friends.json?screen_name=' . $contact['nick']); |
|
|
|
|
|
|
|
if (!$curlResult->isSuccess()) { |
|
|
|
PConfig::delete($uid, 'ostatus', 'legacy_contact'); |
|
|
|
DI::pConfig()->delete($uid, 'ostatus', 'legacy_contact'); |
|
|
|
return $o . L10n::t('Couldn\'t fetch friends for contact.'); |
|
|
|
} |
|
|
|
|
|
|
@ -63,8 +63,8 @@ function ostatus_subscribe_content(App $a) |
|
|
|
|
|
|
|
if ($counter >= $total) { |
|
|
|
DI::page()['htmlhead'] = '<meta http-equiv="refresh" content="0; URL=' . DI::baseUrl() . '/settings/connectors">'; |
|
|
|
PConfig::delete($uid, 'ostatus', 'legacy_friends'); |
|
|
|
PConfig::delete($uid, 'ostatus', 'legacy_contact'); |
|
|
|
DI::pConfig()->delete($uid, 'ostatus', 'legacy_friends'); |
|
|
|
DI::pConfig()->delete($uid, 'ostatus', 'legacy_contact'); |
|
|
|
$o .= L10n::t('Done'); |
|
|
|
return $o; |
|
|
|
} |
|
|
|