aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/acl_selectors.php10
-rw-r--r--include/photos.php4
2 files changed, 12 insertions, 2 deletions
diff --git a/include/acl_selectors.php b/include/acl_selectors.php
index dcf0fe9a2..09c24f82c 100644
--- a/include/acl_selectors.php
+++ b/include/acl_selectors.php
@@ -174,6 +174,16 @@ function populate_acl($defaults = null,$show_jotnets = true, $emptyACL_descripti
$custom = false;
}
+ $r = q("SELECT id, profile_guid, profile_name from profile where is_default = 0 and uid = %d order by profile_name",
+ intval(local_channel())
+ );
+ if($r) {
+ foreach($r as $rv) {
+ $selected = (($single_group && 'vp.' . $rr['hash'] === $allow_gid[0]) ? ' selected = "selected" ' : '');
+ $groups .= '<option id="' . 'vp' . $rv['id'] . '" value="' . 'vp.' . $rv['profile_guid'] . '"' . $selected . '>' . t('Profile','acl') . ' ' . $rv['profile_name'] . '</option>' . "\r\n";
+ }
+ }
+
$r = q("SELECT id, hash, gname FROM groups WHERE deleted = 0 AND uid = %d ORDER BY gname ASC",
intval(local_channel())
);
diff --git a/include/photos.php b/include/photos.php
index 4cd5952f9..c0f7dc8c4 100644
--- a/include/photos.php
+++ b/include/photos.php
@@ -750,14 +750,14 @@ function photo_profile_setperms($channel_id,$resource_id,$profile_id) {
else {
$r = q("update photo set allow_cid = '', allow_gid = '%s', deny_cid = '', deny_gid = ''
where resource_id = '%s' and uid = %d",
- dbesc('vp.' . $profile_guid),
+ dbesc('<vp.' . $profile_guid . '>'),
dbesc($resource_id),
intval($channel_id)
);
$r = q("update attach set allow_cid = '', allow_gid = '%s', deny_cid = '', deny_gid = ''
where hash = '%s' and uid = %d",
- dbesc('vp.' . $profile_guid),
+ dbesc('<vp.' . $profile_guid . '>'),
dbesc($resource_id),
intval($channel_id)
);