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:
parent
1c6535c0b4
commit
63e4750b4a
6 changed files with 38 additions and 26 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue