Skip to content
Snippets Groups Projects
Commit ba5d6318 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Debug the integrity check feature.

parent a7ce414d
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,7 @@
*/
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$langs->load("admin");
......@@ -76,7 +77,7 @@ if (file_exists($xmlfile))
$xml = simplexml_load_file($xmlfile);
if ($xml)
{
$ret = getFilesUpdated($xml->dolibarr_root_dir[0]);
$ret = getFilesUpdated($xml->dolibarr_root_dir[0]); // Fill array $file_list
print '<table class="noborder">';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans("FilesMissing") . '</td>';
......@@ -96,17 +97,24 @@ if (file_exists($xmlfile))
print '<table class="noborder">';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans("FilesUpdated") . '</td>';
print '<td align="right">' . $langs->trans("Size") . '</td>';
print '<td align="center">' . $langs->trans("DateModification") . '</td>';
print '</tr>'."\n";
$var = true;
foreach ($file_list['updated'] as $file) {
foreach ($file_list['updated'] as $file)
{
$var = !$var;
print '<tr ' . $bc[$var] . '>';
print '<td>'.$file.'</td>' . "\n";
print '<td align="right">'.dol_print_size(dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file)).'</td>' . "\n";
print '<td align="center">'.dol_print_date(dol_filemtime(DOL_DOCUMENT_ROOT.'/'.$file),'dayhour').'</td>' . "\n";
print "</tr>\n";
}
print '</table>';
}
} else {
}
else
{
print $langs->trans('XmlNotFound') . ': ' . $xmlfile;
}
......@@ -127,7 +135,8 @@ function getFilesUpdated(SimpleXMLElement $dir, $path = '')
global $file_list;
$exclude = 'install';
foreach ($dir->md5file as $file) {
foreach ($dir->md5file as $file)
{
$filename = $path.$file['name'];
if (preg_match('#'.$exclude.'#', $filename))
......@@ -144,5 +153,5 @@ function getFilesUpdated(SimpleXMLElement $dir, $path = '')
foreach ($dir->dir as $subdir)
getFilesUpdated($subdir, $path.$subdir['name'].'/');
return $file_list;
return $file_list;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment