From: Michael Date: Sat, 18 Mar 2017 12:13:43 +0000 (+0000) Subject: Some standards X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1a436264cd9b143f30f9ff3c0ee4b7e0234ebe7e;p=friendica.git Some standards --- diff --git a/include/Contact.php b/include/Contact.php index 1e393895fb..fc9f660f13 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -127,7 +127,7 @@ function mark_for_death($contact) { if($contact['archive']) return; - if($contact['term-date'] <= NULL_DATE) { + if ($contact['term-date'] <= NULL_DATE) { q("UPDATE `contact` SET `term-date` = '%s' WHERE `id` = %d", dbesc(datetime_convert()), intval($contact['id']) diff --git a/include/datetime.php b/include/datetime.php index fd60f5fd96..9e1d4b55c9 100644 --- a/include/datetime.php +++ b/include/datetime.php @@ -171,7 +171,7 @@ function dob($dob) { $f = get_config('system','birthday_input_format'); if(! $f) $f = 'ymd'; - if($dob == '0000-00-00') + if($dob === '0000-00-00') $value = ''; else $value = (($year) ? datetime_convert('UTC','UTC',$dob,'Y-m-d') : datetime_convert('UTC','UTC',$dob,'m-d')); diff --git a/include/dfrn.php b/include/dfrn.php index de64c37d67..25f8c9358e 100644 --- a/include/dfrn.php +++ b/include/dfrn.php @@ -1094,7 +1094,7 @@ class dfrn { return 3; } - if($contact['term-date'] > NULL_DATE) { + if ($contact['term-date'] > NULL_DATE) { logger("dfrn_deliver: $url back from the dead - removing mark for death"); require_once('include/Contact.php'); unmark_for_death($contact); diff --git a/include/security.php b/include/security.php index a9d2f83de8..05371f71ca 100644 --- a/include/security.php +++ b/include/security.php @@ -55,7 +55,7 @@ function authenticate_success($user_record, $login_initial = false, $interactive $a->user = $user_record; if($interactive) { - if($a->user['login_date'] <= NULL_DATE) { + if ($a->user['login_date'] <= NULL_DATE) { $_SESSION['return_url'] = 'profile_photo/new'; $a->module = 'profile_photo'; info( t("Welcome ") . $a->user['username'] . EOL); diff --git a/mod/contacts.php b/mod/contacts.php index 5fdcb7036d..0569c8ca4e 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -538,7 +538,7 @@ function contacts_content(App $a) { ? t('Never') : datetime_convert('UTC',date_default_timezone_get(),$contact['last-update'],'D, j M Y, g:i A')); - if($contact['last-update'] > NULL_DATE) + if ($contact['last-update'] > NULL_DATE) $last_update .= ' ' . (($contact['last-update'] <= $contact['success_update']) ? t("\x28Update was successful\x29") : t("\x28Update was not successful\x29")); $lblsuggest = (($contact['network'] === NETWORK_DFRN) ? t('Suggest friends') : '');