turn the oft-repeated block_public ... check into a function observer_prohibited()
This commit is contained in:
9
boot.php
9
boot.php
@@ -2400,3 +2400,12 @@ function check_cron_broken() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
function observer_prohibited($allow_account = false) {
|
||||
|
||||
if($allow_account)
|
||||
return (((get_config('system','block_public')) && (! get_account_id()) && (! remote_channel())) ? true : false );
|
||||
return (((get_config('system','block_public')) && (! local_channel()) && (! remote_channel())) ? true : false );
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user