1
0
Fork 0

fix item type

This commit is contained in:
Mike Macgirvin 2010-08-10 01:21:38 -07:00
parent 1c60e6c553
commit 0a4c5a694d

View file

@ -102,8 +102,6 @@ function item_post(&$a) {
$notify_type = (($parent) ? 'comment-new' : 'wall-new' ); $notify_type = (($parent) ? 'comment-new' : 'wall-new' );
if(($_POST['type'] == 'wall') || ($_POST['type'] == 'wall-comment') || ($_POST['type'] == 'net-comment')) {
do { do {
$dups = false; $dups = false;
$hash = random_string(); $hash = random_string();
@ -121,7 +119,7 @@ function item_post(&$a) {
`edited`, `uri`, `title`, `body`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`) `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' )", VALUES( %d, '%s', %d, '%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($contact_id), intval($contact_id),
dbesc($contact_record['name']), dbesc($contact_record['name']),
dbesc($contact_record['url']), dbesc($contact_record['url']),
@ -135,7 +133,6 @@ function item_post(&$a) {
dbesc($str_group_allow), dbesc($str_group_allow),
dbesc($str_contact_deny), dbesc($str_contact_deny),
dbesc($str_group_deny) dbesc($str_group_deny)
); );
$r = q("SELECT `id` FROM `item` WHERE `uri` = '%s' LIMIT 1", $r = q("SELECT `id` FROM `item` WHERE `uri` = '%s' LIMIT 1",
dbesc($uri)); dbesc($uri));
@ -177,15 +174,12 @@ function item_post(&$a) {
intval($parent_item['id']) intval($parent_item['id'])
); );
} }
} }
$url = $a->get_baseurl(); $url = $a->get_baseurl();
proc_close(proc_open("php include/notifier.php \"$url\" \"$notify_type\" \"$post_id\" > notify.log &", proc_close(proc_open("php include/notifier.php \"$url\" \"$notify_type\" \"$post_id\" > notify.log &",
array(),$foo)); array(),$foo));
}
goaway($a->get_baseurl() . "/" . $_POST['return'] ); goaway($a->get_baseurl() . "/" . $_POST['return'] );
return; // NOTREACHED return; // NOTREACHED
} }