aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorThomas Willingham <founder@kakste.com>2013-08-07 22:04:05 +0100
committerThomas Willingham <founder@kakste.com>2013-08-07 22:04:05 +0100
commitea6f5d429da097278bf65587b28e382b5e3e87be (patch)
tree7c1c21d19afb03af29009998c643abcc294f1113 /mod
parent81a0683aaf6a0b816644a3a9a490c3f74b41109f (diff)
downloadvolse-hubzilla-ea6f5d429da097278bf65587b28e382b5e3e87be.tar.gz
volse-hubzilla-ea6f5d429da097278bf65587b28e382b5e3e87be.tar.bz2
volse-hubzilla-ea6f5d429da097278bf65587b28e382b5e3e87be.zip
Unbork webpage permissions - missed this because most of my channel_ids are 1.
Diffstat (limited to 'mod')
-rw-r--r--mod/editwebpage.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/mod/editwebpage.php b/mod/editwebpage.php
index c7323a7f7..46c6b8817 100644
--- a/mod/editwebpage.php
+++ b/mod/editwebpage.php
@@ -9,11 +9,17 @@ function editwebpage_content(&$a) {
$which = argv(1);
// $a->get_channel() and stuff don't work here, so we've got to find the owner for ourselves.
- $owner = q("select channel_id from channel where channel_address = '%s'",
+ $r = q("select channel_id from channel where channel_address = '%s'",
dbesc($which)
);
+ if($r) {
+ $owner = intval($r[0]['channel_id']);
+ //logger('owner: ' . print_r($owner,true));
+ }
+
+
if((local_user()) && (argc() > 2) && (argv(2) === 'view')) {
$which = $channel['channel_address'];
}