Browse Source

Continued with coding convention:

- added curly braces around conditional code blocks
- added space between if/foreach/... and brace
- rewrote a code block so if dbm::is_result() fails it will abort, else the id
  is fetched from INSERT statement
- made some SQL keywords upper-cased and added back-ticks to columns/table names

Signed-off-by: Roland Haeder <roland@mxchange.org>
pull/3043/head
Roland Haeder 4 years ago
parent
commit
ca82678a6d
No known key found for this signature in database GPG Key ID: B72F8185C6C7BD78
2 changed files with 5 additions and 4 deletions
  1. +3
    -3
      include/acl_selectors.php
  2. +2
    -1
      include/message.php

+ 3
- 3
include/acl_selectors.php View File

@ -272,7 +272,7 @@ function prune_deadguys($arr) {
$r = q("SELECT `id` FROM `contact` WHERE `id` IN ( " . $str . ") AND `blocked` = 0 AND `pending` = 0 AND `archive` = 0 ");
if ($r) {
if (dbm::is_result($r)) {
$ret = array();
foreach ($r as $rr) {
$ret[] = intval($rr['id']);
@ -585,9 +585,9 @@ function acl_lookup(&$a, $out_type = 'json') {
);
echo json_encode($o);
killme();
}
else
} else {
$r = array();
}
if (dbm::is_result($r)) {


+ 2
- 1
include/message.php View File

@ -153,7 +153,8 @@ function send_message($recipient=0, $body='', $subject='', $replyto=''){
if ($post_id) {
proc_run(PRIORITY_HIGH, "include/notifier.php", "mail", $post_id);
return intval($post_id);
} else {
}
else {
return -3;
}


Loading…
Cancel
Save