aboutsummaryrefslogtreecommitdiffstats
path: root/mod/thing.php
diff options
context:
space:
mode:
authorHaakon Meland Eriksen <haakon.eriksen@far.no>2015-09-18 18:51:39 +0200
committerHaakon Meland Eriksen <haakon.eriksen@far.no>2015-09-18 18:51:39 +0200
commitce28760c2a7319f3cdc25c39a62582b722e91006 (patch)
tree802f64d3988fc14a277c79ee5192693a4202b502 /mod/thing.php
parent438cb1d7e0f1518dd35a3a377dfd9a9fd885f80c (diff)
parent87c8cf489210136958d2e0b44e4c3ca48c1ff8af (diff)
downloadvolse-hubzilla-ce28760c2a7319f3cdc25c39a62582b722e91006.tar.gz
volse-hubzilla-ce28760c2a7319f3cdc25c39a62582b722e91006.tar.bz2
volse-hubzilla-ce28760c2a7319f3cdc25c39a62582b722e91006.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mod/thing.php')
-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),