From 542370b6dd2896c2c53bf4634d54b87096dfe938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?= Date: Wed, 25 Jul 2018 01:30:23 +0200 Subject: [PATCH 1/2] [cross] Moved CONTACT_* constants to class Friendica\Model\Contact --- pumpio/pumpio.php | 2 +- statusnet/statusnet.php | 3 ++- twitter/twitter.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php index 5cda94d0..a76ea0aa 100644 --- a/pumpio/pumpio.php +++ b/pumpio/pumpio.php @@ -1035,7 +1035,7 @@ function pumpio_get_contact($uid, $contact, $no_insert = false) DBA::escape($contact->preferredUsername), DBA::escape($contact->image->url), DBA::escape(NETWORK_PUMPIO), - intval(CONTACT_IS_FRIEND), + intval(Contact::CONTACT_IS_FRIEND), intval(1), DBA::escape($contact->location->displayName), DBA::escape($contact->summary), diff --git a/statusnet/statusnet.php b/statusnet/statusnet.php index 58f4485e..f23e6631 100644 --- a/statusnet/statusnet.php +++ b/statusnet/statusnet.php @@ -48,6 +48,7 @@ use Friendica\Core\Config; use Friendica\Core\L10n; use Friendica\Core\PConfig; use Friendica\Database\DBA; +use Friendica\Model\Contact; use Friendica\Model\GContact; use Friendica\Model\Group; use Friendica\Model\Item; @@ -928,7 +929,7 @@ function statusnet_fetch_contact($uid, $contact, $create_user) DBA::escape($contact->screen_name), DBA::escape($contact->profile_image_url), DBA::escape(NETWORK_STATUSNET), - intval(CONTACT_IS_FRIEND), + intval(Contact::CONTACT_IS_FRIEND), intval(1), DBA::escape($contact->location), DBA::escape($contact->description), diff --git a/twitter/twitter.php b/twitter/twitter.php index 59188705..18eae39c 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -1029,7 +1029,7 @@ function twitter_fetch_contact($uid, $data, $create_user) $fields['nurl'] = normalise_link($url); $fields['alias'] = 'twitter::' . $data->id_str; $fields['poll'] = 'twitter::' . $data->id_str; - $fields['rel'] = CONTACT_IS_FRIEND; + $fields['rel'] = Contact::CONTACT_IS_FRIEND; $fields['priority'] = 1; $fields['writable'] = true; $fields['blocked'] = false; -- 2.45.2 From 269dc07bef2507a70ad36793f873228a87094e88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?= Date: Wed, 25 Jul 2018 02:12:54 +0200 Subject: [PATCH 2/2] Other PR request: - renamed Contact::CONTACT_IS_* to just plain Contact::* :-) (MrPetovan) --- pumpio/pumpio.php | 2 +- statusnet/statusnet.php | 2 +- twitter/twitter.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php index a76ea0aa..eea1c284 100644 --- a/pumpio/pumpio.php +++ b/pumpio/pumpio.php @@ -1035,7 +1035,7 @@ function pumpio_get_contact($uid, $contact, $no_insert = false) DBA::escape($contact->preferredUsername), DBA::escape($contact->image->url), DBA::escape(NETWORK_PUMPIO), - intval(Contact::CONTACT_IS_FRIEND), + intval(Contact::FRIEND), intval(1), DBA::escape($contact->location->displayName), DBA::escape($contact->summary), diff --git a/statusnet/statusnet.php b/statusnet/statusnet.php index f23e6631..6f987f36 100644 --- a/statusnet/statusnet.php +++ b/statusnet/statusnet.php @@ -929,7 +929,7 @@ function statusnet_fetch_contact($uid, $contact, $create_user) DBA::escape($contact->screen_name), DBA::escape($contact->profile_image_url), DBA::escape(NETWORK_STATUSNET), - intval(Contact::CONTACT_IS_FRIEND), + intval(Contact::FRIEND), intval(1), DBA::escape($contact->location), DBA::escape($contact->description), diff --git a/twitter/twitter.php b/twitter/twitter.php index 18eae39c..8ac6197b 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -1029,7 +1029,7 @@ function twitter_fetch_contact($uid, $data, $create_user) $fields['nurl'] = normalise_link($url); $fields['alias'] = 'twitter::' . $data->id_str; $fields['poll'] = 'twitter::' . $data->id_str; - $fields['rel'] = Contact::CONTACT_IS_FRIEND; + $fields['rel'] = Contact::FRIEND; $fields['priority'] = 1; $fields['writable'] = true; $fields['blocked'] = false; -- 2.45.2