mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 06:13:58 -07:00
Bugfix: https url replacement
Исправление ошибки с некорректной заменой https-ссылок.
This commit is contained in:
parent
85e2cb66d1
commit
44dd6f69d0
2 changed files with 2 additions and 2 deletions
|
@ -72,7 +72,7 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
|
||||||
|
|
||||||
// Version info
|
// Version info
|
||||||
$bb_cfg['tp_version'] = '2.1 (STABLE)';
|
$bb_cfg['tp_version'] = '2.1 (STABLE)';
|
||||||
$bb_cfg['tp_release_date'] = '01-09-2014';
|
$bb_cfg['tp_release_date'] = '07-09-2014';
|
||||||
$bb_cfg['tp_release_state'] = 'R600';
|
$bb_cfg['tp_release_state'] = 'R600';
|
||||||
|
|
||||||
// Database
|
// Database
|
||||||
|
|
|
@ -704,7 +704,7 @@ class bbcode
|
||||||
$url = trim($m[1]);
|
$url = trim($m[1]);
|
||||||
$url_name = (isset($m[2])) ? trim($m[2]) : $url;
|
$url_name = (isset($m[2])) ? trim($m[2]) : $url;
|
||||||
|
|
||||||
if (!preg_match("#^http://#", $url) && !preg_match("/^#/", $url)) $url = 'http://' . $url;
|
if (!preg_match("#^https?://#isu", $url) && !preg_match("/^#/", $url)) $url = 'http://' . $url;
|
||||||
|
|
||||||
if (in_array(parse_url($url, PHP_URL_HOST), $bb_cfg['nofollow']['allowed_url']) || $bb_cfg['nofollow']['disabled'])
|
if (in_array(parse_url($url, PHP_URL_HOST), $bb_cfg['nofollow']['allowed_url']) || $bb_cfg['nofollow']['disabled'])
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue