aboutsummaryrefslogtreecommitdiffstats
path: root/mod/ratings.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/ratings.php')
-rw-r--r--mod/ratings.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/mod/ratings.php b/mod/ratings.php
index fe7cca6e1..4b94f0e52 100644
--- a/mod/ratings.php
+++ b/mod/ratings.php
@@ -4,6 +4,10 @@ require_once('include/dir_fns.php');
function ratings_init(&$a) {
+ if((get_config('system','block_public')) && (! local_channel()) && (! remote_channel())) {
+ return;
+ }
+
$dirmode = intval(get_config('system','directory_mode'));
$x = find_upstream_directory($dirmode);
@@ -57,6 +61,11 @@ function ratings_init(&$a) {
function ratings_content(&$a) {
+ if((get_config('system','block_public')) && (! local_channel()) && (! remote_channel())) {
+ notice( t('Public access denied.') . EOL);
+ return;
+ }
+
$poco_rating = get_config('system','poco_rating_enable');
// if unset default to enabled
if($poco_rating === false)