aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/item.php')
-rw-r--r--mod/item.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/mod/item.php b/mod/item.php
index 9ffcc7de2..894e23a0f 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -470,11 +470,13 @@ function item_post(&$a) {
require_once('include/text.php');
if($uid && $uid == $profile_uid && feature_enabled($uid,'markdown')) {
- require_once('include/bb2diaspora.php');
- $body = diaspora2bb(escape_tags($body),true);
+ require_once('include/bb2diaspora.php');
+ $body = escape_tags($body);
+ $body = preg_replace_callback('/\[share(.*?)\]/ism','share_shield',$body);
+ $body = diaspora2bb($body,true);
+ $body = preg_replace_callback('/\[share(.*?)\]/ism','share_unshield',$body);
}
-
// BBCODE alert: the following functions assume bbcode input
// and will require alternatives for alternative content-types (text/html, text/markdown, text/plain, etc.)
// we may need virtual or template classes to implement the possible alternatives
@@ -683,7 +685,8 @@ function item_post(&$a) {
}
}
- $item_flags |= ITEM_UNSEEN;
+ if(local_user() != $profile_uid)
+ $item_flags |= ITEM_UNSEEN;
if($post_type === 'wall' || $post_type === 'wall-comment')
$item_flags = $item_flags | ITEM_WALL;