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:
parent
de689583e2
commit
6c0c9d542a
18 changed files with 82 additions and 67 deletions
|
@ -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") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue