diff options
| author | Michael Foster <savetheinternet@tinyboard.org> | 2013-08-12 21:14:32 +1000 |
|---|---|---|
| committer | Michael Foster <savetheinternet@tinyboard.org> | 2013-08-12 21:14:32 +1000 |
| commit | e0a8ffcfb9246dc5fda840dc5386598730245802 (patch) | |
| tree | 420b33b30fc9641b766dc85128a037a28444dd98 /inc | |
| parent | 169c68e86221f15b85a34e09ff4c75d4feb6d983 (diff) | |
?/config: Link URLs in comments
Diffstat (limited to 'inc')
| -rw-r--r-- | inc/mod/config-editor.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/inc/mod/config-editor.php b/inc/mod/config-editor.php index 27740378..3f15ebe5 100644 --- a/inc/mod/config-editor.php +++ b/inc/mod/config-editor.php @@ -115,8 +115,14 @@ function config_vars() { $already_exists = true; } - if (!$already_exists && permission_to_edit_config_var($var['name'])) + if (!$already_exists && permission_to_edit_config_var($var['name'])) { + foreach ($var['comment'] as &$comment) { + $comment = preg_replace_callback( + '/((?:https?:\/\/|ftp:\/\/|irc:\/\/)[^\s<>()"]+?(?:\([^\s<>()"]*?\)[^\s<>()"]*?)*)((?:\s|<|>|"|\.||\]|!|\?|,|,|")*(?:[\s<>()"]|$))/', + 'markup_url', $comment); + } $conf[] = $var; + } } } |
