use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\DBA;
-use Friendica\Model;\
-use Friendica\Module\Contact;
+use Friendica\Model;
+use Friendica\Module;
use Friendica\Util\Proxy as ProxyUtils;
$entries[] = $entry;
}
- $tab_str = Contact::getTabsHTML($a, $contact, 4);
+ $tab_str = Module\Contact::getTabsHTML($a, $contact, 4);
$tpl = get_markup_template('viewcontact_template.tpl');
use Friendica\Core\L10n;
use Friendica\Database\DBA;
use Friendica\Model;
-use Friendica\Module\Contact;
+use Friendica\Module;
use Friendica\Util\Proxy as ProxyUtils;
if (DBA::isResult($contact)) {
$a->page['aside'] = "";
- Model\Profile::load($a, "", 0,Model\Contact::getDetailsByURL($contact["url"]));
+ Model\Profile::load($a, "", 0, Model\Contact::getDetailsByURL($contact["url"]));
}
} else {
$contact = DBA::selectFirst('contact', ['name', 'url', 'photo', 'uid', 'id'], ['self' => true, 'uid' => $uid]);
return;
}
- if (!$cid &&Model\Profile::getMyURL()) {
+ if (!$cid && Model\Profile::getMyURL()) {
$contact = DBA::selectFirst('contact', ['id'], ['nurl' => normalise_link(Model\Profile::getMyURL()), 'uid' => $uid]);
if (DBA::isResult($contact)) {
$cid = $contact['id'];
}
if ($cid) {
- $t =Model\GContact::countCommonFriends($uid, $cid);
+ $t = Model\GContact::countCommonFriends($uid, $cid);
} else {
- $t =Model\GContact::countCommonFriendsZcid($uid, $zcid);
+ $t = Model\GContact::countCommonFriendsZcid($uid, $zcid);
}
if ($t > 0) {
}
if ($cid) {
- $r =Model\GContact::commonFriends($uid, $cid, $a->pager['start'], $a->pager['itemspage']);
+ $r = Model\GContact::commonFriends($uid, $cid, $a->pager['start'], $a->pager['itemspage']);
} else {
- $r =Model\GContact::commonFriendsZcid($uid, $zcid, $a->pager['start'], $a->pager['itemspage']);
+ $r = Model\GContact::commonFriendsZcid($uid, $zcid, $a->pager['start'], $a->pager['itemspage']);
}
if (!DBA::isResult($r)) {
$entries = [];
foreach ($r as $rr) {
//get further details of the contact
- $contact_details =Model\Contact::getDetailsByURL($rr['url'], $uid);
+ $contact_details = Model\Contact::getDetailsByURL($rr['url'], $uid);
// $rr['id'] is needed to use contact_photo_menu()
/// @TODO Adding '/" here avoids E_NOTICE on missing constants
$rr['id'] = $rr['cid'];
- $photo_menu =Model\Contact::photoMenu($rr);
+ $photo_menu = Model\Contact::photoMenu($rr);
$entry = [
'url' => $rr['url'],
'details' => $contact_details['location'],
'tags' => $contact_details['keywords'],
'about' => $contact_details['about'],
- 'account_type' =>Model\Contact::getAccountType($contact_details),
+ 'account_type' => Model\Contact::getAccountType($contact_details),
'network' => ContactSelector::networkToName($contact_details['network'], $contact_details['url']),
'photo_menu' => $photo_menu,
'id' => ++$id,
$title = '';
$tab_str = '';
if ($cmd === 'loc' && $cid && local_user() == $uid) {
- $tab_str = Contact::getTabsHTML($a, $contact, 4);
+ $tab_str = Module\Contact::getTabsHTML($a, $contact, 4);
} else {
$title = L10n::t('Common Friends');
}
use Friendica\Core\Protocol;
use Friendica\Database\DBA;
use Friendica\Model;
-use Friendica\Module\Contact;
+use Friendica\Module;
function crepair_init(App $a)
{
if (DBA::isResult($contact)) {
$a->data['contact'] = $contact;
- Profile::load($a, "", 0, Contact::getDetailsByURL($contact["url"]));
+ Profile::load($a, "", 0, Module\Contact::getDetailsByURL($contact["url"]));
}
}
$update_profile = in_array($contact['network'], [Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS]);
- $tab_str = Contact::getTabsHTML($a, $contact, 5);
+ $tab_str = Module\Contact::getTabsHTML($a, $contact, 5);
$tpl = get_markup_template('crepair.tpl');
$o = replace_macros($tpl, [
use Friendica\Core\Worker;
use Friendica\Database\DBA;
use Friendica\Model;
-use Friendica\Module\Contact;
+use Friendica\Module;
use Friendica\Network\Probe;
use Friendica\Protocol\PortableContact;
use Friendica\Util\Network;
$conntxt = "";
$contact = DBA::selectFirst('contact', [], ['id' => $jj->cid]);
if (DBA::isResult($contact)) {
- $photo_menu =Model\Contact::photoMenu($contact);
- $details = Contact::getContactTemplateVars($contact);
+ $photo_menu = Model\Contact::photoMenu($contact);
+ $details = Module\Contact::getContactTemplateVars($contact);
$alt_text = $details['alt_text'];
} else {
$photo_menu = [];
$photo_menu = [];
}
- $photo_menu['profile'] = [L10n::t("View Profile"), Contact::magicLink($jj->url)];
+ $photo_menu['profile'] = [L10n::t("View Profile"), Module\Contact::magicLink($jj->url)];
$photo_menu['follow'] = [L10n::t("Connect/Follow"), $connlnk];
}
use Friendica\Core\System;
use Friendica\Database\DBA;
use Friendica\Model;
-use Friendica\Module\Contact;
+use Friendica\Module;
function group_init(App $a) {
if (local_user()) {
// Format the data of the group members
foreach ($members as $member) {
if ($member['url']) {
- $entry = Contact::getContactTemplateVars($member);
+ $entry = Module\Contact::getContactTemplateVars($member);
$entry['label'] = 'members';
$entry['photo_menu'] = '';
$entry['change_member'] = [
// Format the data of the contacts who aren't in the contact group
foreach ($r as $member) {
if (!in_array($member['id'], $preselected)) {
- $entry = Contact::getContactTemplateVars($member);
+ $entry = Module\Contact::getContactTemplateVars($member);
$entry['label'] = 'contacts';
if (!$nogroup)
$entry['photo_menu'] = [];
if (!DBA::exists('contact', ['id' => $contact_id, 'uid' => local_user()])) {
notice(L10n::t('Could not access contact record.') . EOL);
- goaway('contacts');
+ goaway('contact');
return; // NOTREACHED
}
$a = self::getApp();
$sort_type = 0;
$o = '';
- Nav::setSelected('contacts');
+ Nav::setSelected('contact');
if (!local_user()) {
notice(L10n::t('Permission denied.') . EOL);
$orig_record = DBA::selectFirst('contact', [], ['id' => $contact_id, 'uid' => [0, local_user()], 'self' => false]);
if (!DBA::isResult($orig_record)) {
notice(L10n::t('Could not access contact record.') . EOL);
- goaway('contacts');
+ goaway('contact');
return; // NOTREACHED
}
if ($cmd === 'update' && ($orig_record['uid'] != 0)) {
self::updateContactFromPoll($contact_id);
- goaway('contacts/' . $contact_id);
+ goaway('contact/' . $contact_id);
// NOTREACHED
}
$blocked = Model\Contact::isBlockedByUser($contact_id, local_user());
info(($blocked ? L10n::t('Contact has been blocked') : L10n::t('Contact has been unblocked')) . EOL);
- goaway('contacts/' . $contact_id);
+ goaway('contact/' . $contact_id);
return; // NOTREACHED
}
$ignored = Model\Contact::isIgnoredByUser($contact_id, local_user());
info(($ignored ? L10n::t('Contact has been ignored') : L10n::t('Contact has been unignored')) . EOL);
- goaway('contacts/' . $contact_id);
+ goaway('contact/' . $contact_id);
return; // NOTREACHED
}
info((($archived) ? L10n::t('Contact has been archived') : L10n::t('Contact has been unarchived')) . EOL);
}
- goaway('contacts/' . $contact_id);
+ goaway('contact/' . $contact_id);
return; // NOTREACHED
}
}
// Now check how the user responded to the confirmation query
if (defaults($_REQUEST, 'canceled')) {
- goaway('contacts');
+ goaway('contact');
}
self::dropContact($orig_record);
info(L10n::t('Contact has been removed.') . EOL);
- goaway('contacts');
+ goaway('contact');
return; // NOTREACHED
}
if ($cmd === 'posts') {
use Friendica\Core\System;
use Friendica\Database\DBA;
use Friendica\Model;
-use Friendica\Module\Contact;
+use Friendica\Module;
$frio = 'view/theme/frio';
if (DBA::isResult($r)) {
foreach ($r as $rr) {
- $contacts[] = Model\Contact::getContactTemplateVars($rr);
+ $contacts[] = Module\Contact::getContactTemplateVars($rr);
}
}