diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php
index ee831d92a19..16853706b7d 100644
--- a/htdocs/admin/system/dolibarr.php
+++ b/htdocs/admin/system/dolibarr.php
@@ -102,12 +102,12 @@ print '
'.$langs->trans("CurrentVersion").' global->MAIN_VERSION_LAST_INSTALL) {
+ if (DOL_VERSION != getDolGlobalString('MAIN_VERSION_LAST_INSTALL')) {
print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired", DOL_VERSION, getDolGlobalString('MAIN_VERSION_LAST_INSTALL')));
}
} else {
// Compare version with last upgrade database version
- if (DOL_VERSION != $conf->global->MAIN_VERSION_LAST_UPGRADE) {
+ if (DOL_VERSION != getDolGlobalString('MAIN_VERSION_LAST_UPGRADE')) {
print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired", DOL_VERSION, getDolGlobalString('MAIN_VERSION_LAST_UPGRADE')));
}
}
@@ -116,7 +116,12 @@ $version = DOL_VERSION;
if (preg_match('/[a-z]+/i', $version)) {
$version = 'develop'; // If version contains text, it is not an official tagged version, so we use the full change log.
}
-print ' '.$langs->trans("SeeChangeLog").'';
+
+$urlofchangelog = 'https://raw.githubusercontent.com/Dolibarr/dolibarr/'.$version.'/ChangeLog';
+
+print ' ';
+//print dolButtonToOpenUrlInDialogPopup('changelogpopup', $langs->trans("SeeChangeLog"), $langs->trans("SeeChangeLog"), $urlofchangelog);
+print ''.$langs->trans("SeeChangeLog").'';
$newversion = '';
if (function_exists('curl_init')) {
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 1c8bbedbf57..8abcab0464e 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -2887,13 +2887,19 @@ function dolButtonToOpenUrlInDialogPopup($name, $label, $buttonstring, $url, $di
$url .= '?dol_hide_topmenu=1&dol_hide_leftmenu=1&dol_openinpopup=' . urlencode($name);
}
+ if (preg_match('/^https/i', $url)) {
+ $urltoopen = $url;
+ } else {
+ $urltoopen = DOL_URL_ROOT . $url;
+ }
+
$out = '';
//print '';
$out .= '';
$out .= 'use_javascript_ajax)) {
- $out .= ' href="' . DOL_URL_ROOT . $url . '" target="_blank"';
+ $out .= ' href="' . $urltoopen . '" target="_blank"';
} elseif ($jsonopen) {
$out .= ' href="#" onclick="' . $jsonopen . '"';
} else {
@@ -2910,9 +2916,9 @@ function dolButtonToOpenUrlInDialogPopup($name, $label, $buttonstring, $url, $di
$out .= ' |