aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-10-29 15:11:58 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-10-29 15:11:58 -0700
commita1e28bb669b1a9376b9c15bc32a3496ef0d906b9 (patch)
tree203a13b58831ac6c426b0f538e8b12b5498479f0 /mod
parentdc4bd531a4aee036d28dfc233662ac71e4f6e7df (diff)
parentc5aedb14a962290140b1f2b7cc1d2b62296c7624 (diff)
downloadvolse-hubzilla-a1e28bb669b1a9376b9c15bc32a3496ef0d906b9.tar.gz
volse-hubzilla-a1e28bb669b1a9376b9c15bc32a3496ef0d906b9.tar.bz2
volse-hubzilla-a1e28bb669b1a9376b9c15bc32a3496ef0d906b9.zip
Merge https://github.com/redmatrix/hubzilla into pending_merge
Diffstat (limited to 'mod')
-rw-r--r--mod/editpost.php1
-rw-r--r--mod/item.php4
2 files changed, 3 insertions, 2 deletions
diff --git a/mod/editpost.php b/mod/editpost.php
index 1bee16ee7..2f999858f 100644
--- a/mod/editpost.php
+++ b/mod/editpost.php
@@ -90,7 +90,6 @@ function editpost_content(&$a) {
$category .= ', ';
$category .= $cat['term'];
}
-
}
if($itm[0]['attach']) {
diff --git a/mod/item.php b/mod/item.php
index 4dcf8edd7..591dc8407 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -607,6 +607,7 @@ function item_post(&$a) {
if(preg_match_all('/(\[attachment\](.*?)\[\/attachment\])/',$body,$match)) {
$attachments = array();
+ $i = 0;
foreach($match[2] as $mtch) {
$attach_link = '';
$hash = substr($mtch,0,strpos($mtch,','));
@@ -626,7 +627,8 @@ function item_post(&$a) {
$attach_link = '[audio]' . z_root() . '/attach/' . $r['data']['hash'] . '/' . $r['data']['revision'] . (($ext) ? $ext : '') . '[/audio]';
elseif(strpos($r['data']['filetype'],'video/') !== false)
$attach_link = '[video]' . z_root() . '/attach/' . $r['data']['hash'] . '/' . $r['data']['revision'] . (($ext) ? $ext : '') . '[/video]';
- $body = str_replace($match[1],$attach_link,$body);
+ $body = str_replace($match[1][$i],$attach_link,$body);
+ $i++;
}
}