1
0
Fork 0

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>
This commit is contained in:
Roland Häder 2016-12-20 21:13:50 +01:00
commit 6c0c9d542a
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78
18 changed files with 82 additions and 67 deletions

View file

@ -53,7 +53,7 @@ function group_rmv($uid,$name) {
$r = q("SELECT def_gid, allow_gid, deny_gid FROM user WHERE uid = %d LIMIT 1",
intval($uid)
);
if($r) {
if ($r) {
$user_info = $r[0];
$change = false;
@ -199,7 +199,7 @@ function mini_group_select($uid,$gid = 0, $label = "") {
);
$grps[] = array('name' => '', 'id' => '0', 'selected' => '');
if (dbm::is_result($r)) {
foreach($r as $rr) {
foreach ($r as $rr) {
$grps[] = array('name' => $rr['name'], 'id' => $rr['id'], 'selected' => (($gid == $rr['id']) ? 'true' : ''));
}
@ -257,7 +257,7 @@ function group_side($every="contacts",$each="group",$editmode = "standard", $gro
}
if (dbm::is_result($r)) {
foreach($r as $rr) {
foreach ($r as $rr) {
$selected = (($group_id == $rr['id']) ? ' group-selected' : '');
if ($editmode == "full") {