added location tagging

This commit is contained in:
Mike Macgirvin 2010-08-20 14:33:15 -07:00
commit 709c86b2da
10 changed files with 36 additions and 7 deletions

View file

@ -72,6 +72,7 @@ function item_post(&$a) {
$title = notags(trim($_POST['title']));
$body = escape_tags(trim($_POST['body']));
$location = notags(trim($_POST['location']));
if(! strlen($body)) {
notice( t('Empty post discarded.') . EOL );
@ -142,8 +143,8 @@ function item_post(&$a) {
$r = q("INSERT INTO `item` (`uid`,`type`,`contact-id`,`owner-name`,`owner-link`,`owner-avatar`,
`author-name`, `author-link`, `author-avatar`, `created`,
`edited`, `uri`, `title`, `body`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`)
VALUES( %d, '%s', %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' )",
`edited`, `uri`, `title`, `body`, `location`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`)
VALUES( %d, '%s', %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' )",
intval($profile_uid),
dbesc($post_type),
intval($contact_id),
@ -158,6 +159,7 @@ function item_post(&$a) {
dbesc($uri),
dbesc($title),
dbesc($body),
dbesc($location),
dbesc($str_contact_allow),
dbesc($str_group_allow),
dbesc($str_contact_deny),