mirror of
https://github.com/friendica/friendica
synced 2024-12-23 11:20:15 +00:00
Bugfix: Following mail accounts is now possible again
This commit is contained in:
parent
303a59f1d0
commit
7c8c8b821a
2 changed files with 15 additions and 2 deletions
|
@ -819,7 +819,9 @@ function probe_url($url, $mode = PROBE_NORMAL, $level = 1) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Cache::set("probe_url:".$mode.":".$url,serialize($result), CACHE_DAY);
|
// Only store into the cache if the value seems to be valid
|
||||||
|
if ($result['network'] != NETWORK_FEED)
|
||||||
|
Cache::set("probe_url:".$mode.":".$url,serialize($result), CACHE_DAY);
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
require_once('include/Scrape.php');
|
require_once('include/Scrape.php');
|
||||||
require_once('include/follow.php');
|
require_once('include/follow.php');
|
||||||
|
require_once('include/contact_selectors.php');
|
||||||
|
|
||||||
function follow_content(&$a) {
|
function follow_content(&$a) {
|
||||||
|
|
||||||
|
@ -30,6 +31,9 @@ function follow_content(&$a) {
|
||||||
|
|
||||||
$ret = probe_url($url);
|
$ret = probe_url($url);
|
||||||
|
|
||||||
|
if ($ret["network"] == NETWORK_MAIL)
|
||||||
|
$ret["url"] = $ret["addr"];
|
||||||
|
|
||||||
if($ret['network'] === NETWORK_DFRN) {
|
if($ret['network'] === NETWORK_DFRN) {
|
||||||
$request = $ret["request"];
|
$request = $ret["request"];
|
||||||
$tpl = get_markup_template('dfrn_request.tpl');
|
$tpl = get_markup_template('dfrn_request.tpl');
|
||||||
|
@ -51,8 +55,15 @@ function follow_content(&$a) {
|
||||||
// Makes the connection request for friendica contacts easier
|
// Makes the connection request for friendica contacts easier
|
||||||
$_SESSION["fastlane"] = $ret["url"];
|
$_SESSION["fastlane"] = $ret["url"];
|
||||||
|
|
||||||
|
$header = $ret["name"];
|
||||||
|
|
||||||
|
if ($ret["addr"] != "")
|
||||||
|
$header .= " <".$ret["addr"].">";
|
||||||
|
|
||||||
|
$header .= " (".network_to_name($ret['network']).")";
|
||||||
|
|
||||||
$o = replace_macros($tpl,array(
|
$o = replace_macros($tpl,array(
|
||||||
'$header' => $ret["name"]." (".$ret["addr"].")",
|
'$header' => htmlentities($header),
|
||||||
'$photo' => $ret["photo"],
|
'$photo' => $ret["photo"],
|
||||||
'$desc' => "",
|
'$desc' => "",
|
||||||
'$pls_answer' => t('Please answer the following:'),
|
'$pls_answer' => t('Please answer the following:'),
|
||||||
|
|
Loading…
Reference in a new issue