added spaces (CR)
Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
parent
849e56e3a5
commit
57b6e4c636
1 changed files with 16 additions and 13 deletions
|
@ -394,22 +394,24 @@ function construct_acl_data(App $a, $user) {
|
||||||
foreach ($acl_data['groups'] as $key=>$group) {
|
foreach ($acl_data['groups'] as $key=>$group) {
|
||||||
// Add a "selected" flag to groups that are posted to by default
|
// Add a "selected" flag to groups that are posted to by default
|
||||||
if ($user_defaults['allow_gid'] &&
|
if ($user_defaults['allow_gid'] &&
|
||||||
in_array($group['id'], $user_defaults['allow_gid']) && !in_array($group['id'], $user_defaults['deny_gid']) )
|
in_array($group['id'], $user_defaults['allow_gid']) && !in_array($group['id'], $user_defaults['deny_gid']) ) {
|
||||||
$acl_data['groups'][$key]['selected'] = 1;
|
$acl_data['groups'][$key]['selected'] = 1;
|
||||||
else
|
} else {
|
||||||
$acl_data['groups'][$key]['selected'] = 0;
|
$acl_data['groups'][$key]['selected'] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if ($acl_data['contacts']) {
|
if ($acl_data['contacts']) {
|
||||||
foreach ($acl_data['contacts'] as $key=>$contact) {
|
foreach ($acl_data['contacts'] as $key=>$contact) {
|
||||||
// Add a "selected" flag to groups that are posted to by default
|
// Add a "selected" flag to groups that are posted to by default
|
||||||
if ($user_defaults['allow_cid'] &&
|
if ($user_defaults['allow_cid'] &&
|
||||||
in_array($contact['id'], $user_defaults['allow_cid']) && !in_array($contact['id'], $user_defaults['deny_cid']) )
|
in_array($contact['id'], $user_defaults['allow_cid']) && !in_array($contact['id'], $user_defaults['deny_cid']) ) {
|
||||||
$acl_data['contacts'][$key]['selected'] = 1;
|
$acl_data['contacts'][$key]['selected'] = 1;
|
||||||
else
|
} else {
|
||||||
$acl_data['contacts'][$key]['selected'] = 0;
|
$acl_data['contacts'][$key]['selected'] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $acl_data;
|
return $acl_data;
|
||||||
|
|
||||||
|
@ -430,9 +432,10 @@ function acl_lookup(App $a, $out_type = 'json') {
|
||||||
|
|
||||||
// For use with jquery.textcomplete for private mail completion
|
// For use with jquery.textcomplete for private mail completion
|
||||||
|
|
||||||
if (x($_REQUEST,'query') && strlen($_REQUEST['query'])) {
|
if (x($_REQUEST, 'query') && strlen($_REQUEST['query'])) {
|
||||||
if (! $type)
|
if (! $type) {
|
||||||
$type = 'm';
|
$type = 'm';
|
||||||
|
}
|
||||||
$search = $_REQUEST['query'];
|
$search = $_REQUEST['query'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -624,9 +627,9 @@ function acl_lookup(App $a, $out_type = 'json') {
|
||||||
if ($conv_id) {
|
if ($conv_id) {
|
||||||
/* if $conv_id is set, get unknow contacts in thread */
|
/* if $conv_id is set, get unknow contacts in thread */
|
||||||
/* but first get know contacts url to filter them out */
|
/* but first get know contacts url to filter them out */
|
||||||
function _contact_link($i){ return dbesc($i['link']); }
|
function _contact_link($i) { return dbesc($i['link']); }
|
||||||
$known_contacts = array_map(_contact_link, $contacts);
|
$known_contacts = array_map('_contact_link', $contacts);
|
||||||
$unknow_contacts=array();
|
$unknow_contacts = array();
|
||||||
$r = q("SELECT `author-avatar`,`author-name`,`author-link`
|
$r = q("SELECT `author-avatar`,`author-name`,`author-link`
|
||||||
FROM `item` WHERE `parent` = %d
|
FROM `item` WHERE `parent` = %d
|
||||||
AND (`author-name` LIKE '%%%s%%' OR `author-link` LIKE '%%%s%%')
|
AND (`author-name` LIKE '%%%s%%' OR `author-link` LIKE '%%%s%%')
|
||||||
|
@ -639,13 +642,13 @@ function acl_lookup(App $a, $out_type = 'json') {
|
||||||
dbesc($search),
|
dbesc($search),
|
||||||
implode("','", $known_contacts)
|
implode("','", $known_contacts)
|
||||||
);
|
);
|
||||||
if (dbm::is_result($r)){
|
if (dbm::is_result($r)) {
|
||||||
foreach ($r as $row) {
|
foreach ($r as $row) {
|
||||||
// nickname..
|
// nickname..
|
||||||
$up = parse_url($row['author-link']);
|
$up = parse_url($row['author-link']);
|
||||||
$nick = explode("/",$up['path']);
|
$nick = explode("/", $up['path']);
|
||||||
$nick = $nick[count($nick)-1];
|
$nick = $nick[count($nick) - 1];
|
||||||
$nick .= "@".$up['host'];
|
$nick .= "@" . $up['host'];
|
||||||
// /nickname
|
// /nickname
|
||||||
$unknow_contacts[] = array(
|
$unknow_contacts[] = array(
|
||||||
'type' => 'c',
|
'type' => 'c',
|
||||||
|
|
Loading…
Reference in a new issue