From 7cd1bd59b2544aae52a399761849f46bd7b8a066 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 11 Oct 2013 20:44:13 -0700 Subject: bug 175 - categories not updated when editing --- mod/item.php | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'mod/item.php') diff --git a/mod/item.php b/mod/item.php index 48a22bd3c..59c395b4d 100644 --- a/mod/item.php +++ b/mod/item.php @@ -605,6 +605,7 @@ function item_post(&$a) { $datarray['item_flags'] = $item_flags; $datarray['layout_mid'] = $layout_mid; $datarray['comment_policy'] = map_scope($channel['channel_w_comment']); + $datarray['term'] = $post_tags; // preview mode - prepare the body for display and send it via json @@ -685,21 +686,6 @@ function item_post(&$a) { if($post_id) { logger('mod_item: saved item ' . $post_id); - if(count($post_tags)) { - foreach($post_tags as $tag) { - if(strlen(trim($tag['term']))) { - q("insert into term (uid,oid,otype,type,term,url) values (%d,%d,%d,%d,'%s','%s')", - intval($tag['uid']), - intval($post_id), - intval($tag['otype']), - intval($tag['type']), - dbesc(trim($tag['term'])), - dbesc(trim($tag['url'])) - ); - } - } - } - if($parent) { $r = q("UPDATE `item` SET `changed` = '%s' WHERE `parent` = %d ", -- cgit v1.2.3 From 095d1bae26ba0e3a1f1cf5291c251b7be571b41d Mon Sep 17 00:00:00 2001 From: Olaf Conradi Date: Sat, 12 Oct 2013 19:27:39 +0200 Subject: Typo in replaced variable --- mod/item.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/item.php') diff --git a/mod/item.php b/mod/item.php index 59c395b4d..3d4845a47 100644 --- a/mod/item.php +++ b/mod/item.php @@ -880,7 +880,7 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag) { $url = 'http://getzot.com'; $newtag = '#[zrl=' . $url . ']' . $basetag . '[/zrl]'; $body = str_replace($tag,$newtag,$body); - $replace = true; + $replaced = true; } else { //base tag has the tags name only -- cgit v1.2.3 From 9787872778d02d770431386853fa3313f453398e Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 14 Oct 2013 15:34:47 -0700 Subject: linkify post categories --- mod/item.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/item.php') diff --git a/mod/item.php b/mod/item.php index 3d4845a47..1bdd951cd 100644 --- a/mod/item.php +++ b/mod/item.php @@ -529,7 +529,7 @@ function item_post(&$a) { 'type' => TERM_CATEGORY, 'otype' => TERM_OBJ_POST, 'term' => trim($cat), - 'url' => '' + 'url' => $owner_xchan['xchan_url'] . '?f=&cat=' . urlencode(trim($cat)) ); } } -- cgit v1.2.3 From 100043da38af9e1f01a3943e5bc996ab5311894a Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 15 Oct 2013 15:51:20 -0700 Subject: oauth wasn't logging in properly, also fixed api status_show to return last public post, not the last private post --- mod/item.php | 1 - 1 file changed, 1 deletion(-) (limited to 'mod/item.php') diff --git a/mod/item.php b/mod/item.php index 1bdd951cd..08076bdf6 100644 --- a/mod/item.php +++ b/mod/item.php @@ -161,7 +161,6 @@ function item_post(&$a) { $observer = $a->get_observer(); - if($parent) { logger('mod_item: item_post parent=' . $parent); $can_comment = false; -- cgit v1.2.3 From d39f1c570caa531897324a5a5ae1e9b0d165a27f Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 19 Oct 2013 16:22:07 -0700 Subject: part one - honour system.tagifonlyrecip pconfig, default is false - not ready to deal with the second part yet (changing the tag char for tag_deliver channels) without a bit more discussion/concensus. --- mod/item.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mod/item.php') diff --git a/mod/item.php b/mod/item.php index 08076bdf6..218e9c174 100644 --- a/mod/item.php +++ b/mod/item.php @@ -385,9 +385,10 @@ function item_post(&$a) { $body = fix_mce_lf($body); } - // If we're sending a private top-level message with a single @-taggable channel as a recipient, @-tag it. + // If we're sending a private top-level message with a single @-taggable channel as a recipient, @-tag it, if our pconfig is set. - if((! $parent) && (substr_count($str_contact_allow,'<') == 1) && ($str_group_allow == '') && ($str_contact_deny == '') && ($str_group_deny == '')) { + + if((! $parent) && (get_pconfig($profile_uid,'system','tagifonlyrecip')) && (substr_count($str_contact_allow,'<') == 1) && ($str_group_allow == '') && ($str_contact_deny == '') && ($str_group_deny == '')) { $x = q("select abook_id, abook_their_perms from abook where abook_xchan = '%s' and abook_channel = %d limit 1", dbesc(str_replace(array('<','>'),array('',''),$str_contact_allow)), intval($profile_uid) -- cgit v1.2.3