diff --git a/htdocs/admin/system/about.php b/htdocs/admin/system/about.php index e9e2e0f1749..bb6e2372b47 100644 --- a/htdocs/admin/system/about.php +++ b/htdocs/admin/system/about.php @@ -63,7 +63,7 @@ if ($action == 'getlastversion') llxHeader(); -print load_fiche_titre("Dolibarr",'','title_setup'); +print load_fiche_titre($langs->trans("ExternalResources"),'','title_setup'); print '
| '.$langs->trans("Version").' | '.$langs->trans("Value").' |
| '.$langs->trans("VersionLastInstall").' | '.$conf->global->MAIN_VERSION_LAST_INSTALL.' |
| '.$langs->trans("VersionLastUpgrade").' | '.$conf->global->MAIN_VERSION_LAST_UPGRADE.' |
| '.$langs->trans("VersionProgram").' | '.DOL_VERSION; +print ' |
| '.$langs->trans("CurrentVersion").' ('.$langs->trans("Programs").') | '.DOL_VERSION;
// If current version differs from last upgrade
if (empty($conf->global->MAIN_VERSION_LAST_UPGRADE))
{
- // Compare version with last install database version (upgrades never occured)
- if (DOL_VERSION != $conf->global->MAIN_VERSION_LAST_INSTALL) print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired",DOL_VERSION,$conf->global->MAIN_VERSION_LAST_INSTALL));
+ // Compare version with last install database version (upgrades never occured)
+ if (DOL_VERSION != $conf->global->MAIN_VERSION_LAST_INSTALL) print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired",DOL_VERSION,$conf->global->MAIN_VERSION_LAST_INSTALL));
}
else
{
- // Compare version with last upgrade database version
- if (DOL_VERSION != $conf->global->MAIN_VERSION_LAST_UPGRADE) print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired",DOL_VERSION,$conf->global->MAIN_VERSION_LAST_UPGRADE));
+ // Compare version with last upgrade database version
+ if (DOL_VERSION != $conf->global->MAIN_VERSION_LAST_UPGRADE) print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired",DOL_VERSION,$conf->global->MAIN_VERSION_LAST_UPGRADE));
}
+
+if (function_exists('curl_init'))
+{
+ $conf->global->MAIN_USE_RESPONSE_TIMEOUT = 10;
+ print ' - ';
+ if ($action == 'getlastversion')
+ {
+ if ($sfurl)
+ {
+ while (! empty($sfurl->channel[0]->item[$i]->title) && $i < 10000)
+ {
+ $title=$sfurl->channel[0]->item[$i]->title;
+ if (preg_match('/([0-9]+\.([0-9\.]+))/', $title, $reg))
+ {
+ $newversion=$reg[1];
+ $newversionarray=explode('.',$newversion);
+ $versionarray=explode('.',$version);
+ //var_dump($newversionarray);var_dump($versionarray);
+ if (versioncompare($newversionarray, $versionarray) > 0) $version=$newversion;
+ }
+ $i++;
+ }
+
+ // Show version
+ print $langs->trans("LastStableVersion").' : '. (($version != '0.0')?$version:$langs->trans("Unknown")) .' '; + } + else + { + print $langs->trans("LastStableVersion").' : ' .$langs->trans("UpdateServerOffline").' '; + } + } + else + { + print $langs->trans("LastStableVersion").' : ' .$langs->trans("Check").' '; + } +} + print ' |
| '.$langs->trans("VersionLastUpgrade").' ('.$langs->trans("Database").') | '.$conf->global->MAIN_VERSION_LAST_UPGRADE.' |
| '.$langs->trans("VersionLastInstall").' | '.$conf->global->MAIN_VERSION_LAST_INSTALL.' |
| '; +print ' | ';
print '
|