more spaces + curly braces ...

Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
Roland Haeder 2017-04-08 19:20:01 +02:00
parent 8ba461db0a
commit f6c667ef45
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78

View file

@ -4,11 +4,11 @@
* @file include/acl_selectors.php * @file include/acl_selectors.php
*/ */
require_once("include/contact_selectors.php"); require_once "include/contact_selectors.php";
require_once("include/contact_widgets.php"); require_once "include/contact_widgets.php";
require_once("include/DirSearch.php"); require_once "include/DirSearch.php";
require_once("include/features.php"); require_once "include/features.php";
require_once("mod/proxy.php"); require_once "mod/proxy.php";
/** /**
@ -35,10 +35,11 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) {
if (dbm::is_result($r)) { if (dbm::is_result($r)) {
foreach ($r as $rr) { foreach ($r as $rr) {
if ((is_array($preselected)) && in_array($rr['id'], $preselected)) if ((is_array($preselected)) && in_array($rr['id'], $preselected)) {
$selected = " selected=\"selected\" "; $selected = " selected=\"selected\" ";
else } else {
$selected = ''; $selected = '';
}
$trimmed = mb_substr($rr['name'],0,12); $trimmed = mb_substr($rr['name'],0,12);
@ -115,11 +116,11 @@ function contact_selector($selname, $selclass, $preselected = false, $options) {
$sql_extra = ''; $sql_extra = '';
if ($x['mutual']) { if (x($x, 'mutual')) {
$sql_extra .= sprintf(" AND `rel` = %d ", intval(CONTACT_IS_FRIEND)); $sql_extra .= sprintf(" AND `rel` = %d ", intval(CONTACT_IS_FRIEND));
} }
if (intval($x['exclude'])) { if (x($x, 'exclude'])) {
$sql_extra .= sprintf(" AND `id` != %d ", intval($x['exclude'])); $sql_extra .= sprintf(" AND `id` != %d ", intval($x['exclude']));
} }
@ -549,9 +550,7 @@ function acl_lookup(App $a, $out_type = 'json') {
intval(local_user()), intval(local_user()),
dbesc(NETWORK_OSTATUS), dbesc(NETWORK_STATUSNET) dbesc(NETWORK_OSTATUS), dbesc(NETWORK_STATUSNET)
); );
} } elseif ($type == 'c') {
elseif ($type=='c'){
$r = q("SELECT `id`, `name`, `nick`, `micro`, `network`, `url`, `attag`, `forum`, `prv` FROM `contact` $r = q("SELECT `id`, `name`, `nick`, `micro`, `network`, `url`, `attag`, `forum`, `prv` FROM `contact`
WHERE `uid` = %d AND NOT `self` AND NOT `blocked` AND NOT `pending` AND NOT `archive` AND `notify` != '' WHERE `uid` = %d AND NOT `self` AND NOT `blocked` AND NOT `pending` AND NOT `archive` AND `notify` != ''
AND NOT (`network` IN ('%s')) AND NOT (`network` IN ('%s'))