added spaces + some curly braces

Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2017-01-26 16:01:56 +01:00 committed by Roland Haeder
parent 0cd241bcbe
commit 41a36606c6
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78
60 changed files with 1018 additions and 930 deletions

View file

@ -5,7 +5,7 @@
// authorisation to do this.
function user_remove($uid) {
if(! $uid)
if (! $uid)
return;
logger('Removing user: ' . $uid);
@ -49,7 +49,7 @@ function user_remove($uid) {
// Send an update to the directory
proc_run(PRIORITY_LOW, "include/directory.php", $r[0]['url']);
if($uid == local_user()) {
if ($uid == local_user()) {
unset($_SESSION['authenticated']);
unset($_SESSION['uid']);
goaway(App::get_baseurl());
@ -124,10 +124,10 @@ function terminate_friendship($user,$self,$contact) {
function mark_for_death($contact) {
if($contact['archive'])
if ($contact['archive'])
return;
if($contact['term-date'] == '0000-00-00 00:00:00') {
if ($contact['term-date'] == '0000-00-00 00:00:00') {
q("UPDATE `contact` SET `term-date` = '%s' WHERE `id` = %d",
dbesc(datetime_convert()),
intval($contact['id'])
@ -151,7 +151,7 @@ function mark_for_death($contact) {
/// Check for contact vitality via probing
$expiry = $contact['term-date'] . ' + 32 days ';
if(datetime_convert() > datetime_convert('UTC','UTC',$expiry)) {
if (datetime_convert() > datetime_convert('UTC','UTC',$expiry)) {
// relationship is really truly dead.
// archive them rather than delete
@ -483,7 +483,7 @@ function random_profile() {
function contacts_not_grouped($uid,$start = 0,$count = 0) {
if(! $count) {
if (! $count) {
$r = q("select count(*) as total from contact where uid = %d and self = 0 and id not in (select distinct(`contact-id`) from group_member where uid = %d) ",
intval($uid),
intval($uid)
@ -775,18 +775,18 @@ function posts_from_contact_url(App $a, $contact_url) {
function formatted_location($profile) {
$location = '';
if($profile['locality'])
if ($profile['locality'])
$location .= $profile['locality'];
if($profile['region'] AND ($profile['locality'] != $profile['region'])) {
if($location)
if ($profile['region'] AND ($profile['locality'] != $profile['region'])) {
if ($location)
$location .= ', ';
$location .= $profile['region'];
}
if($profile['country-name']) {
if($location)
if ($profile['country-name']) {
if ($location)
$location .= ', ';
$location .= $profile['country-name'];
@ -808,7 +808,7 @@ function account_type($contact) {
// "page-flags" is a field in the user table,
// "forum" and "prv" are used in the contact table. They stand for PAGE_COMMUNITY and PAGE_PRVGROUP.
// "community" is used in the gcontact table and is true if the contact is PAGE_COMMUNITY or PAGE_PRVGROUP.
if((isset($contact['page-flags']) && (intval($contact['page-flags']) == PAGE_COMMUNITY))
if ((isset($contact['page-flags']) && (intval($contact['page-flags']) == PAGE_COMMUNITY))
|| (isset($contact['page-flags']) && (intval($contact['page-flags']) == PAGE_PRVGROUP))
|| (isset($contact['forum']) && intval($contact['forum']))
|| (isset($contact['prv']) && intval($contact['prv']))