1
0
Fork 0

more coding convention applied:

- added curly braces
- added spaces where needed
- $r only needs to be tested with dbm::is_result()
- made SQL keywords all uper-case

Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2017-01-23 09:50:25 +01:00 committed by Roland Haeder
commit 63e4750b4a
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78
6 changed files with 38 additions and 26 deletions

View file

@ -34,8 +34,9 @@ function profiles_init(App $a) {
intval($a->argv[2]),
intval(local_user())
);
if($r)
if ($r) {
info(t('Profile deleted.').EOL);
}
goaway('profiles');
return; // NOTREACHED
@ -473,11 +474,12 @@ function profiles_post(App $a) {
intval(local_user())
);
if($r)
if ($r) {
info( t('Profile updated.') . EOL);
}
if($namechanged && $is_default) {
if ($namechanged && $is_default) {
$r = q("UPDATE `contact` SET `name` = '%s', `name-date` = '%s' WHERE `self` = 1 AND `uid` = %d",
dbesc($name),
dbesc(datetime_convert()),
@ -489,7 +491,7 @@ function profiles_post(App $a) {
);
}
if($is_default) {
if ($is_default) {
$location = formatted_location(array("locality" => $locality, "region" => $region, "country-name" => $country_name));
q("UPDATE `contact` SET `about` = '%s', `location` = '%s', `keywords` = '%s', `gender` = '%s' WHERE `self` AND `uid` = %d",