]> git.mxchange.org Git - friendica.git/blobdiff - mod/lockview.php
Merge pull request #2664 from annando/1607-remote-auth
[friendica.git] / mod / lockview.php
index 82f93f498566e7be8b8fb5ef9cfdeb93483bb0d1..0ae54c8c125f92d07616113a7b52865e3d61fed1 100644 (file)
@@ -1,8 +1,8 @@
 <?php
 
-if(! function_exists('lockview_content')) {
-function lockview_content(&$a) {
 
+function lockview_content(&$a) {
+  
        $type = (($a->argc > 1) ? $a->argv[1] : 0);
        if (is_numeric($type)) {
                $item_id = intval($type);
@@ -10,13 +10,13 @@ function lockview_content(&$a) {
        } else {
                $item_id = (($a->argc > 2) ? intval($a->argv[2]) : 0);
        }
-
+  
        if(! $item_id)
                killme();
 
        if (!in_array($type, array('item','photo','event')))
                killme();
-
+     
        $r = q("SELECT * FROM `%s` WHERE `id` = %d LIMIT 1",
                dbesc($type),
                intval($item_id)
@@ -33,7 +33,7 @@ function lockview_content(&$a) {
        }
 
 
-       if(($item['private'] == 1) && (! strlen($item['allow_cid'])) && (! strlen($item['allow_gid']))
+       if(($item['private'] == 1) && (! strlen($item['allow_cid'])) && (! strlen($item['allow_gid'])) 
                && (! strlen($item['deny_cid'])) && (! strlen($item['deny_gid']))) {
 
                echo t('Remote privacy information not available.') . '<br />';
@@ -53,7 +53,7 @@ function lockview_content(&$a) {
                        dbesc(implode(', ', $allowed_groups))
                );
                if(count($r))
-                       foreach($r as $rr)
+                       foreach($r as $rr) 
                                $l[] = '<b>' . $rr['name'] . '</b>';
        }
        if(count($allowed_users)) {
@@ -61,7 +61,7 @@ function lockview_content(&$a) {
                        dbesc(implode(', ',$allowed_users))
                );
                if(count($r))
-                       foreach($r as $rr)
+                       foreach($r as $rr) 
                                $l[] = $rr['name'];
 
        }
@@ -71,7 +71,7 @@ function lockview_content(&$a) {
                        dbesc(implode(', ', $deny_groups))
                );
                if(count($r))
-                       foreach($r as $rr)
+                       foreach($r as $rr) 
                                $l[] = '<b><strike>' . $rr['name'] . '</strike></b>';
        }
        if(count($deny_users)) {
@@ -79,12 +79,12 @@ function lockview_content(&$a) {
                        dbesc(implode(', ',$deny_users))
                );
                if(count($r))
-                       foreach($r as $rr)
+                       foreach($r as $rr) 
                                $l[] = '<strike>' . $rr['name'] . '</strike>';
 
        }
 
        echo $o . implode(', ', $l);
        killme();
-}
+
 }