aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xinclude/items.php24
-rwxr-xr-xview/theme/duepuntozero/jot.tpl5
-rw-r--r--view/theme/ghost/unsupported0
-rwxr-xr-xview/theme/testbubble/jot.tpl6
4 files changed, 30 insertions, 5 deletions
diff --git a/include/items.php b/include/items.php
index a1254e165..3c55fbb4f 100755
--- a/include/items.php
+++ b/include/items.php
@@ -1747,6 +1747,18 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
$datarray['parent-uri'] = $item_id;
$datarray['uid'] = $importer['uid'];
$datarray['contact-id'] = $contact['id'];
+
+ if(x($datarray,'owner-link') && strlen($datarray['owner-link']) && (! link_compare($datarray['owner-link'],$contact['url']))) {
+ // The item owner info is not our contact. It's OK and is to be expected if this is a tgroup delivery,
+ // but otherwise there's a possible data mixup on the sender's system.
+ // the tgroup delivery code called from item_store will correct it if it's a forum,
+ // but we're going to unconditionally correct it here so that the post will always be owned by our contact.
+ logger('local_delivery: Correcting item owner.', LOGGER_DEBUG);
+ $datarray['owner-name'] = $contact['name'];
+ $datarray['owner-link'] = $contact['url'];
+ $datarray['owner-avatar'] = $contact['thumb'];
+ }
+
$r = item_store($datarray);
continue;
@@ -2439,6 +2451,18 @@ function local_delivery($importer,$data) {
$datarray['parent-uri'] = $item_id;
$datarray['uid'] = $importer['importer_uid'];
$datarray['contact-id'] = $importer['id'];
+
+ if(x($datarray,'owner-link') && strlen($datarray['owner-link']) && (! link_compare($datarray['owner-link'],$importer['url']))) {
+ // The item owner info is not our contact. It's OK and is to be expected if this is a tgroup delivery,
+ // but otherwise there's a possible data mixup on the sender's system.
+ // the tgroup delivery code called from item_store will correct it if it's a forum,
+ // but we're going to unconditionally correct it here so that the post will always be owned by our contact.
+ logger('local_delivery: Correcting item owner.', LOGGER_DEBUG);
+ $datarray['owner-name'] = $importer['senderName'];
+ $datarray['owner-link'] = $importer['url'];
+ $datarray['owner-avatar'] = $importer['thumb'];
+ }
+
$r = item_store($datarray);
continue;
}
diff --git a/view/theme/duepuntozero/jot.tpl b/view/theme/duepuntozero/jot.tpl
index e356d1d8f..5fe1f954e 100755
--- a/view/theme/duepuntozero/jot.tpl
+++ b/view/theme/duepuntozero/jot.tpl
@@ -14,10 +14,11 @@
<input type="hidden" name="coord" id="jot-coord" value="" />
<input type="hidden" name="post_id" value="$post_id" />
<input type="hidden" name="preview" id="jot-preview" value="0" />
- <input name="title" id="jot-title" type="text" placeholder="$placeholdertitle" value="$title" class="jothidden" style="display:none">
+ <div id="jot-title-wrap"><input name="title" id="jot-title" type="text" placeholder="$placeholdertitle" value="$title" class="jothidden" style="display:none"></div>
+ <div id="jot-text-wrap">
<img id="profile-jot-text-loading" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{ if $content }}$content{{ else }}$share{{ endif }}</textarea>
-
+ </div>
<div id="profile-jot-submit-wrapper" class="jothidden">
<input type="submit" id="profile-jot-submit" name="submit" value="$share" />
diff --git a/view/theme/ghost/unsupported b/view/theme/ghost/unsupported
deleted file mode 100644
index e69de29bb..000000000
--- a/view/theme/ghost/unsupported
+++ /dev/null
diff --git a/view/theme/testbubble/jot.tpl b/view/theme/testbubble/jot.tpl
index 5bb5b4673..45d206d57 100755
--- a/view/theme/testbubble/jot.tpl
+++ b/view/theme/testbubble/jot.tpl
@@ -16,11 +16,11 @@
<input type="hidden" name="coord" id="jot-coord" value="" />
<input type="hidden" name="post_id" value="$post_id" />
<input type="hidden" name="preview" id="jot-preview" value="0" />
- <input name="title" id="jot-title" type="text" placeholder="$placeholdertitle" value="$title" class="jothidden" style="display:none">
-
+ <div id="jot-title-wrap"><input name="title" id="jot-title" type="text" placeholder="$placeholdertitle" value="$title" class="jothidden" style="display:none"></div>
+ <div id="jot-text-wrap">
<img id="profile-jot-text-loading" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{ if $content }}$content{{ else }}$share{{ endif }}</textarea>
-
+ </div>
<div id="profile-upload-wrapper" class="jot-tool" style="display: none;" >
<div id="wall-image-upload-div" ><a onclick="return false;" id="wall-image-upload" class="icon border camera" title="$upload"></a></div>
</div>