Unbork webpage permissions - missed this because most of my channel_ids are 1.

This commit is contained in:
Thomas Willingham 2013-08-07 22:04:05 +01:00
parent 81a0683aaf
commit ea6f5d429d

View File

@ -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'];
}