aboutsummaryrefslogtreecommitdiffstats
path: root/include/wiki.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-11-15 02:12:30 -0800
committerzotlabs <mike@macgirvin.com>2016-11-15 02:12:30 -0800
commit0f5a166cceef6dcfb5f29077122eabd09ef290be (patch)
treebc4080ce445784a513491bcd4e57846aa2c61e2d /include/wiki.php
parentd59f450819242f0bf71f6c2ed85483b44fd0dbbf (diff)
downloadvolse-hubzilla-0f5a166cceef6dcfb5f29077122eabd09ef290be.tar.gz
volse-hubzilla-0f5a166cceef6dcfb5f29077122eabd09ef290be.tar.bz2
volse-hubzilla-0f5a166cceef6dcfb5f29077122eabd09ef290be.zip
still a bit of wiki permission weirdness, this should catch the major ones
Diffstat (limited to 'include/wiki.php')
-rw-r--r--include/wiki.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/wiki.php b/include/wiki.php
index d52308b08..1d1e20e27 100644
--- a/include/wiki.php
+++ b/include/wiki.php
@@ -192,8 +192,9 @@ function wiki_exists_by_name($uid, $urlName) {
function wiki_get_permissions($resource_id, $owner_id, $observer_hash) {
// TODO: For now, only the owner can edit
$sql_extra = item_permissions_sql($owner_id, $observer_hash);
- $r = q("SELECT * FROM item WHERE resource_type = '%s' AND resource_id = '%s' $sql_extra LIMIT 1",
- dbesc(WIKI_ITEM_RESOURCE_TYPE),
+ $r = q("SELECT * FROM item WHERE uid = %d and resource_type = '%s' AND resource_id = '%s' $sql_extra LIMIT 1",
+ intval($owner_id),
+ dbesc(WIKI_ITEM_RESOURCE_TYPE),
dbesc($resource_id)
);