]> git.mxchange.org Git - friendica.git/commitdiff
add plink to profile notifications
authorfriendica <info@friendica.com>
Thu, 12 Jul 2012 23:12:37 +0000 (16:12 -0700)
committerfriendica <info@friendica.com>
Thu, 12 Jul 2012 23:12:37 +0000 (16:12 -0700)
include/conversation.php
mod/profiles.php

index 71627918189902b2f195af715e73bd2cb8aa7e03..6c3f13477fdf4cd16371e504d6a8baedc26be032 100644 (file)
@@ -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) {
index 4df8a5af7e6b3d1da8c52c41ccdfa7810e17ff91..61f525e0fa29e8850d292cff625de922dfb09beb 100644 (file)
@@ -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");
 
+       }
 }