X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fostatus_subscribe.php;h=3250bdc2a2d7cea10df77dc403afd92a0f6ade67;hb=c22920edba4f80fee2d828a9fe265a9cb702e81c;hp=c950e9700e4a5fc74b1738480f8827d8f50caff7;hpb=4b6afbf6814acde5151edc74f0b6cf1fd7685432;p=friendica.git diff --git a/mod/ostatus_subscribe.php b/mod/ostatus_subscribe.php index c950e9700e..3250bdc2a2 100644 --- a/mod/ostatus_subscribe.php +++ b/mod/ostatus_subscribe.php @@ -1,17 +1,20 @@ ".t("Subsribing to OStatus contacts").""; + $o = "

".t("Subscribing to OStatus contacts")."

"; $uid = local_user(); @@ -21,21 +24,24 @@ function ostatus_subscribe_content(&$a) { if (get_pconfig($uid, "ostatus", "legacy_friends") == "") { - if ($_REQUEST["url"] == "") + if ($_REQUEST["url"] == "") { return $o.t("No contact provided."); + } $contact = probe_url($_REQUEST["url"]); - if (!$contact) + if (!$contact) { return $o.t("Couldn't fetch information for contact."); + } $api = $contact["baseurl"]."/api/"; // Fetching friends $data = z_fetch_url($api."statuses/friends.json?screen_name=".$contact["nick"]); - if (!$data["success"]) + if (!$data["success"]) { return $o.t("Couldn't fetch friends for contact."); + } set_pconfig($uid, "ostatus", "legacy_friends", $data["body"]); } @@ -45,7 +51,7 @@ function ostatus_subscribe_content(&$a) { $total = sizeof($friends); if ($counter >= $total) { - $a->page['htmlhead'] = ''; + $a->page['htmlhead'] = ''; del_pconfig($uid, "ostatus", "legacy_friends"); del_pconfig($uid, "ostatus", "legacy_contact"); $o .= t("Done"); @@ -61,18 +67,20 @@ function ostatus_subscribe_content(&$a) { $data = probe_url($url); if ($data["network"] == NETWORK_OSTATUS) { $result = new_contact($uid,$url,true); - if ($result["success"]) + if ($result["success"]) { $o .= " - ".t("success"); - else + } else { $o .= " - ".t("failed"); - } else + } + } else { $o .= " - ".t("ignored"); + } $o .= "

"; $o .= "

".t("Keep this window open until done.")."

"; - $a->page['htmlhead'] = ''; + $a->page['htmlhead'] = ''; return $o; }