]> git.mxchange.org Git - friendica.git/commitdiff
block_public should also block the contacts page and 'Connect' page if not logged in
authorFriendika <info@friendika.com>
Fri, 22 Apr 2011 02:12:22 +0000 (19:12 -0700)
committerFriendika <info@friendika.com>
Fri, 22 Apr 2011 02:12:22 +0000 (19:12 -0700)
mod/dfrn_request.php
mod/viewcontacts.php

index 4463c713f97fcc0807c9bfaba57ceaeb6ac097ba..1af0dc85ddf6f6b9103b24fa495e9bc5a1f19c5a 100644 (file)
 if(! function_exists('dfrn_request_init')) {
 function dfrn_request_init(&$a) {
 
+       if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
+               return;
+       }
+
        if($a->argc > 1)
                $which = $a->argv[1];
 
@@ -583,6 +587,12 @@ function dfrn_request_content(&$a) {
                 * Normal web request. Display our user's introduction form.
                 */
  
+               if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
+                       notice( t('Public access denied.') . EOL);
+                       return;
+               }
+
+
                /**
                 * Try to auto-fill the profile address
                 */
index 063637bf9e2d26e8d98e9f606a4ba801842c2e2c..c970db33aa5298c2e531faa3533dc174767372f1 100644 (file)
@@ -2,13 +2,21 @@
 
 function viewcontacts_init(&$a) {
 
-       profile_load($a,$a->argv[1]);
+       if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
+               return;
+       }
 
+       profile_load($a,$a->argv[1]);
 }
 
 
 function viewcontacts_content(&$a) {
 
+       if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
+               notice( t('Public access denied.') . EOL);
+               return;
+       }
+
        if(((! count($a->profile)) || ($a->profile['hide-friends']))) {
                notice( t('Permission denied.') . EOL);
                return;