Remove direct calls to App->user
This commit is contained in:
parent
266ee26240
commit
fc283ab928
51 changed files with 238 additions and 166 deletions
|
@ -31,7 +31,7 @@ function api_post(App $a)
|
|||
return;
|
||||
}
|
||||
|
||||
if (count($a->user) && !empty($a->user['uid']) && $a->user['uid'] != local_user()) {
|
||||
if (empty($a->getUserId()) || $a->getUserId() != local_user()) {
|
||||
notice(DI::l10n()->t('Permission denied.'));
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ function cal_content(App $a)
|
|||
$sql_extra = " AND `event`.`cid` = 0 " . $sql_perms;
|
||||
|
||||
// get the tab navigation bar
|
||||
$tabs = BaseProfile::getTabsHTML($a, 'cal', false, $owner);
|
||||
$tabs = BaseProfile::getTabsHTML($a, 'cal', false, $owner['nickname'], $owner['hide-friends']);
|
||||
|
||||
// The view mode part is similiar to /mod/events.php
|
||||
if ($mode == 'view') {
|
||||
|
|
|
@ -63,7 +63,7 @@ function display_init(App $a)
|
|||
if (local_user()) {
|
||||
$item = Post::selectFirstForUser(local_user(), $fields, ['guid' => DI::args()->getArgv()[1], 'uid' => local_user()]);
|
||||
if (DBA::isResult($item)) {
|
||||
$nick = $a->user['nickname'];
|
||||
$nick = $a->getNickname();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -275,10 +275,10 @@ function display_content(App $a, $update = false, $update_uid = 0)
|
|||
if ($is_owner && !$update) {
|
||||
$x = [
|
||||
'is_owner' => true,
|
||||
'allow_location' => $a->user['allow_location'],
|
||||
'default_location' => $a->user['default-location'],
|
||||
'nickname' => $a->user['nickname'],
|
||||
'lockstate' => (is_array($a->user) && (strlen($a->user['allow_cid']) || strlen($a->user['allow_gid']) || strlen($a->user['deny_cid']) || strlen($a->user['deny_gid'])) ? 'lock' : 'unlock'),
|
||||
'allow_location' => $a->getUserValue('allow_location'),
|
||||
'default_location' => $a->getUserValue('default-location'),
|
||||
'nickname' => $a->getNickname(),
|
||||
'lockstate' => ACL::getLockstateForUserId($a->getUserId()) ? 'lock' : 'unlock',
|
||||
'acl' => ACL::getFullSelectorHTML(DI::page(), $a->user, true),
|
||||
'bang' => '',
|
||||
'visitor' => 'block',
|
||||
|
|
|
@ -65,7 +65,7 @@ function editpost_content(App $a)
|
|||
DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [
|
||||
'$ispublic' => ' ', // DI::l10n()->t('Visible to <strong>everybody</strong>'),
|
||||
'$geotag' => $geotag,
|
||||
'$nickname' => $a->user['nickname'],
|
||||
'$nickname' => $a->getNickname(),
|
||||
'$is_mobile' => DI::mode()->isMobile(),
|
||||
]);
|
||||
|
||||
|
@ -107,7 +107,7 @@ function editpost_content(App $a)
|
|||
'$posttype' => $item['post-type'],
|
||||
'$content' => undo_post_tagging($item['body']),
|
||||
'$post_id' => $post_id,
|
||||
'$defloc' => $a->user['default-location'],
|
||||
'$defloc' => $a->getUserValue('default-location'),
|
||||
'$visitor' => 'none',
|
||||
'$pvisit' => 'none',
|
||||
'$emailcc' => DI::l10n()->t('CC: email addresses'),
|
||||
|
|
|
@ -280,7 +280,7 @@ function events_content(App $a)
|
|||
$tabs = '';
|
||||
// tabs
|
||||
if ($a->getThemeInfoValue('events_in_profile')) {
|
||||
$tabs = BaseProfile::getTabsHTML($a, 'events', true, $a->user);
|
||||
$tabs = BaseProfile::getTabsHTML($a, 'events', true, $a->getNickname(), false);
|
||||
}
|
||||
|
||||
$mode = 'view';
|
||||
|
|
|
@ -88,7 +88,7 @@ function fbrowser_content(App $a)
|
|||
}
|
||||
|
||||
return [
|
||||
DI::baseUrl() . '/photos/' . $a->user['nickname'] . '/image/' . $rr['resource-id'],
|
||||
DI::baseUrl() . '/photos/' . $a->getNickname() . '/image/' . $rr['resource-id'],
|
||||
$filename_e,
|
||||
DI::baseUrl() . '/photo/' . $rr['resource-id'] . '-' . $scale . '.'. $ext
|
||||
];
|
||||
|
@ -103,7 +103,7 @@ function fbrowser_content(App $a)
|
|||
'$folders' => $albums,
|
||||
'$files' => $files,
|
||||
'$cancel' => DI::l10n()->t('Cancel'),
|
||||
'$nickname' => $a->user['nickname'],
|
||||
'$nickname' => $a->getNickname(),
|
||||
'$upload' => DI::l10n()->t('Upload')
|
||||
]);
|
||||
|
||||
|
@ -132,7 +132,7 @@ function fbrowser_content(App $a)
|
|||
'$folders' => false,
|
||||
'$files' => $files,
|
||||
'$cancel' => DI::l10n()->t('Cancel'),
|
||||
'$nickname' => $a->user['nickname'],
|
||||
'$nickname' => $a->getNickname(),
|
||||
'$upload' => DI::l10n()->t('Upload')
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ function message_content(App $a)
|
|||
return Login::form();
|
||||
}
|
||||
|
||||
$myprofile = DI::baseUrl() . '/profile/' . $a->user['nickname'];
|
||||
$myprofile = DI::baseUrl() . '/profile/' . $a->getNickname();
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate('mail_head.tpl');
|
||||
if (DI::args()->getArgc() > 1 && DI::args()->getArgv()[1] == 'new') {
|
||||
|
@ -179,7 +179,7 @@ function message_content(App $a)
|
|||
$tpl = Renderer::getMarkupTemplate('msg-header.tpl');
|
||||
DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [
|
||||
'$baseurl' => DI::baseUrl()->get(true),
|
||||
'$nickname' => $a->user['nickname'],
|
||||
'$nickname' => $a->getNickname(),
|
||||
'$linkurl' => DI::l10n()->t('Please enter a link URL:')
|
||||
]);
|
||||
|
||||
|
@ -292,7 +292,7 @@ function message_content(App $a)
|
|||
$tpl = Renderer::getMarkupTemplate('msg-header.tpl');
|
||||
DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [
|
||||
'$baseurl' => DI::baseUrl()->get(true),
|
||||
'$nickname' => $a->user['nickname'],
|
||||
'$nickname' => $a->getNickname(),
|
||||
'$linkurl' => DI::l10n()->t('Please enter a link URL:')
|
||||
]);
|
||||
|
||||
|
@ -431,7 +431,7 @@ function render_messages(array $msg, $t)
|
|||
$tpl = Renderer::getMarkupTemplate($t);
|
||||
$rslt = '';
|
||||
|
||||
$myprofile = DI::baseUrl() . '/profile/' . $a->user['nickname'];
|
||||
$myprofile = DI::baseUrl() . '/profile/' . $a->getNickname();
|
||||
|
||||
foreach ($msg as $rr) {
|
||||
if ($rr['unknown']) {
|
||||
|
|
|
@ -45,16 +45,16 @@ function notes_content(App $a, $update = false)
|
|||
return;
|
||||
}
|
||||
|
||||
$o = BaseProfile::getTabsHTML($a, 'notes', true, $a->user);
|
||||
$o = BaseProfile::getTabsHTML($a, 'notes', true, $a->getNickname(), false);
|
||||
|
||||
if (!$update) {
|
||||
$o .= '<h3>' . DI::l10n()->t('Personal Notes') . '</h3>';
|
||||
|
||||
$x = [
|
||||
'is_owner' => true,
|
||||
'allow_location' => (($a->user['allow_location']) ? true : false),
|
||||
'default_location' => $a->user['default-location'],
|
||||
'nickname' => $a->user['nickname'],
|
||||
'allow_location' => (($a->getUserValue('allow_location')) ? true : false),
|
||||
'default_location' => $a->getUserValue('default-location'),
|
||||
'nickname' => $a->getNickname(),
|
||||
'lockstate' => 'lock',
|
||||
'acl' => \Friendica\Core\ACL::getSelfOnlyHTML(local_user(), DI::l10n()->t('Personal notes are visible only by yourself.')),
|
||||
'bang' => '',
|
||||
|
|
|
@ -38,6 +38,7 @@ use Friendica\Model\Contact;
|
|||
use Friendica\Model\Item;
|
||||
use Friendica\Model\Photo;
|
||||
use Friendica\Model\Post;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Model\Tag;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Module\BaseProfile;
|
||||
|
@ -223,7 +224,7 @@ function photos_post(App $a)
|
|||
// Update the photo albums cache
|
||||
Photo::clearAlbumCache($page_owner_uid);
|
||||
|
||||
DI::baseUrl()->redirect('photos/' . $a->user['nickname'] . '/album/' . bin2hex($newalbum));
|
||||
DI::baseUrl()->redirect('photos/' . $a->getNickname() . '/album/' . bin2hex($newalbum));
|
||||
return; // NOTREACHED
|
||||
}
|
||||
|
||||
|
@ -830,6 +831,8 @@ function photos_content(App $a)
|
|||
return;
|
||||
}
|
||||
|
||||
$profile = Profile::getByUID($user['uid']);
|
||||
|
||||
$phototypes = Images::supportedTypes();
|
||||
|
||||
$_SESSION['photo_return'] = DI::args()->getCommand();
|
||||
|
@ -903,7 +906,7 @@ function photos_content(App $a)
|
|||
|
||||
// tabs
|
||||
$is_owner = (local_user() && (local_user() == $owner_uid));
|
||||
$o .= BaseProfile::getTabsHTML($a, 'photos', $is_owner, $user);
|
||||
$o .= BaseProfile::getTabsHTML($a, 'photos', $is_owner, $user['nickname'], $profile['hide-friends']);
|
||||
|
||||
// Display upload form
|
||||
if ($datatype === 'upload') {
|
||||
|
@ -958,12 +961,7 @@ function photos_content(App $a)
|
|||
'$albumselect' => $albumselect,
|
||||
'$permissions' => DI::l10n()->t('Permissions'),
|
||||
'$aclselect' => $aclselect_e,
|
||||
'$lockstate' => is_array($a->user)
|
||||
&& (strlen($a->user['allow_cid'])
|
||||
|| strlen($a->user['allow_gid'])
|
||||
|| strlen($a->user['deny_cid'])
|
||||
|| strlen($a->user['deny_gid'])
|
||||
) ? 'lock' : 'unlock',
|
||||
'$lockstate' => ACL::getLockstateForUserId($a->getUserId()) ? 'lock' : 'unlock',
|
||||
'$alt_uploader' => $ret['addon_text'],
|
||||
'$default_upload_box' => ($ret['default_upload'] ? $default_upload_box : ''),
|
||||
'$default_upload_submit' => ($ret['default_upload'] ? $default_upload_submit : ''),
|
||||
|
|
|
@ -193,7 +193,7 @@ function ping_init(App $a)
|
|||
$intro_count = count($intros1) + count($intros2);
|
||||
$intros = $intros1 + $intros2;
|
||||
|
||||
$myurl = DI::baseUrl() . '/profile/' . $a->user['nickname'];
|
||||
$myurl = DI::baseUrl() . '/profile/' . $a->getNickname();
|
||||
$mails = q(
|
||||
"SELECT `id`, `from-name`, `from-url`, `from-photo`, `created` FROM `mail`
|
||||
WHERE `uid` = %d AND `seen` = 0 AND `from-url` != '%s' ",
|
||||
|
|
|
@ -70,7 +70,7 @@ function removeme_post(App $a)
|
|||
}
|
||||
|
||||
if (User::getIdFromPasswordAuthentication($a->user, trim($_POST['qxz_password']))) {
|
||||
User::remove($a->user['uid']);
|
||||
User::remove($a->getUserId());
|
||||
|
||||
unset($_SESSION['authenticated']);
|
||||
unset($_SESSION['uid']);
|
||||
|
|
|
@ -61,7 +61,7 @@ function settings_post(App $a)
|
|||
return;
|
||||
}
|
||||
|
||||
if (count($a->user) && !empty($a->user['uid']) && $a->user['uid'] != local_user()) {
|
||||
if (empty($a->getUserId()) || $a->getUserId() != local_user()) {
|
||||
notice(DI::l10n()->t('Permission denied.'));
|
||||
return;
|
||||
}
|
||||
|
@ -73,6 +73,8 @@ function settings_post(App $a)
|
|||
return;
|
||||
}
|
||||
|
||||
$user = User::getById($a->getUserId());
|
||||
|
||||
if ((DI::args()->getArgc() > 1) && (DI::args()->getArgv()[1] == 'connectors')) {
|
||||
BaseModule::checkFormSecurityTokenRedirectOnError('/settings/connectors', 'settings_connectors');
|
||||
|
||||
|
@ -108,7 +110,7 @@ function settings_post(App $a)
|
|||
}
|
||||
if (strlen($mail_pass)) {
|
||||
$pass = '';
|
||||
openssl_public_encrypt($mail_pass, $pass, $a->user['pubkey']);
|
||||
openssl_public_encrypt($mail_pass, $pass, $user['pubkey']);
|
||||
DBA::update('mailacct', ['pass' => bin2hex($pass)], ['uid' => local_user()]);
|
||||
}
|
||||
$r = q("UPDATE `mailacct` SET `server` = '%s', `port` = %d, `ssltype` = '%s', `user` = '%s',
|
||||
|
@ -134,7 +136,7 @@ function settings_post(App $a)
|
|||
|
||||
if (strlen($eacct['server'])) {
|
||||
$dcrpass = '';
|
||||
openssl_private_decrypt(hex2bin($eacct['pass']), $dcrpass, $a->user['prvkey']);
|
||||
openssl_private_decrypt(hex2bin($eacct['pass']), $dcrpass, $user['prvkey']);
|
||||
$mbox = Email::connect($mb, $mail_user, $dcrpass);
|
||||
unset($dcrpass);
|
||||
if (!$mbox) {
|
||||
|
@ -309,7 +311,7 @@ function settings_post(App $a)
|
|||
|
||||
$err = '';
|
||||
|
||||
if ($username != $a->user['username']) {
|
||||
if ($username != $user['username']) {
|
||||
if (strlen($username) > 40) {
|
||||
$err .= DI::l10n()->t('Please use a shorter name.');
|
||||
}
|
||||
|
@ -318,11 +320,11 @@ function settings_post(App $a)
|
|||
}
|
||||
}
|
||||
|
||||
if ($email != $a->user['email']) {
|
||||
if ($email != $user['email']) {
|
||||
// check for the correct password
|
||||
if (!User::authenticate(intval(local_user()), $_POST['mpassword'])) {
|
||||
$err .= DI::l10n()->t('Wrong Password.');
|
||||
$email = $a->user['email'];
|
||||
$email = $user['email'];
|
||||
}
|
||||
// check the email is valid
|
||||
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
|
||||
|
@ -333,7 +335,7 @@ function settings_post(App $a)
|
|||
$adminlist = explode(",", str_replace(" ", "", strtolower(DI::config()->get('config', 'admin_email'))));
|
||||
if (in_array(strtolower($email), $adminlist)) {
|
||||
$err .= DI::l10n()->t('Cannot change to that email.');
|
||||
$email = $a->user['email'];
|
||||
$email = $user['email'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -343,7 +345,7 @@ function settings_post(App $a)
|
|||
return;
|
||||
}
|
||||
|
||||
if (($timezone != $a->user['timezone']) && strlen($timezone)) {
|
||||
if (($timezone != $user['timezone']) && strlen($timezone)) {
|
||||
date_default_timezone_set($timezone);
|
||||
}
|
||||
|
||||
|
@ -592,18 +594,20 @@ function settings_content(App $a)
|
|||
return;
|
||||
}
|
||||
|
||||
$username = $a->user['username'];
|
||||
$email = $a->user['email'];
|
||||
$nickname = $a->user['nickname'];
|
||||
$timezone = $a->user['timezone'];
|
||||
$language = $a->user['language'];
|
||||
$notify = $a->user['notify-flags'];
|
||||
$defloc = $a->user['default-location'];
|
||||
$openid = $a->user['openid'];
|
||||
$maxreq = $a->user['maxreq'];
|
||||
$expire = ((intval($a->user['expire'])) ? $a->user['expire'] : '');
|
||||
$unkmail = $a->user['unkmail'];
|
||||
$cntunkmail = $a->user['cntunkmail'];
|
||||
$user = User::getById($a->getUserId());
|
||||
|
||||
$username = $user['username'];
|
||||
$email = $user['email'];
|
||||
$nickname = $a->getNickname();
|
||||
$timezone = $user['timezone'];
|
||||
$language = $user['language'];
|
||||
$notify = $user['notify-flags'];
|
||||
$defloc = $user['default-location'];
|
||||
$openid = $user['openid'];
|
||||
$maxreq = $user['maxreq'];
|
||||
$expire = ((intval($user['expire'])) ? $user['expire'] : '');
|
||||
$unkmail = $user['unkmail'];
|
||||
$cntunkmail = $user['cntunkmail'];
|
||||
|
||||
$expire_items = DI::pConfig()->get(local_user(), 'expire', 'items', true);
|
||||
$expire_notes = DI::pConfig()->get(local_user(), 'expire', 'notes', true);
|
||||
|
@ -611,15 +615,15 @@ function settings_content(App $a)
|
|||
$expire_photos = DI::pConfig()->get(local_user(), 'expire', 'photos', false);
|
||||
$expire_network_only = DI::pConfig()->get(local_user(), 'expire', 'network_only', false);
|
||||
|
||||
if (!strlen($a->user['timezone'])) {
|
||||
if (!strlen($user['timezone'])) {
|
||||
$timezone = date_default_timezone_get();
|
||||
}
|
||||
|
||||
// Set the account type to "Community" when the page is a community page but the account type doesn't fit
|
||||
// This is only happening on the first visit after the update
|
||||
if (in_array($a->user['page-flags'], [User::PAGE_FLAGS_COMMUNITY, User::PAGE_FLAGS_PRVGROUP]) &&
|
||||
($a->user['account-type'] != User::ACCOUNT_TYPE_COMMUNITY))
|
||||
$a->user['account-type'] = User::ACCOUNT_TYPE_COMMUNITY;
|
||||
if (in_array($user['page-flags'], [User::PAGE_FLAGS_COMMUNITY, User::PAGE_FLAGS_PRVGROUP]) &&
|
||||
($user['account-type'] != User::ACCOUNT_TYPE_COMMUNITY))
|
||||
$user['account-type'] = User::ACCOUNT_TYPE_COMMUNITY;
|
||||
|
||||
$pageset_tpl = Renderer::getMarkupTemplate('settings/pagetypes.tpl');
|
||||
|
||||
|
@ -627,7 +631,7 @@ function settings_content(App $a)
|
|||
'$account_types' => DI::l10n()->t("Account Types"),
|
||||
'$user' => DI::l10n()->t("Personal Page Subtypes"),
|
||||
'$community' => DI::l10n()->t("Community Forum Subtypes"),
|
||||
'$account_type' => $a->user['account-type'],
|
||||
'$account_type' => $user['account-type'],
|
||||
'$type_person' => User::ACCOUNT_TYPE_PERSON,
|
||||
'$type_organisation' => User::ACCOUNT_TYPE_ORGANISATION,
|
||||
'$type_news' => User::ACCOUNT_TYPE_NEWS,
|
||||
|
@ -635,39 +639,39 @@ function settings_content(App $a)
|
|||
|
||||
'$account_person' => ['account-type', DI::l10n()->t('Personal Page'), User::ACCOUNT_TYPE_PERSON,
|
||||
DI::l10n()->t('Account for a personal profile.'),
|
||||
($a->user['account-type'] == User::ACCOUNT_TYPE_PERSON)],
|
||||
($user['account-type'] == User::ACCOUNT_TYPE_PERSON)],
|
||||
|
||||
'$account_organisation' => ['account-type', DI::l10n()->t('Organisation Page'), User::ACCOUNT_TYPE_ORGANISATION,
|
||||
DI::l10n()->t('Account for an organisation that automatically approves contact requests as "Followers".'),
|
||||
($a->user['account-type'] == User::ACCOUNT_TYPE_ORGANISATION)],
|
||||
($user['account-type'] == User::ACCOUNT_TYPE_ORGANISATION)],
|
||||
|
||||
'$account_news' => ['account-type', DI::l10n()->t('News Page'), User::ACCOUNT_TYPE_NEWS,
|
||||
DI::l10n()->t('Account for a news reflector that automatically approves contact requests as "Followers".'),
|
||||
($a->user['account-type'] == User::ACCOUNT_TYPE_NEWS)],
|
||||
($user['account-type'] == User::ACCOUNT_TYPE_NEWS)],
|
||||
|
||||
'$account_community' => ['account-type', DI::l10n()->t('Community Forum'), User::ACCOUNT_TYPE_COMMUNITY,
|
||||
DI::l10n()->t('Account for community discussions.'),
|
||||
($a->user['account-type'] == User::ACCOUNT_TYPE_COMMUNITY)],
|
||||
($user['account-type'] == User::ACCOUNT_TYPE_COMMUNITY)],
|
||||
|
||||
'$page_normal' => ['page-flags', DI::l10n()->t('Normal Account Page'), User::PAGE_FLAGS_NORMAL,
|
||||
DI::l10n()->t('Account for a regular personal profile that requires manual approval of "Friends" and "Followers".'),
|
||||
($a->user['page-flags'] == User::PAGE_FLAGS_NORMAL)],
|
||||
($user['page-flags'] == User::PAGE_FLAGS_NORMAL)],
|
||||
|
||||
'$page_soapbox' => ['page-flags', DI::l10n()->t('Soapbox Page'), User::PAGE_FLAGS_SOAPBOX,
|
||||
DI::l10n()->t('Account for a public profile that automatically approves contact requests as "Followers".'),
|
||||
($a->user['page-flags'] == User::PAGE_FLAGS_SOAPBOX)],
|
||||
($user['page-flags'] == User::PAGE_FLAGS_SOAPBOX)],
|
||||
|
||||
'$page_community' => ['page-flags', DI::l10n()->t('Public Forum'), User::PAGE_FLAGS_COMMUNITY,
|
||||
DI::l10n()->t('Automatically approves all contact requests.'),
|
||||
($a->user['page-flags'] == User::PAGE_FLAGS_COMMUNITY)],
|
||||
($user['page-flags'] == User::PAGE_FLAGS_COMMUNITY)],
|
||||
|
||||
'$page_freelove' => ['page-flags', DI::l10n()->t('Automatic Friend Page'), User::PAGE_FLAGS_FREELOVE,
|
||||
DI::l10n()->t('Account for a popular profile that automatically approves contact requests as "Friends".'),
|
||||
($a->user['page-flags'] == User::PAGE_FLAGS_FREELOVE)],
|
||||
($user['page-flags'] == User::PAGE_FLAGS_FREELOVE)],
|
||||
|
||||
'$page_prvgroup' => ['page-flags', DI::l10n()->t('Private Forum [Experimental]'), User::PAGE_FLAGS_PRVGROUP,
|
||||
DI::l10n()->t('Requires manual approval of contact requests.'),
|
||||
($a->user['page-flags'] == User::PAGE_FLAGS_PRVGROUP)],
|
||||
($user['page-flags'] == User::PAGE_FLAGS_PRVGROUP)],
|
||||
|
||||
|
||||
]);
|
||||
|
@ -731,7 +735,7 @@ function settings_content(App $a)
|
|||
'$timezone' => ['timezone_select' , DI::l10n()->t('Your Timezone:'), Temporal::getTimezoneSelect($timezone), ''],
|
||||
'$language' => ['language', DI::l10n()->t('Your Language:'), $language, DI::l10n()->t('Set the language we use to show you friendica interface and to send you emails'), $lang_choices],
|
||||
'$defloc' => ['defloc', DI::l10n()->t('Default Post Location:'), $defloc, ''],
|
||||
'$allowloc' => ['allow_location', DI::l10n()->t('Use Browser Location:'), ($a->user['allow_location'] == 1), ''],
|
||||
'$allowloc' => ['allow_location', DI::l10n()->t('Use Browser Location:'), ($user['allow_location'] == 1), ''],
|
||||
|
||||
'$h_prv' => DI::l10n()->t('Security and Privacy Settings'),
|
||||
'$visibility' => $profile['net-publish'],
|
||||
|
@ -739,14 +743,14 @@ function settings_content(App $a)
|
|||
'$profile_in_dir' => $profile_in_dir,
|
||||
'$profile_in_net_dir' => ['profile_in_netdirectory', DI::l10n()->t('Allow your profile to be searchable globally?'), $profile['net-publish'], DI::l10n()->t("Activate this setting if you want others to easily find and follow you. Your profile will be searchable on remote systems. This setting also determines whether Friendica will inform search engines that your profile should be indexed or not.") . $net_pub_desc],
|
||||
'$hide_friends' => ['hide-friends', DI::l10n()->t('Hide your contact/friend list from viewers of your profile?'), $profile['hide-friends'], DI::l10n()->t('A list of your contacts is displayed on your profile page. Activate this option to disable the display of your contact list.')],
|
||||
'$hide_wall' => ['hidewall', DI::l10n()->t('Hide your profile details from anonymous viewers?'), $a->user['hidewall'], DI::l10n()->t('Anonymous visitors will only see your profile picture, your display name and the nickname you are using on your profile page. Your public posts and replies will still be accessible by other means.')],
|
||||
'$hide_wall' => ['hidewall', DI::l10n()->t('Hide your profile details from anonymous viewers?'), $user['hidewall'], DI::l10n()->t('Anonymous visitors will only see your profile picture, your display name and the nickname you are using on your profile page. Your public posts and replies will still be accessible by other means.')],
|
||||
'$unlisted' => ['unlisted', DI::l10n()->t('Make public posts unlisted'), DI::pConfig()->get(local_user(), 'system', 'unlisted'), DI::l10n()->t('Your public posts will not appear on the community pages or in search results, nor be sent to relay servers. However they can still appear on public feeds on remote servers.')],
|
||||
'$accessiblephotos' => ['accessible-photos', DI::l10n()->t('Make all posted pictures accessible'), DI::pConfig()->get(local_user(), 'system', 'accessible-photos'), DI::l10n()->t("This option makes every posted picture accessible via the direct link. This is a workaround for the problem that most other networks can't handle permissions on pictures. Non public pictures still won't be visible for the public on your photo albums though.")],
|
||||
'$blockwall' => ['blockwall', DI::l10n()->t('Allow friends to post to your profile page?'), (intval($a->user['blockwall']) ? '0' : '1'), DI::l10n()->t('Your contacts may write posts on your profile wall. These posts will be distributed to your contacts')], // array('blockwall', DI::l10n()->t('Allow friends to post to your profile page:'), !$blockwall, ''),
|
||||
'$blocktags' => ['blocktags', DI::l10n()->t('Allow friends to tag your posts?'), (intval($a->user['blocktags']) ? '0' : '1'), DI::l10n()->t('Your contacts can add additional tags to your posts.')], // array('blocktags', DI::l10n()->t('Allow friends to tag your posts:'), !$blocktags, ''),
|
||||
'$blockwall' => ['blockwall', DI::l10n()->t('Allow friends to post to your profile page?'), (intval($user['blockwall']) ? '0' : '1'), DI::l10n()->t('Your contacts may write posts on your profile wall. These posts will be distributed to your contacts')], // array('blockwall', DI::l10n()->t('Allow friends to post to your profile page:'), !$blockwall, ''),
|
||||
'$blocktags' => ['blocktags', DI::l10n()->t('Allow friends to tag your posts?'), (intval($user['blocktags']) ? '0' : '1'), DI::l10n()->t('Your contacts can add additional tags to your posts.')], // array('blocktags', DI::l10n()->t('Allow friends to tag your posts:'), !$blocktags, ''),
|
||||
'$unkmail' => ['unkmail', DI::l10n()->t('Permit unknown people to send you private mail?'), $unkmail, DI::l10n()->t('Friendica network users may send you private messages even if they are not in your contact list.')],
|
||||
'$cntunkmail' => ['cntunkmail', DI::l10n()->t('Maximum private messages per day from unknown people:'), $cntunkmail , DI::l10n()->t("\x28to prevent spam abuse\x29")],
|
||||
'$group_select' => Group::displayGroupSelection(local_user(), $a->user['def_gid']),
|
||||
'$group_select' => Group::displayGroupSelection(local_user(), $user['def_gid']),
|
||||
'$permissions' => DI::l10n()->t('Default Post Permissions'),
|
||||
'$aclselect' => ACL::getFullSelectorHTML(DI::page(), $a->user),
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ use Friendica\Database\DBA;
|
|||
use Friendica\DI;
|
||||
use Friendica\Model\Attach;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Module\BaseProfile;
|
||||
use Friendica\Security\Security;
|
||||
|
@ -120,6 +121,7 @@ function videos_content(App $a)
|
|||
return;
|
||||
}
|
||||
|
||||
$profile = Profile::getByUID($user['uid']);
|
||||
//$phototypes = Photo::supportedTypes();
|
||||
|
||||
$_SESSION['video_return'] = DI::args()->getCommand();
|
||||
|
@ -171,7 +173,7 @@ function videos_content(App $a)
|
|||
|
||||
// tabs
|
||||
$_is_owner = (local_user() && (local_user() == $user['uid']));
|
||||
$o .= BaseProfile::getTabsHTML($a, 'videos', $_is_owner, $user);
|
||||
$o .= BaseProfile::getTabsHTML($a, 'videos', $_is_owner, $user['nickname'], $profile['hide-friends']);
|
||||
|
||||
//
|
||||
// dispatch request
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue