diff --git a/dev/build/generate_filelist_xml.php b/dev/build/generate_filelist_xml.php index 9f57fbfdd18..5911ed1ed01 100755 --- a/dev/build/generate_filelist_xml.php +++ b/dev/build/generate_filelist_xml.php @@ -272,6 +272,16 @@ $checksumconcat = array(); fputs($fp, ''."\n"); +// TODO Use this array to make the scan +$arrayofunalterablefiles = array( + array('dir' => dirname(__FILE__).'/../../htdocs/blockedlog', 'files' => 'all', 'regextoinclude' => '(\.php|\.sql)$', 'regextoexclude' => ''), + array('dir' => dirname(__FILE__).'/../../htdocs/install/mysql/tables', 'files' => 'all', 'regextoinclude' => 'llx_blockedlog.*(\.php|\.sql)$'), + array('dir' => dirname(__FILE__).'/../../htdocs/core/triggers', 'files' => 'interface_50_modBlockedlog_ActionsBlockedLog.class.php'), + array('dir' => dirname(__FILE__).'/../../htdocs/core/class', 'files' => 'interfaces.class.php'), + array('dir' => dirname(__FILE__).'/../../htdocs/core/class', 'files' => 'commontrigger.class.php'), + array('dir' => dirname(__FILE__).'/../../htdocs/takepos', 'files' => 'receipt.php') +); + $regextoinclude = '(\.php|\.sql)$'; $regextoexclude = ''; // Exclude dirs $files = dol_dir_list(dirname(__FILE__).'/../../htdocs/blockedlog', 'files', 1, $regextoinclude, $regextoexclude, 'fullname'); diff --git a/htdocs/admin/system/filecheck.php b/htdocs/admin/system/filecheck.php index 0d4b1c08751..0e3b1465ed9 100644 --- a/htdocs/admin/system/filecheck.php +++ b/htdocs/admin/system/filecheck.php @@ -134,7 +134,7 @@ $enableremotecheck = true; print '
'; print ''; -print $langs->trans("MakeIntegrityAnalysisFrom").':
'; +print img_picto('', 'search', 'class="pictofixedwidth"').$langs->trans("MakeIntegrityAnalysisFrom").'...

'; print '
'; print ''."\n"; @@ -245,14 +245,52 @@ if (empty($error) && !empty($xml)) { $out .= ''; $out .= ''."\n"; $out .= ''.$langs->trans("Country").''."\n"; - $out .= ''."\n"; + $out .= ''.$langs->trans("YourCountryCode").''."\n"; $out .= ''.$mysoc->country_code.''."\n"; $out .= "\n"; $out .= ''; $out .= ''."\n"; - $out .= ''.$langs->trans("ModuleMustBeEnabled", $langs->transnoentitiesnoconv("BlockedLog")).''."\n"; - $out .= ''.yn(1).''."\n"; - $out .= ''.yn(isModEnabled('blockedlog') ? 1 : 0).''."\n"; + $out .= ''.$langs->trans("StatusOfModule", $langs->transnoentitiesnoconv("BlockedLog")).''."\n"; + $out .= ''.$langs->trans("Enabled").''."\n"; + $out .= ''; + $out .= isModEnabled('blockedlog') ? ''.$langs->trans("Enabled").'' : ''.$langs->trans("Disabled").''; + + include_once DOL_DOCUMENT_ROOT.'/core/modules/modBlockedLog.class.php'; + $objMod = new modBlockedLog($db); + $modulename = $objMod->getName(); + $moduledesc = $objMod->getDesc(); + $moduleauthor = $objMod->getPublisher(); + $moduledir = strtolower(preg_replace('/^mod/i', '', get_class($objMod))); + $const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i', '', get_class($objMod))); + + $text = ''.$langs->trans("LastActivationDate").': '; + if (getDolGlobalString($const_name)) { + $text .= dol_print_date($objMod->getLastActivationDate(), 'dayhour'); + } else { + $text .= $langs->trans("Disabled"); + } + $tmp = $objMod->getLastActivationInfo(); + $authorid = (empty($tmp['authorid']) ? '' : $tmp['authorid']); + if ($authorid > 0) { + $tmpuser = new User($db); + $tmpuser->fetch($authorid); + $text .= '
'.$langs->trans("LastActivationAuthor").': '; + $text .= $tmpuser->getNomUrl(0, 'nolink', -1, 1); + } + $ip = (empty($tmp['ip']) ? '' : $tmp['ip']); + if ($ip) { + $text .= '
'.$langs->trans("LastActivationIP").': '; + $text .= $ip; + } + $lastactivationversion = (empty($tmp['lastactivationversion']) ? '' : $tmp['lastactivationversion']); + if ($lastactivationversion && $lastactivationversion != 'dolibarr') { + $text .= '
'.$langs->trans("LastActivationVersion").': '; + $text .= $lastactivationversion; + } + + $out .= $form->textwithpicto('', $text); + + $out . ''."\n"; $out .= "\n"; } @@ -500,23 +538,24 @@ if (empty($error) && !empty($xml)) { $resultcomment = ''; $outexpectedchecksum = ($checksumtoget ? $checksumtoget : $langs->trans("Unknown")); + $outcurrentchecksumtext = ''; if ($checksumget == $checksumtoget) { if (empty($onlymodifiedorremoved) && !empty($file_list['added'])) { $resultcode = 'warning'; $resultcomment = 'FileIntegrityIsOkButFilesWereAdded'; $outcurrentchecksum = $checksumget; - $outcurrentchecksum .= '

'.img_picto('', 'tick').' '.$langs->trans($resultcomment).''; + $outcurrentchecksumtext .= img_picto('', 'tick').' '.$langs->trans($resultcomment).''; } else { $resultcode = 'ok'; $resultcomment = 'Success'; $outcurrentchecksum = ''.$checksumget.''; - $outcurrentchecksum.= '

'.img_picto('', 'tick').' '.$langs->trans($resultcomment).''; + $outcurrentchecksumtext.= img_picto('', 'tick').' '.$langs->trans($resultcomment).''; } } else { $resultcode = 'error'; $resultcomment = 'FileIntegrityIsKO'; $outcurrentchecksum = ''.$checksumget.''; - $outcurrentchecksum .= '

'.img_picto('', 'error').' '.$langs->trans($resultcomment).''; + $outcurrentchecksumtext .= img_picto('', 'error').' '.$langs->trans($resultcomment).''; } // Show warning @@ -554,13 +593,27 @@ if (empty($error) && !empty($xml)) { } else { print load_fiche_titre($langs->trans("GlobalChecksum")); } - print $langs->trans("ExpectedChecksum").' = '; + + + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''."\n"; + + print ''; + print ''; + print '
'.$langs->trans("ExpectedChecksum").''.$langs->trans("CurrentChecksum").'
'; print ''; print $outexpectedchecksum; - print '
'; - print $langs->trans("CurrentChecksum").' = '.$outcurrentchecksum; + print ''; + print '
'; + print $outcurrentchecksum; + print '
'; + print $outcurrentchecksumtext.'
'; - print '

'; + print '
'; print $outforlistoffiles; print '
'; diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php index 154e0148f54..1d4c831c91e 100644 --- a/htdocs/blockedlog/admin/blockedlog_list.php +++ b/htdocs/blockedlog/admin/blockedlog_list.php @@ -431,7 +431,6 @@ $s = $langs->trans("FilesIntegrityDesc", '{s}'); $s = str_replace('{s}', DOL_URL_ROOT.'/admin/system/filecheck.php', $s); print $s; print "
\n"; - print "
\n"; print '
'; @@ -548,7 +547,7 @@ print ''; // Actions code print ''; -print $form->multiselectarray('search_code', $block_static->trackedevents, $search_code, 0, 0, 'maxwidth200', 1); +print $form->multiselectarray('search_code', $block_static->trackedevents, $search_code, 0, 0, 'maxwidth150', 1); print ''; // Ref diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index c4c9c8eccd2..53c7f21f2e4 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -2662,7 +2662,7 @@ AlgorithmFor=Algorithm for: %s SensitiveData=Sensitive data ToolToDecryptAString=Tool to decrypt a string Decrypt=Decrypt -FilesIntegrityDesc=If you want to check the integrity of files instead of database, you can do it by using this tool. +FilesIntegrityDesc=If you want to check the integrity of files instead of database, you can do it by using this tool. AttributeCodeHelp=A code of your choice (without special chars and spaces) to identify the property.
Note that if an object B is created from an existing object A that has a different type (for example creation of an invoice from an order), the value of the complementary attributes of A are also copied into the complementary attributes of B when the code of the attribute is the same. ThereIsMoreThanXAnswers=There is more than %s answers with your filter. Please add more filters... PdfAddTermOfSaleHelp=You can upload the file at the bottom of this setup page @@ -2736,3 +2736,4 @@ ModuleProviderSites=Module providers StillInDevelopment=Still in development SeeValueIntoConfPhp=Some sensitive data in database are encrypted using this key. Without it, system backup and restoration is still possible but sensitive data (Tokens, BAN) would remain obfuscated and you will need to regenerate them. SeeValueIntoConfPhp2=For security purpose, this value can be read from a system user, that have file system access to the conf/conf.php file. If you need a non system backup, without encrypted data, you can use the "export" menu to export your data in clear CSV files. +StatusOfModule=Status of module %s diff --git a/htdocs/langs/en_US/blockedlog.lang b/htdocs/langs/en_US/blockedlog.lang index 76e18c06185..c05b2623c52 100644 --- a/htdocs/langs/en_US/blockedlog.lang +++ b/htdocs/langs/en_US/blockedlog.lang @@ -1,7 +1,8 @@ BlockedLog=Unalterable Logs BlockedLogDesc=This module tracks some events into an unalterable log (that you can't modify once recorded) into a block chain, in real time. This module provides compatibility with requirements of laws of some countries (like France with the law Finance 2016 - Norme NF525). Fingerprints=Archived events and fingerprints -FingerprintsDesc=This is the tool to browse or extract the unalterable logs. Unalterable logs are generated and archived locally into a dedicated table, in real time when you record a business event. You can use this tool to export this archive and save it into an external support (some countries, like France, ask that you do it every year). Note that, there is no feature to purge this log and every change tried to be done directly into this log (by a hacker for example) will be reported with a non-valid fingerprint. If you really need to purge this table because you used your application for a demo/test purpose and want to clean your data to start your production, you can ask your reseller or integrator to reset your database (all your data will be removed). +FingerprintsDesc=This is the tool to browse or extract the unalterable logs. Unalterable logs are generated and archived locally into a dedicated table, in real time when a business event appears. You can use this tool to export this archive and save it into an external support (some countries, like France, ask that you do it at least every year). Note that, there is no feature to purge this log and every change tried to be done directly into this log (by a hacker for example) will be reported with a non-valid fingerprint. +FingerprintsDesc2=If you really need to purge this table because you used your application for a demo/test purpose and want to clean your data to start your production, you can ask your reseller or integrator to reset your database (all your data will be removed). CompanyInitialKey=Company initial key (hash of genesis block) BrowseBlockedLog=Unalterable logs ShowAllFingerPrintsMightBeTooLong=Show all archived unlaterable logs (might be long) @@ -34,6 +35,7 @@ BlockedLogDisabledBis=System to track events into unalterable logs has been disa LinkHasBeenDisabledForPerformancePurpose=For performance purpose, direct link to the document is not shown after the 100th line. SavedOnLine=Saved on line UnlaterableDataOfEvent=Unalterable data of event +YourCountryCode=Your country code ## logTypes logBILL_DELETE=Customer invoice logically deleted