The quote functionality is simplified
This commit is contained in:
parent
b5ad8c3e15
commit
0d3aa681b4
10 changed files with 170 additions and 257 deletions
|
@ -595,14 +595,7 @@ function item_post(App $a) {
|
|||
$datarray['protocol'] = Conversation::PARCEL_DIRECT;
|
||||
$datarray['direction'] = Conversation::PUSH;
|
||||
|
||||
if ($orig_post) {
|
||||
$datarray['edit'] = true;
|
||||
} else {
|
||||
// If this was a share, add missing data here
|
||||
$datarray = Item::addShareDataFromOriginal($datarray);
|
||||
|
||||
$datarray['edit'] = false;
|
||||
}
|
||||
$datarray['edit'] = $orig_post;
|
||||
|
||||
// Check for hashtags in the body and repair or add hashtag links
|
||||
if ($preview || $orig_post) {
|
||||
|
|
|
@ -42,11 +42,8 @@ function share_init(App $a) {
|
|||
}
|
||||
|
||||
$shared = BBCode::fetchShareAttributes($item['body']);
|
||||
if (!empty($shared['message_id']) || !empty($shared['link'])) {
|
||||
if (empty($shared['comment']) && (!empty($shared['message_id']) || !empty($shared['link']))) {
|
||||
$content = '[share]' . ($shared['message_id'] ?: $shared['link']) . '[/share]';
|
||||
} elseif (strpos($item['body'], '[/share]') !== false) {
|
||||
$pos = strpos($item['body'], '[share');
|
||||
$content = substr($item['body'], $pos);
|
||||
} else {
|
||||
$content = '[share]' . $item['uri'] . '[/share]';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue