Merge branch 'develop' into new-changelog

pull/1593/head
Art4 2025-01-30 21:57:40 +01:00
commit 42f511e216
4 changed files with 11 additions and 9 deletions

View File

@ -208,7 +208,7 @@ function blockbot_log_activitypub(string $url, string $agent)
blockbot_save('activitypub-inbox-agents', $agent); blockbot_save('activitypub-inbox-agents', $agent);
} }
if (!empty($_SERVER['HTTP_SIGNATURE']) && !empty(HTTPSignature::getSigner('', $_SERVER))) { if (!empty($_SERVER['HTTP_SIGNATURE']) && !empty(HTTPSignature::getSigner('', $_SERVER, false))) {
blockbot_save('activitypub-signature-agents', $agent); blockbot_save('activitypub-signature-agents', $agent);
} }
} }

View File

@ -54,8 +54,8 @@ function invidious_settings(array &$data)
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/invidious/'); $t = Renderer::getMarkupTemplate('settings.tpl', 'addon/invidious/');
$html = Renderer::replaceMacros($t, [ $html = Renderer::replaceMacros($t, [
'$enabled' => ['enabled', DI::l10n()->t('Replace Youtube links with links to an Invidious server'), $enabled, DI::l10n()->t('If enabled, Youtube links are replaced with the links to the specified Invidious server.')], '$enabled' => ['invidious-enabled', DI::l10n()->t('Replace Youtube links with links to an Invidious server'), $enabled, DI::l10n()->t('If enabled, Youtube links are replaced with the links to the specified Invidious server.')],
'$server' => ['server', DI::l10n()->t('Invidious server'), $server, DI::l10n()->t('See %s for a list of available Invidious servers.', '<a href="https://api.invidious.io/">https://api.invidious.io/</a>')], '$server' => ['invidious-server', DI::l10n()->t('Invidious server'), $server, DI::l10n()->t('See %s for a list of available Invidious servers.', '<a href="https://api.invidious.io/">https://api.invidious.io/</a>')],
]); ]);
$data = [ $data = [
@ -71,9 +71,9 @@ function invidious_settings_post(array &$b)
return; return;
} }
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'invidious', 'enabled', (bool)$_POST['enabled']); DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'invidious', 'enabled', (bool)$_POST['invidious-enabled']);
$server = trim($_POST['server'], " \n\r\t\v\x00/"); $server = trim($_POST['invidious-server'], " \n\r\t\v\x00/");
if ($server != DI::config()->get('invidious', 'server', INVIDIOUS_DEFAULT) && !empty($server)) { if ($server != DI::config()->get('invidious', 'server', INVIDIOUS_DEFAULT) && !empty($server)) {
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'invidious', 'server', $server); DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'invidious', 'server', $server);
} else { } else {

View File

@ -26,7 +26,7 @@ function markdown_addon_settings(array &$data)
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/markdown/'); $t = Renderer::getMarkupTemplate('settings.tpl', 'addon/markdown/');
$html = Renderer::replaceMacros($t, [ $html = Renderer::replaceMacros($t, [
'$enabled' => ['enabled', DI::l10n()->t('Enable Markdown parsing'), $enabled, DI::l10n()->t('If enabled, adds Markdown support to the Compose Post form.')], '$enabled' => ['markdown-enabled', DI::l10n()->t('Enable Markdown parsing'), $enabled, DI::l10n()->t('If enabled, adds Markdown support to the Compose Post form.')],
]); ]);
$data = [ $data = [
@ -42,7 +42,7 @@ function markdown_addon_settings_post(array &$b)
return; return;
} }
DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'markdown', 'enabled', intval($_POST['enabled'])); DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'markdown', 'enabled', intval($_POST['markdown-enabled']));
} }
function markdown_post_local_start(&$request) { function markdown_post_local_start(&$request) {

View File

@ -82,11 +82,13 @@ function saml_footer(string &$body)
<script> <script>
var target=$("#settings-nickname-desc"); var target=$("#settings-nickname-desc");
if (target.length) { target.append("<p>$fragment</p>"); } if (target.length) { target.append("<p>$fragment</p>"); }
document.getElementById('id_email').setAttribute('readonly', 'readonly');
var saml_hint = document.createElement("span"); var saml_hint = document.createElement("span");
var saml_hint_text = document.createTextNode('$samlhint'); var saml_hint_text = document.createTextNode('$samlhint');
saml_hint.appendChild(saml_hint_text); saml_hint.appendChild(saml_hint_text);
document.getElementById('id_email').parentNode.insertBefore(saml_hint, document.getElementById('id_email').nextSibling); if ( document.getElementById('id_email') != null ) {
document.getElementById('id_email').setAttribute('readonly', 'readonly');
document.getElementById('id_email').parentNode.insertBefore(saml_hint, document.getElementById('id_email').nextSibling);
}
// Frio theme // Frio theme
if ( document.getElementById('password-settings-collapse') != null ) { if ( document.getElementById('password-settings-collapse') != null ) {
document.getElementById('password-settings-collapse').replaceChildren(saml_hint.cloneNode(true)); document.getElementById('password-settings-collapse').replaceChildren(saml_hint.cloneNode(true));