diff --git a/doc/smarty3-templates.md b/doc/smarty3-templates.md index 599e3597e7..f174f21642 100644 --- a/doc/smarty3-templates.md +++ b/doc/smarty3-templates.md @@ -177,6 +177,7 @@ Field parameter: 1. Label for the input box, 2. Current text for the box, 3. Help text for the input box. +4. if set to "required" modern browser will check that this input box is filled when submitting the form, ### field_yesno.tpl diff --git a/src/Module/Proxy.php b/src/Module/Proxy.php index 75a1142af6..6b40a498a0 100644 --- a/src/Module/Proxy.php +++ b/src/Module/Proxy.php @@ -287,14 +287,13 @@ class Proxy extends BaseModule } /** - * @brief Output a blank image, without cache headers, in case of errors + * In case of an error just stop. We don't return content to avoid caching problems * + * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ private static function responseError() { - header('Content-type: image/png'); - echo file_get_contents('images/blank.png'); - exit(); + throw new \Friendica\Network\HTTPException\InternalServerErrorException(); } /** diff --git a/src/Module/Register.php b/src/Module/Register.php index 217581b160..1637e0d8b6 100644 --- a/src/Module/Register.php +++ b/src/Module/Register.php @@ -114,7 +114,7 @@ class Register extends BaseModule $o = Renderer::replaceMacros($tpl, [ '$invitations' => Config::get('system', 'invitation_only'), '$permonly' => intval(Config::get('config', 'register_policy')) === self::APPROVE, - '$permonlybox' => ['permonlybox', L10n::t('Note for the admin'), '', L10n::t('Leave a message for the admin, why you want to join this node')], + '$permonlybox' => ['permonlybox', L10n::t('Note for the admin'), '', L10n::t('Leave a message for the admin, why you want to join this node'), 'required'], '$invite_desc' => L10n::t('Membership on this site is by invitation only.'), '$invite_label' => L10n::t('Your invitation code: '), '$invite_id' => $invite_id, diff --git a/src/Protocol/PortableContact.php b/src/Protocol/PortableContact.php index def8f1b628..a1e6f7e21c 100644 --- a/src/Protocol/PortableContact.php +++ b/src/Protocol/PortableContact.php @@ -720,7 +720,7 @@ class PortableContact $server['register_policy'] = Register::CLOSED; - if (is_bool($nodeinfo['openRegistrations']) && $nodeinfo['openRegistrations']) { + if (isset($nodeinfo['openRegistrations']) && is_bool($nodeinfo['openRegistrations']) && $nodeinfo['openRegistrations']) { $server['register_policy'] = Register::OPEN; } diff --git a/view/templates/field_textarea.tpl b/view/templates/field_textarea.tpl index eadcbe56c7..17b07266a9 100644 --- a/view/templates/field_textarea.tpl +++ b/view/templates/field_textarea.tpl @@ -1,7 +1,7 @@