aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Lockview.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-07-17 21:40:04 -0700
committerredmatrix <git@macgirvin.com>2016-07-17 21:40:04 -0700
commitde4f9d68bdaade902a8030888f9df035fa1329ec (patch)
tree5021daad0c4002ce9b7c89233b7c8446552b5a07 /Zotlabs/Module/Lockview.php
parent191cd21028ab108c2a7f982c654601d780865eff (diff)
parent571b8cc85b3a770f16aed021bb39b889e0275ed6 (diff)
downloadvolse-hubzilla-de4f9d68bdaade902a8030888f9df035fa1329ec.tar.gz
volse-hubzilla-de4f9d68bdaade902a8030888f9df035fa1329ec.tar.bz2
volse-hubzilla-de4f9d68bdaade902a8030888f9df035fa1329ec.zip
Merge branch 'dev' into perms
Diffstat (limited to 'Zotlabs/Module/Lockview.php')
-rw-r--r--Zotlabs/Module/Lockview.php35
1 files changed, 33 insertions, 2 deletions
diff --git a/Zotlabs/Module/Lockview.php b/Zotlabs/Module/Lockview.php
index 4776e1c56..d86a3c1d8 100644
--- a/Zotlabs/Module/Lockview.php
+++ b/Zotlabs/Module/Lockview.php
@@ -1,17 +1,31 @@
<?php
namespace Zotlabs\Module;
-
+require_once('include/security.php');
class Lockview extends \Zotlabs\Web\Controller {
function get() {
+
+ $atokens = array();
+
+ if(local_channel()) {
+ $at = q("select * from atoken where atoken_uid = %d",
+ intval(local_channel())
+ );
+ if($at) {
+ foreach($at as $t) {
+ $atokens[] = atoken_xchan($t);
+ }
+ }
+ }
$type = ((argc() > 1) ? argv(1) : 0);
if (is_numeric($type)) {
$item_id = intval($type);
$type='item';
- } else {
+ }
+ else {
$item_id = ((argc() > 2) ? intval(argv(2)) : 0);
}
@@ -98,6 +112,13 @@ class Lockview extends \Zotlabs\Web\Controller {
if($r)
foreach($r as $rr)
$l[] = '<li>' . $rr['xchan_name'] . '</li>';
+ if($atokens) {
+ foreach($atokens as $at) {
+ if(in_array("'" . $at['xchan_hash'] . "'",$allowed_users)) {
+ $l[] = '<li>' . $at['xchan_name'] . '</li>';
+ }
+ }
+ }
}
if(count($deny_groups)) {
$r = q("SELECT gname FROM `groups` WHERE hash IN ( " . implode(', ', $deny_groups) . " )");
@@ -110,6 +131,16 @@ class Lockview extends \Zotlabs\Web\Controller {
if($r)
foreach($r as $rr)
$l[] = '<li><strike>' . $rr['xchan_name'] . '</strike></li>';
+
+ if($atokens) {
+ foreach($atokens as $at) {
+ if(in_array("'" . $at['xchan_hash'] . "'",$deny_users)) {
+ $l[] = '<li><strike>' . $at['xchan_name'] . '</strike></li>';
+ }
+ }
+ }
+
+
}
echo $o . implode($l);