From 5e0698ba8731e7e4659a24c0ab4fa9c4a1aef173 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sun, 22 May 2016 17:52:30 -0700 Subject: turn the oft-repeated block_public ... check into a function observer_prohibited() --- boot.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'boot.php') diff --git a/boot.php b/boot.php index 25551346b..690a330d8 100755 --- a/boot.php +++ b/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 ); + +} + -- cgit v1.2.3