aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-23 03:27:14 -0800
committerfriendica <info@friendica.com>2015-01-23 03:27:14 -0800
commit7cd4374e3d2833725beeb1c3b65687dc0856619c (patch)
tree3030d4ad4b6af40bfc0d171ed2078fd552577bcc
parentc49c96962fdcdb69a06d4f7e641d6ab9768b7ca4 (diff)
parente87437626867caf133eee2ef7cdba39506497eab (diff)
downloadvolse-hubzilla-7cd4374e3d2833725beeb1c3b65687dc0856619c.tar.gz
volse-hubzilla-7cd4374e3d2833725beeb1c3b65687dc0856619c.tar.bz2
volse-hubzilla-7cd4374e3d2833725beeb1c3b65687dc0856619c.zip
Merge https://github.com/friendica/red into pending_merge
-rw-r--r--mod/ping.php2
-rw-r--r--mod/sharedwithme.php11
-rw-r--r--view/tpl/hdr.tpl2
3 files changed, 9 insertions, 6 deletions
diff --git a/mod/ping.php b/mod/ping.php
index 593ae21f8..1cebd152d 100644
--- a/mod/ping.php
+++ b/mod/ping.php
@@ -229,7 +229,7 @@ function ping_init(&$a) {
foreach($z as $zz) {
$notifs[] = array(
'notify_link' => $a->get_baseurl() . '/notify/view/' . $zz['id'],
- 'name' => '', // not required here because the name is in the message
+ 'name' => $zz['name'],
'url' => $zz['url'],
'photo' => $zz['photo'],
'when' => relative_date($zz['date']),
diff --git a/mod/sharedwithme.php b/mod/sharedwithme.php
index ff93051da..baaf41f61 100644
--- a/mod/sharedwithme.php
+++ b/mod/sharedwithme.php
@@ -12,7 +12,7 @@ function sharedwithme_content(&$a) {
$is_owner = (local_user() && (local_user() == $channel['channel_id']));
- //maintenance - see if a file got dropped and remove it systemwide
+ //maintenance - see if a file got dropped and remove it systemwide - this should possibly go to include/poller
$x = q("SELECT * FROM item WHERE verb = '%s' AND obj_type = '%s' AND uid = %d",
dbesc(ACTIVITY_UPDATE),
dbesc(ACTIVITY_OBJ_FILE),
@@ -26,18 +26,21 @@ function sharedwithme_content(&$a) {
$object = json_decode($xx['object'],true);
$hash = $object['hash'];
- //If object has a mid it's an update - the inlcuded mid is the latest and should not be removed
+ //If object has a mid it's an update activity - the inlcuded mid is the latest and should not be removed
$update = (($object['mid']) ? true : false);
if($update) {
$mid = $object['mid'];
- $y = q("DELETE FROM item WHERE (mid != '%s' AND obj_type = '%s' AND object LIKE '%s') AND (verb = '%s' OR verb = '%s')",
+ unset($object['mid']); //remove mid from object to match the post activity object
+
+ $y = q("DELETE FROM item WHERE (mid != '%s' AND obj_type = '%s') AND (object = '%s' AND verb = '%s') OR (object = '%s' AND verb = '%s')",
dbesc($mid),
dbesc(ACTIVITY_OBJ_FILE),
- dbesc('%"hash":"' . $hash . '"%'),
+ dbesc(json_encode($object)),
dbesc(ACTIVITY_POST),
+ dbesc($xx['object']),
dbesc(ACTIVITY_UPDATE)
);
diff --git a/view/tpl/hdr.tpl b/view/tpl/hdr.tpl
index cfd22e607..c3f0700f0 100644
--- a/view/tpl/hdr.tpl
+++ b/view/tpl/hdr.tpl
@@ -1,5 +1,5 @@
<div id="banner" class="hidden-sm hidden-xs">{{$banner}}</div>
<ul id="nav-notifications-template" style="display:none;" rel="template">
- <li class="{5}"><a href="{0}" title="{2} {3}"><img data-src="{1}"><span class='contactname'>{2}</span><span class="dropdown-sub-text">{3}<br>{4}</span></a></li>
+ <li class="{5}"><a href="{0}" title="{2} {3}"><img data-src="{1}"><span class="contactname">{2}</span><span class="dropdown-sub-text">{3}<br>{4}</span></a></li>
</ul>