activity verbs

This commit is contained in:
Mike Macgirvin 2010-09-09 21:16:40 -07:00
parent 3a3bf273c7
commit 2e6041d1b6

View file

@ -50,6 +50,7 @@ function item_post(&$a) {
$title = notags(trim($_POST['title'])); $title = notags(trim($_POST['title']));
$body = escape_tags(trim($_POST['body'])); $body = escape_tags(trim($_POST['body']));
$location = notags(trim($_POST['location'])); $location = notags(trim($_POST['location']));
$verb = notags(trim($_POST['verb']));
if(! strlen($body)) { if(! strlen($body)) {
notice( t('Empty post discarded.') . EOL ); notice( t('Empty post discarded.') . EOL );
@ -109,14 +110,17 @@ function item_post(&$a) {
if($post_type == 'wall' || $post_type == 'wall-comment') if($post_type == 'wall' || $post_type == 'wall-comment')
$wall = 1; $wall = 1;
if(! strlen($verb))
$verb = ACTIVITY_POST ;
$notify_type = (($parent) ? 'comment-new' : 'wall-new' ); $notify_type = (($parent) ? 'comment-new' : 'wall-new' );
$uri = item_new_uri($a->get_hostname(),$profile_uid); $uri = item_new_uri($a->get_hostname(),$profile_uid);
$r = q("INSERT INTO `item` (`uid`,`type`,`wall`,`contact-id`,`owner-name`,`owner-link`,`owner-avatar`, $r = q("INSERT INTO `item` (`uid`,`type`,`wall`,`contact-id`,`owner-name`,`owner-link`,`owner-avatar`,
`author-name`, `author-link`, `author-avatar`, `created`, `author-name`, `author-link`, `author-avatar`, `created`,
`edited`, `changed`, `uri`, `title`, `body`, `location`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`) `edited`, `changed`, `uri`, `title`, `body`, `location`, `verb`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`)
VALUES( %d, '%s', %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' )", VALUES( %d, '%s', %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' )",
intval($profile_uid), intval($profile_uid),
dbesc($post_type), dbesc($post_type),
intval($wall), intval($wall),
@ -134,6 +138,7 @@ function item_post(&$a) {
dbesc($title), dbesc($title),
dbesc($body), dbesc($body),
dbesc($location), dbesc($location),
dbesc($verb),
dbesc($str_contact_allow), dbesc($str_contact_allow),
dbesc($str_group_allow), dbesc($str_group_allow),
dbesc($str_contact_deny), dbesc($str_contact_deny),