aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--done26
-rw-r--r--include/text.php6
-rw-r--r--mod/lockview.php50
-rw-r--r--view/theme/redbasic/css/style.css96
4 files changed, 134 insertions, 44 deletions
diff --git a/done b/done
index d489f5481..627822e01 100644
--- a/done
+++ b/done
@@ -15,7 +15,7 @@ include/
+ account.php
acl_selectors.php
+ activities.php
- api.php
+? api.php
? attach.php
+ auth.php
- bb2diaspora.php (check for function dependencies before removing)
@@ -34,7 +34,7 @@ include/
+ directory.php
- email.php
+ enotify.php
- event.php
++ event.php
+ expire.php
fcontact.php
? follow.php
@@ -47,23 +47,23 @@ include/
? items.php
+ js_strings.php
+ language.php
- message.php
+? message.php
- msgclean.php
? nav.php
network.php
- notifier.php
++ notifier.php
oauth.php
oembed.php
-? onepoll.php
+? onepoll.php
? Photo.php
? plugin.php
-? poller.php
+? poller.php
? profile_advanced.php
profile_selectors.php
? queue_fn.php
? queue.php
- salmon.php
- Scrape.php
+= Scrape.php
+ security.php
? session.php
socgraph.php
@@ -104,14 +104,14 @@ mod/
fsuggest.php
+ group.php
- hcard.php -> not needed
- help.php
+= help.php
+ home.php
hostxrd.php -> probably not needed
? install.php
invite.php
+ item.php
+ like.php
- lockview.php
++ lockview.php
+ login.php
lostpass.php
magic.php
@@ -157,10 +157,10 @@ mod/
suggest.php
tagger.php
tagrm.php
- uexport.php
- update_community.php - needs converting to json
- update_network.php - needs converting to json
- update_profile.php - needs converting to json
+? uexport.php
+? update_community.php - needs converting to json
+? update_network.php - needs converting to json
+? update_profile.php - needs converting to json
viewcontacts.php
view.php
+ viewsrc.php
diff --git a/include/text.php b/include/text.php
index 6f2caa510..167fbb1df 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1798,9 +1798,11 @@ function magic_link($s) {
return $s;
}
-function stringify_array_elms(&$arr) {
+// if $escape is true, dbesc() each element before adding quotes
+
+function stringify_array_elms(&$arr,$escape = false) {
for($x = 0; $x < count($arr); $x ++)
- $arr[$x] = "'" . $arr[$x] . "'";
+ $arr[$x] = "'" . (($escape) ? dbesc($arr[$x]) : $arr[$x]) . "'";
}
/**
diff --git a/mod/lockview.php b/mod/lockview.php
index 0307103f8..01a6997ee 100644
--- a/mod/lockview.php
+++ b/mod/lockview.php
@@ -3,12 +3,12 @@
function lockview_content(&$a) {
- $type = (($a->argc > 1) ? $a->argv[1] : 0);
+ $type = ((argc() > 1) ? argv(1) : 0);
if (is_numeric($type)) {
$item_id = intval($type);
$type='item';
} else {
- $item_id = (($a->argc > 2) ? intval($a->argv[2]) : 0);
+ $item_id = ((argc() > 2) ? intval(argv(2)) : 0);
}
if(! $item_id)
@@ -17,20 +17,20 @@ function lockview_content(&$a) {
if (!in_array($type, array('item','photo','event')))
killme();
- $r = q("SELECT * FROM `%s` WHERE `id` = %d LIMIT 1",
+ $r = q("SELECT * FROM %s WHERE id = %d LIMIT 1",
dbesc($type),
intval($item_id)
);
- if(! count($r))
+ if(! $r)
killme();
+
$item = $r[0];
+
if($item['uid'] != local_user())
killme();
-
- if(($item['private'] == 1) && (! strlen($item['allow_cid'])) && (! strlen($item['allow_gid']))
+ if(($item['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 />';
killme();
}
@@ -43,40 +43,34 @@ function lockview_content(&$a) {
$o = t('Visible to:') . '<br />';
$l = array();
+ stringify_array_elms($allowed_groups,true);
+ stringify_array_elms($allowed_users,true);
+ stringify_array_elms($deny_groups,true);
+ stringify_array_elms($deny_users,true);
+
if(count($allowed_groups)) {
- $r = q("SELECT `name` FROM `group` WHERE `id` IN ( %s )",
- dbesc(implode(', ', $allowed_groups))
- );
- if(count($r))
+ $r = q("SELECT name FROM group WHERE hash IN ( " . implode(', ', $allowed_groups) . " )");
+ if($r)
foreach($r as $rr)
$l[] = '<b>' . $rr['name'] . '</b>';
}
if(count($allowed_users)) {
- $r = q("SELECT `name` FROM `contact` WHERE `id` IN ( %s )",
- dbesc(implode(', ',$allowed_users))
- );
- if(count($r))
+ $r = q("SELECT xchan_name FROM xchan WHERE xchan_hash IN ( " . implode(', ',$allowed_users) . " )");
+ if($r)
foreach($r as $rr)
- $l[] = $rr['name'];
-
+ $l[] = $rr['xchan_name'];
}
-
if(count($deny_groups)) {
- $r = q("SELECT `name` FROM `group` WHERE `id` IN ( %s )",
- dbesc(implode(', ', $deny_groups))
- );
- if(count($r))
+ $r = q("SELECT name FROM group WHERE hash IN ( " . implode(', ', $deny_groups) . " )");
+ if($r)
foreach($r as $rr)
$l[] = '<b><strike>' . $rr['name'] . '</strike></b>';
}
if(count($deny_users)) {
- $r = q("SELECT `name` FROM `contact` WHERE `id` IN ( %s )",
- dbesc(implode(', ',$deny_users))
- );
- if(count($r))
+ $r = q("SELECT xchan_name FROM xchan WHERE xchan_hash IN ( " . implode(', ', $deny_users) . " )");
+ if($r)
foreach($r as $rr)
- $l[] = '<strike>' . $rr['name'] . '</strike>';
-
+ $l[] = '<strike>' . $rr['xchan_name'] . '</strike>';
}
echo $o . implode(', ', $l);
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index fd989554b..c7654b65d 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -3778,4 +3778,98 @@ ul.menu-popup {
.tabs-end {
clear: both;
-} \ No newline at end of file
+}
+
+
+
+
+#acl-wrapper {
+ width: 690px;
+ float:left;
+}
+#acl-search {
+ float:right;
+ background: #ffffff url("../../../../images/search_18.png") no-repeat right center;
+ padding-right:20px;
+}
+#acl-showall {
+ float: left;
+ display: block;
+ width: auto;
+ height: 18px;
+ background-color: #cccccc;
+ background-image: url("../../../../images/show_all_off.png");
+ background-position: 7px 7px;
+ background-repeat: no-repeat;
+ padding: 7px 5px 0px 30px;
+ -webkit-border-radius: 5px ;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+ color: #999999;
+}
+#acl-showall.selected {
+ color: #000000;
+ background-color: #ff9900;
+ background-image: url("../../../../images/show_all_on.png");
+}
+
+#acl-list {
+ height: 210px;
+ border: 1px solid #cccccc;
+ clear: both;
+ margin-top: 30px;
+ overflow: auto;
+}
+#acl-list-content {
+
+}
+.acl-list-item {
+ display: block;
+ width: 150px;
+ height: 30px;
+ border: 1px solid #cccccc;
+ margin: 5px;
+ float: left;
+}
+.acl-list-item img{
+ width:22px;
+ height: 22px;
+ float: left;
+ margin: 4px;
+}
+.acl-list-item p { height: 12px; font-size: 10px; margin: 0px; padding: 2px 0px 1px; overflow: hidden;}
+.acl-list-item a {
+ font-size: 8px;
+ display: block;
+ width: 40px;
+ height: 10px;
+ float: left;
+ color: #999999;
+ background-color: #cccccc;
+ background-position: 3px 3px;
+ background-repeat: no-repeat;
+ margin-right: 5px;
+ -webkit-border-radius: 2px ;
+ -moz-border-radius: 2px;
+ border-radius: 2px;
+ padding-left: 15px;
+}
+#acl-wrapper a:hover {
+ text-decoration: none;
+ color:#000000;
+}
+.acl-button-show { background-image: url("../../../../images/show_off.png"); }
+.acl-button-hide { background-image: url("../../../../images/hide_off.png"); }
+
+.acl-button-show.selected {
+ color: #000000;
+ background-color: #9ade00;
+ background-image: url("../../../../images/show_on.png");
+}
+.acl-button-hide.selected {
+ color: #000000;
+ background-color: #ff4141;
+ background-image: url("../../../../images/hide_on.png");
+}
+.acl-list-item.groupshow { border-color: #9ade00; }
+.acl-list-item.grouphide { border-color: #ff4141; }