fix some community tagging bugs
This commit is contained in:
parent
9fd4d5f0cc
commit
822a4a0287
@ -147,6 +147,7 @@ class Item extends BaseObject {
|
|||||||
$this->check_wall_to_wall();
|
$this->check_wall_to_wall();
|
||||||
|
|
||||||
if($this->is_toplevel()) {
|
if($this->is_toplevel()) {
|
||||||
|
// FIXME check this permission
|
||||||
if($conv->get_profile_owner() == local_user()) {
|
if($conv->get_profile_owner() == local_user()) {
|
||||||
|
|
||||||
// FIXME we don't need all this stuff, some can be done in the template
|
// FIXME we don't need all this stuff, some can be done in the template
|
||||||
@ -161,14 +162,18 @@ class Item extends BaseObject {
|
|||||||
'starred' => t('starred'),
|
'starred' => t('starred'),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$indent = 'comment';
|
||||||
|
}
|
||||||
|
|
||||||
|
// FIXME - check this permission
|
||||||
|
if($conv->get_profile_owner() == local_user()) {
|
||||||
$tagger = array(
|
$tagger = array(
|
||||||
'tagit' => t("add tag"),
|
'tagit' => t("add tag"),
|
||||||
'classtagger' => "",
|
'classtagger' => "",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
$indent = 'comment';
|
|
||||||
}
|
|
||||||
|
|
||||||
if($this->is_commentable()) {
|
if($this->is_commentable()) {
|
||||||
$like = array( t("I like this \x28toggle\x29"), t("like"));
|
$like = array( t("I like this \x28toggle\x29"), t("like"));
|
||||||
|
@ -1874,7 +1874,9 @@ function tag_deliver($uid,$item_id) {
|
|||||||
$j_obj = json_decode($item['object'],true);
|
$j_obj = json_decode($item['object'],true);
|
||||||
logger('tag_deliver: tag object: ' . print_r($j_obj,true), LOGGER_DATA);
|
logger('tag_deliver: tag object: ' . print_r($j_obj,true), LOGGER_DATA);
|
||||||
if($j_obj && $j_obj['id'] && $j_obj['title']) {
|
if($j_obj && $j_obj['id'] && $j_obj['title']) {
|
||||||
store_item_tag($u[0]['channel_id'],$p[0]['id'],TERM_OBJ_POST,TERM_HASHTAG,$j_obj['title'],$j['obj']['id']);
|
if(is_array($j_obj['link']))
|
||||||
|
$taglink = get_rel_link($j_obj['link'],'alternate');
|
||||||
|
store_item_tag($u[0]['channel_id'],$p[0]['id'],TERM_OBJ_POST,TERM_HASHTAG,$j_obj['title'],$j_obj['id']);
|
||||||
proc_run('php','include/notifier.php','edit_post',$p[0]['id']);
|
proc_run('php','include/notifier.php','edit_post',$p[0]['id']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,8 @@ function tagger_content(&$a) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$observer_hash = get_observer_hash();
|
||||||
|
|
||||||
$term = notags(trim($_GET['term']));
|
$term = notags(trim($_GET['term']));
|
||||||
// no commas allowed
|
// no commas allowed
|
||||||
$term = str_replace(array(',',' '),array('','_'),$term);
|
$term = str_replace(array(',',' '),array('','_'),$term);
|
||||||
@ -122,7 +124,7 @@ function tagger_content(&$a) {
|
|||||||
$arr['object'] = $obj;
|
$arr['object'] = $obj;
|
||||||
$arr['parent_mid'] = $item['mid'];
|
$arr['parent_mid'] = $item['mid'];
|
||||||
|
|
||||||
store_item_tag($item['uid'],$item['id'],TERM_OBJ_POST,TERM_HASHTAG,$term);
|
store_item_tag($item['uid'],$item['id'],TERM_OBJ_POST,TERM_HASHTAG,$term,$tagid);
|
||||||
$ret = post_activity_item($arr);
|
$ret = post_activity_item($arr);
|
||||||
|
|
||||||
if($ret['success'])
|
if($ret['success'])
|
||||||
|
Reference in New Issue
Block a user