Unbork webpage permissions - missed this because most of my channel_ids are 1.
This commit is contained in:
parent
81a0683aaf
commit
ea6f5d429d
@ -9,9 +9,15 @@ function editwebpage_content(&$a) {
|
|||||||
$which = argv(1);
|
$which = argv(1);
|
||||||
|
|
||||||
// $a->get_channel() and stuff don't work here, so we've got to find the owner for ourselves.
|
// $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)
|
dbesc($which)
|
||||||
);
|
);
|
||||||
|
if($r) {
|
||||||
|
$owner = intval($r[0]['channel_id']);
|
||||||
|
//logger('owner: ' . print_r($owner,true));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if((local_user()) && (argc() > 2) && (argv(2) === 'view')) {
|
if((local_user()) && (argc() > 2) && (argv(2) === 'view')) {
|
||||||
|
Reference in New Issue
Block a user