aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorHabeas Codice <habeascodice@federated.social>2015-01-23 17:26:37 -0800
committerHabeas Codice <habeascodice@federated.social>2015-01-23 17:26:37 -0800
commit0405f2bcb973118e6567fd44a7994aa06f54fe7a (patch)
tree8926d35b5168111ab3f80d517ed97bce660181b1 /mod
parent891d231bbe4ee4499cf9e62013971b85a0542404 (diff)
parentbe9fc16bd5833e58ba2c3e5ed19153548437fe45 (diff)
downloadvolse-hubzilla-0405f2bcb973118e6567fd44a7994aa06f54fe7a.tar.gz
volse-hubzilla-0405f2bcb973118e6567fd44a7994aa06f54fe7a.tar.bz2
volse-hubzilla-0405f2bcb973118e6567fd44a7994aa06f54fe7a.zip
Merge branch 'master' of https://github.com/friendica/red
Diffstat (limited to 'mod')
-rw-r--r--mod/filestorage.php3
-rw-r--r--mod/ping.php2
-rw-r--r--mod/sharedwithme.php38
3 files changed, 13 insertions, 30 deletions
diff --git a/mod/filestorage.php b/mod/filestorage.php
index 9852f4e73..05f6a79e6 100644
--- a/mod/filestorage.php
+++ b/mod/filestorage.php
@@ -38,8 +38,9 @@ function filestorage_post(&$a) {
//Build directory tree and redirect
$channel = $a->get_channel();
$cloudPath = get_parent_cloudpath($channel_id, $channel['channel_address'], $resource);
+ $object = get_file_activity_object($channel_id, $resource, $cloudPath);
- file_activity($channel_id, $resource, $cloudPath, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny, 'post', $no_activity);
+ file_activity($channel_id, $object, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny, 'post', $no_activity);
goaway($cloudPath);
}
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..8b7d2661c 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),
@@ -24,35 +24,17 @@ function sharedwithme_content(&$a) {
foreach($x as $xx) {
$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
- $update = (($object['mid']) ? true : false);
+ $d_mid = $object['d_mid'];
+ $u_mid = $xx['mid'];
- 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')",
- dbesc($mid),
- dbesc(ACTIVITY_OBJ_FILE),
- dbesc('%"hash":"' . $hash . '"%'),
- dbesc(ACTIVITY_POST),
- dbesc(ACTIVITY_UPDATE)
- );
-
- }
-
- else {
-
- $z = q("DELETE FROM item WHERE (obj_type = '%s' AND object LIKE '%s') AND (verb = '%s' OR verb = '%s')",
- dbesc(ACTIVITY_OBJ_FILE),
- dbesc('%"hash":"' . $hash . '"%'),
- dbesc(ACTIVITY_POST),
- dbesc(ACTIVITY_UPDATE)
- );
-
- }
+ $y = q("DELETE FROM item WHERE obj_type = '%s' AND (verb = '%s' AND mid = '%s') OR (verb = '%s' AND mid = '%s')",
+ dbesc(ACTIVITY_OBJ_FILE),
+ dbesc(ACTIVITY_POST),
+ dbesc($d_mid),
+ dbesc(ACTIVITY_UPDATE),
+ dbesc($u_mid)
+ );
}