Merge remote-tracking branch 'upstream/develop' into 1601-dfrn
This commit is contained in:
commit
4208acf4b6
|
@ -21,11 +21,22 @@ You can tag a person on a different network or one that is **not in your social
|
|||
|
||||
* @mike@macgirvin.com - This is called a "remote mention" and can only be an email-style locator, not a web URL.
|
||||
|
||||
Unless their system blocks unsolicited "mentions", the person tagged will likely receive a "Mention" post/activity or become a direct participant in the conversation in the case of public posts. Please note that Friendica blocks incoming "mentions" from people with no relationship to you. This is a spam prevention measure.
|
||||
Unless their system blocks unsolicited "mentions", the person tagged will likely receive a "Mention" post/activity or become a direct participant in the conversation in the case of public posts.
|
||||
Friendica blocks incoming “mentions” from people with no relationship to you.
|
||||
The exception is an ongiong conversation started from a contact of both you and the 3rd person or a conversation in a forum where you are a member of.
|
||||
This is a spam prevention measure.
|
||||
|
||||
Remote mentions are delivered using the OStatus protocol. This protocol is used by Friendica and GNU Social and several other systems, but is not currently implemented in Diaspora.
|
||||
Remote mentions are delivered using the OStatus protocol.
|
||||
This protocol is used by Friendica and GNU Social and several other systems, but is not currently implemented in Diaspora.
|
||||
As the OStatus protocol allows this Friendica user can be @-mentioned by users from platforms using this protocol in conversations if the "Enable OStatus support" is activated on the Friendica node.
|
||||
These @-mentions wont be blocked, even if there is no relationship between the sender and the receiver of the message.
|
||||
|
||||
Friendica makes no distinction between people and groups for the purpose of tagging. (Some other networks use !group to indicate a group.)
|
||||
Friendica makes no distinction between people and forums for the purpose of tagging.
|
||||
(Some other networks use !forum to indicate a forum.)
|
||||
|
||||
If you sort your contacts into groups, you cannot @-mention these groups.
|
||||
But you can select the group in the access control when creating a new posting, to allow (or disallow) a certain group of people to see the posting.
|
||||
See [Groups and Privacy](help/Groups-and-Privacy) for more details about grouping your contacts.
|
||||
|
||||
**Topical Tags**
|
||||
|
||||
|
|
|
@ -412,12 +412,12 @@ function get_contact($url, $uid = 0) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
$contact = q("SELECT `id`, `avatar-date` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d",
|
||||
$contact = q("SELECT `id`, `avatar-date` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d ORDER BY `id` LIMIT 2",
|
||||
dbesc(normalise_link($url)),
|
||||
intval($uid));
|
||||
|
||||
if (!$contact)
|
||||
$contact = q("SELECT `id`, `avatar-date` FROM `contact` WHERE `alias` IN ('%s', '%s') AND `uid` = %d",
|
||||
$contact = q("SELECT `id`, `avatar-date` FROM `contact` WHERE `alias` IN ('%s', '%s') AND `uid` = %d ORDER BY `id` LIMIT 1",
|
||||
dbesc($url),
|
||||
dbesc(normalise_link($url)),
|
||||
intval($uid));
|
||||
|
@ -441,9 +441,7 @@ function get_contact($url, $uid = 0) {
|
|||
if (!in_array($data["network"], array(NETWORK_DFRN, NETWORK_OSTATUS, NETWORK_DIASPORA)))
|
||||
return 0;
|
||||
|
||||
// tempory programming. Can be deleted after 2015-02-07
|
||||
if (($data["alias"] == "") AND (normalise_link($data["url"]) != normalise_link($url)))
|
||||
$data["alias"] = normalise_link($url);
|
||||
$url = $data["url"];
|
||||
|
||||
if ($contactid == 0) {
|
||||
q("INSERT INTO `contact` (`uid`, `created`, `url`, `nurl`, `addr`, `alias`, `notify`, `poll`,
|
||||
|
@ -472,7 +470,7 @@ function get_contact($url, $uid = 0) {
|
|||
dbesc($data["poco"])
|
||||
);
|
||||
|
||||
$contact = q("SELECT `id` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d",
|
||||
$contact = q("SELECT `id` FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d ORDER BY `id` LIMIT 2",
|
||||
dbesc(normalise_link($data["url"])),
|
||||
intval($uid));
|
||||
if (!$contact)
|
||||
|
@ -481,6 +479,11 @@ function get_contact($url, $uid = 0) {
|
|||
$contactid = $contact[0]["id"];
|
||||
}
|
||||
|
||||
if ((count($contact) > 1) AND ($uid == 0) AND ($contactid != 0) AND ($url != ""))
|
||||
q("DELETE FROM `contact` WHERE `nurl` = '%s' AND `id` != %d",
|
||||
dbesc(normalise_link($url)),
|
||||
intval($contactid));
|
||||
|
||||
require_once("Photo.php");
|
||||
|
||||
$photos = import_profile_photo($data["photo"],$uid,$contactid);
|
||||
|
|
|
@ -235,7 +235,9 @@ function scrape_feed($url) {
|
|||
$a = get_app();
|
||||
|
||||
$ret = array();
|
||||
$s = fetch_url($url);
|
||||
$cookiejar = tempnam(get_temppath(), 'cookiejar-scrape-feed-');
|
||||
$s = fetch_url($url, false, $redirects, 0, Null, $cookiejar);
|
||||
unlink($cookiejar);
|
||||
|
||||
$headers = $a->get_curl_headers();
|
||||
$code = $a->get_curl_code();
|
||||
|
@ -662,7 +664,9 @@ function probe_url($url, $mode = PROBE_NORMAL, $level = 1) {
|
|||
$vcard['photo'] = $feedret['photo'];
|
||||
require_once('library/simplepie/simplepie.inc');
|
||||
$feed = new SimplePie();
|
||||
$xml = fetch_url($poll);
|
||||
$cookiejar = tempnam(get_temppath(), 'cookiejar-scrape-feed-');
|
||||
$xml = fetch_url($poll, false, $redirects, 0, Null, $cookiejar);
|
||||
unlink($cookiejar);
|
||||
|
||||
logger('probe_url: fetch feed: ' . $poll . ' returns: ' . $xml, LOGGER_DATA);
|
||||
$a = get_app();
|
||||
|
|
|
@ -1551,6 +1551,8 @@
|
|||
WHERE `item`.`visible` = 1 and `item`.`moderated` = 0 AND `item`.`deleted` = 0
|
||||
AND `contact`.`id` = `item`.`contact-id`
|
||||
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
|
||||
AND NOT `item`.`private` AND `item`.`allow_cid` = '' AND `item`.`allow`.`gid` = ''
|
||||
AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = ''
|
||||
$sql_extra
|
||||
AND `item`.`id`=%d",
|
||||
intval($id)
|
||||
|
@ -1579,7 +1581,8 @@
|
|||
$_REQUEST["source"] = api_source();
|
||||
|
||||
item_post($a);
|
||||
}
|
||||
} else
|
||||
throw new ForbiddenException();
|
||||
|
||||
// this should output the last post (the one we just posted).
|
||||
$called_api = null;
|
||||
|
|
|
@ -430,7 +430,6 @@ function cron_repair_database() {
|
|||
q("UPDATE `item` INNER JOIN `item` AS `parent` ON `parent`.`uri` = `item`.`parent-uri` AND `parent`.`uid` = `item`.`uid` SET `item`.`parent` = `parent`.`id` WHERE `item`.`parent` = 0");
|
||||
|
||||
/// @todo
|
||||
/// - remove duplicated contacts with uid=0 (We could do this at the place where the contacts are stored)
|
||||
/// - remove thread entries without item
|
||||
/// - remove sign entries without item
|
||||
/// - remove children when parent got lost
|
||||
|
|
|
@ -42,6 +42,7 @@ if(!function_exists('z_fetch_url')){
|
|||
* @return array an assoziative array with:
|
||||
* * \e int \b return_code => HTTP return code or 0 if timeout or failure
|
||||
* * \e boolean \b success => boolean true (if HTTP 2xx result) or false
|
||||
* * \e string \b redirect_url => in case of redirect, content was finally retrieved from this URL
|
||||
* * \e string \b header => HTTP headers
|
||||
* * \e string \b body => fetched content
|
||||
*/
|
||||
|
@ -116,6 +117,9 @@ function z_fetch_url($url,$binary = false, &$redirects = 0, $opts=array()) {
|
|||
// if it throws any errors.
|
||||
|
||||
$s = @curl_exec($ch);
|
||||
if (curl_errno($ch) !== CURLE_OK) {
|
||||
logger('fetch_url error fetching '.$url.': '.curl_error($ch), LOGGER_NORMAL);
|
||||
}
|
||||
|
||||
$base = $s;
|
||||
$curl_info = @curl_getinfo($ch);
|
||||
|
@ -133,6 +137,10 @@ function z_fetch_url($url,$binary = false, &$redirects = 0, $opts=array()) {
|
|||
$base = substr($base,strlen($chunk));
|
||||
}
|
||||
|
||||
$a->set_curl_code($http_code);
|
||||
$a->set_curl_content_type($curl_info['content_type']);
|
||||
$a->set_curl_headers($header);
|
||||
|
||||
if($http_code == 301 || $http_code == 302 || $http_code == 303 || $http_code == 307) {
|
||||
$new_location_info = @parse_url($curl_info["redirect_url"]);
|
||||
$old_location_info = @parse_url($curl_info["url"]);
|
||||
|
@ -160,13 +168,13 @@ function z_fetch_url($url,$binary = false, &$redirects = 0, $opts=array()) {
|
|||
$a->set_curl_content_type($curl_info['content_type']);
|
||||
|
||||
$body = substr($s,strlen($header));
|
||||
$a->set_curl_headers($header);
|
||||
|
||||
|
||||
|
||||
$rc = intval($http_code);
|
||||
$ret['return_code'] = $rc;
|
||||
$ret['success'] = (($rc >= 200 && $rc <= 299) ? true : false);
|
||||
$ret['redirect_url'] = $url;
|
||||
if(! $ret['success']) {
|
||||
$ret['error'] = curl_error($ch);
|
||||
$ret['debug'] = $curl_info;
|
||||
|
|
|
@ -334,7 +334,9 @@ function onepoll_run(&$argv, &$argc){
|
|||
if($contact['rel'] == CONTACT_IS_FOLLOWER || $contact['blocked'] || $contact['readonly'])
|
||||
return;
|
||||
|
||||
$xml = fetch_url($contact['poll']);
|
||||
$cookiejar = tempnam(get_temppath(), 'cookiejar-onepoll-');
|
||||
$xml = fetch_url($contact['poll'], false, $redirects, 0, Null, $cookiejar);
|
||||
unlink($cookiejar);
|
||||
}
|
||||
elseif($contact['network'] === NETWORK_MAIL || $contact['network'] === NETWORK_MAIL2) {
|
||||
|
||||
|
|
|
@ -238,6 +238,10 @@ function proxy_url($url, $writemode = false, $size = "") {
|
|||
|
||||
$a = get_app();
|
||||
|
||||
if (substr($url, 0, strlen('http')) !== 'http') {
|
||||
return($url);
|
||||
}
|
||||
|
||||
// Only continue if it isn't a local image and the isn't deactivated
|
||||
if (proxy_is_local_image($url)) {
|
||||
$url = str_replace(normalise_link($a->get_baseurl())."/", $a->get_baseurl()."/", $url);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -431,7 +431,7 @@ $a->strings["User registrations waiting for confirmation"] = "Nutzeranmeldungen
|
|||
$a->strings["This page offers you some numbers to the known part of the federated social network your Friendica node is part of. These numbers are not complete but only reflect the part of the network your node is aware of."] = "Diese Seite präsentiert einige Zahlen zu dem bekannten Teil des föderalen sozialen Netzwerks, von dem deine Friendica Installation ein Teil ist. Diese Zahlen sind nicht absolut und reflektieren nur den Teil des Netzwerks, den dein Knoten kennt.";
|
||||
$a->strings["The <em>Auto Discovered Contact Directory</em> feature is not enabled, it will improve the data displayed here."] = "Die Funktion um <em>Automatisch ein Kontaktverzeichnis erstellen</em> ist nicht aktiv. Es wird die hier angezeigten Daten verbessern.";
|
||||
$a->strings["Administration"] = "Administration";
|
||||
$a->strings["Currently this node is aware of nodes from the following platforms:"] = "Momentan kennt dieser Knoten andere Knoten der folgenden Plattformen:";
|
||||
$a->strings["Currently this node is aware of %d nodes from the following platforms:"] = "Momentan kennt dieser Knoten %d andere Knoten der folgenden Plattformen:";
|
||||
$a->strings["ID"] = "ID";
|
||||
$a->strings["Recipient Name"] = "Empfänger Name";
|
||||
$a->strings["Recipient Profile"] = "Empfänger Profil";
|
||||
|
|
Loading…
Reference in New Issue
Block a user