forked from friendica/friendica-addons
Compare commits
3 commits
2025.07-rc
...
pr-1600
Author | SHA1 | Date | |
---|---|---|---|
a37f313990 | |||
99f26dc3cc | |||
a844eb0cad |
5 changed files with 11 additions and 11 deletions
|
@ -209,7 +209,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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -27,7 +27,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 = [
|
||||||
|
@ -43,7 +43,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) {
|
||||||
|
|
|
@ -60,7 +60,7 @@ function rendertime_page_end(string &$o)
|
||||||
|
|
||||||
if (DI::userSession()->isSiteAdmin() && (($_GET['mode'] ?? '') != 'minimal') && !DI::mode()->isMobile() && !DI::mode()->isMobile() && !$ignored) {
|
if (DI::userSession()->isSiteAdmin() && (($_GET['mode'] ?? '') != 'minimal') && !DI::mode()->isMobile() && !DI::mode()->isMobile() && !$ignored) {
|
||||||
|
|
||||||
$o = $o . '<div class="renderinfo">' . DI::l10n()->t("Database: %s/%s, Network: %s, Rendering: %s, Session: %s, I/O: %s, Other: %s, Total: %s",
|
$o = $o . '<div class="renderinfo" aria-hidden="true">' . DI::l10n()->t("Database: %s/%s, Network: %s, Rendering: %s, Session: %s, I/O: %s, Other: %s, Total: %s",
|
||||||
round($profiler->get('database') - $profiler->get('database_write'), 3),
|
round($profiler->get('database') - $profiler->get('database_write'), 3),
|
||||||
round($profiler->get('database_write'), 3),
|
round($profiler->get('database_write'), 3),
|
||||||
round($profiler->get('network'), 2),
|
round($profiler->get('network'), 2),
|
||||||
|
@ -77,7 +77,7 @@ function rendertime_page_end(string &$o)
|
||||||
|
|
||||||
$total = microtime(true) - $profiler->get('start');
|
$total = microtime(true) - $profiler->get('start');
|
||||||
$rest = $total - ($profiler->get('ready') - $profiler->get('start')) - $profiler->get('init') - $profiler->get('content');
|
$rest = $total - ($profiler->get('ready') - $profiler->get('start')) - $profiler->get('init') - $profiler->get('content');
|
||||||
$o = $o . '<div class="renderinfo">' . DI::l10n()->t("Class-Init: %s, Boot: %s, Init: %s, Content: %s, Other: %s, Total: %s",
|
$o = $o . '<div class="renderinfo" aria-hidden="true">' . DI::l10n()->t("Class-Init: %s, Boot: %s, Init: %s, Content: %s, Other: %s, Total: %s",
|
||||||
round($profiler->get('classinit') - $profiler->get('start'), 3),
|
round($profiler->get('classinit') - $profiler->get('start'), 3),
|
||||||
round($profiler->get('ready') - $profiler->get('classinit'), 3),
|
round($profiler->get('ready') - $profiler->get('classinit'), 3),
|
||||||
round($profiler->get('init'), 3),
|
round($profiler->get('init'), 3),
|
||||||
|
@ -87,7 +87,7 @@ function rendertime_page_end(string &$o)
|
||||||
) . '</div>';
|
) . '</div>';
|
||||||
|
|
||||||
if ($profiler->isRendertime()) {
|
if ($profiler->isRendertime()) {
|
||||||
$o .= '<pre>';
|
$o .= '<pre aria-hidden="true">';
|
||||||
$o .= $profiler->getRendertimeString(floatval(DI::config()->get('rendertime', 'minimal_time', 0)));
|
$o .= $profiler->getRendertimeString(floatval(DI::config()->get('rendertime', 'minimal_time', 0)));
|
||||||
$o .= '</pre>';
|
$o .= '</pre>';
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ function addHeightToggleHandler($item) {
|
||||||
$item.data("item-id", itemId);
|
$item.data("item-id", itemId);
|
||||||
var toggleId = "wall-item-body-toggle-" + itemId;
|
var toggleId = "wall-item-body-toggle-" + itemId;
|
||||||
|
|
||||||
$item.append('<div class="wall-item-body-toggle" data-item-id="' + itemId + '" id="' + toggleId + '" ><button type="button" class="wall-item-body-toggle-text">' + showmore_dyn_showmore_linktext + '</button></div>');
|
$item.append('<div class="wall-item-body-toggle" data-item-id="' + itemId + '" id="' + toggleId + '" ><button type="button" class="wall-item-body-toggle-text" aria-hidden="true">' + showmore_dyn_showmore_linktext + '</button></div>');
|
||||||
$item.addClass("limitable limit-height");
|
$item.addClass("limitable limit-height");
|
||||||
|
|
||||||
var $toggle = $("#" + toggleId);
|
var $toggle = $("#" + toggleId);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue