aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photos.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2010-11-03 16:48:21 -0700
committerFriendika <info@friendika.com>2010-11-03 16:48:21 -0700
commita985ad4a5407c3cbc0d0a3919e19ddd99bf108af (patch)
tree8d4cc4b5e0cd4d452c571ea41e8f32e81127b028 /mod/photos.php
parent98a508532f0f3ea35748fa650aa3cad5e929e3de (diff)
downloadvolse-hubzilla-a985ad4a5407c3cbc0d0a3919e19ddd99bf108af.tar.gz
volse-hubzilla-a985ad4a5407c3cbc0d0a3919e19ddd99bf108af.tar.bz2
volse-hubzilla-a985ad4a5407c3cbc0d0a3919e19ddd99bf108af.zip
add activity target to items, allow multiple link relations
Diffstat (limited to 'mod/photos.php')
-rw-r--r--mod/photos.php34
1 files changed, 31 insertions, 3 deletions
diff --git a/mod/photos.php b/mod/photos.php
index 8d2805fde..298bc9907 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -259,6 +259,7 @@ function photos_post(&$a) {
if($x !== '@' && $x !== '#')
$rawtags = '#' . $rawtags;
+ $taginfo = array();
$tags = get_tags($rawtags);
if(count($tags)) {
@@ -273,12 +274,14 @@ function photos_post(&$a) {
if($link['@attributes']['rel'] === 'http://webfinger.net/rel/profile-page')
$profile = $link['@attributes']['href'];
if($link['@attributes']['rel'] === 'salmon') {
+ $salmon = '$url:' . str_replace(',','%sc',$link['@attributes']['href']);
if(strlen($inform))
$inform .= ',';
- $inform .= 'url:' . str_replace(',','%2c',$link['@attributes']['href']);
+ $inform .= $salmon;
}
}
}
+ $taginfo[] = array($newname,$profile,$salmon);
}
else {
$newname = $name;
@@ -297,12 +300,14 @@ function photos_post(&$a) {
}
if(count($r)) {
$profile = $r[0]['url'];
+ $notify = 'cid:' . $r[0]['id'];
if(strlen($inform))
$inform .= ',';
- $inform .= 'cid:' . $r[0]['id'];
+ $inform .= $notify;
}
}
if($profile) {
+ $taginfo[] = array($newname,$profile,$notify);
if(strlen($str_tags))
$str_tags .= ',';
$profile = str_replace(',','%2c',$profile);
@@ -330,13 +335,36 @@ function photos_post(&$a) {
intval($item_id),
intval(local_user())
);
+
+ if(count($taginfo)) {
+ foreach($taginfo as $tagged) {
+// $slap = create_photo_tag(local_user(),$item_id, $tagged);
+
+
+//
+ }
+ // call notifier on new tag activity
+ }
+
+// $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
+
+// $proc_debug = get_config('system','proc_debug');
+
+ // send the notification upstream/downstream as the case may be
+
+// if($i[0]['visible'])
+// proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"drop\" \"$drop_id\" $proc_debug & ",
+// array(),$foo));
+
+
+
}
goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
return; // NOTREACHED
}
-
+ // default post action - upload a photo
if(! x($_FILES,'userfile'))
killme();