diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index f2bcc410aa2..bddb4e665d3 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1693,7 +1693,7 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename = * @param string $name A name for the html component * @param string $label Label shown in Popup title top bar * @param string $buttonstring button string - * @param string $url Url to open + * @param string $url Relative Url to open * @param string $disabled Disabled text * @param string $morecss More CSS * @param string $backtopagejsfields The back to page must be managed using javascript instead of a redirect. @@ -1702,6 +1702,8 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename = */ function dolButtonToOpenUrlInDialogPopup($name, $label, $buttonstring, $url, $disabled = '', $morecss = 'button bordertransp', $backtopagejsfields = '') { + global $conf; + if (strpos($url, '?') > 0) { $url .= '&dol_hide_topmenu=1&dol_hide_leftmenu=1&dol_openinpopup='.urlencode($name); } else { @@ -1725,44 +1727,50 @@ function dolButtonToOpenUrlInDialogPopup($name, $label, $buttonstring, $url, $di } //print ''; - $out .= ''."\n"; - $out .= ''.$buttonstring.''; - $out .= '