aboutsummaryrefslogtreecommitdiffstats
path: root/include/diaspora.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-11-01 17:30:52 -0700
committerFriendika <info@friendika.com>2011-11-01 17:30:52 -0700
commit0975ea86101281befec9258d58e28c88d7b8ae4d (patch)
tree81bae123c6ff781b0c253df21836c225f23fcd07 /include/diaspora.php
parent573670fa0c8a3d8f111430985d263499b79a6ac0 (diff)
downloadvolse-hubzilla-0975ea86101281befec9258d58e28c88d7b8ae4d.tar.gz
volse-hubzilla-0975ea86101281befec9258d58e28c88d7b8ae4d.tar.bz2
volse-hubzilla-0975ea86101281befec9258d58e28c88d7b8ae4d.zip
add attachments to Diaspora posts
Diffstat (limited to 'include/diaspora.php')
-rw-r--r--include/diaspora.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/diaspora.php b/include/diaspora.php
index f362a3478..ac78beb2f 100644
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -1418,6 +1418,17 @@ function diaspora_send_status($item,$owner,$contact,$public_batch = false) {
$body = xmlify(html_entity_decode(bb2diaspora($body)));
+ if($item['attach']) {
+ $cnt = preg_match_all('/href=\"(.*?)\"(.*?)title=\"(.*?)\"/ism',$item['attach'],$matches,PREG_SET_ORDER);
+ if(cnt) {
+ $body .= "\n" . t('Attachments:') . "\n";
+ foreach($matches as $mtch) {
+ $body .= '[' . $mtch[3] . '](' . $mtch[1] . ')' . "\n";
+ }
+ }
+ }
+
+
$public = (($item['private']) ? 'false' : 'true');
require_once('include/datetime.php');