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:
committed by
Roland Haeder
parent
1c6535c0b4
commit
63e4750b4a
+6
-4
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user