diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-09-14 21:25:10 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-09-14 21:25:10 -0700 |
commit | 325a5b4af4f75322730ef1d2134d789581ed8378 (patch) | |
tree | fdc52ff479fce714059b04df669f3caf53540a2e /mod | |
parent | 021c81cb62210cb33e9cc155a918b7ed5ebc20ac (diff) | |
download | volse-hubzilla-325a5b4af4f75322730ef1d2134d789581ed8378.tar.gz volse-hubzilla-325a5b4af4f75322730ef1d2134d789581ed8378.tar.bz2 volse-hubzilla-325a5b4af4f75322730ef1d2134d789581ed8378.zip |
we need an owner for permissions_sql
Diffstat (limited to 'mod')
-rw-r--r-- | mod/thing.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mod/thing.php b/mod/thing.php index 03dc7db5b..280cc194d 100644 --- a/mod/thing.php +++ b/mod/thing.php @@ -234,9 +234,17 @@ function thing_init(&$a) { function thing_content(&$a) { + // @FIXME one problem with things is we can't share them unless we provide the channel in the url + // so we can definitively lookup the owner. + if(argc() == 2) { - $sql_extra = permissions_sql(); + $r = q("select obj_channel from obj where obj_type = %d and obj_obj = '%s' limit 1", + intval(TERM_OBJ_THING), + dbesc(argv(1)) + ); + if($r) + $sql_extra = permissions_sql($r[0]['obj_channel']); $r = q("select * from obj where obj_type = %d and obj_obj = '%s' $sql_extra limit 1", intval(TERM_OBJ_THING), |