From f008591580ec9fda4b4af89fa2ca6ea8e502ba28 Mon Sep 17 00:00:00 2001 From: slawkens Date: Sat, 11 Nov 2023 21:16:34 +0100 Subject: [PATCH] Make links in settings desc clickable --- system/functions.php | 4 ++++ system/libs/Settings.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/system/functions.php b/system/functions.php index bfd113b7..c4224d01 100644 --- a/system/functions.php +++ b/system/functions.php @@ -1675,6 +1675,10 @@ function displayErrorBoxWithBackButton($errors, $action = null) { ]); } +function makeLinksClickable($text, $blank = true) { + return preg_replace('!(((f|ht)tp(s)?://)[-a-zA-Zа-яА-Я()0-9@:%_+.~#?&;//=]+)!i', '$1', $text); +} + // validator functions require_once LIBS . 'validator.php'; require_once SYSTEM . 'compat/base.php'; diff --git a/system/libs/Settings.php b/system/libs/Settings.php index 850ea138..f83776b8 100644 --- a/system/libs/Settings.php +++ b/system/libs/Settings.php @@ -329,7 +329,7 @@ class Settings implements ArrayAccess
'; echo 'Default: ';