]> git.mxchange.org Git - friendica.git/blobdiff - mod/photos.php
over-ride comment box
[friendica.git] / mod / photos.php
index 757b4685d91908d9b2825d78b39b13dc86f46cf2..324ce898d26003fdf188ebd919114cc43e6590a6 100644 (file)
@@ -6,6 +6,10 @@ require_once('include/bbcode.php');
 
 function photos_init(&$a) {
 
+
+       if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
+               return;
+       }
        $o = '';
 
        if($a->argc > 1) {
@@ -657,6 +661,16 @@ function photos_content(&$a) {
        // photos/name/image/xxxxx/edit
 
 
+       if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
+               notice( t('Public access denied.') . EOL);
+               return;
+       }
+
+
+       require_once('include/bbcode.php');
+       require_once('include/security.php');
+       require_once('include/conversation.php');
+
        if(! x($a->data,'user')) {
                notice( t('No photos selected') . EOL );
                return;
@@ -893,8 +907,7 @@ function photos_content(&$a) {
 
        if($datatype === 'image') {
 
-               require_once('security.php');
-               require_once('bbcode.php');
+
 
                $o = '<div id="live-display"></div>' . "\r\n";
                // fetch image, item containing image, then comments