mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
Make links in settings desc clickable
This commit is contained in:
parent
1d5b751fe1
commit
f008591580
@ -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', '<a href="$1"' . (!$blank ?: ' target="_blank"') . '>$1</a>', $text);
|
||||||
|
}
|
||||||
|
|
||||||
// validator functions
|
// validator functions
|
||||||
require_once LIBS . 'validator.php';
|
require_once LIBS . 'validator.php';
|
||||||
require_once SYSTEM . 'compat/base.php';
|
require_once SYSTEM . 'compat/base.php';
|
||||||
|
@ -329,7 +329,7 @@ class Settings implements ArrayAccess
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="well setting-default"><?php
|
<div class="well setting-default"><?php
|
||||||
echo ($setting['desc'] ?? '');
|
echo (isset($setting['desc']) ? makeLinksClickable($setting['desc']) : '');
|
||||||
echo '<br/>';
|
echo '<br/>';
|
||||||
echo '<strong>Default:</strong> ';
|
echo '<strong>Default:</strong> ';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user