mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Fix url or module provider
This commit is contained in:
@@ -376,10 +376,12 @@ if ($mode == 'desc') {
|
||||
}
|
||||
$editor_url = $objMod->editor_url;
|
||||
if (!preg_match('/^http/', $editor_url)) {
|
||||
$editor_url = 'http://'.$editor_url;
|
||||
$editor_url = 'https://'.$editor_url;
|
||||
}
|
||||
$editor_url_to_show = preg_replace('/(utm_[a-z_]+|origin)=[a-z0-9_]+/i', '', $editor_url);
|
||||
$editor_url_to_show = preg_replace('/[\/\?]+$/', '', $editor_url_to_show);
|
||||
if (!empty($objMod->editor_url) && !preg_match('/dolibarr\.org/i', $objMod->editor_url)) {
|
||||
$textexternal .= ($objMod->editor_name != 'dolibarr' ? ' - ' : '').img_picto('', 'globe').' <a href="'.$editor_url.'" target="_blank" rel="noopener noreferrer external">'.$objMod->editor_url.'</a>';
|
||||
$textexternal .= ($objMod->editor_name != 'dolibarr' ? ' - ' : '').img_picto('', 'globe').' <a href="'.$editor_url.'" target="_blank" rel="noopener noreferrer external">'.$editor_url_to_show.'</a>';
|
||||
}
|
||||
$text .= $textexternal;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user