mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 23:35:12 +00:00
add plink to profile change notifications
This commit is contained in:
parent
3f7b93ce65
commit
599f3d2961
3 changed files with 12 additions and 5 deletions
|
@ -235,6 +235,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) {
|
||||
|
@ -248,11 +249,9 @@ function localize_item(&$item){
|
|||
if($x) {
|
||||
$sparkle = false;
|
||||
$y = best_link_url($item,$sparkle,true);
|
||||
if(strstr($y,'/redir/'))
|
||||
if($sparkle)
|
||||
$item['plink'] = $y . '?f=&url=' . $item['plink'];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
2012-07-11.12
|
||||
2012-07-12.13
|
||||
|
|
Loading…
Reference in a new issue