Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master: syntax error from pasted text, remove ^M's bug #335 network search broken after new ssl policy settings whitespace notification for disapora comments * master:
This commit is contained in:
commit
a8c1cbc655
|
@ -1159,6 +1159,48 @@ function diaspora_comment($importer,$xml,$msg) {
|
||||||
|
|
||||||
proc_run('php','include/notifier.php','comment',$message_id);
|
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 ",
|
||||||
|
dbesc($parent_item['uri']),
|
||||||
|
intval($importer['uid'])
|
||||||
|
);
|
||||||
|
|
||||||
|
if(count($myconv)) {
|
||||||
|
$importer_url = $a->get_baseurl() . '/profile/' . $importer['nickname'];
|
||||||
|
|
||||||
|
foreach($myconv as $conv) {
|
||||||
|
|
||||||
|
// now if we find a match, it means we're in this conversation
|
||||||
|
|
||||||
|
if(! link_compare($conv['author-link'],$importer_url))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
require_once('include/enotify.php');
|
||||||
|
|
||||||
|
$conv_parent = $conv['parent'];
|
||||||
|
|
||||||
|
notification(array(
|
||||||
|
'type' => NOTIFY_COMMENT,
|
||||||
|
'notify_flags' => $importer['notify-flags'],
|
||||||
|
'language' => $importer['language'],
|
||||||
|
'to_name' => $importer['username'],
|
||||||
|
'to_email' => $importer['email'],
|
||||||
|
'uid' => $importer['uid'],
|
||||||
|
'item' => $datarray,
|
||||||
|
'link' => $a->get_baseurl() . '/display/' . $importer['nickname'] . '/' . $posted_id,
|
||||||
|
'source_name' => $datarray['author-name'],
|
||||||
|
'source_link' => $datarray['author-link'],
|
||||||
|
'source_photo' => $datarray['author-avatar'],
|
||||||
|
'verb' => ACTIVITY_POST,
|
||||||
|
'otype' => 'item',
|
||||||
|
'parent' => $conv_parent,
|
||||||
|
|
||||||
|
));
|
||||||
|
|
||||||
|
// only send one notification
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2026,6 +2026,7 @@ function local_delivery($importer,$data) {
|
||||||
if(($item['verb'] === ACTIVITY_TAG) && ($item['object-type'] === ACTVITY_OBJ_TAGTERM)) {
|
if(($item['verb'] === ACTIVITY_TAG) && ($item['object-type'] === ACTVITY_OBJ_TAGTERM)) {
|
||||||
$xo = parse_xml_string($item['object'],false);
|
$xo = parse_xml_string($item['object'],false);
|
||||||
$xt = parse_xml_string($item['target'],false);
|
$xt = parse_xml_string($item['target'],false);
|
||||||
|
|
||||||
if($xt->type === ACTIVITY_OBJ_NOTE) {
|
if($xt->type === ACTIVITY_OBJ_NOTE) {
|
||||||
$i = q("select * from `item` where uri = '%s' and uid = %d limit 1",
|
$i = q("select * from `item` where uri = '%s' and uid = %d limit 1",
|
||||||
dbesc($xt->id),
|
dbesc($xt->id),
|
||||||
|
|
|
@ -638,7 +638,7 @@ if(! function_exists('search')) {
|
||||||
function search($s,$id='search-box',$url='/search',$save = false) {
|
function search($s,$id='search-box',$url='/search',$save = false) {
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
$o = '<div id="' . $id . '">';
|
$o = '<div id="' . $id . '">';
|
||||||
$o .= '<form action="' . $a->get_baseurl() . $url . '" method="get" >';
|
$o .= '<form action="' . $a->get_baseurl((stristr($url,'network')) ? true : false) . $url . '" method="get" >';
|
||||||
$o .= '<input type="text" name="search" id="search-text" value="' . $s .'" />';
|
$o .= '<input type="text" name="search" id="search-text" value="' . $s .'" />';
|
||||||
$o .= '<input type="submit" name="submit" id="search-submit" value="' . t('Search') . '" />';
|
$o .= '<input type="submit" name="submit" id="search-submit" value="' . t('Search') . '" />';
|
||||||
if($save)
|
if($save)
|
||||||
|
|
|
@ -836,7 +836,7 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag) {
|
||||||
//if the tag is replaced...
|
//if the tag is replaced...
|
||||||
if(strpos($tag,'[url='))
|
if(strpos($tag,'[url='))
|
||||||
//...do nothing
|
//...do nothing
|
||||||
continue;
|
return;
|
||||||
//base tag has the tags name only
|
//base tag has the tags name only
|
||||||
$basetag = str_replace('_',' ',substr($tag,1));
|
$basetag = str_replace('_',' ',substr($tag,1));
|
||||||
//create text for link
|
//create text for link
|
||||||
|
|
|
@ -90,7 +90,7 @@ function saved_searches($search) {
|
||||||
$o = replace_macros($tpl, array(
|
$o = replace_macros($tpl, array(
|
||||||
'$title' => t('Saved Searches'),
|
'$title' => t('Saved Searches'),
|
||||||
'$add' => t('add'),
|
'$add' => t('add'),
|
||||||
'$searchbox' => search($search,'netsearch-box',$a->get_baseurl(true) . $srchurl,true),
|
'$searchbox' => search($search,'netsearch-box',$srchurl,true),
|
||||||
'$saved' => $saved,
|
'$saved' => $saved,
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue