aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-09-14 21:25:10 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-09-14 21:25:10 -0700
commit325a5b4af4f75322730ef1d2134d789581ed8378 (patch)
treefdc52ff479fce714059b04df669f3caf53540a2e
parent021c81cb62210cb33e9cc155a918b7ed5ebc20ac (diff)
downloadvolse-hubzilla-325a5b4af4f75322730ef1d2134d789581ed8378.tar.gz
volse-hubzilla-325a5b4af4f75322730ef1d2134d789581ed8378.tar.bz2
volse-hubzilla-325a5b4af4f75322730ef1d2134d789581ed8378.zip
we need an owner for permissions_sql
-rw-r--r--mod/thing.php10
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),