diff options
Diffstat (limited to 'include/diaspora.php')
-rw-r--r-- | include/diaspora.php | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/include/diaspora.php b/include/diaspora.php index 06df9c24a..2051de5fc 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -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']) ); @@ -2298,14 +2298,20 @@ function diaspora_transmit($owner,$contact,$slap,$public_batch) { logger('diaspora_transmit: ' . $logid . ' ' . $dest_url); - if(! intval(get_config('system','diaspora_test'))) - post_url($dest_url . '/', $slap); + if(was_recently_delayed($contact['id'])) { + $return_code = 0; + } else { - logger('diaspora_transmit: test_mode'); - return 200; + if(! intval(get_config('system','diaspora_test'))) { + post_url($dest_url . '/', $slap); + $return_code = $a->get_curl_code(); + } + else { + logger('diaspora_transmit: test_mode'); + return 200; + } } - - $return_code = $a->get_curl_code(); + logger('diaspora_transmit: ' . $logid . ' returns: ' . $return_code); if((! $return_code) || (($return_code == 503) && (stristr($a->get_curl_headers(),'retry-after')))) { |