diff --git a/build/generate_filelist_xml.php b/build/generate_filelist_xml.php index 1eeac5410b2..c1a56beacd7 100755 --- a/build/generate_filelist_xml.php +++ b/build/generate_filelist_xml.php @@ -123,16 +123,21 @@ foreach ($includeconstants as $countrycode => $tmp) fputs($fp, ''."\n"); -// TODO Replace RecursiveDirectoryIterator with dol_dir_list -$dir_iterator1 = new RecursiveDirectoryIterator(dirname(__FILE__).'/../htdocs/'); +/*$dir_iterator1 = new RecursiveDirectoryIterator(dirname(__FILE__).'/../htdocs/'); $iterator1 = new RecursiveIteratorIterator($dir_iterator1); // Need to ignore document custom etc. Note: this also ignore natively symbolic links. $files = new RegexIterator($iterator1, '#^(?:[A-Z]:)?(?:/(?!(?:'.($includecustom?'':'custom\/|').'documents\/|conf\/|install\/))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i'); +*/ +$regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$'; +$regextoexclude='('.($includecustom?'':'custom|').'documents|conf|install)$'; // Exclude dirs +$files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude, 'fullname'); $dir=''; $needtoclose=0; -foreach ($files as $file) { - $newdir = str_replace(dirname(__FILE__).'/../htdocs', '', dirname($file)); - if ($newdir!=$dir) { +foreach ($files as $filetmp) { + $file = $filetmp['fullname']; + //$newdir = str_replace(dirname(__FILE__).'/../htdocs', '', dirname($file)); + $newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file)); + if ($newdir!=$dir) { if ($needtoclose) fputs($fp, ' '."\n"); fputs($fp, ' '."\n"); @@ -160,14 +165,21 @@ $checksumconcat=array(); fputs($fp, ''."\n"); // TODO Replace RecursiveDirectoryIterator with dol_dir_list -$dir_iterator2 = new RecursiveDirectoryIterator(dirname(__FILE__).'/../scripts/'); +/*$dir_iterator2 = new RecursiveDirectoryIterator(dirname(__FILE__).'/../scripts/'); $iterator2 = new RecursiveIteratorIterator($dir_iterator2); // Need to ignore document custom etc. Note: this also ignore natively symbolic links. $files = new RegexIterator($iterator2, '#^(?:[A-Z]:)?(?:/(?!(?:custom|documents|conf|install))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i'); +*/ +$regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$'; +$regextoexclude='(custom|documents|conf|install)$'; // Exclude dirs +$files = dol_dir_list(dirname(__FILE__).'/../scripts/', 'files', 1, $regextoinclude, $regextoexclude, 'fullname'); $dir=''; $needtoclose=0; -foreach ($files as $file) { - $newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file)); +foreach ($files as $filetmp) { + $file = $filetmp['fullname']; + //$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file)); + $newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file)); + $newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file)); if ($newdir!=$dir) { if ($needtoclose) fputs($fp, ' '."\n"); diff --git a/htdocs/admin/system/filecheck.php b/htdocs/admin/system/filecheck.php index 679cea1b946..62d0999170f 100644 --- a/htdocs/admin/system/filecheck.php +++ b/htdocs/admin/system/filecheck.php @@ -95,13 +95,13 @@ print ''."\n"; if (dol_is_file($xmlfile)) { print ' '.$langs->trans("LocalSignature").' = '; - print ''; + print ''; print '
'; } else { print ' '.$langs->trans("LocalSignature").' = '; - print ''; + print ''; print ' ('.$langs->trans("AvailableOnlyOnPackagedVersions").')'; print '
'; } @@ -109,7 +109,7 @@ print ''."\n"; if ($enableremotecheck) { print ' '.$langs->trans("RemoteSignature").' = '; - print '
'; + print '
'; } else {