2
0
forked from Wavyzz/dolibarr

# WARNING: head commit changed in the meantime

Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
Laurent Destailleur
2022-06-01 22:13:42 +02:00
parent 53e7f2dc7e
commit d3fed26d78

View File

@@ -3030,6 +3030,10 @@ function dol_print_socialnetworks($value, $cid, $socid, $type, $dictsocialnetwor
$tmpvirginurl = preg_replace('/\/?{socialid}/', '', $dictsocialnetworks[$type]['url']);
if ($tmpvirginurl) {
$value = preg_replace('/'.preg_quote($tmpvirginurl, '/').'\/?/', '', $value);
$tmpvirginurl2 = preg_replace('/^https?:\/\//i', '', $tmpvirginurl);
if ($tmpvirginurl2) {
$value = preg_replace('/'.preg_quote($tmpvirginurl2, '/').'\/?/', '', $value);
}
}
$link = str_replace('{socialid}', $value, $dictsocialnetworks[$type]['url']);
if (preg_match('/^https?:\/\//i', $link)) {