fix #83
This commit is contained in:
parent
ec28dee728
commit
c5aedb14a9
@ -90,7 +90,6 @@ function editpost_content(&$a) {
|
|||||||
$category .= ', ';
|
$category .= ', ';
|
||||||
$category .= $cat['term'];
|
$category .= $cat['term'];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($itm[0]['attach']) {
|
if($itm[0]['attach']) {
|
||||||
|
@ -607,6 +607,7 @@ function item_post(&$a) {
|
|||||||
|
|
||||||
if(preg_match_all('/(\[attachment\](.*?)\[\/attachment\])/',$body,$match)) {
|
if(preg_match_all('/(\[attachment\](.*?)\[\/attachment\])/',$body,$match)) {
|
||||||
$attachments = array();
|
$attachments = array();
|
||||||
|
$i = 0;
|
||||||
foreach($match[2] as $mtch) {
|
foreach($match[2] as $mtch) {
|
||||||
$attach_link = '';
|
$attach_link = '';
|
||||||
$hash = substr($mtch,0,strpos($mtch,','));
|
$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]';
|
$attach_link = '[audio]' . z_root() . '/attach/' . $r['data']['hash'] . '/' . $r['data']['revision'] . (($ext) ? $ext : '') . '[/audio]';
|
||||||
elseif(strpos($r['data']['filetype'],'video/') !== false)
|
elseif(strpos($r['data']['filetype'],'video/') !== false)
|
||||||
$attach_link = '[video]' . z_root() . '/attach/' . $r['data']['hash'] . '/' . $r['data']['revision'] . (($ext) ? $ext : '') . '[/video]';
|
$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++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user