From 374a6d7783af6840a695fac6ca1496e5dc2e4c59 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 26 Dec 2016 18:50:20 +0100 Subject: [PATCH] Fix filecheck tool. --- htdocs/admin/system/filecheck.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/htdocs/admin/system/filecheck.php b/htdocs/admin/system/filecheck.php index 5bea1b521ac..6f90d2c0348 100644 --- a/htdocs/admin/system/filecheck.php +++ b/htdocs/admin/system/filecheck.php @@ -75,9 +75,9 @@ $file_list = array('missing' => array(), 'updated' => array()); // File to analyze //$xmlfile = DOL_DOCUMENT_ROOT.'/install/filelist-'.DOL_VERSION.'.xml'; -$xmlshortfile = '/install/filelist-'.DOL_VERSION.'.xml'; +$xmlshortfile = GETPOST('xmlshortfile')?GETPOST('xmlshortfile'):'/install/filelist-'.DOL_VERSION.'.xml'; $xmlfile = DOL_DOCUMENT_ROOT.$xmlshortfile; -$xmlremote = 'https://www.dolibarr.org/files/stable/signatures/filelist-'.DOL_VERSION.'.xml'; +$xmlremote = GETPOST('xmlremote')?GETPOST('xmlremote'):'https://www.dolibarr.org/files/stable/signatures/filelist-'.DOL_VERSION.'.xml'; // Test if remote test is ok @@ -87,21 +87,27 @@ if (preg_match('/beta|alpha/i', DOL_VERSION)) $enableremotecheck=False; print '
'; print $langs->trans("MakeIntegrityAnalysisFrom").':
'; +print ''."\n"; if (dol_is_file($xmlfile)) { print ' '.$langs->trans("LocalSignature").' = '.$xmlshortfile.'
'; } else { - print ' '.$langs->trans("LocalSignature").' = '.$xmlshortfile.' ('.$langs->trans("AvailableOnlyOnPackagedVersions").')
'; + print ' '.$langs->trans("LocalSignature").' = '.$xmlshortfile; + if (! GETPOST('xmlshortfile')) print ' ('.$langs->trans("AvailableOnlyOnPackagedVersions").')'; + print '
'; } +print ''."\n"; if ($enableremotecheck) { print ' '.$langs->trans("RemoteSignature").' = '.$xmlremote.'
'; } else { - print ' '.$langs->trans("RemoteSignature").' = '.$xmlremote.' ('.$langs->trans("FeatureAvailableOnlyOnStable").')
'; + print ' '.$langs->trans("RemoteSignature").' = '.$xmlremote; + if (! GETPOST('xmlremote')) print ' ('.$langs->trans("FeatureAvailableOnlyOnStable").')'; + print '
'; } print '
'; print '
'; @@ -128,7 +134,8 @@ if (GETPOST('target') == 'remote') if (! $xmlarray['curl_error_no'] && $xmlarray['http_code'] != '404') { $xmlfile = $xmlarray['content']; - $xml = simplexml_load_file($xmlfile); + //print "eee".$xmlfile."eee"; + $xml = simplexml_load_string($xmlfile); } else {