Apply suggestions from code review
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
parent
0bbe954316
commit
1793513f46
|
@ -122,15 +122,16 @@ function display_fetchauthor($item)
|
||||||
// Check for a repeated message
|
// Check for a repeated message
|
||||||
$shared = Item::getShareArray($item);
|
$shared = Item::getShareArray($item);
|
||||||
if (!empty($shared) && empty($shared['comment'])) {
|
if (!empty($shared) && empty($shared['comment'])) {
|
||||||
$profiledata = [];
|
$profiledata = [
|
||||||
$profiledata['uid'] = -1;
|
'uid' => -1,
|
||||||
$profiledata['id'] = -1;
|
'id' => -1,
|
||||||
$profiledata['nickname'] = '';
|
'nickname' => '',
|
||||||
$profiledata['name'] = '';
|
'name' => '',
|
||||||
$profiledata['picdate'] = '';
|
'picdate' => '',
|
||||||
$profiledata['photo'] = '';
|
'photo' => '',
|
||||||
$profiledata['url'] = '';
|
'url' => '',
|
||||||
$profiledata['network'] = '';
|
'network' => '',
|
||||||
|
];
|
||||||
|
|
||||||
if (!empty($shared['author'])) {
|
if (!empty($shared['author'])) {
|
||||||
$profiledata['name'] = $shared['author'];
|
$profiledata['name'] = $shared['author'];
|
||||||
|
|
|
@ -1624,7 +1624,7 @@ function photos_content(App $a)
|
||||||
$o .= Renderer::replaceMacros($tpl, [
|
$o .= Renderer::replaceMacros($tpl, [
|
||||||
'$title' => DI::l10n()->t('Recent Photos'),
|
'$title' => DI::l10n()->t('Recent Photos'),
|
||||||
'$can_post' => $can_post,
|
'$can_post' => $can_post,
|
||||||
'$upload' => [DI::l10n()->t('Upload New Photos'), 'photos/'.$user['nickname'].'/upload'],
|
'$upload' => [DI::l10n()->t('Upload New Photos'), 'photos/' . $user['nickname'] . '/upload'],
|
||||||
'$photos' => $photos,
|
'$photos' => $photos,
|
||||||
'$paginate' => $pager->renderFull($total),
|
'$paginate' => $pager->renderFull($total),
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -118,7 +118,7 @@ class Delegation extends BaseModule
|
||||||
throw new ForbiddenException(DI::l10n()->t('Permission denied.'));
|
throw new ForbiddenException(DI::l10n()->t('Permission denied.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$identities = User::identities(DI::session()->get('submanage') ?: local_user());
|
$identities = User::identities(DI::session()->get('submanage', local_user()));
|
||||||
|
|
||||||
//getting additinal information for each identity
|
//getting additinal information for each identity
|
||||||
foreach ($identities as $key => $identity) {
|
foreach ($identities as $key => $identity) {
|
||||||
|
|
|
@ -65,7 +65,7 @@ class Magic extends BaseModule
|
||||||
$contact = DBA::selectFirst('contact', ['id', 'nurl', 'url'], ['id' => $cid]);
|
$contact = DBA::selectFirst('contact', ['id', 'nurl', 'url'], ['id' => $cid]);
|
||||||
|
|
||||||
// Redirect if the contact is already authenticated on this site.
|
// Redirect if the contact is already authenticated on this site.
|
||||||
if (!empty($a->getContactId()) && strpos($contact['nurl'], Strings::normaliseLink(DI::baseUrl()->get())) !== false) {
|
if ($a->getContactId() && strpos($contact['nurl'], Strings::normaliseLink(DI::baseUrl()->get())) !== false) {
|
||||||
if ($test) {
|
if ($test) {
|
||||||
$ret['success'] = true;
|
$ret['success'] = true;
|
||||||
$ret['message'] .= 'Local site - you are already authenticated.' . EOL;
|
$ret['message'] .= 'Local site - you are already authenticated.' . EOL;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user