aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/bbcode.php17
-rw-r--r--view/js/main.js6
2 files changed, 8 insertions, 15 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index 817986da0..7531bd774 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -326,22 +326,11 @@ function bb_ShareAttributes($match) {
$auth = is_matrix_url($profile);
}
- // message_id is never used, do we still need it?
- $message_id = "";
- preg_match("/message_id='(.*?)'/ism", $attributes, $matches);
- if ($matches[1] != "")
- $message_id = $matches[1];
-
- if(! $message_id) {
- preg_match("/guid='(.*?)'/ism", $attributes, $matches);
- if ($matches[1] != "")
- $message_id = $matches[1];
- }
-
+ $rnd = mt_rand();
$reldate = '<span class="autotime" title="' . datetime_convert('UTC', date_default_timezone_get(), $posted, 'c') . '" >' . datetime_convert('UTC', date_default_timezone_get(), $posted, 'r') . '</span>';
- $headline = '<div class="shared_container"> <div class="shared_header">';
+ $headline = '<div id="shared_container_' . $rnd . '" class="shared_container"> <div id="shared_header_' . $rnd . '" class="shared_header">';
if ($avatar != "")
$headline .= '<a href="' . (($auth) ? zid($profile) : $profile) . '" ><img src="' . $avatar . '" alt="' . $author . '" height="32" width="32" /></a>';
@@ -363,7 +352,7 @@ function bb_ShareAttributes($match) {
$headline .= '<span>' . $fmt . '</span></div>';
- $text = $headline . '<div class="reshared-content">' . trim($match[2]) . '</div></div>';
+ $text = $headline . '<div id="reshared-content-' . $rnd . '" class="reshared-content">' . trim($match[2]) . '</div></div>';
return $text;
}
diff --git a/view/js/main.js b/view/js/main.js
index dcd04f053..ca9ad8ca4 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -239,7 +239,11 @@ function handle_comment_form(e) {
},10000);
});
- function commentSaveChanges(convId,isFinal = false) {
+ function commentSaveChanges(convId, isFinal) {
+
+ if(typeof isFinal === 'undefined')
+ isFinal = false;
+
if(auto_save_draft) {
tmp = $('#' + emptyCommentElm).val();
if(tmp) {