Merge pull request #12106 from MrPetovan/task/4090-move-mod-settings
Move mod/settings.php to src/Module
This commit is contained in:
commit
3f6ec3dd31
22 changed files with 894 additions and 690 deletions
|
@ -9,8 +9,8 @@ There is also a connector for accessing your email INBOX.
|
|||
|
||||
If the following network connectors are installed on your system, select the following links to visit the appropriate settings page and configure them for your account:
|
||||
|
||||
* [Twitter](/settings/addon)
|
||||
* [GNU Social](/settings/addon)
|
||||
* [Twitter](/settings/addons)
|
||||
* [GNU Social](/settings/addons)
|
||||
* [Email](/settings)
|
||||
|
||||
Instructions For Connecting To People On Specific Services
|
||||
|
|
358
mod/settings.php
358
mod/settings.php
|
@ -1,358 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2022, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\BaseModule;
|
||||
use Friendica\Content\Feature;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Module\BaseSettings;
|
||||
use Friendica\Module\Security\Login;
|
||||
use Friendica\Protocol\Email;
|
||||
|
||||
function settings_init(App $a)
|
||||
{
|
||||
if (!DI::userSession()->getLocalUserId()) {
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.'));
|
||||
return;
|
||||
}
|
||||
|
||||
BaseSettings::createAside();
|
||||
}
|
||||
|
||||
function settings_post(App $a)
|
||||
{
|
||||
if (!$a->isLoggedIn()) {
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.'));
|
||||
return;
|
||||
}
|
||||
|
||||
if (DI::userSession()->getSubManagedUserId()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((DI::args()->getArgc() > 1) && (DI::args()->getArgv()[1] == 'addon')) {
|
||||
BaseModule::checkFormSecurityTokenRedirectOnError(DI::args()->getQueryString(), 'settings_addon');
|
||||
|
||||
Hook::callAll('addon_settings_post', $_POST);
|
||||
DI::baseUrl()->redirect(DI::args()->getQueryString());
|
||||
return;
|
||||
}
|
||||
|
||||
$user = User::getById($a->getLoggedInUserId());
|
||||
|
||||
if ((DI::args()->getArgc() > 1) && (DI::args()->getArgv()[1] == 'connectors')) {
|
||||
BaseModule::checkFormSecurityTokenRedirectOnError(DI::args()->getQueryString(), 'settings_connectors');
|
||||
|
||||
if (!empty($_POST['general-submit'])) {
|
||||
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'system', 'accept_only_sharer', intval($_POST['accept_only_sharer']));
|
||||
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'system', 'disable_cw', !intval($_POST['enable_cw']));
|
||||
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'system', 'no_intelligent_shortening', !intval($_POST['enable_smart_shortening']));
|
||||
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'system', 'simple_shortening', intval($_POST['simple_shortening']));
|
||||
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'system', 'attach_link_title', intval($_POST['attach_link_title']));
|
||||
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'ostatus', 'legacy_contact', $_POST['legacy_contact']);
|
||||
} elseif (!empty($_POST['mail-submit'])) {
|
||||
$mail_server = $_POST['mail_server'] ?? '';
|
||||
$mail_port = $_POST['mail_port'] ?? '';
|
||||
$mail_ssl = strtolower(trim($_POST['mail_ssl'] ?? ''));
|
||||
$mail_user = $_POST['mail_user'] ?? '';
|
||||
$mail_pass = trim($_POST['mail_pass'] ?? '');
|
||||
$mail_action = trim($_POST['mail_action'] ?? '');
|
||||
$mail_movetofolder = trim($_POST['mail_movetofolder'] ?? '');
|
||||
$mail_replyto = $_POST['mail_replyto'] ?? '';
|
||||
$mail_pubmail = $_POST['mail_pubmail'] ?? '';
|
||||
|
||||
if (function_exists('imap_open') && !DI::config()->get('system', 'imap_disabled')) {
|
||||
if (!DBA::exists('mailacct', ['uid' => DI::userSession()->getLocalUserId()])) {
|
||||
DBA::insert('mailacct', ['uid' => DI::userSession()->getLocalUserId()]);
|
||||
}
|
||||
if (strlen($mail_pass)) {
|
||||
$pass = '';
|
||||
openssl_public_encrypt($mail_pass, $pass, $user['pubkey']);
|
||||
DBA::update('mailacct', ['pass' => bin2hex($pass)], ['uid' => DI::userSession()->getLocalUserId()]);
|
||||
}
|
||||
|
||||
$r = DBA::update('mailacct', [
|
||||
'server' => $mail_server,
|
||||
'port' => $mail_port,
|
||||
'ssltype' => $mail_ssl,
|
||||
'user' => $mail_user,
|
||||
'action' => $mail_action,
|
||||
'movetofolder' => $mail_movetofolder,
|
||||
'mailbox' => 'INBOX',
|
||||
'reply_to' => $mail_replyto,
|
||||
'pubmail' => $mail_pubmail
|
||||
], ['uid' => DI::userSession()->getLocalUserId()]);
|
||||
|
||||
Logger::debug('updating mailaccount', ['response' => $r]);
|
||||
$mailacct = DBA::selectFirst('mailacct', [], ['uid' => DI::userSession()->getLocalUserId()]);
|
||||
if (DBA::isResult($mailacct)) {
|
||||
$mb = Email::constructMailboxName($mailacct);
|
||||
|
||||
if (strlen($mailacct['server'])) {
|
||||
$dcrpass = '';
|
||||
openssl_private_decrypt(hex2bin($mailacct['pass']), $dcrpass, $user['prvkey']);
|
||||
$mbox = Email::connect($mb, $mail_user, $dcrpass);
|
||||
unset($dcrpass);
|
||||
if (!$mbox) {
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Failed to connect with email account using the settings provided.'));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Hook::callAll('connector_settings_post', $_POST);
|
||||
DI::baseUrl()->redirect(DI::args()->getQueryString());
|
||||
return;
|
||||
}
|
||||
|
||||
if ((DI::args()->getArgc() > 1) && (DI::args()->getArgv()[1] === 'features')) {
|
||||
BaseModule::checkFormSecurityTokenRedirectOnError('/settings/features', 'settings_features');
|
||||
foreach ($_POST as $k => $v) {
|
||||
if (strpos($k, 'feature_') === 0) {
|
||||
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'feature', substr($k, 8), ((intval($v)) ? 1 : 0));
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function settings_content(App $a)
|
||||
{
|
||||
$o = '';
|
||||
Nav::setSelected('settings');
|
||||
|
||||
if (!DI::userSession()->getLocalUserId()) {
|
||||
//DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.'));
|
||||
return Login::form();
|
||||
}
|
||||
|
||||
if (DI::userSession()->getSubManagedUserId()) {
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.'));
|
||||
return '';
|
||||
}
|
||||
|
||||
if ((DI::args()->getArgc() > 1) && (DI::args()->getArgv()[1] === 'oauth')) {
|
||||
if ((DI::args()->getArgc() > 3) && (DI::args()->getArgv()[2] === 'delete')) {
|
||||
BaseModule::checkFormSecurityTokenRedirectOnError('/settings/oauth', 'settings_oauth', 't');
|
||||
|
||||
DBA::delete('application-token', ['application-id' => DI::args()->getArgv()[3], 'uid' => DI::userSession()->getLocalUserId()]);
|
||||
DI::baseUrl()->redirect('settings/oauth/', true);
|
||||
return '';
|
||||
}
|
||||
|
||||
$applications = DBA::selectToArray('application-view', ['id', 'uid', 'name', 'website', 'scopes', 'created_at'], ['uid' => DI::userSession()->getLocalUserId()]);
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate('settings/oauth.tpl');
|
||||
$o .= Renderer::replaceMacros($tpl, [
|
||||
'$form_security_token' => BaseModule::getFormSecurityToken("settings_oauth"),
|
||||
'$baseurl' => DI::baseUrl()->get(true),
|
||||
'$title' => DI::l10n()->t('Connected Apps'),
|
||||
'$name' => DI::l10n()->t('Name'),
|
||||
'$website' => DI::l10n()->t('Home Page'),
|
||||
'$created_at' => DI::l10n()->t('Created'),
|
||||
'$delete' => DI::l10n()->t('Remove authorization'),
|
||||
'$apps' => $applications,
|
||||
]);
|
||||
return $o;
|
||||
}
|
||||
|
||||
if ((DI::args()->getArgc() > 1) && (DI::args()->getArgv()[1] === 'addon')) {
|
||||
$addon_settings_forms = [];
|
||||
foreach (DI::dba()->selectToArray('hook', ['file', 'function'], ['hook' => 'addon_settings']) as $hook) {
|
||||
$data = [];
|
||||
Hook::callSingle(DI::app(), 'addon_settings', [$hook['file'], $hook['function']], $data);
|
||||
|
||||
if (!empty($data['href'])) {
|
||||
$tpl = Renderer::getMarkupTemplate('settings/addon/link.tpl');
|
||||
$addon_settings_forms[] = Renderer::replaceMacros($tpl, [
|
||||
'$addon' => $data['addon'],
|
||||
'$title' => $data['title'],
|
||||
'$href' => $data['href'],
|
||||
]);
|
||||
} elseif(!empty($data['addon'])) {
|
||||
$tpl = Renderer::getMarkupTemplate('settings/addon/panel.tpl');
|
||||
$addon_settings_forms[$data['addon']] = Renderer::replaceMacros($tpl, [
|
||||
'$addon' => $data['addon'],
|
||||
'$title' => $data['title'],
|
||||
'$open' => (DI::args()->getArgv()[2] ?? '') === $data['addon'],
|
||||
'$html' => $data['html'] ?? '',
|
||||
'$submit' => $data['submit'] ?? DI::l10n()->t('Save Settings'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate('settings/addons.tpl');
|
||||
$o .= Renderer::replaceMacros($tpl, [
|
||||
'$form_security_token' => BaseModule::getFormSecurityToken("settings_addon"),
|
||||
'$title' => DI::l10n()->t('Addon Settings'),
|
||||
'$no_addons_settings_configured' => DI::l10n()->t('No Addon settings configured'),
|
||||
'$addon_settings_forms' => $addon_settings_forms,
|
||||
]);
|
||||
return $o;
|
||||
}
|
||||
|
||||
if ((DI::args()->getArgc() > 1) && (DI::args()->getArgv()[1] === 'features')) {
|
||||
|
||||
$arr = [];
|
||||
$features = Feature::get();
|
||||
foreach ($features as $fname => $fdata) {
|
||||
$arr[$fname] = [];
|
||||
$arr[$fname][0] = $fdata[0];
|
||||
foreach (array_slice($fdata,1) as $f) {
|
||||
$arr[$fname][1][] = ['feature_' . $f[0], $f[1], Feature::isEnabled(DI::userSession()->getLocalUserId(), $f[0]), $f[2]];
|
||||
}
|
||||
}
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate('settings/features.tpl');
|
||||
$o .= Renderer::replaceMacros($tpl, [
|
||||
'$form_security_token' => BaseModule::getFormSecurityToken("settings_features"),
|
||||
'$title' => DI::l10n()->t('Additional Features'),
|
||||
'$features' => $arr,
|
||||
'$submit' => DI::l10n()->t('Save Settings'),
|
||||
]);
|
||||
return $o;
|
||||
}
|
||||
|
||||
if ((DI::args()->getArgc() > 1) && (DI::args()->getArgv()[1] === 'connectors')) {
|
||||
$accept_only_sharer = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'accept_only_sharer'));
|
||||
$enable_cw = !intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'disable_cw'));
|
||||
$enable_smart_shortening = !intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'no_intelligent_shortening'));
|
||||
$simple_shortening = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'simple_shortening'));
|
||||
$attach_link_title = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'attach_link_title'));
|
||||
$legacy_contact = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'ostatus', 'legacy_contact');
|
||||
|
||||
if (!empty($legacy_contact)) {
|
||||
/// @todo Isn't it supposed to be a $a->internalRedirect() call?
|
||||
DI::page()['htmlhead'] = '<meta http-equiv="refresh" content="0; URL=' . DI::baseUrl().'/ostatus_subscribe?url=' . urlencode($legacy_contact) . '">';
|
||||
}
|
||||
|
||||
$connector_settings_forms = [];
|
||||
foreach (DI::dba()->selectToArray('hook', ['file', 'function'], ['hook' => 'connector_settings']) as $hook) {
|
||||
$data = [];
|
||||
Hook::callSingle(DI::app(), 'connector_settings', [$hook['file'], $hook['function']], $data);
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate('settings/addon/connector.tpl');
|
||||
$connector_settings_forms[$data['connector']] = Renderer::replaceMacros($tpl, [
|
||||
'$connector' => $data['connector'],
|
||||
'$title' => $data['title'],
|
||||
'$image' => $data['image'] ?? '',
|
||||
'$enabled' => $data['enabled'] ?? true,
|
||||
'$open' => (DI::args()->getArgv()[2] ?? '') === $data['connector'],
|
||||
'$html' => $data['html'] ?? '',
|
||||
'$submit' => $data['submit'] ?? DI::l10n()->t('Save Settings'),
|
||||
]);
|
||||
}
|
||||
|
||||
if ($a->isSiteAdmin()) {
|
||||
$diasp_enabled = DI::l10n()->t('Built-in support for %s connectivity is %s', DI::l10n()->t('Diaspora (Socialhome, Hubzilla)'), ((DI::config()->get('system', 'diaspora_enabled')) ? DI::l10n()->t('enabled') : DI::l10n()->t('disabled')));
|
||||
$ostat_enabled = DI::l10n()->t('Built-in support for %s connectivity is %s', DI::l10n()->t('OStatus (GNU Social)'), ((DI::config()->get('system', 'ostatus_disabled')) ? DI::l10n()->t('disabled') : DI::l10n()->t('enabled')));
|
||||
} else {
|
||||
$diasp_enabled = "";
|
||||
$ostat_enabled = "";
|
||||
}
|
||||
|
||||
$mail_disabled = ((function_exists('imap_open') && (!DI::config()->get('system', 'imap_disabled'))) ? 0 : 1);
|
||||
if (!$mail_disabled) {
|
||||
$mailacct = DBA::selectFirst('mailacct', [], ['uid' => DI::userSession()->getLocalUserId()]);
|
||||
} else {
|
||||
$mailacct = null;
|
||||
}
|
||||
|
||||
$mail_server = $mailacct['server'] ?? '';
|
||||
$mail_port = (!empty($mailacct['port']) && is_numeric($mailacct['port'])) ? (int)$mailacct['port'] : '';
|
||||
$mail_ssl = $mailacct['ssltype'] ?? '';
|
||||
$mail_user = $mailacct['user'] ?? '';
|
||||
$mail_replyto = $mailacct['reply_to'] ?? '';
|
||||
$mail_pubmail = $mailacct['pubmail'] ?? 0;
|
||||
$mail_action = $mailacct['action'] ?? 0;
|
||||
$mail_movetofolder = $mailacct['movetofolder'] ?? '';
|
||||
$mail_chk = $mailacct['last_check'] ?? DBA::NULL_DATETIME;
|
||||
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate('settings/connectors.tpl');
|
||||
|
||||
$mail_disabled_message = ($mail_disabled ? DI::l10n()->t('Email access is disabled on this site.') : '');
|
||||
|
||||
$ssl_options = ['TLS' => 'TLS', 'SSL' => 'SSL'];
|
||||
|
||||
if (DI::config()->get('system', 'insecure_imap')) {
|
||||
$ssl_options['notls'] = DI::l10n()->t('None');
|
||||
}
|
||||
|
||||
$o .= Renderer::replaceMacros($tpl, [
|
||||
'$form_security_token' => BaseModule::getFormSecurityToken("settings_connectors"),
|
||||
|
||||
'$title' => DI::l10n()->t('Social Networks'),
|
||||
|
||||
'$diasp_enabled' => $diasp_enabled,
|
||||
'$ostat_enabled' => $ostat_enabled,
|
||||
|
||||
'$general_settings' => DI::l10n()->t('General Social Media Settings'),
|
||||
'$accept_only_sharer' => [
|
||||
'accept_only_sharer',
|
||||
DI::l10n()->t('Followed content scope'),
|
||||
$accept_only_sharer,
|
||||
DI::l10n()->t('By default, conversations in which your follows participated but didn\'t start will be shown in your timeline. You can turn this behavior off, or expand it to the conversations in which your follows liked a post.'),
|
||||
[
|
||||
Item::COMPLETION_NONE => DI::l10n()->t('Only conversations my follows started'),
|
||||
Item::COMPLETION_COMMENT => DI::l10n()->t('Conversations my follows started or commented on (default)'),
|
||||
Item::COMPLETION_LIKE => DI::l10n()->t('Any conversation my follows interacted with, including likes'),
|
||||
]
|
||||
],
|
||||
'$enable_cw' => ['enable_cw', DI::l10n()->t('Enable Content Warning'), $enable_cw, DI::l10n()->t('Users on networks like Mastodon or Pleroma are able to set a content warning field which collapse their post by default. This enables the automatic collapsing instead of setting the content warning as the post title. Doesn\'t affect any other content filtering you eventually set up.')],
|
||||
'$enable_smart_shortening' => ['enable_smart_shortening', DI::l10n()->t('Enable intelligent shortening'), $enable_smart_shortening, DI::l10n()->t('Normally the system tries to find the best link to add to shortened posts. If disabled, every shortened post will always point to the original friendica post.')],
|
||||
'$simple_shortening' => ['simple_shortening', DI::l10n()->t('Enable simple text shortening'), $simple_shortening, DI::l10n()->t('Normally the system shortens posts at the next line feed. If this option is enabled then the system will shorten the text at the maximum character limit.')],
|
||||
'$attach_link_title' => ['attach_link_title', DI::l10n()->t('Attach the link title'), $attach_link_title, DI::l10n()->t('When activated, the title of the attached link will be added as a title on posts to Diaspora. This is mostly helpful with "remote-self" contacts that share feed content.')],
|
||||
'$legacy_contact' => ['legacy_contact', DI::l10n()->t('Your legacy ActivityPub/GNU Social account'), $legacy_contact, DI::l10n()->t("If you enter your old account name from an ActivityPub based system or your GNU Social/Statusnet account name here (in the format user@domain.tld), your contacts will be added automatically. The field will be emptied when done.")],
|
||||
|
||||
'$repair_ostatus_url' => 'ostatus/repair',
|
||||
'$repair_ostatus_text' => DI::l10n()->t('Repair OStatus subscriptions'),
|
||||
|
||||
'$connector_settings_forms' => $connector_settings_forms,
|
||||
|
||||
'$h_mail' => DI::l10n()->t('Email/Mailbox Setup'),
|
||||
'$mail_desc' => DI::l10n()->t("If you wish to communicate with email contacts using this service \x28optional\x29, please specify how to connect to your mailbox."),
|
||||
'$mail_lastcheck' => ['mail_lastcheck', DI::l10n()->t('Last successful email check:'), $mail_chk, ''],
|
||||
'$mail_disabled' => $mail_disabled_message,
|
||||
'$mail_server' => ['mail_server', DI::l10n()->t('IMAP server name:'), $mail_server, ''],
|
||||
'$mail_port' => ['mail_port', DI::l10n()->t('IMAP port:'), $mail_port, ''],
|
||||
'$mail_ssl' => ['mail_ssl', DI::l10n()->t('Security:'), strtoupper($mail_ssl), '', $ssl_options],
|
||||
'$mail_user' => ['mail_user', DI::l10n()->t('Email login name:'), $mail_user, ''],
|
||||
'$mail_pass' => ['mail_pass', DI::l10n()->t('Email password:'), '', ''],
|
||||
'$mail_replyto' => ['mail_replyto', DI::l10n()->t('Reply-to address:'), $mail_replyto, 'Optional'],
|
||||
'$mail_pubmail' => ['mail_pubmail', DI::l10n()->t('Send public posts to all email contacts:'), $mail_pubmail, ''],
|
||||
'$mail_action' => ['mail_action', DI::l10n()->t('Action after import:'), $mail_action, '', [0 => DI::l10n()->t('None'), 1 => DI::l10n()->t('Delete'), 2 => DI::l10n()->t('Mark as seen'), 3 => DI::l10n()->t('Move to folder')]],
|
||||
'$mail_movetofolder' => ['mail_movetofolder', DI::l10n()->t('Move to folder:'), $mail_movetofolder, ''],
|
||||
'$submit' => DI::l10n()->t('Save Settings'),
|
||||
]);
|
||||
|
||||
Hook::callAll('display_settings', $o);
|
||||
return $o;
|
||||
}
|
||||
}
|
|
@ -21,116 +21,155 @@
|
|||
|
||||
namespace Friendica\Module;
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\BaseModule;
|
||||
use Friendica\Content\Feature;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\DI;
|
||||
use Friendica\Core\Session\Capability\IHandleUserSessions;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Module\Security\Login;
|
||||
use Friendica\Network\HTTPException\ForbiddenException;
|
||||
use Friendica\Util\Profiler;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class BaseSettings extends BaseModule
|
||||
{
|
||||
public static function createAside()
|
||||
/** @var App\Page */
|
||||
protected $page;
|
||||
/** @var IHandleUserSessions */
|
||||
protected $session;
|
||||
|
||||
public function __construct(IHandleUserSessions $session, App\Page $page, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = [])
|
||||
{
|
||||
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
|
||||
|
||||
$this->page = $page;
|
||||
$this->session = $session;
|
||||
|
||||
if ($this->session->getSubManagedUserId()) {
|
||||
throw new ForbiddenException($this->t('Permission denied.'));
|
||||
}
|
||||
}
|
||||
|
||||
protected function content(array $request = []): string
|
||||
{
|
||||
Nav::setSelected('settings');
|
||||
|
||||
if (!$this->session->getLocalUserId()) {
|
||||
$this->session->set('return_path', $this->args->getCommand());
|
||||
$this->baseUrl->redirect('login');
|
||||
}
|
||||
|
||||
$this->createAside();
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
public function createAside()
|
||||
{
|
||||
$tpl = Renderer::getMarkupTemplate('settings/head.tpl');
|
||||
DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [
|
||||
'$ispublic' => DI::l10n()->t('everybody')
|
||||
$this->page['htmlhead'] .= Renderer::replaceMacros($tpl, [
|
||||
'$ispublic' => $this->t('everybody')
|
||||
]);
|
||||
|
||||
$tabs = [];
|
||||
|
||||
$tabs[] = [
|
||||
'label' => DI::l10n()->t('Account'),
|
||||
'url' => 'settings',
|
||||
'selected' => ((DI::args()->getArgc() == 1) && (DI::args()->getArgv() === 'settings') ? 'active' : ''),
|
||||
'label' => $this->t('Account'),
|
||||
'url' => 'settings',
|
||||
'selected' => static::class == Settings\Account::class ? 'active' : '',
|
||||
'accesskey' => 'o',
|
||||
];
|
||||
|
||||
$tabs[] = [
|
||||
'label' => DI::l10n()->t('Two-factor authentication'),
|
||||
'url' => 'settings/2fa',
|
||||
'selected' => ((DI::args()->getArgc() > 1) && (DI::args()->getArgv()[1] === '2fa') ? 'active' : ''),
|
||||
'label' => $this->t('Two-factor authentication'),
|
||||
'url' => 'settings/2fa',
|
||||
'selected' => in_array(static::class, [
|
||||
Settings\TwoFactor\AppSpecific::class,
|
||||
Settings\TwoFactor\Index::class,
|
||||
Settings\TwoFactor\Recovery::class,
|
||||
Settings\TwoFactor\Trusted::class,
|
||||
Settings\TwoFactor\Verify::class
|
||||
]) ? 'active' : '',
|
||||
'accesskey' => '2',
|
||||
];
|
||||
|
||||
$tabs[] = [
|
||||
'label' => DI::l10n()->t('Profile'),
|
||||
'url' => 'settings/profile',
|
||||
'selected' => ((DI::args()->getArgc() > 1) && (DI::args()->getArgv()[1] === 'profile') ? 'active' : ''),
|
||||
'label' => $this->t('Profile'),
|
||||
'url' => 'settings/profile',
|
||||
'selected' => in_array(static::class, [
|
||||
Settings\Profile\Index::class,
|
||||
Settings\Profile\Photo\Crop::class,
|
||||
Settings\Profile\Photo\Index::class,
|
||||
]) ? 'active' : '',
|
||||
'accesskey' => 'p',
|
||||
];
|
||||
|
||||
if (Feature::get()) {
|
||||
$tabs[] = [
|
||||
'label' => DI::l10n()->t('Additional features'),
|
||||
'url' => 'settings/features',
|
||||
'selected' => ((DI::args()->getArgc() > 1) && (DI::args()->getArgv()[1] === 'features') ? 'active' : ''),
|
||||
'label' => $this->t('Additional features'),
|
||||
'url' => 'settings/features',
|
||||
'selected' => static::class == Settings\Features::class ? 'active' : '',
|
||||
'accesskey' => 't',
|
||||
];
|
||||
}
|
||||
|
||||
$tabs[] = [
|
||||
'label' => DI::l10n()->t('Display'),
|
||||
'url' => 'settings/display',
|
||||
'selected' => ((DI::args()->getArgc() > 1) && (DI::args()->getArgv()[1] === 'display') ? 'active' : ''),
|
||||
'label' => $this->t('Display'),
|
||||
'url' => 'settings/display',
|
||||
'selected' => static::class == Settings\Display::class ? 'active' : '',
|
||||
'accesskey' => 'i',
|
||||
];
|
||||
|
||||
$tabs[] = [
|
||||
'label' => DI::l10n()->t('Social Networks'),
|
||||
'url' => 'settings/connectors',
|
||||
'selected' => ((DI::args()->getArgc() > 1) && (DI::args()->getArgv()[1] === 'connectors') ? 'active' : ''),
|
||||
'label' => $this->t('Social Networks'),
|
||||
'url' => 'settings/connectors',
|
||||
'selected' => static::class == Settings\Connectors::class ? 'active' : '',
|
||||
'accesskey' => 'w',
|
||||
];
|
||||
|
||||
$tabs[] = [
|
||||
'label' => DI::l10n()->t('Addons'),
|
||||
'url' => 'settings/addon',
|
||||
'selected' => ((DI::args()->getArgc() > 1) && (DI::args()->getArgv()[1] === 'addon') ? 'active' : ''),
|
||||
'label' => $this->t('Addons'),
|
||||
'url' => 'settings/addons',
|
||||
'selected' => static::class == Settings\Addons::class ? 'active' : '',
|
||||
'accesskey' => 'l',
|
||||
];
|
||||
|
||||
$tabs[] = [
|
||||
'label' => DI::l10n()->t('Manage Accounts'),
|
||||
'url' => 'settings/delegation',
|
||||
'selected' => ((DI::args()->getArgc() > 1) && (DI::args()->getArgv()[1] === 'delegation') ? 'active' : ''),
|
||||
'label' => $this->t('Manage Accounts'),
|
||||
'url' => 'settings/delegation',
|
||||
'selected' => static::class == Settings\Delegation::class ? 'active' : '',
|
||||
'accesskey' => 'd',
|
||||
];
|
||||
|
||||
$tabs[] = [
|
||||
'label' => DI::l10n()->t('Connected apps'),
|
||||
'url' => 'settings/oauth',
|
||||
'selected' => ((DI::args()->getArgc() > 1) && (DI::args()->getArgv()[1] === 'oauth') ? 'active' : ''),
|
||||
'label' => $this->t('Connected apps'),
|
||||
'url' => 'settings/oauth',
|
||||
'selected' => static::class == Settings\OAuth::class ? 'active' : '',
|
||||
'accesskey' => 'b',
|
||||
];
|
||||
|
||||
$tabs[] = [
|
||||
'label' => DI::l10n()->t('Export personal data'),
|
||||
'url' => 'settings/userexport',
|
||||
'selected' => ((DI::args()->getArgc() > 1) && (DI::args()->getArgv()[1] === 'userexport') ? 'active' : ''),
|
||||
'label' => $this->t('Export personal data'),
|
||||
'url' => 'settings/userexport',
|
||||
'selected' => static::class == Settings\UserExport::class ? 'active' : '',
|
||||
'accesskey' => 'e',
|
||||
];
|
||||
|
||||
$tabs[] = [
|
||||
'label' => DI::l10n()->t('Remove account'),
|
||||
'url' => 'settings/removeme',
|
||||
'selected' => static::class === Settings\RemoveMe::class ? 'active' : '',
|
||||
'label' => $this->t('Remove account'),
|
||||
'url' => 'settings/removeme',
|
||||
'selected' => static::class === Settings\RemoveMe::class ? 'active' : '',
|
||||
'accesskey' => 'r',
|
||||
];
|
||||
|
||||
|
||||
$tabtpl = Renderer::getMarkupTemplate("generic_links_widget.tpl");
|
||||
DI::page()['aside'] = Renderer::replaceMacros($tabtpl, [
|
||||
'$title' => DI::l10n()->t('Settings'),
|
||||
$tabtpl = Renderer::getMarkupTemplate('generic_links_widget.tpl');
|
||||
$this->page['aside'] = Renderer::replaceMacros($tabtpl, [
|
||||
'$title' => $this->t('Settings'),
|
||||
'$class' => 'settings-widget',
|
||||
'$items' => $tabs,
|
||||
]);
|
||||
}
|
||||
|
||||
protected function content(array $request = []): string
|
||||
{
|
||||
$a = DI::app();
|
||||
|
||||
static::createAside();
|
||||
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,9 +56,9 @@ class OpenID extends BaseModule
|
|||
}
|
||||
|
||||
// NOTE: we search both for normalised and non-normalised form of $authid
|
||||
// because the normalization step was removed from setting
|
||||
// mod/settings.php in 8367cad so it might have left mixed
|
||||
// records in the user table
|
||||
// because the normalization step was removed from settings
|
||||
// in commit 8367cadeeffec4b6792a502847304b17ceba5882, so it might
|
||||
// have left mixed records in the user table
|
||||
//
|
||||
$condition = ['blocked' => false, 'account_expired' => false, 'account_removed' => false, 'verified' => true,
|
||||
'openid' => [$authId, Strings::normaliseOpenID($authId)]];
|
||||
|
|
94
src/Module/Settings/Addons.php
Normal file
94
src/Module/Settings/Addons.php
Normal file
|
@ -0,0 +1,94 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2022, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Friendica\Module\Settings;
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\Session\Capability\IHandleUserSessions;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\Module\BaseSettings;
|
||||
use Friendica\Module\Response;
|
||||
use Friendica\Util\Profiler;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class Addons extends BaseSettings
|
||||
{
|
||||
/** @var Database */
|
||||
private $database;
|
||||
/** @var App */
|
||||
private $app;
|
||||
|
||||
public function __construct(App $app, Database $database, IHandleUserSessions $session, App\Page $page, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = [])
|
||||
{
|
||||
parent::__construct($session, $page, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
|
||||
|
||||
$this->database = $database;
|
||||
$this->app = $app;
|
||||
}
|
||||
|
||||
protected function post(array $request = [])
|
||||
{
|
||||
BaseSettings::checkFormSecurityTokenRedirectOnError($this->args->getQueryString(), 'settings_addon');
|
||||
|
||||
Hook::callAll('addon_settings_post', $request);
|
||||
$this->baseUrl->redirect($this->args->getQueryString());
|
||||
}
|
||||
|
||||
protected function content(array $request = []): string
|
||||
{
|
||||
parent::content($request); // TODO: Change the autogenerated stub
|
||||
|
||||
$addon_settings_forms = [];
|
||||
foreach ($this->database->selectToArray('hook', ['file', 'function'], ['hook' => 'addon_settings']) as $hook) {
|
||||
$data = [];
|
||||
Hook::callSingle($this->app, 'addon_settings', [$hook['file'], $hook['function']], $data);
|
||||
|
||||
if (!empty($data['href'])) {
|
||||
$tpl = Renderer::getMarkupTemplate('settings/addons/link.tpl');
|
||||
$addon_settings_forms[] = Renderer::replaceMacros($tpl, [
|
||||
'$addon' => $data['addon'],
|
||||
'$title' => $data['title'],
|
||||
'$href' => $data['href'],
|
||||
]);
|
||||
} elseif (!empty($data['addon'])) {
|
||||
$tpl = Renderer::getMarkupTemplate('settings/addons/panel.tpl');
|
||||
$addon_settings_forms[$data['addon']] = Renderer::replaceMacros($tpl, [
|
||||
'$addon' => $data['addon'],
|
||||
'$title' => $data['title'],
|
||||
'$open' => ($this->parameters['addon'] ?? '') === $data['addon'],
|
||||
'$html' => $data['html'] ?? '',
|
||||
'$submit' => $data['submit'] ?? $this->t('Save Settings'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate('settings/addons.tpl');
|
||||
return Renderer::replaceMacros($tpl, [
|
||||
'$form_security_token' => BaseSettings::getFormSecurityToken('settings_addon'),
|
||||
'$title' => $this->t('Addon Settings'),
|
||||
'$no_addons_settings_configured' => $this->t('No Addon settings configured'),
|
||||
'$addon_settings_forms' => $addon_settings_forms,
|
||||
]);
|
||||
}
|
||||
}
|
249
src/Module/Settings/Connectors.php
Normal file
249
src/Module/Settings/Connectors.php
Normal file
|
@ -0,0 +1,249 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2022, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Friendica\Module\Settings;
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Config\Capability\IManageConfigValues;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig\Capability\IManagePersonalConfigValues;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\Session\Capability\IHandleUserSessions;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Module\BaseSettings;
|
||||
use Friendica\Module\Response;
|
||||
use Friendica\Navigation\SystemMessages;
|
||||
use Friendica\Protocol\Email;
|
||||
use Friendica\Util\Profiler;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class Connectors extends BaseSettings
|
||||
{
|
||||
/** @var IManageConfigValues */
|
||||
private $config;
|
||||
/** @var IManagePersonalConfigValues */
|
||||
private $pconfig;
|
||||
/** @var Database */
|
||||
private $database;
|
||||
/** @var SystemMessages */
|
||||
private $systemMessages;
|
||||
/** @var App */
|
||||
private $app;
|
||||
|
||||
public function __construct(App $app, SystemMessages $systemMessages, Database $database, IManagePersonalConfigValues $pconfig, IManageConfigValues $config, IHandleUserSessions $session, App\Page $page, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = [])
|
||||
{
|
||||
parent::__construct($session, $page, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
|
||||
|
||||
$this->config = $config;
|
||||
$this->pconfig = $pconfig;
|
||||
$this->database = $database;
|
||||
$this->systemMessages = $systemMessages;
|
||||
$this->app = $app;
|
||||
}
|
||||
|
||||
protected function post(array $request = [])
|
||||
{
|
||||
BaseSettings::checkFormSecurityTokenRedirectOnError($this->args->getQueryString(), 'settings_connectors');
|
||||
|
||||
$user = User::getById($this->session->getLocalUserId());
|
||||
|
||||
if (!empty($request['general-submit'])) {
|
||||
$this->pconfig->set($this->session->getLocalUserId(), 'system', 'accept_only_sharer', intval($request['accept_only_sharer']));
|
||||
$this->pconfig->set($this->session->getLocalUserId(), 'system', 'disable_cw', !intval($request['enable_cw']));
|
||||
$this->pconfig->set($this->session->getLocalUserId(), 'system', 'no_intelligent_shortening', !intval($request['enable_smart_shortening']));
|
||||
$this->pconfig->set($this->session->getLocalUserId(), 'system', 'simple_shortening', intval($request['simple_shortening']));
|
||||
$this->pconfig->set($this->session->getLocalUserId(), 'system', 'attach_link_title', intval($request['attach_link_title']));
|
||||
$this->pconfig->set($this->session->getLocalUserId(), 'ostatus', 'legacy_contact', $request['legacy_contact']);
|
||||
} elseif (!empty($request['mail-submit']) && function_exists('imap_open') && !$this->config->get('system', 'imap_disabled')) {
|
||||
$mail_server = $request['mail_server'] ?? '';
|
||||
$mail_port = $request['mail_port'] ?? '';
|
||||
$mail_ssl = strtolower(trim($request['mail_ssl'] ?? ''));
|
||||
$mail_user = $request['mail_user'] ?? '';
|
||||
$mail_pass = trim($request['mail_pass'] ?? '');
|
||||
$mail_action = trim($request['mail_action'] ?? '');
|
||||
$mail_movetofolder = trim($request['mail_movetofolder'] ?? '');
|
||||
$mail_replyto = $request['mail_replyto'] ?? '';
|
||||
$mail_pubmail = $request['mail_pubmail'] ?? '';
|
||||
|
||||
if (!$this->database->exists('mailacct', ['uid' => $this->session->getLocalUserId()])) {
|
||||
$this->database->insert('mailacct', ['uid' => $this->session->getLocalUserId()]);
|
||||
}
|
||||
|
||||
if (strlen($mail_pass)) {
|
||||
$pass = '';
|
||||
openssl_public_encrypt($mail_pass, $pass, $user['pubkey']);
|
||||
$this->database->update('mailacct', ['pass' => bin2hex($pass)], ['uid' => $this->session->getLocalUserId()]);
|
||||
}
|
||||
|
||||
$r = $this->database->update('mailacct', [
|
||||
'server' => $mail_server,
|
||||
'port' => $mail_port,
|
||||
'ssltype' => $mail_ssl,
|
||||
'user' => $mail_user,
|
||||
'action' => $mail_action,
|
||||
'movetofolder' => $mail_movetofolder,
|
||||
'mailbox' => 'INBOX',
|
||||
'reply_to' => $mail_replyto,
|
||||
'pubmail' => $mail_pubmail
|
||||
], ['uid' => $this->session->getLocalUserId()]);
|
||||
|
||||
$this->logger->debug('updating mailaccount', ['response' => $r]);
|
||||
$mailacct = $this->database->selectFirst('mailacct', [], ['uid' => $this->session->getLocalUserId()]);
|
||||
if ($this->database->isResult($mailacct)) {
|
||||
if (strlen($mailacct['server'])) {
|
||||
$dcrpass = '';
|
||||
openssl_private_decrypt(hex2bin($mailacct['pass']), $dcrpass, $user['prvkey']);
|
||||
$mbox = Email::connect(Email::constructMailboxName($mailacct), $mail_user, $dcrpass);
|
||||
unset($dcrpass);
|
||||
if (!$mbox) {
|
||||
$this->systemMessages->addNotice($this->t('Failed to connect with email account using the settings provided.'));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Hook::callAll('connector_settings_post', $request);
|
||||
$this->baseUrl->redirect($this->args->getQueryString());
|
||||
}
|
||||
|
||||
protected function content(array $request = []): string
|
||||
{
|
||||
parent::content($request);
|
||||
|
||||
$accept_only_sharer = intval($this->pconfig->get($this->session->getLocalUserId(), 'system', 'accept_only_sharer'));
|
||||
$enable_cw = !intval($this->pconfig->get($this->session->getLocalUserId(), 'system', 'disable_cw'));
|
||||
$enable_smart_shortening = !intval($this->pconfig->get($this->session->getLocalUserId(), 'system', 'no_intelligent_shortening'));
|
||||
$simple_shortening = intval($this->pconfig->get($this->session->getLocalUserId(), 'system', 'simple_shortening'));
|
||||
$attach_link_title = intval($this->pconfig->get($this->session->getLocalUserId(), 'system', 'attach_link_title'));
|
||||
$legacy_contact = $this->pconfig->get($this->session->getLocalUserId(), 'ostatus', 'legacy_contact');
|
||||
|
||||
if (!empty($legacy_contact)) {
|
||||
$this->baseUrl->redirect('ostatus_subscribe?url=' . urlencode($legacy_contact));
|
||||
}
|
||||
|
||||
$connector_settings_forms = [];
|
||||
foreach ($this->database->selectToArray('hook', ['file', 'function'], ['hook' => 'connector_settings']) as $hook) {
|
||||
$data = [];
|
||||
Hook::callSingle($this->app, 'connector_settings', [$hook['file'], $hook['function']], $data);
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate('settings/addons/connector.tpl');
|
||||
$connector_settings_forms[$data['connector']] = Renderer::replaceMacros($tpl, [
|
||||
'$connector' => $data['connector'],
|
||||
'$title' => $data['title'],
|
||||
'$image' => $data['image'] ?? '',
|
||||
'$enabled' => $data['enabled'] ?? true,
|
||||
'$open' => ($this->parameters['connector'] ?? '') === $data['connector'],
|
||||
'$html' => $data['html'] ?? '',
|
||||
'$submit' => $data['submit'] ?? $this->t('Save Settings'),
|
||||
]);
|
||||
}
|
||||
|
||||
if ($this->app->isSiteAdmin()) {
|
||||
$diasp_enabled = $this->config->get('system', 'diaspora_enabled') ?
|
||||
$this->t('Built-in support for %s connectivity is enabled', $this->t('Diaspora (Socialhome, Hubzilla)')) :
|
||||
$this->t('Built-in support for %s connectivity is disabled', $this->t('Diaspora (Socialhome, Hubzilla)'));
|
||||
$ostat_enabled = $this->config->get('system', 'ostatus_disabled') ?
|
||||
$this->t('Built-in support for %s connectivity is disabled', $this->t('OStatus (GNU Social)')) :
|
||||
$this->t('Built-in support for %s connectivity is enabled', $this->t('OStatus (GNU Social)'));
|
||||
} else {
|
||||
$diasp_enabled = '';
|
||||
$ostat_enabled = '';
|
||||
}
|
||||
|
||||
$mail_enabled = function_exists('imap_open') && !$this->config->get('system', 'imap_disabled');
|
||||
if ($mail_enabled) {
|
||||
$mail_account = $this->database->selectFirst('mailacct', [], ['uid' => $this->session->getLocalUserId()]);
|
||||
$mail_disabled = '';
|
||||
} else {
|
||||
$mail_account = null;
|
||||
$mail_disabled = $this->t('Email access is disabled on this site.');
|
||||
}
|
||||
|
||||
$mail_server = $mail_account['server'] ?? '';
|
||||
$mail_port = (!empty($mail_account['port']) && is_numeric($mail_account['port'])) ? (int)$mail_account['port'] : '';
|
||||
$mail_ssl = $mail_account['ssltype'] ?? '';
|
||||
$mail_user = $mail_account['user'] ?? '';
|
||||
$mail_replyto = $mail_account['reply_to'] ?? '';
|
||||
$mail_pubmail = $mail_account['pubmail'] ?? 0;
|
||||
$mail_action = $mail_account['action'] ?? 0;
|
||||
$mail_movetofolder = $mail_account['movetofolder'] ?? '';
|
||||
$mail_chk = $mail_account['last_check'] ?? DBA::NULL_DATETIME;
|
||||
|
||||
$ssl_options = ['TLS' => 'TLS', 'SSL' => 'SSL'];
|
||||
if ($this->config->get('system', 'insecure_imap')) {
|
||||
$ssl_options['notls'] = $this->t('None');
|
||||
}
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate('settings/connectors.tpl');
|
||||
$o = Renderer::replaceMacros($tpl, [
|
||||
'$form_security_token' => BaseSettings::getFormSecurityToken("settings_connectors"),
|
||||
|
||||
'$title' => $this->t('Social Networks'),
|
||||
|
||||
'$diasp_enabled' => $diasp_enabled,
|
||||
'$ostat_enabled' => $ostat_enabled,
|
||||
|
||||
'$general_settings' => $this->t('General Social Media Settings'),
|
||||
'$accept_only_sharer' => [
|
||||
'accept_only_sharer',
|
||||
$this->t('Followed content scope'),
|
||||
$accept_only_sharer,
|
||||
$this->t('By default, conversations in which your follows participated but didn\'t start will be shown in your timeline. You can turn this behavior off, or expand it to the conversations in which your follows liked a post.'),
|
||||
[
|
||||
Item::COMPLETION_NONE => $this->t('Only conversations my follows started'),
|
||||
Item::COMPLETION_COMMENT => $this->t('Conversations my follows started or commented on (default)'),
|
||||
Item::COMPLETION_LIKE => $this->t('Any conversation my follows interacted with, including likes'),
|
||||
]
|
||||
],
|
||||
'$enable_cw' => ['enable_cw', $this->t('Enable Content Warning'), $enable_cw, $this->t('Users on networks like Mastodon or Pleroma are able to set a content warning field which collapse their post by default. This enables the automatic collapsing instead of setting the content warning as the post title. Doesn\'t affect any other content filtering you eventually set up.')],
|
||||
'$enable_smart_shortening' => ['enable_smart_shortening', $this->t('Enable intelligent shortening'), $enable_smart_shortening, $this->t('Normally the system tries to find the best link to add to shortened posts. If disabled, every shortened post will always point to the original friendica post.')],
|
||||
'$simple_shortening' => ['simple_shortening', $this->t('Enable simple text shortening'), $simple_shortening, $this->t('Normally the system shortens posts at the next line feed. If this option is enabled then the system will shorten the text at the maximum character limit.')],
|
||||
'$attach_link_title' => ['attach_link_title', $this->t('Attach the link title'), $attach_link_title, $this->t('When activated, the title of the attached link will be added as a title on posts to Diaspora. This is mostly helpful with "remote-self" contacts that share feed content.')],
|
||||
'$legacy_contact' => ['legacy_contact', $this->t('Your legacy ActivityPub/GNU Social account'), $legacy_contact, $this->t('If you enter your old account name from an ActivityPub based system or your GNU Social/Statusnet account name here (in the format user@domain.tld), your contacts will be added automatically. The field will be emptied when done.')],
|
||||
|
||||
'$repair_ostatus_url' => 'ostatus/repair',
|
||||
'$repair_ostatus_text' => $this->t('Repair OStatus subscriptions'),
|
||||
|
||||
'$connector_settings_forms' => $connector_settings_forms,
|
||||
|
||||
'$h_mail' => $this->t('Email/Mailbox Setup'),
|
||||
'$mail_desc' => $this->t("If you wish to communicate with email contacts using this service \x28optional\x29, please specify how to connect to your mailbox."),
|
||||
'$mail_lastcheck' => ['mail_lastcheck', $this->t('Last successful email check:'), $mail_chk, ''],
|
||||
'$mail_disabled' => $mail_disabled,
|
||||
'$mail_server' => ['mail_server', $this->t('IMAP server name:'), $mail_server, ''],
|
||||
'$mail_port' => ['mail_port', $this->t('IMAP port:'), $mail_port, ''],
|
||||
'$mail_ssl' => ['mail_ssl', $this->t('Security:'), strtoupper($mail_ssl), '', $ssl_options],
|
||||
'$mail_user' => ['mail_user', $this->t('Email login name:'), $mail_user, ''],
|
||||
'$mail_pass' => ['mail_pass', $this->t('Email password:'), '', ''],
|
||||
'$mail_replyto' => ['mail_replyto', $this->t('Reply-to address:'), $mail_replyto, 'Optional'],
|
||||
'$mail_pubmail' => ['mail_pubmail', $this->t('Send public posts to all email contacts:'), $mail_pubmail, ''],
|
||||
'$mail_action' => ['mail_action', $this->t('Action after import:'), $mail_action, '', [0 => $this->t('None'), 1 => $this->t('Delete'), 2 => $this->t('Mark as seen'), 3 => $this->t('Move to folder')]],
|
||||
'$mail_movetofolder' => ['mail_movetofolder', $this->t('Move to folder:'), $mail_movetofolder, ''],
|
||||
'$submit' => $this->t('Save Settings'),
|
||||
]);
|
||||
|
||||
return $o;
|
||||
}
|
||||
}
|
79
src/Module/Settings/Features.php
Normal file
79
src/Module/Settings/Features.php
Normal file
|
@ -0,0 +1,79 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2022, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Friendica\Module\Settings;
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Content\Feature;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig\Capability\IManagePersonalConfigValues;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\Session\Capability\IHandleUserSessions;
|
||||
use Friendica\Module\BaseSettings;
|
||||
use Friendica\Module\Response;
|
||||
use Friendica\Util\Profiler;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class Features extends BaseSettings
|
||||
{
|
||||
/** @var IManagePersonalConfigValues */
|
||||
private $pConfig;
|
||||
|
||||
public function __construct(IManagePersonalConfigValues $pConfig, IHandleUserSessions $session, App\Page $page, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = [])
|
||||
{
|
||||
parent::__construct($session, $page, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
|
||||
|
||||
$this->pConfig = $pConfig;
|
||||
}
|
||||
|
||||
protected function post(array $request = [])
|
||||
{
|
||||
BaseSettings::checkFormSecurityTokenRedirectOnError('/settings/features', 'settings_features');
|
||||
foreach ($request as $k => $v) {
|
||||
if (strpos($k, 'feature_') === 0) {
|
||||
$this->pConfig->set($this->session->getLocalUserId(), 'feature', substr($k, 8), ((intval($v)) ? 1 : 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function content(array $request = []): string
|
||||
{
|
||||
parent::content($request);
|
||||
|
||||
$arr = [];
|
||||
$features = Feature::get();
|
||||
foreach ($features as $name => $feature) {
|
||||
$arr[$name] = [];
|
||||
$arr[$name][0] = $feature[0];
|
||||
foreach (array_slice($feature, 1) as $f) {
|
||||
$arr[$name][1][] = ['feature_' . $f[0], $f[1], Feature::isEnabled($this->session->getLocalUserId(), $f[0]), $f[2]];
|
||||
}
|
||||
}
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate('settings/features.tpl');
|
||||
return Renderer::replaceMacros($tpl, [
|
||||
'$form_security_token' => BaseSettings::getFormSecurityToken('settings_features'),
|
||||
'$title' => $this->t('Additional Features'),
|
||||
'$features' => $arr,
|
||||
'$submit' => $this->t('Save Settings'),
|
||||
]);
|
||||
}
|
||||
}
|
80
src/Module/Settings/OAuth.php
Normal file
80
src/Module/Settings/OAuth.php
Normal file
|
@ -0,0 +1,80 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2022, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Friendica\Module\Settings;
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\Session\Capability\IHandleUserSessions;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\Module\BaseSettings;
|
||||
use Friendica\Module\Response;
|
||||
use Friendica\Util\Profiler;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class OAuth extends BaseSettings
|
||||
{
|
||||
/** @var Database */
|
||||
private $database;
|
||||
|
||||
public function __construct(Database $database, IHandleUserSessions $session, App\Page $page, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = [])
|
||||
{
|
||||
parent::__construct($session, $page, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
|
||||
|
||||
$this->database = $database;
|
||||
}
|
||||
|
||||
protected function post(array $request = [])
|
||||
{
|
||||
if (!$this->session->getLocalUserId()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isset($request['delete'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
BaseSettings::checkFormSecurityTokenRedirectOnError('/settings/oauth', 'settings_oauth');
|
||||
|
||||
$this->database->delete('application-token', ['application-id' => $request['delete'], 'uid' => $this->session->getLocalUserId()]);
|
||||
$this->baseUrl->redirect('settings/oauth', true);
|
||||
}
|
||||
|
||||
protected function content(array $request = []): string
|
||||
{
|
||||
parent::content($request);
|
||||
|
||||
$applications = $this->database->selectToArray('application-view', ['id', 'uid', 'name', 'website', 'scopes', 'created_at'], ['uid' => $this->session->getLocalUserId()]);
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate('settings/oauth.tpl');
|
||||
return Renderer::replaceMacros($tpl, [
|
||||
'$form_security_token' => BaseSettings::getFormSecurityToken('settings_oauth'),
|
||||
'$baseurl' => $this->baseUrl->get(true),
|
||||
'$title' => $this->t('Connected Apps'),
|
||||
'$name' => $this->t('Name'),
|
||||
'$website' => $this->t('Home Page'),
|
||||
'$created_at' => $this->t('Created'),
|
||||
'$delete' => $this->t('Remove authorization'),
|
||||
'$apps' => $applications,
|
||||
]);
|
||||
}
|
||||
}
|
|
@ -592,15 +592,12 @@ return [
|
|||
'[/]' => [Module\Settings\Account::class, [R::GET, R::POST]],
|
||||
'/{open}' => [Module\Settings\Account::class, [R::GET, R::POST]],
|
||||
],
|
||||
'/2fa' => [
|
||||
'[/]' => [Module\Settings\TwoFactor\Index::class, [R::GET, R::POST]],
|
||||
'/recovery' => [Module\Settings\TwoFactor\Recovery::class, [R::GET, R::POST]],
|
||||
'/app_specific' => [Module\Settings\TwoFactor\AppSpecific::class, [R::GET, R::POST]],
|
||||
'/verify' => [Module\Settings\TwoFactor\Verify::class, [R::GET, R::POST]],
|
||||
'/trusted' => [Module\Settings\TwoFactor\Trusted::class, [R::GET, R::POST]],
|
||||
],
|
||||
'/addons[/{addon}]' => [Module\Settings\Addons::class, [R::GET, R::POST]],
|
||||
'/connectors[/{connector}]' => [Module\Settings\Connectors::class, [R::GET, R::POST]],
|
||||
'/delegation[/{action}/{user_id}]' => [Module\Settings\Delegation::class, [R::GET, R::POST]],
|
||||
'/display' => [Module\Settings\Display::class, [R::GET, R::POST]],
|
||||
'/display' => [Module\Settings\Display::class, [R::GET, R::POST]],
|
||||
'/features' => [Module\Settings\Features::class, [R::GET, R::POST]],
|
||||
'/oauth' => [Module\Settings\OAuth::class, [R::GET, R::POST]],
|
||||
'/profile' => [
|
||||
'[/]' => [Module\Settings\Profile\Index::class, [R::GET, R::POST]],
|
||||
'/photo[/new]' => [Module\Settings\Profile\Photo\Index::class, [R::GET, R::POST]],
|
||||
|
@ -608,6 +605,13 @@ return [
|
|||
],
|
||||
'/removeme' => [Module\Settings\RemoveMe::class, [R::GET, R::POST]],
|
||||
'/userexport[/{action}]' => [Module\Settings\UserExport::class, [R::GET ]],
|
||||
'/2fa' => [
|
||||
'[/]' => [Module\Settings\TwoFactor\Index::class, [R::GET, R::POST]],
|
||||
'/recovery' => [Module\Settings\TwoFactor\Recovery::class, [R::GET, R::POST]],
|
||||
'/app_specific' => [Module\Settings\TwoFactor\AppSpecific::class, [R::GET, R::POST]],
|
||||
'/verify' => [Module\Settings\TwoFactor\Verify::class, [R::GET, R::POST]],
|
||||
'/trusted' => [Module\Settings\TwoFactor\Trusted::class, [R::GET, R::POST]],
|
||||
],
|
||||
],
|
||||
|
||||
'/network' => [
|
||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: 2022.12-dev\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-11-08 20:19-0500\n"
|
||||
"POT-Creation-Date: 2022-11-09 06:29-0500\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -41,18 +41,18 @@ msgstr ""
|
|||
#: mod/editpost.php:38 mod/item.php:181 mod/item.php:186 mod/item.php:870
|
||||
#: mod/message.php:69 mod/message.php:114 mod/notes.php:44
|
||||
#: mod/ostatus_subscribe.php:33 mod/photos.php:159 mod/photos.php:886
|
||||
#: mod/settings.php:40 mod/settings.php:50 mod/settings.php:156
|
||||
#: src/Module/Attach.php:56 src/Module/BaseApi.php:94
|
||||
#: src/Module/BaseNotifications.php:98 src/Module/Calendar/Event/API.php:88
|
||||
#: src/Module/Calendar/Event/Form.php:84 src/Module/Calendar/Event/Show.php:54
|
||||
#: src/Module/Calendar/Export.php:62 src/Module/Calendar/Show.php:64
|
||||
#: src/Module/Contact/Advanced.php:60 src/Module/Contact/Follow.php:86
|
||||
#: src/Module/Contact/Follow.php:158 src/Module/Contact/Suggestions.php:54
|
||||
#: src/Module/Contact/Unfollow.php:66 src/Module/Contact/Unfollow.php:80
|
||||
#: src/Module/Contact/Unfollow.php:112 src/Module/Delegation.php:118
|
||||
#: src/Module/FollowConfirm.php:38 src/Module/FriendSuggest.php:57
|
||||
#: src/Module/Group.php:40 src/Module/Group.php:83 src/Module/Invite.php:42
|
||||
#: src/Module/Invite.php:131 src/Module/Notifications/Notification.php:76
|
||||
#: src/Module/BaseNotifications.php:98 src/Module/BaseSettings.php:52
|
||||
#: src/Module/Calendar/Event/API.php:88 src/Module/Calendar/Event/Form.php:84
|
||||
#: src/Module/Calendar/Event/Show.php:54 src/Module/Calendar/Export.php:62
|
||||
#: src/Module/Calendar/Show.php:64 src/Module/Contact/Advanced.php:60
|
||||
#: src/Module/Contact/Follow.php:86 src/Module/Contact/Follow.php:158
|
||||
#: src/Module/Contact/Suggestions.php:54 src/Module/Contact/Unfollow.php:66
|
||||
#: src/Module/Contact/Unfollow.php:80 src/Module/Contact/Unfollow.php:112
|
||||
#: src/Module/Delegation.php:118 src/Module/FollowConfirm.php:38
|
||||
#: src/Module/FriendSuggest.php:57 src/Module/Group.php:40
|
||||
#: src/Module/Group.php:83 src/Module/Invite.php:42 src/Module/Invite.php:131
|
||||
#: src/Module/Notifications/Notification.php:76
|
||||
#: src/Module/Notifications/Notification.php:107
|
||||
#: src/Module/OStatus/Repair.php:60 src/Module/Profile/Attachment/Upload.php:97
|
||||
#: src/Module/Profile/Common.php:55 src/Module/Profile/Contacts.php:55
|
||||
|
@ -661,7 +661,7 @@ msgstr ""
|
|||
msgid "Upload New Photos"
|
||||
msgstr ""
|
||||
|
||||
#: mod/photos.php:128 src/Module/BaseSettings.php:35
|
||||
#: mod/photos.php:128 src/Module/BaseSettings.php:74
|
||||
msgid "everybody"
|
||||
msgstr ""
|
||||
|
||||
|
@ -873,10 +873,11 @@ msgstr ""
|
|||
msgid "Select"
|
||||
msgstr ""
|
||||
|
||||
#: mod/photos.php:1422 mod/settings.php:350 src/Content/Conversation.php:634
|
||||
#: mod/photos.php:1422 src/Content/Conversation.php:634
|
||||
#: src/Module/Moderation/Users/Active.php:136
|
||||
#: src/Module/Moderation/Users/Blocked.php:136
|
||||
#: src/Module/Moderation/Users/Index.php:151
|
||||
#: src/Module/Settings/Connectors.php:242
|
||||
msgid "Delete"
|
||||
msgstr ""
|
||||
|
||||
|
@ -904,236 +905,6 @@ msgstr ""
|
|||
msgid "View Album"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:122
|
||||
msgid "Failed to connect with email account using the settings provided."
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:175
|
||||
msgid "Connected Apps"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:176 src/Module/Contact/Advanced.php:134
|
||||
#: src/Module/Moderation/Blocklist/Contact.php:122
|
||||
#: src/Module/Moderation/Users/Active.php:126
|
||||
#: src/Module/Moderation/Users/Blocked.php:126
|
||||
#: src/Module/Moderation/Users/Create.php:71
|
||||
#: src/Module/Moderation/Users/Deleted.php:83
|
||||
#: src/Module/Moderation/Users/Index.php:140
|
||||
#: src/Module/Moderation/Users/Index.php:160
|
||||
#: src/Module/Moderation/Users/Pending.php:99
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:177 src/Content/Nav.php:215
|
||||
msgid "Home Page"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:178 src/Module/Admin/Queue.php:78
|
||||
msgid "Created"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:179
|
||||
msgid "Remove authorization"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:205 mod/settings.php:237 mod/settings.php:268
|
||||
#: mod/settings.php:352 src/Module/Admin/Addons/Index.php:69
|
||||
#: src/Module/Admin/Features.php:87 src/Module/Admin/Logs/Settings.php:81
|
||||
#: src/Module/Admin/Site.php:434 src/Module/Admin/Themes/Index.php:113
|
||||
#: src/Module/Admin/Tos.php:83 src/Module/Settings/Account.php:563
|
||||
#: src/Module/Settings/Delegation.php:169 src/Module/Settings/Display.php:200
|
||||
msgid "Save Settings"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:213
|
||||
msgid "Addon Settings"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:214
|
||||
msgid "No Addon settings configured"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:235
|
||||
msgid "Additional Features"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:273
|
||||
msgid "Diaspora (Socialhome, Hubzilla)"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:273 mod/settings.php:274
|
||||
msgid "enabled"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:273 mod/settings.php:274
|
||||
msgid "disabled"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:273 mod/settings.php:274
|
||||
#, php-format
|
||||
msgid "Built-in support for %s connectivity is %s"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:274
|
||||
msgid "OStatus (GNU Social)"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:300
|
||||
msgid "Email access is disabled on this site."
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:305 mod/settings.php:350
|
||||
msgid "None"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:311 src/Module/BaseSettings.php:78
|
||||
msgid "Social Networks"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:316
|
||||
msgid "General Social Media Settings"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:319
|
||||
msgid "Followed content scope"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:321
|
||||
msgid ""
|
||||
"By default, conversations in which your follows participated but didn't "
|
||||
"start will be shown in your timeline. You can turn this behavior off, or "
|
||||
"expand it to the conversations in which your follows liked a post."
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:323
|
||||
msgid "Only conversations my follows started"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:324
|
||||
msgid "Conversations my follows started or commented on (default)"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:325
|
||||
msgid "Any conversation my follows interacted with, including likes"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:328
|
||||
msgid "Enable Content Warning"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:328
|
||||
msgid ""
|
||||
"Users on networks like Mastodon or Pleroma are able to set a content warning "
|
||||
"field which collapse their post by default. This enables the automatic "
|
||||
"collapsing instead of setting the content warning as the post title. Doesn't "
|
||||
"affect any other content filtering you eventually set up."
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:329
|
||||
msgid "Enable intelligent shortening"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:329
|
||||
msgid ""
|
||||
"Normally the system tries to find the best link to add to shortened posts. "
|
||||
"If disabled, every shortened post will always point to the original "
|
||||
"friendica post."
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:330
|
||||
msgid "Enable simple text shortening"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:330
|
||||
msgid ""
|
||||
"Normally the system shortens posts at the next line feed. If this option is "
|
||||
"enabled then the system will shorten the text at the maximum character limit."
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:331
|
||||
msgid "Attach the link title"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:331
|
||||
msgid ""
|
||||
"When activated, the title of the attached link will be added as a title on "
|
||||
"posts to Diaspora. This is mostly helpful with \"remote-self\" contacts that "
|
||||
"share feed content."
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:332
|
||||
msgid "Your legacy ActivityPub/GNU Social account"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:332
|
||||
msgid ""
|
||||
"If you enter your old account name from an ActivityPub based system or your "
|
||||
"GNU Social/Statusnet account name here (in the format user@domain.tld), your "
|
||||
"contacts will be added automatically. The field will be emptied when done."
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:335
|
||||
msgid "Repair OStatus subscriptions"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:339
|
||||
msgid "Email/Mailbox Setup"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:340
|
||||
msgid ""
|
||||
"If you wish to communicate with email contacts using this service "
|
||||
"(optional), please specify how to connect to your mailbox."
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:341
|
||||
msgid "Last successful email check:"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:343
|
||||
msgid "IMAP server name:"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:344
|
||||
msgid "IMAP port:"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:345
|
||||
msgid "Security:"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:346
|
||||
msgid "Email login name:"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:347
|
||||
msgid "Email password:"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:348
|
||||
msgid "Reply-to address:"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:349
|
||||
msgid "Send public posts to all email contacts:"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:350
|
||||
msgid "Action after import:"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:350 src/Content/Nav.php:283
|
||||
msgid "Mark as seen"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:350
|
||||
msgid "Move to folder"
|
||||
msgstr ""
|
||||
|
||||
#: mod/settings.php:351
|
||||
msgid "Move to folder:"
|
||||
msgstr ""
|
||||
|
||||
#: src/App.php:490
|
||||
msgid "No system theme config value set."
|
||||
msgstr ""
|
||||
|
@ -2012,7 +1783,7 @@ msgid "Your posts and conversations"
|
|||
msgstr ""
|
||||
|
||||
#: src/Content/Nav.php:194 src/Module/BaseProfile.php:48
|
||||
#: src/Module/BaseSettings.php:55 src/Module/Contact.php:460
|
||||
#: src/Module/BaseSettings.php:100 src/Module/Contact.php:460
|
||||
#: src/Module/Contact/Profile.php:383 src/Module/Profile/Profile.php:240
|
||||
#: src/Module/Welcome.php:57 view/theme/frio/theme.php:238
|
||||
msgid "Profile"
|
||||
|
@ -2060,6 +1831,10 @@ msgstr ""
|
|||
msgid "Home"
|
||||
msgstr ""
|
||||
|
||||
#: src/Content/Nav.php:215 src/Module/Settings/OAuth.php:74
|
||||
msgid "Home Page"
|
||||
msgstr ""
|
||||
|
||||
#: src/Content/Nav.php:219 src/Module/Register.php:168
|
||||
#: src/Module/Security/Login.php:124
|
||||
msgid "Register"
|
||||
|
@ -2174,6 +1949,10 @@ msgstr ""
|
|||
msgid "See all notifications"
|
||||
msgstr ""
|
||||
|
||||
#: src/Content/Nav.php:283 src/Module/Settings/Connectors.php:242
|
||||
msgid "Mark as seen"
|
||||
msgstr ""
|
||||
|
||||
#: src/Content/Nav.php:283
|
||||
msgid "Mark all system notifications as seen"
|
||||
msgstr ""
|
||||
|
@ -2199,7 +1978,7 @@ msgid "Manage other pages"
|
|||
msgstr ""
|
||||
|
||||
#: src/Content/Nav.php:295 src/Module/Admin/Addons/Details.php:114
|
||||
#: src/Module/Admin/Themes/Details.php:93 src/Module/BaseSettings.php:122
|
||||
#: src/Module/Admin/Themes/Details.php:93 src/Module/BaseSettings.php:170
|
||||
#: src/Module/Welcome.php:52 view/theme/frio/theme.php:247
|
||||
msgid "Settings"
|
||||
msgstr ""
|
||||
|
@ -3938,7 +3717,7 @@ msgid "Administration"
|
|||
msgstr ""
|
||||
|
||||
#: src/Module/Admin/Addons/Details.php:112 src/Module/Admin/Addons/Index.php:68
|
||||
#: src/Module/BaseAdmin.php:92 src/Module/BaseSettings.php:85
|
||||
#: src/Module/BaseAdmin.php:92 src/Module/BaseSettings.php:134
|
||||
msgid "Addons"
|
||||
msgstr ""
|
||||
|
||||
|
@ -3966,6 +3745,17 @@ msgstr ""
|
|||
msgid "Addon %s failed to install."
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Admin/Addons/Index.php:69 src/Module/Admin/Features.php:87
|
||||
#: src/Module/Admin/Logs/Settings.php:81 src/Module/Admin/Site.php:434
|
||||
#: src/Module/Admin/Themes/Index.php:113 src/Module/Admin/Tos.php:83
|
||||
#: src/Module/Settings/Account.php:563 src/Module/Settings/Addons.php:81
|
||||
#: src/Module/Settings/Connectors.php:159
|
||||
#: src/Module/Settings/Connectors.php:244
|
||||
#: src/Module/Settings/Delegation.php:169 src/Module/Settings/Display.php:200
|
||||
#: src/Module/Settings/Features.php:76
|
||||
msgid "Save Settings"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Admin/Addons/Index.php:70
|
||||
msgid "Reload active addons"
|
||||
msgstr ""
|
||||
|
@ -4300,6 +4090,10 @@ msgstr ""
|
|||
msgid "Job Parameters"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Admin/Queue.php:78 src/Module/Settings/OAuth.php:75
|
||||
msgid "Created"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Admin/Queue.php:79
|
||||
msgid "Priority"
|
||||
msgstr ""
|
||||
|
@ -5591,7 +5385,7 @@ msgstr ""
|
|||
msgid "Configuration"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/BaseAdmin.php:94 src/Module/BaseSettings.php:63
|
||||
#: src/Module/BaseAdmin.php:94 src/Module/BaseSettings.php:112
|
||||
msgid "Additional features"
|
||||
msgstr ""
|
||||
|
||||
|
@ -5730,32 +5524,36 @@ msgstr ""
|
|||
msgid "Forum Search - %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/BaseSettings.php:41
|
||||
#: src/Module/BaseSettings.php:80
|
||||
msgid "Account"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/BaseSettings.php:48 src/Module/Security/TwoFactor/Verify.php:96
|
||||
#: src/Module/BaseSettings.php:87 src/Module/Security/TwoFactor/Verify.php:96
|
||||
#: src/Module/Settings/TwoFactor/Index.php:117
|
||||
msgid "Two-factor authentication"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/BaseSettings.php:71
|
||||
#: src/Module/BaseSettings.php:120
|
||||
msgid "Display"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/BaseSettings.php:92 src/Module/Settings/Delegation.php:170
|
||||
#: src/Module/BaseSettings.php:127 src/Module/Settings/Connectors.php:203
|
||||
msgid "Social Networks"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/BaseSettings.php:141 src/Module/Settings/Delegation.php:170
|
||||
msgid "Manage Accounts"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/BaseSettings.php:99
|
||||
#: src/Module/BaseSettings.php:148
|
||||
msgid "Connected apps"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/BaseSettings.php:106 src/Module/Settings/UserExport.php:102
|
||||
#: src/Module/BaseSettings.php:155 src/Module/Settings/UserExport.php:102
|
||||
msgid "Export personal data"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/BaseSettings.php:113
|
||||
#: src/Module/BaseSettings.php:162
|
||||
msgid "Remove account"
|
||||
msgstr ""
|
||||
|
||||
|
@ -6030,6 +5828,18 @@ msgstr ""
|
|||
msgid "Return to contact editor"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Contact/Advanced.php:134
|
||||
#: src/Module/Moderation/Blocklist/Contact.php:122
|
||||
#: src/Module/Moderation/Users/Active.php:126
|
||||
#: src/Module/Moderation/Users/Blocked.php:126
|
||||
#: src/Module/Moderation/Users/Create.php:71
|
||||
#: src/Module/Moderation/Users/Deleted.php:83
|
||||
#: src/Module/Moderation/Users/Index.php:140
|
||||
#: src/Module/Moderation/Users/Index.php:160
|
||||
#: src/Module/Moderation/Users/Pending.php:99 src/Module/Settings/OAuth.php:73
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Contact/Advanced.php:135
|
||||
msgid "Account Nickname"
|
||||
msgstr ""
|
||||
|
@ -9379,6 +9189,189 @@ msgstr ""
|
|||
msgid "Resend relocate message to contacts"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Addons.php:89
|
||||
msgid "Addon Settings"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Addons.php:90
|
||||
msgid "No Addon settings configured"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:121
|
||||
msgid "Failed to connect with email account using the settings provided."
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:165
|
||||
#: src/Module/Settings/Connectors.php:166
|
||||
msgid "Diaspora (Socialhome, Hubzilla)"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:165
|
||||
#: src/Module/Settings/Connectors.php:169
|
||||
#, php-format
|
||||
msgid "Built-in support for %s connectivity is enabled"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:166
|
||||
#: src/Module/Settings/Connectors.php:168
|
||||
#, php-format
|
||||
msgid "Built-in support for %s connectivity is disabled"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:168
|
||||
#: src/Module/Settings/Connectors.php:169
|
||||
msgid "OStatus (GNU Social)"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:181
|
||||
msgid "Email access is disabled on this site."
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:196
|
||||
#: src/Module/Settings/Connectors.php:242
|
||||
msgid "None"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:208
|
||||
msgid "General Social Media Settings"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:211
|
||||
msgid "Followed content scope"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:213
|
||||
msgid ""
|
||||
"By default, conversations in which your follows participated but didn't "
|
||||
"start will be shown in your timeline. You can turn this behavior off, or "
|
||||
"expand it to the conversations in which your follows liked a post."
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:215
|
||||
msgid "Only conversations my follows started"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:216
|
||||
msgid "Conversations my follows started or commented on (default)"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:217
|
||||
msgid "Any conversation my follows interacted with, including likes"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:220
|
||||
msgid "Enable Content Warning"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:220
|
||||
msgid ""
|
||||
"Users on networks like Mastodon or Pleroma are able to set a content warning "
|
||||
"field which collapse their post by default. This enables the automatic "
|
||||
"collapsing instead of setting the content warning as the post title. Doesn't "
|
||||
"affect any other content filtering you eventually set up."
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:221
|
||||
msgid "Enable intelligent shortening"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:221
|
||||
msgid ""
|
||||
"Normally the system tries to find the best link to add to shortened posts. "
|
||||
"If disabled, every shortened post will always point to the original "
|
||||
"friendica post."
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:222
|
||||
msgid "Enable simple text shortening"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:222
|
||||
msgid ""
|
||||
"Normally the system shortens posts at the next line feed. If this option is "
|
||||
"enabled then the system will shorten the text at the maximum character limit."
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:223
|
||||
msgid "Attach the link title"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:223
|
||||
msgid ""
|
||||
"When activated, the title of the attached link will be added as a title on "
|
||||
"posts to Diaspora. This is mostly helpful with \"remote-self\" contacts that "
|
||||
"share feed content."
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:224
|
||||
msgid "Your legacy ActivityPub/GNU Social account"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:224
|
||||
msgid ""
|
||||
"If you enter your old account name from an ActivityPub based system or your "
|
||||
"GNU Social/Statusnet account name here (in the format user@domain.tld), your "
|
||||
"contacts will be added automatically. The field will be emptied when done."
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:227
|
||||
msgid "Repair OStatus subscriptions"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:231
|
||||
msgid "Email/Mailbox Setup"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:232
|
||||
msgid ""
|
||||
"If you wish to communicate with email contacts using this service "
|
||||
"(optional), please specify how to connect to your mailbox."
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:233
|
||||
msgid "Last successful email check:"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:235
|
||||
msgid "IMAP server name:"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:236
|
||||
msgid "IMAP port:"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:237
|
||||
msgid "Security:"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:238
|
||||
msgid "Email login name:"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:239
|
||||
msgid "Email password:"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:240
|
||||
msgid "Reply-to address:"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:241
|
||||
msgid "Send public posts to all email contacts:"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:242
|
||||
msgid "Action after import:"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:242
|
||||
msgid "Move to folder"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Connectors.php:243
|
||||
msgid "Move to folder:"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Delegation.php:52
|
||||
msgid "Delegation successfully granted."
|
||||
msgstr ""
|
||||
|
@ -9578,6 +9571,18 @@ msgstr ""
|
|||
msgid "Beginning of week:"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Features.php:74
|
||||
msgid "Additional Features"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/OAuth.php:72
|
||||
msgid "Connected Apps"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/OAuth.php:76
|
||||
msgid "Remove authorization"
|
||||
msgstr ""
|
||||
|
||||
#: src/Module/Settings/Profile/Index.php:84
|
||||
msgid "Profile Name is required."
|
||||
msgstr ""
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{{foreach $addon_settings_forms as $addon => $addon_settings_form}}
|
||||
|
||||
<form action="settings/addon/{{$addon}}" method="post" autocomplete="off">
|
||||
<form action="settings/addons/{{$addon}}" method="post" autocomplete="off">
|
||||
<input type="hidden" name="form_security_token" value="{{$form_security_token}}">
|
||||
{{$addon_settings_form nofilter}}
|
||||
</form>
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
</form>
|
||||
<div class="clear"></div>
|
||||
|
||||
{{if !$mail_disabled}}
|
||||
<form action="settings/connectors" method="post" autocomplete="off">
|
||||
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
|
||||
<span id="settings_mail_inflated" class="settings-block fakelink" style="display: block;"
|
||||
|
@ -38,6 +37,9 @@
|
|||
<span class="fakelink" onclick="openClose('settings_mail_expanded'); openClose('settings_mail_inflated');">
|
||||
<img class="connector" src="images/mail.png"/><h3 class="settings-heading connector">{{$h_mail}}</h3>
|
||||
</span>
|
||||
{{if $mail_disabled}}
|
||||
<p>{{$mail_disabled}}</p>
|
||||
{{else}}
|
||||
<p>{{$mail_desc nofilter}}</p>
|
||||
{{include file="field_custom.tpl" field=$mail_lastcheck}}
|
||||
{{include file="field_input.tpl" field=$mail_server}}
|
||||
|
@ -53,9 +55,9 @@
|
|||
<div class="settings-submit-wrapper">
|
||||
<input type="submit" id="mail-submit" name="mail-submit" class="settings-submit" value="{{$submit}}"/>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</form>
|
||||
{{/if}}
|
||||
|
||||
{{foreach $connector_settings_forms as $addon => $connector_settings_form}}
|
||||
<form action="settings/connectors/{{$addon}}" method="post" autocomplete="off">
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
<div class="generic-page-wrapper">
|
||||
<h1>{{$title}}</h1>
|
||||
<form action="settings/oauth" method="post" autocomplete="off">
|
||||
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
|
||||
<input type="hidden" name="form_security_token" value="{{$form_security_token}}">
|
||||
<table id='application-block' class='table table-condensed table-striped'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{$name}}</th>
|
||||
<th>{{$website}}</th>
|
||||
<th>{{$created_at}}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -16,7 +17,11 @@
|
|||
<td>{{$app.name}}</td>
|
||||
<td>{{$app.website}}</td>
|
||||
<td>{{$app.created_at}}</td>
|
||||
<td><a href="{{$baseurl}}/settings/oauth/delete/{{$app.id}}?t={{$form_security_token}}" class="icon s22 delete" title="{{$delete}}"> </a></td>
|
||||
<td>
|
||||
<button type="submit" class="btn" title="{{$delete}}" name="delete" value="{{$app.id}}">
|
||||
<i class="icon s22 delete" aria-hidden="true"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<div class="panel-group panel-group-settings" id="settings-addons" role="tablist" aria-multiselectable="true">
|
||||
{{foreach $addon_settings_forms as $addon => $addon_settings_form}}
|
||||
<form action="settings/addon/{{$addon}}" method="post" autocomplete="off" class="panel">
|
||||
<form action="settings/addons/{{$addon}}" method="post" autocomplete="off" class="panel">
|
||||
<input type="hidden" name="form_security_token" value="{{$form_security_token}}">
|
||||
{{$addon_settings_form nofilter}}
|
||||
</form>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="generic-page-wrapper">
|
||||
{{include file="section_title.tpl" title=$title}}
|
||||
{{include file="section_title.tpl" title=$title}}
|
||||
|
||||
<p class="connector_statusmsg">{{$diasp_enabled}}</p>
|
||||
<p class="connector_statusmsg">{{$ostat_enabled}}</p>
|
||||
|
@ -38,8 +38,6 @@
|
|||
</div>
|
||||
</form>
|
||||
|
||||
{{if !$mail_disabled}}
|
||||
|
||||
<form action="settings/connectors" method="post" autocomplete="off" class="panel">
|
||||
<input type="hidden" name="form_security_token" value="{{$form_security_token}}">
|
||||
|
||||
|
@ -52,7 +50,9 @@
|
|||
</div>
|
||||
<div id="mail-settings-content" class="panel-collapse collapse" role="tabpanel" aria-labelledby="mail-settings-title">
|
||||
<div class="panel-body">
|
||||
|
||||
{{if $mail_disabled}}
|
||||
<p>{{$mail_disabled}}</p>
|
||||
{{else}}
|
||||
<p>{{$mail_desc nofilter}}</p>
|
||||
|
||||
{{include file="field_custom.tpl" field=$mail_lastcheck}}
|
||||
|
@ -68,15 +68,15 @@
|
|||
</div>
|
||||
<div class="panel-footer">
|
||||
<button type="submit" id="mail-submit" name="mail-submit" class="btn btn-primary" value="{{$submit}}">{{$submit}}</button>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{{/if}}
|
||||
|
||||
{{foreach $connector_settings_forms as $addon => $connector_settings_form}}
|
||||
<form action="settings/connectors/{{$addon}}" method="post" autocomplete="off" class="panel">
|
||||
<input type="hidden" name="form_security_token" value="{{$form_security_token}}">
|
||||
{{$connector_settings_form nofilter}}
|
||||
{{$connector_settings_form nofilter}}
|
||||
</form>
|
||||
{{/foreach}}
|
||||
</div>
|
||||
|
|
|
@ -2,13 +2,14 @@
|
|||
{{* include the title template for the settings title *}}
|
||||
{{include file="section_title.tpl" title=$title}}
|
||||
<form action="settings/oauth" method="post" autocomplete="off">
|
||||
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
|
||||
<input type="hidden" name="form_security_token" value="{{$form_security_token}}">
|
||||
<table id='application-block' class='table table-condensed table-striped'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{$name}}</th>
|
||||
<th>{{$website}}</th>
|
||||
<th>{{$created_at}}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -17,7 +18,11 @@
|
|||
<td>{{$app.name}}</td>
|
||||
<td>{{$app.website}}</td>
|
||||
<td>{{$app.created_at}}</td>
|
||||
<td><a href="{{$baseurl}}/settings/oauth/delete/{{$app.id}}?t={{$form_security_token}}" class="btn" title="{{$delete}}"><i class="fa fa-trash" aria-hidden="true"></i></a></td>
|
||||
<td>
|
||||
<button type="submit" class="btn" title="{{$delete}}" name="delete" value="{{$app.id}}">
|
||||
<i class="fa fa-trash" aria-hidden="true"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
|
|
Loading…
Reference in a new issue