From 7f7e2c5de0f9191ed86cee2e0282276f6269250a Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 12 Jul 2012 16:12:37 -0700 Subject: [PATCH] add plink to profile notifications --- include/conversation.php | 1 + mod/profiles.php | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/conversation.php b/include/conversation.php index 7162791818..6c3f13477f 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -234,6 +234,7 @@ function localize_item(&$item){ $item['body'] = str_replace($mtch[0],'@[url=' . zrl($mtch[1]). ']',$item['body']); } } + // add zrl's to public images if(preg_match_all('/\[url=(.*?)\/photos\/(.*?)\/image\/(.*?)\]\[img(.*?)\]h(.*?)\[\/img\]\[\/url\]/is',$item['body'],$matches,PREG_SET_ORDER)) { foreach($matches as $mtch) { diff --git a/mod/profiles.php b/mod/profiles.php index 4df8a5af7e..61f525e0fa 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -385,9 +385,17 @@ function profile_activity($changed, $value) { $arr['deny_gid'] = $a->user['deny_gid']; $i = item_store($arr); - if($i) + if($i) { + + // give it a permanent link + q("update item set plink = '%s' where id = %d limit 1", + dbesc($a->get_baseurl() . '/display/' . $a->user['nickname'] . '/' . $i), + intval($i) + ); + proc_run('php',"include/notifier.php","activity","$i"); + } }