Merge branch 'master' of git://github.com/friendica/friendica
This commit is contained in:
commit
214ec91a3f
425 changed files with 14504 additions and 23377 deletions
|
@ -73,6 +73,49 @@ function contact_remove($id) {
|
|||
}
|
||||
|
||||
|
||||
// sends an unfriend message. Does not remove the contact
|
||||
|
||||
function terminate_friendship($user,$self,$contact) {
|
||||
|
||||
|
||||
$a = get_app();
|
||||
|
||||
require_once('include/datetime.php');
|
||||
|
||||
if($contact['network'] === NETWORK_OSTATUS) {
|
||||
|
||||
$slap = replace_macros(get_markup_template('follow_slap.tpl'), array(
|
||||
'$name' => $user['username'],
|
||||
'$profile_page' => $a->get_baseurl() . '/profile/' . $user['nickname'],
|
||||
'$photo' => $self['photo'],
|
||||
'$thumb' => $self['thumb'],
|
||||
'$published' => datetime_convert('UTC','UTC', 'now', ATOM_TIME),
|
||||
'$item_id' => 'urn:X-dfrn:' . $a->get_hostname() . ':unfollow:' . random_string(),
|
||||
'$title' => '',
|
||||
'$type' => 'text',
|
||||
'$content' => t('stopped following'),
|
||||
'$nick' => $user['nickname'],
|
||||
'$verb' => 'http://ostatus.org/schema/1.0/unfollow', // ACTIVITY_UNFOLLOW,
|
||||
'$ostat_follow' => '' // '<as:verb>http://ostatus.org/schema/1.0/unfollow</as:verb>' . "\r\n"
|
||||
));
|
||||
|
||||
if((x($contact,'notify')) && (strlen($contact['notify']))) {
|
||||
require_once('include/salmon.php');
|
||||
slapper($user,$contact['notify'],$slap);
|
||||
}
|
||||
}
|
||||
elseif($contact['network'] === NETWORK_DIASPORA) {
|
||||
require_once('include/diaspora.php');
|
||||
diaspora_unshare($user,$contact);
|
||||
}
|
||||
elseif($contact['network'] === NETWORK_DFRN) {
|
||||
require_once('include/items.php');
|
||||
dfrn_deliver($user,$contact,'placeholder', 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Contact has refused to recognise us as a friend. We will start a countdown.
|
||||
// If they still don't recognise us in 32 days, the relationship is over,
|
||||
// and we won't waste any more time trying to communicate with them.
|
||||
|
|
|
@ -567,8 +567,17 @@
|
|||
$_REQUEST['profile_uid'] = local_user();
|
||||
if(requestdata('parent'))
|
||||
$_REQUEST['type'] = 'net-comment';
|
||||
else
|
||||
else {
|
||||
$_REQUEST['type'] = 'wall';
|
||||
if(x($_FILES,'media')) {
|
||||
// upload the image if we have one
|
||||
$_REQUEST['hush']='yeah'; //tell wall_upload function to return img info instead of echo
|
||||
require_once('mod/wall_upload.php');
|
||||
$media = wall_upload_post($a);
|
||||
if(strlen($media)>0)
|
||||
$_REQUEST['body'] .= "\n\n".$media;
|
||||
}
|
||||
}
|
||||
|
||||
// set this so that the item_post() function is quiet and doesn't redirect or emit json
|
||||
|
||||
|
|
|
@ -298,6 +298,9 @@ function bbcode($Text,$preserve_nl = false) {
|
|||
$Text = preg_replace_callback("/\[nobb\](.*?)\[\/nobb\]/ism", 'bb_unspacefy_and_trim',$Text);
|
||||
$Text = preg_replace_callback("/\[pre\](.*?)\[\/pre\]/ism", 'bb_unspacefy_and_trim',$Text);
|
||||
|
||||
|
||||
$Text = preg_replace('/\[\&\;([#a-z0-9]+)\;\]/','&$1;',$Text);
|
||||
|
||||
// fix any escaped ampersands that may have been converted into links
|
||||
$Text = preg_replace("/\<(.*?)(src|href)=(.*?)\&\;(.*?)\>/ism",'<$1$2=$3&$4>',$Text);
|
||||
if(strlen($saved_image))
|
||||
|
|
|
@ -553,6 +553,14 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
|
|||
'$myphoto' => $a->contact['thumb'],
|
||||
'$comment' => t('Comment'),
|
||||
'$submit' => t('Submit'),
|
||||
'$edbold' => t('Bold'),
|
||||
'$editalic' => t('Italic'),
|
||||
'$eduline' => t('Underline'),
|
||||
'$edquote' => t('Quote'),
|
||||
'$edcode' => t('Code'),
|
||||
'$edimg' => t('Image'),
|
||||
'$edurl' => t('Link'),
|
||||
'$edvideo' => t('Video'),
|
||||
'$preview' => t('Preview'),
|
||||
'$ww' => (($mode === 'network') ? $commentww : '')
|
||||
));
|
||||
|
|
|
@ -706,10 +706,10 @@ function diaspora_post($importer,$xml) {
|
|||
continue;
|
||||
|
||||
$basetag = str_replace('_',' ',substr($tag,1));
|
||||
$body = str_replace($tag,'#[url=' . $a->get_baseurl() . '/search?search=' . rawurlencode($basetag) . ']' . $basetag . '[/url]',$body);
|
||||
$body = str_replace($tag,'#[url=' . $a->get_baseurl() . '/search?tag=' . rawurlencode($basetag) . ']' . $basetag . '[/url]',$body);
|
||||
if(strlen($str_tags))
|
||||
$str_tags .= ',';
|
||||
$str_tags .= '#[url=' . $a->get_baseurl() . '/search?search=' . rawurlencode($basetag) . ']' . $basetag . '[/url]';
|
||||
$str_tags .= '#[url=' . $a->get_baseurl() . '/search?tag=' . rawurlencode($basetag) . ']' . $basetag . '[/url]';
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -872,10 +872,10 @@ function diaspora_reshare($importer,$xml) {
|
|||
|
||||
|
||||
$basetag = str_replace('_',' ',substr($tag,1));
|
||||
$body = str_replace($tag,'#[url=' . $a->get_baseurl() . '/search?search=' . rawurlencode($basetag) . ']' . $basetag . '[/url]',$body);
|
||||
$body = str_replace($tag,'#[url=' . $a->get_baseurl() . '/search?tag=' . rawurlencode($basetag) . ']' . $basetag . '[/url]',$body);
|
||||
if(strlen($str_tags))
|
||||
$str_tags .= ',';
|
||||
$str_tags .= '#[url=' . $a->get_baseurl() . '/search?search=' . rawurlencode($basetag) . ']' . $basetag . '[/url]';
|
||||
$str_tags .= '#[url=' . $a->get_baseurl() . '/search?tag=' . rawurlencode($basetag) . ']' . $basetag . '[/url]';
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -1113,10 +1113,10 @@ function diaspora_comment($importer,$xml,$msg) {
|
|||
|
||||
|
||||
$basetag = str_replace('_',' ',substr($tag,1));
|
||||
$body = str_replace($tag,'#[url=' . $a->get_baseurl() . '/search?search=' . rawurlencode($basetag) . ']' . $basetag . '[/url]',$body);
|
||||
$body = str_replace($tag,'#[url=' . $a->get_baseurl() . '/search?tag=' . rawurlencode($basetag) . ']' . $basetag . '[/url]',$body);
|
||||
if(strlen($str_tags))
|
||||
$str_tags .= ',';
|
||||
$str_tags .= '#[url=' . $a->get_baseurl() . '/search?search=' . rawurlencode($basetag) . ']' . $basetag . '[/url]';
|
||||
$str_tags .= '#[url=' . $a->get_baseurl() . '/search?tag=' . rawurlencode($basetag) . ']' . $basetag . '[/url]';
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -1172,7 +1172,7 @@ function diaspora_comment($importer,$xml,$msg) {
|
|||
proc_run('php','include/notifier.php','comment',$message_id);
|
||||
}
|
||||
|
||||
$myconv = q("SELECT `author-link`, `author-avatar`, `parent` FROM `item` WHERE `parent-uri` = '%s' AND `uid` = %d AND `parent` != 0 ",
|
||||
$myconv = q("SELECT `author-link`, `author-avatar`, `parent` FROM `item` WHERE `parent-uri` = '%s' AND `uid` = %d AND `parent` != 0 AND `deleted` = 0 ",
|
||||
dbesc($parent_item['uri']),
|
||||
intval($importer['uid'])
|
||||
);
|
||||
|
|
|
@ -83,7 +83,7 @@ function collecturls($message) {
|
|||
$urls = array();
|
||||
foreach ($result as $treffer) {
|
||||
// A list of some links that should be ignored
|
||||
$list = array("/user/", "/tag/", "/group/", "/profile/", "/search?search=", "mailto:", "/u/", "/node/",
|
||||
$list = array("/user/", "/tag/", "/group/", "/profile/", "/search?search=", "/search?tag=", "mailto:", "/u/", "/node/",
|
||||
"//facebook.com/profile.php?id=", "//plus.google.com/");
|
||||
foreach ($list as $listitem)
|
||||
if (strpos($treffer[1], $listitem) !== false)
|
||||
|
|
|
@ -2479,7 +2479,7 @@ function local_delivery($importer,$data) {
|
|||
|
||||
if(!x($datarray['type']) || $datarray['type'] != 'activity') {
|
||||
|
||||
$myconv = q("SELECT `author-link`, `author-avatar`, `parent` FROM `item` WHERE `parent-uri` = '%s' AND `uid` = %d AND `parent` != 0 ",
|
||||
$myconv = q("SELECT `author-link`, `author-avatar`, `parent` FROM `item` WHERE `parent-uri` = '%s' AND `uid` = %d AND `parent` != 0 AND `deleted` = 0",
|
||||
dbesc($parent_uri),
|
||||
intval($importer['importer_uid'])
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue