+ if($parent) {
+ $r = q("SELECT `uri`, `private`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`
+ FROM `item` WHERE `id` = %d AND `parent` = %d AND `uid` = %d LIMIT 1",
+ intval($parent),
+ intval($parent),
+ intval($uid)
+ );
+ if(count($r)) {
+ $parent_uri = $r[0]['uri'];
+ $private = $r[0]['private'];
+ $allow_cid = $r[0]['allow_cid'];
+ $allow_gid = $r[0]['allow_gid'];
+ $deny_cid = $r[0]['deny_cid'];
+ $deny_gid = $r[0]['deny_gid'];
+ }
+ }
+ else {
+
+ $private = ((x($_GET,'private')) ? intval($_GET['private']) : 0);
+
+ $allow_cid = (($private) ? '<' . $target['id']. '>' : $a->user['allow_cid']);
+ $allow_gid = (($private) ? '' : $a->user['allow_gid']);
+ $deny_cid = (($private) ? '' : $a->user['deny_cid']);
+ $deny_gid = (($private) ? '' : $a->user['deny_gid']);
+ }
+