Merge remote-tracking branch 'upstream/develop' into 1504-unified-follow
This commit is contained in:
commit
190b7d6070
|
@ -452,11 +452,6 @@ function network_content(&$a, $update = 0) {
|
||||||
}
|
}
|
||||||
set_pconfig(local_user(), 'network.view', 'net.selected', ($nets ? $nets : 'all'));
|
set_pconfig(local_user(), 'network.view', 'net.selected', ($nets ? $nets : 'all'));
|
||||||
|
|
||||||
/*if ($update) {
|
|
||||||
print_r($_GET);
|
|
||||||
die("ss");
|
|
||||||
}*/
|
|
||||||
|
|
||||||
if(! $update) {
|
if(! $update) {
|
||||||
if($group) {
|
if($group) {
|
||||||
if(($t = group_public_members($group)) && (! get_pconfig(local_user(),'system','nowarn_insecure'))) {
|
if(($t = group_public_members($group)) && (! get_pconfig(local_user(),'system','nowarn_insecure'))) {
|
||||||
|
@ -471,6 +466,14 @@ die("ss");
|
||||||
|
|
||||||
$celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
|
$celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
|
||||||
|
|
||||||
|
$content = "";
|
||||||
|
|
||||||
|
if ($cid) {
|
||||||
|
$contact = q("SELECT `nick` FROM `contact` WHERE `id` = %d AND `uid` = %d AND `forum`", intval($cid), intval(local_user()));
|
||||||
|
if ($contact)
|
||||||
|
$content = "@".$contact[0]["nick"]."+".$cid;
|
||||||
|
}
|
||||||
|
|
||||||
$x = array(
|
$x = array(
|
||||||
'is_owner' => true,
|
'is_owner' => true,
|
||||||
'allow_location' => $a->user['allow_location'],
|
'allow_location' => $a->user['allow_location'],
|
||||||
|
@ -483,6 +486,7 @@ die("ss");
|
||||||
'visitor' => 'block',
|
'visitor' => 'block',
|
||||||
'profile_uid' => local_user(),
|
'profile_uid' => local_user(),
|
||||||
'acl_data' => construct_acl_data($a, $a->user), // For non-Javascript ACL selector
|
'acl_data' => construct_acl_data($a, $a->user), // For non-Javascript ACL selector
|
||||||
|
'content' => $content,
|
||||||
);
|
);
|
||||||
|
|
||||||
$o .= status_editor($a,$x);
|
$o .= status_editor($a,$x);
|
||||||
|
|
|
@ -97,15 +97,6 @@ function parseurl_getsiteinfo($url, $no_guessing = false, $do_oembed = true, $co
|
||||||
return($siteinfo);
|
return($siteinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($do_oembed) {
|
|
||||||
require_once("include/oembed.php");
|
|
||||||
|
|
||||||
$oembed_data = oembed_fetch_url($url);
|
|
||||||
|
|
||||||
if ($oembed_data->type != "error")
|
|
||||||
$siteinfo["type"] = $oembed_data->type;
|
|
||||||
}
|
|
||||||
|
|
||||||
// if the file is too large then exit
|
// if the file is too large then exit
|
||||||
if ($curl_info["download_content_length"] > 1000000)
|
if ($curl_info["download_content_length"] > 1000000)
|
||||||
return($siteinfo);
|
return($siteinfo);
|
||||||
|
@ -114,6 +105,24 @@ function parseurl_getsiteinfo($url, $no_guessing = false, $do_oembed = true, $co
|
||||||
if (($curl_info["content_type"] != "") AND !strstr(strtolower($curl_info["content_type"]),"html"))
|
if (($curl_info["content_type"] != "") AND !strstr(strtolower($curl_info["content_type"]),"html"))
|
||||||
return($siteinfo);
|
return($siteinfo);
|
||||||
|
|
||||||
|
if ($do_oembed) {
|
||||||
|
require_once("include/oembed.php");
|
||||||
|
|
||||||
|
$oembed_data = oembed_fetch_url($url);
|
||||||
|
|
||||||
|
if ($oembed_data->type != "error")
|
||||||
|
$siteinfo["type"] = $oembed_data->type;
|
||||||
|
|
||||||
|
if (($oembed_data->type == "link") AND ($siteinfo["type"] != "photo")) {
|
||||||
|
if (isset($oembed_data->title))
|
||||||
|
$siteinfo["title"] = $oembed_data->title;
|
||||||
|
if (isset($oembed_data->description))
|
||||||
|
$siteinfo["text"] = trim($oembed_data->description);
|
||||||
|
if (isset($oembed_data->thumbnail_url))
|
||||||
|
$siteinfo["image"] = $oembed_data->thumbnail_url;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$stamp1 = microtime(true);
|
$stamp1 = microtime(true);
|
||||||
|
|
||||||
// Now fetch the body as well
|
// Now fetch the body as well
|
||||||
|
@ -283,15 +292,6 @@ function parseurl_getsiteinfo($url, $no_guessing = false, $do_oembed = true, $co
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($oembed_data) AND ($oembed_data->type == "link") AND ($siteinfo["type"] != "photo")) {
|
|
||||||
if (isset($oembed_data->title) AND (trim($oembed_data->title) != ""))
|
|
||||||
$siteinfo["title"] = $oembed_data->title;
|
|
||||||
if (isset($oembed_data->description) AND (trim($oembed_data->description) != ""))
|
|
||||||
$siteinfo["text"] = trim($oembed_data->description);
|
|
||||||
if (isset($oembed_data->thumbnail_url) AND (trim($oembed_data->thumbnail_url) != ""))
|
|
||||||
$siteinfo["image"] = $oembed_data->thumbnail_url;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((@$siteinfo["image"] == "") AND !$no_guessing) {
|
if ((@$siteinfo["image"] == "") AND !$no_guessing) {
|
||||||
$list = $xpath->query("//img[@src]");
|
$list = $xpath->query("//img[@src]");
|
||||||
foreach ($list as $node) {
|
foreach ($list as $node) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user