mirror of
https://github.com/friendica/friendica
synced 2025-04-19 10:30:10 +00:00
Merge pull request #8190 from MrPetovan/task/profile-tidings
Deprecated profile fields cleanup
This commit is contained in:
commit
353dddaf15
31 changed files with 45 additions and 574 deletions
|
@ -44,7 +44,7 @@ class AllFriends extends BaseModule
|
|||
}
|
||||
|
||||
DI::page()['aside'] = "";
|
||||
Model\Profile::load($app, "", 0, Model\Contact::getDetailsByURL($contact["url"]));
|
||||
Model\Profile::load($app, "", Model\Contact::getDetailsByURL($contact["url"]));
|
||||
|
||||
$total = Model\GContact::countAllFriends(local_user(), $cid);
|
||||
|
||||
|
|
|
@ -957,7 +957,7 @@ class Contact extends BaseModule
|
|||
|
||||
$profiledata = Model\Contact::getDetailsByURL($contact['url']);
|
||||
|
||||
Model\Profile::load($a, '', 0, $profiledata, true);
|
||||
Model\Profile::load($a, '', $profiledata, true);
|
||||
$o .= Model\Contact::getPostsFromUrl($contact['url'], true, $update);
|
||||
}
|
||||
|
||||
|
@ -979,7 +979,7 @@ class Contact extends BaseModule
|
|||
$profiledata['remoteconnect'] = DI::baseUrl() . '/follow?url=' . urlencode($profiledata['url']);
|
||||
}
|
||||
|
||||
Model\Profile::load($a, '', 0, $profiledata, true);
|
||||
Model\Profile::load($a, '', $profiledata, true);
|
||||
$o .= Model\Contact::getPostsFromUrl($contact['url']);
|
||||
}
|
||||
|
||||
|
|
|
@ -137,10 +137,7 @@ class Directory extends BaseModule
|
|||
$location = '';
|
||||
}
|
||||
|
||||
$gender = (!empty($profile['gender']) ? DI::l10n()->t('Gender:') : false);
|
||||
$marital = (!empty($profile['marital']) ? DI::l10n()->t('Status:') : false);
|
||||
$homepage = (!empty($profile['homepage']) ? DI::l10n()->t('Homepage:') : false);
|
||||
$about = (!empty($profile['about']) ? DI::l10n()->t('About:') : false);
|
||||
|
||||
$location_e = $location;
|
||||
|
||||
|
@ -160,11 +157,8 @@ class Directory extends BaseModule
|
|||
'profile' => $profile,
|
||||
'location' => $location_e,
|
||||
'tags' => $contact['pub_keywords'],
|
||||
'gender' => $gender,
|
||||
'pdesc' => $pdesc,
|
||||
'marital' => $marital,
|
||||
'homepage' => $homepage,
|
||||
'about' => $about,
|
||||
'photo_menu' => $photo_menu,
|
||||
|
||||
];
|
||||
|
|
|
@ -21,16 +21,14 @@ class HoverCard extends BaseModule
|
|||
if ((local_user()) && ($parameters['action'] ?? '') === 'view') {
|
||||
// A logged in user views a profile of a user
|
||||
$nickname = $a->user['nickname'];
|
||||
$profile = $parameters['profile'];
|
||||
} elseif (empty($parameters['action'])) {
|
||||
// Show the profile hovercard
|
||||
$nickname = $parameters['profile'];
|
||||
$profile = 0;
|
||||
} else {
|
||||
throw new NotFoundException(DI::l10n()->t('No profile'));
|
||||
}
|
||||
|
||||
Profile::load($a, $nickname, $profile);
|
||||
Profile::load($a, $nickname);
|
||||
|
||||
$page = DI::page();
|
||||
|
||||
|
|
|
@ -25,17 +25,15 @@ class NoScrape extends BaseModule
|
|||
if (isset($parameters['nick'])) {
|
||||
// Get infos about a specific nick (public)
|
||||
$which = $parameters['nick'];
|
||||
$profile = 0;
|
||||
} elseif (local_user() && isset($parameters['profile']) && DI::args()->get(2) == 'view') {
|
||||
// view infos about a known profile (needs a login)
|
||||
$which = $a->user['nickname'];
|
||||
$profile = $parameters['profile'];
|
||||
} else {
|
||||
System::jsonError(403, 'Authentication required');
|
||||
exit();
|
||||
}
|
||||
|
||||
Profile::load($a, $which, $profile);
|
||||
Profile::load($a, $nickname);
|
||||
|
||||
$json_info = [
|
||||
'addr' => $a->profile['addr'],
|
||||
|
@ -114,7 +112,7 @@ class NoScrape extends BaseModule
|
|||
$json_info['last-activity'] = date('o-W', $last_active);
|
||||
|
||||
//These are optional fields.
|
||||
$profile_fields = ['pdesc', 'locality', 'region', 'postal-code', 'country-name', 'gender', 'marital', 'about'];
|
||||
$profile_fields = ['pdesc', 'locality', 'region', 'postal-code', 'country-name'];
|
||||
foreach ($profile_fields as $field) {
|
||||
if (!empty($a->profile[$field])) {
|
||||
$json_info["$field"] = $a->profile[$field];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue