]> git.mxchange.org Git - friendica.git/blobdiff - mod/lockview.php
tabs and total count for contacts page
[friendica.git] / mod / lockview.php
old mode 100644 (file)
new mode 100755 (executable)
index a99628b..9e64e26
@@ -4,21 +4,21 @@
 function lockview_content(&$a) {
   
        $type = (($a->argc > 1) ? $a->argv[1] : 0);
-  if (is_numeric($type)) {
-      $item_id = intval($type);
-      $type='item';
-  } else {
-    $item_id = (($a->argc > 2) ? intval($a->argv[2]) : 0);
-  }
+       if (is_numeric($type)) {
+               $item_id = intval($type);
+               $type='item';
+       } else {
+               $item_id = (($a->argc > 2) ? intval($a->argv[2]) : 0);
+       }
   
        if(! $item_id)
                killme();
 
-  if (!in_array($type, array('item','photo','event')))
-    killme();
+       if (!in_array($type, array('item','photo','event')))
+               killme();
      
        $r = q("SELECT * FROM `%s` WHERE `id` = %d LIMIT 1",
-    dbesc($type),
+               dbesc($type),
                intval($item_id)
        );
        if(! count($r))
@@ -48,7 +48,6 @@ function lockview_content(&$a) {
                        dbesc(implode(', ', $allowed_groups))
                );
                if(count($r))
-  if($item['uid'] != local_user())
                        foreach($r as $rr) 
                                $l[] = '<b>' . $rr['name'] . '</b>';
        }
@@ -80,11 +79,7 @@ function lockview_content(&$a) {
 
        }
 
-  if (count($l)>0) {
-    echo $o . implode(', ', $l);
-  } else {
-    echo $o . t('nobody');
-  }
+       echo $o . implode(', ', $l);
        killme();
 
 }