From fbe0b13706522db47429339204a17f4487d6775f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 Feb 2017 01:07:54 +0100 Subject: [PATCH] Add parameter to set the url to use for the file integrity checker --- htdocs/admin/system/filecheck.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/htdocs/admin/system/filecheck.php b/htdocs/admin/system/filecheck.php index 7536c6df793..3a78fb6e9ea 100644 --- a/htdocs/admin/system/filecheck.php +++ b/htdocs/admin/system/filecheck.php @@ -73,11 +73,15 @@ print '
'; // Modified or missing files $file_list = array('missing' => array(), 'updated' => array()); -// File to analyze -//$xmlfile = DOL_DOCUMENT_ROOT.'/install/filelist-'.DOL_VERSION.'.xml'; +// Local file to compare to $xmlshortfile = GETPOST('xmlshortfile')?GETPOST('xmlshortfile'):'/install/filelist-'.DOL_VERSION.'.xml'; $xmlfile = DOL_DOCUMENT_ROOT.$xmlshortfile; -$xmlremote = GETPOST('xmlremote')?GETPOST('xmlremote'):'https://www.dolibarr.org/files/stable/signatures/filelist-'.DOL_VERSION.'.xml'; +// Remote file to compare to +$xmlremote = GETPOST('xmlremote'); +if (empty($xmlremote) && ! empty($conf->global->MAIN_FILECHECK_URL)) $xmlremote = $conf->global->MAIN_FILECHECK_URL; +$param='MAIN_FILECHECK_URL_'.DOL_VERSION; +if (empty($xmlremote) && ! empty($conf->global->$param)) $xmlremote = $conf->global->$param; +if (empty($xmlremote)) $xmlremote = 'https://www.dolibarr.org/files/stable/signatures/filelist-'.DOL_VERSION.'.xml'; // Test if remote test is ok