dolibarr 19.0.3
filecheck.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2005-2020 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
4 * Copyright (C) 2007-2012 Regis Houssin <regis.houssin@inodbox.com>
5 * Copyright (C) 2015-2019 Frederic France <frederic.france@netlogic.fr>
6 * Copyright (C) 2017 Nicolas ZABOURI <info@inovea-conseil.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 */
21
27// Load Dolibarr environment
28require '../../main.inc.php';
29require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
30require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
31
32$langs->load("admin");
33
34if (!$user->admin) {
36}
37
38$error = 0;
39
40
41/*
42 * View
43 */
44
45@set_time_limit(300);
46
47llxHeader();
48
49print load_fiche_titre($langs->trans("FileCheckDolibarr"), '', 'title_setup');
50
51print '<span class="opacitymedium">'.$langs->trans("FileCheckDesc").'</span><br><br>';
52
53// Version
54print '<div class="div-table-responsive-no-min">';
55print '<table class="noborder centpercent">';
56print '<tr class="liste_titre"><td>'.$langs->trans("Version").'</td><td>'.$langs->trans("Value").'</td></tr>'."\n";
57print '<tr class="oddeven"><td width="300">'.$langs->trans("VersionLastInstall").'</td><td>'.getDolGlobalString('MAIN_VERSION_LAST_INSTALL').'</td></tr>'."\n";
58print '<tr class="oddeven"><td width="300">'.$langs->trans("VersionLastUpgrade").'</td><td>'.getDolGlobalString('MAIN_VERSION_LAST_UPGRADE').'</td></tr>'."\n";
59print '<tr class="oddeven"><td width="300">'.$langs->trans("VersionProgram").'</td><td>'.DOL_VERSION;
60// If current version differs from last upgrade
61if (!getDolGlobalString('MAIN_VERSION_LAST_UPGRADE')) {
62 // Compare version with last install database version (upgrades never occured)
63 if (DOL_VERSION != $conf->global->MAIN_VERSION_LAST_INSTALL) {
64 print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired", DOL_VERSION, $conf->global->MAIN_VERSION_LAST_INSTALL));
65 }
66} else {
67 // Compare version with last upgrade database version
68 if (DOL_VERSION != $conf->global->MAIN_VERSION_LAST_UPGRADE) {
69 print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired", DOL_VERSION, $conf->global->MAIN_VERSION_LAST_UPGRADE));
70 }
71}
72print '</td></tr>'."\n";
73print '</table>';
74print '</div>';
75print '<br>';
76
77
78// Modified or missing files
79$file_list = array('missing' => array(), 'updated' => array());
80
81// Local file to compare to
82$xmlshortfile = dol_sanitizeFileName(GETPOST('xmlshortfile', 'alpha') ? GETPOST('xmlshortfile', 'alpha') : 'filelist-'.DOL_VERSION.(!getDolGlobalString('MAIN_FILECHECK_LOCAL_SUFFIX') ? '' : $conf->global->MAIN_FILECHECK_LOCAL_SUFFIX).'.xml'.(!getDolGlobalString('MAIN_FILECHECK_LOCAL_EXT') ? '' : $conf->global->MAIN_FILECHECK_LOCAL_EXT));
83
84$xmlfile = DOL_DOCUMENT_ROOT.'/install/'.$xmlshortfile;
85if (!preg_match('/\.zip$/i', $xmlfile) && dol_is_file($xmlfile.'.zip')) {
86 $xmlfile = $xmlfile.'.zip';
87}
88
89// Remote file to compare to
90$xmlremote = GETPOST('xmlremote', 'alphanohtml');
91if (empty($xmlremote) && getDolGlobalString('MAIN_FILECHECK_URL')) {
92 $xmlremote = $conf->global->MAIN_FILECHECK_URL;
93}
94$param = 'MAIN_FILECHECK_URL_'.DOL_VERSION;
95if (empty($xmlremote) && getDolGlobalString($param)) {
96 $xmlremote = getDolGlobalString($param);
97}
98if (empty($xmlremote)) {
99 $xmlremote = 'https://www.dolibarr.org/files/stable/signatures/filelist-'.DOL_VERSION.'.xml';
100}
101if ($xmlremote && !preg_match('/^https?:\/\//', $xmlremote)) {
102 $langs->load("errors");
103 setEventMessages($langs->trans("ErrorURLMustStartWithHttp", $xmlremote), null, 'errors');
104 $error++;
105} elseif ($xmlremote && !preg_match('/\.xml$/', $xmlremote)) {
106 $langs->load("errors");
107 setEventMessages($langs->trans("ErrorURLMustEndWith", $xmlremote, '.xml'), null, 'errors');
108 $error++;
109}
110
111// Test if remote test is ok
112$enableremotecheck = true;
113if (preg_match('/beta|alpha|rc/i', DOL_VERSION) || getDolGlobalString('MAIN_ALLOW_INTEGRITY_CHECK_ON_UNSTABLE')) {
114 $enableremotecheck = false;
115}
116$enableremotecheck = true;
117
118print '<form name="check" action="'.$_SERVER["PHP_SELF"].'">';
119print '<input type="hidden" name="token" value="'.newToken().'">';
120print $langs->trans("MakeIntegrityAnalysisFrom").':<br>';
121print '<!-- for a local check target=local&xmlshortfile=... -->'."\n";
122if (dol_is_file($xmlfile)) {
123 print '<input type="radio" name="target" id="checkboxlocal" value="local"'.((!GETPOST('target') || GETPOST('target') == 'local') ? 'checked="checked"' : '').'"> <label for="checkboxlocal">'.$langs->trans("LocalSignature").'</label> = ';
124 print '<input name="xmlshortfile" class="flat minwidth400" value="'.dol_escape_htmltag($xmlshortfile).'">';
125 print '<br>';
126} else {
127 print '<input type="radio" name="target" id="checkboxlocal" value="local"> <label for="checkboxlocal">'.$langs->trans("LocalSignature").' = ';
128 print '<input name="xmlshortfile" class="flat minwidth400" value="'.dol_escape_htmltag($xmlshortfile).'">';
129 print ' <span class="warning">('.$langs->trans("AvailableOnlyOnPackagedVersions").')</span></label>';
130 print '<br>';
131}
132print '<!-- for a remote target=remote&xmlremote=... -->'."\n";
133if ($enableremotecheck) {
134 print '<input type="radio" name="target" id="checkboxremote" value="remote"'.(GETPOST('target') == 'remote' ? 'checked="checked"' : '').'> <label for="checkboxremote">'.$langs->trans("RemoteSignature").'</label> = ';
135 print '<input name="xmlremote" class="flat minwidth500" value="'.dol_escape_htmltag($xmlremote).'"><br>';
136} else {
137 print '<input type="radio" name="target" id="checkboxremote" value="remote" disabled="disabled"> '.$langs->trans("RemoteSignature").' = '.dol_escape_htmltag($xmlremote);
138 if (!GETPOST('xmlremote')) {
139 print ' <span class="warning">('.$langs->trans("FeatureAvailableOnlyOnStable").')</span>';
140 }
141 print '<br>';
142}
143print '<br><div class="center"><input type="submit" name="check" class="button" value="'.$langs->trans("Check").'"></div>';
144print '</form>';
145print '<br>';
146print '<br>';
147
148if (GETPOST('target') == 'local') {
149 if (dol_is_file($xmlfile)) {
150 // If file is a zip file (.../filelist-x.y.z.xml.zip), we uncompress it before
151 if (preg_match('/\.zip$/i', $xmlfile)) {
152 dol_mkdir($conf->admin->dir_temp);
153 $xmlfilenew = preg_replace('/\.zip$/i', '', $xmlfile);
154 $result = dol_uncompress($xmlfile, $conf->admin->dir_temp);
155 if (empty($result['error'])) {
156 $xmlfile = $conf->admin->dir_temp.'/'.basename($xmlfilenew);
157 } else {
158 print $langs->trans('FailedToUncompressFile').': '.$xmlfile;
159 $error++;
160 }
161 }
162 $xml = simplexml_load_file($xmlfile);
163 if ($xml === false) {
164 print '<div class="warning">'.$langs->trans('XmlCorrupted').': '.$xmlfile.'</span>';
165 $error++;
166 }
167 } else {
168 print '<div class="warning">'.$langs->trans('XmlNotFound').': '.$xmlfile.'</span>';
169 $error++;
170 }
171}
172if (GETPOST('target') == 'remote') {
173 $xmlarray = getURLContent($xmlremote, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only. Same is used into api_setup.class.php.
174
175 // Return array('content'=>response,'curl_error_no'=>errno,'curl_error_msg'=>errmsg...)
176 if (!$xmlarray['curl_error_no'] && $xmlarray['http_code'] != '400' && $xmlarray['http_code'] != '404') {
177 $xmlfile = $xmlarray['content'];
178 //print "xmlfilestart".$xmlfile."xmlfileend";
179 if (LIBXML_VERSION < 20900) {
180 // Avoid load of external entities (security problem).
181 // Required only if LIBXML_VERSION < 20900
182 libxml_disable_entity_loader(true);
183 }
184
185 $xml = simplexml_load_string($xmlfile, 'SimpleXMLElement', LIBXML_NOCDATA|LIBXML_NONET);
186 } else {
187 $errormsg = $langs->trans('XmlNotFound').': '.$xmlremote.' - '.$xmlarray['http_code'].(($xmlarray['http_code'] == 400 && $xmlarray['content']) ? ' '.$xmlarray['content'] : '').' '.$xmlarray['curl_error_no'].' '.$xmlarray['curl_error_msg'];
188 setEventMessages($errormsg, null, 'errors');
189 $error++;
190 }
191}
192
193
194if (empty($error) && !empty($xml)) {
195 $checksumconcat = array();
196 $file_list = array();
197 $out = '';
198
199 // Forced constants
200 if (is_object($xml->dolibarr_constants[0])) {
201 $out .= load_fiche_titre($langs->trans("ForcedConstants"));
202
203 $out .= '<div class="div-table-responsive-no-min">';
204 $out .= '<table class="noborder">';
205 $out .= '<tr class="liste_titre">';
206 $out .= '<td>#</td>';
207 $out .= '<td>'.$langs->trans("Constant").'</td>';
208 $out .= '<td class="center">'.$langs->trans("ExpectedValue").'</td>';
209 $out .= '<td class="center">'.$langs->trans("Value").'</td>';
210 $out .= '</tr>'."\n";
211
212 $i = 0;
213 foreach ($xml->dolibarr_constants[0]->constant as $constant) { // $constant is a simpleXMLElement
214 $constname = $constant['name'];
215 $constvalue = (string) $constant;
216 $constvalue = (empty($constvalue) ? '0' : $constvalue);
217 // Value found
218 $value = '';
219 if ($constname && getDolGlobalString($constname) != '') {
220 $value = getDolGlobalString($constname);
221 }
222 $valueforchecksum = (empty($value) ? '0' : $value);
223
224 $checksumconcat[] = $valueforchecksum;
225
226 $i++;
227 $out .= '<tr class="oddeven">';
228 $out .= '<td>'.$i.'</td>'."\n";
229 $out .= '<td>'.dol_escape_htmltag($constname).'</td>'."\n";
230 $out .= '<td class="center">'.dol_escape_htmltag($constvalue).'</td>'."\n";
231 $out .= '<td class="center">'.dol_escape_htmltag($valueforchecksum).'</td>'."\n";
232 $out .= "</tr>\n";
233 }
234
235 if ($i == 0) {
236 $out .= '<tr class="oddeven"><td colspan="4" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
237 }
238 $out .= '</table>';
239 $out .= '</div>';
240
241 $out .= '<br>';
242 }
243
244 // Scan htdocs
245 if (is_object($xml->dolibarr_htdocs_dir[0])) {
246 //var_dump($xml->dolibarr_htdocs_dir[0]['includecustom']);exit;
247 $includecustom = (empty($xml->dolibarr_htdocs_dir[0]['includecustom']) ? 0 : $xml->dolibarr_htdocs_dir[0]['includecustom']);
248
249 // Define qualified files (must be same than into generate_filelist_xml.php and in api_setup.class.php)
250 $regextoinclude = '\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|bak|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$';
251 $regextoexclude = '('.($includecustom ? '' : 'custom|').'documents|conf|install|dejavu-fonts-ttf-.*|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
252 $scanfiles = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude);
253
254 // Fill file_list with files in signature, new files, modified files
255 $ret = getFilesUpdated($file_list, $xml->dolibarr_htdocs_dir[0], '', DOL_DOCUMENT_ROOT, $checksumconcat); // Fill array $file_list
256 // Complete with list of new files
257 foreach ($scanfiles as $keyfile => $valfile) {
258 $tmprelativefilename = preg_replace('/^'.preg_quote(DOL_DOCUMENT_ROOT, '/').'/', '', $valfile['fullname']);
259 if (!in_array($tmprelativefilename, $file_list['insignature'])) {
260 $md5newfile = @md5_file($valfile['fullname']); // Can fails if we don't have permission to open/read file
261 $file_list['added'][] = array('filename'=>$tmprelativefilename, 'md5'=>$md5newfile);
262 }
263 }
264
265 // Files missings
266 $out .= load_fiche_titre($langs->trans("FilesMissing"));
267
268 $out .= '<div class="div-table-responsive-no-min">';
269 $out .= '<table class="noborder">';
270 $out .= '<tr class="liste_titre">';
271 $out .= '<td>#</td>';
272 $out .= '<td>'.$langs->trans("Filename").'</td>';
273 $out .= '<td class="right">'.$langs->trans("ExpectedSize").'</td>';
274 $out .= '<td class="center">'.$langs->trans("ExpectedChecksum").'</td>';
275 $out .= '</tr>'."\n";
276 $tmpfilelist = dol_sort_array($file_list['missing'], 'filename');
277 if (is_array($tmpfilelist) && count($tmpfilelist)) {
278 $i = 0;
279 foreach ($tmpfilelist as $file) {
280 $i++;
281 $out .= '<tr class="oddeven">';
282 $out .= '<td>'.$i.'</td>'."\n";
283 $out .= '<td>'.dol_escape_htmltag($file['filename']).'</td>'."\n";
284 $out .= '<td class="right">';
285 if (!empty($file['expectedsize'])) {
286 $out .= dol_print_size($file['expectedsize']);
287 }
288 $out .= '</td>'."\n";
289 $out .= '<td class="center">'.dol_escape_htmltag($file['expectedmd5']).'</td>'."\n";
290 $out .= "</tr>\n";
291 }
292 } else {
293 $out .= '<tr class="oddeven"><td colspan="4" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
294 }
295 $out .= '</table>';
296 $out .= '</div>';
297
298 $out .= '<br>';
299
300 // Files modified
301 $out .= load_fiche_titre($langs->trans("FilesModified"));
302
303 $totalsize = 0;
304 $out .= '<div class="div-table-responsive-no-min">';
305 $out .= '<table class="noborder">';
306 $out .= '<tr class="liste_titre">';
307 $out .= '<td>#</td>';
308 $out .= '<td>'.$langs->trans("Filename").'</td>';
309 $out .= '<td class="center">'.$langs->trans("ExpectedChecksum").'</td>';
310 $out .= '<td class="center">'.$langs->trans("CurrentChecksum").'</td>';
311 $out .= '<td class="right">'.$langs->trans("ExpectedSize").'</td>';
312 $out .= '<td class="right">'.$langs->trans("CurrentSize").'</td>';
313 $out .= '<td class="right">'.$langs->trans("DateModification").'</td>';
314 $out .= '</tr>'."\n";
315 $tmpfilelist2 = dol_sort_array($file_list['updated'], 'filename');
316 if (is_array($tmpfilelist2) && count($tmpfilelist2)) {
317 $i = 0;
318 foreach ($tmpfilelist2 as $file) {
319 $i++;
320 $out .= '<tr class="oddeven">';
321 $out .= '<td>'.$i.'</td>'."\n";
322 $out .= '<td>'.dol_escape_htmltag($file['filename']).'</td>'."\n";
323 $out .= '<td class="center">'.dol_escape_htmltag($file['expectedmd5']).'</td>'."\n";
324 $out .= '<td class="center">'.dol_escape_htmltag($file['md5']).'</td>'."\n";
325 $out .= '<td class="right">';
326 if ($file['expectedsize']) {
327 $out .= dol_print_size($file['expectedsize']);
328 }
329 $out .= '</td>'."\n";
330 $size = dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename']);
331 $totalsize += $size;
332 $out .= '<td class="right">'.dol_print_size($size).'</td>'."\n";
333 $out .= '<td class="right">'.dol_print_date(dol_filemtime(DOL_DOCUMENT_ROOT.'/'.$file['filename']), 'dayhour').'</td>'."\n";
334 $out .= "</tr>\n";
335 }
336 $out .= '<tr class="liste_total">';
337 $out .= '<td></td>'."\n";
338 $out .= '<td>'.$langs->trans("Total").'</td>'."\n";
339 $out .= '<td class="center"></td>'."\n";
340 $out .= '<td class="center"></td>'."\n";
341 $out .= '<td class="center"></td>'."\n";
342 $out .= '<td class="right">'.dol_print_size($totalsize).'</td>'."\n";
343 $out .= '<td class="right"></td>'."\n";
344 $out .= "</tr>\n";
345 } else {
346 $out .= '<tr class="oddeven"><td colspan="7" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
347 }
348 $out .= '</table>';
349 $out .= '</div>';
350
351 $out .= '<br>';
352
353 // Files added
354 $out .= load_fiche_titre($langs->trans("FilesAdded"));
355
356 $totalsize = 0;
357 $out .= '<div class="div-table-responsive-no-min">';
358 $out .= '<table class="noborder">';
359 $out .= '<tr class="liste_titre">';
360 $out .= '<td>#</td>';
361 $out .= '<td>'.$langs->trans("Filename").'</td>';
362 $out .= '<td class="center">'.$langs->trans("ExpectedChecksum").'</td>';
363 $out .= '<td class="center">'.$langs->trans("CurrentChecksum").'</td>';
364 $out .= '<td class="right">'.$langs->trans("Size").'</td>';
365 $out .= '<td class="right">'.$langs->trans("DateModification").'</td>';
366 $out .= '</tr>'."\n";
367 $tmpfilelist3 = dol_sort_array($file_list['added'], 'filename');
368 if (is_array($tmpfilelist3) && count($tmpfilelist3)) {
369 $i = 0;
370 foreach ($tmpfilelist3 as $file) {
371 $i++;
372 $out .= '<tr class="oddeven">';
373 $out .= '<td>'.$i.'</td>'."\n";
374 $out .= '<td>'.dol_escape_htmltag($file['filename']);
375 if (!preg_match('/^win/i', PHP_OS)) {
376 $htmltext = $langs->trans("YouCanDeleteFileOnServerWith", 'rm '.DOL_DOCUMENT_ROOT.$file['filename']); // The slash is included int file['filename']
377 $out .= ' '.$form->textwithpicto('', $htmltext, 1, 'help', '', 0, 2, 'helprm'.$i);
378 }
379 $out .= '</td>'."\n";
380 $out .= '<td class="center">'.dol_escape_htmltag($file['expectedmd5']).'</td>'."\n";
381 $out .= '<td class="center">'.dol_escape_htmltag($file['md5']).'</td>'."\n";
382 $size = dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename']);
383 $totalsize += $size;
384 $out .= '<td class="right">'.dol_print_size($size).'</td>'."\n";
385 $out .= '<td class="right">'.dol_print_date(dol_filemtime(DOL_DOCUMENT_ROOT.'/'.$file['filename']), 'dayhour').'</td>'."\n";
386 $out .= "</tr>\n";
387 }
388 $out .= '<tr class="liste_total">';
389 $out .= '<td></td>'."\n";
390 $out .= '<td>'.$langs->trans("Total").'</td>'."\n";
391 $out .= '<td class="center"></td>'."\n";
392 $out .= '<td class="center"></td>'."\n";
393 $out .= '<td class="right">'.dol_print_size($totalsize).'</td>'."\n";
394 $out .= '<td class="right"></td>'."\n";
395 $out .= "</tr>\n";
396 } else {
397 $out .= '<tr class="oddeven"><td colspan="6" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
398 }
399 $out .= '</table>';
400 $out .= '</div>';
401 } else {
402 print '<div class="error">';
403 print 'Error: Failed to found <b>dolibarr_htdocs_dir</b> into content of XML file:<br>'.dol_escape_htmltag(dol_trunc($xmlfile, 500));
404 print '</div><br>';
405 $error++;
406 }
407
408
409 // Scan scripts
410 /*
411 if (is_object($xml->dolibarr_script_dir[0]))
412 {
413 $file_list = array();
414 $ret = getFilesUpdated($file_list, $xml->dolibarr_htdocs_dir[0], '', ???, $checksumconcat); // Fill array $file_list
415 }*/
416
417
418 asort($checksumconcat); // Sort list of checksum
419 //var_dump($checksumconcat);
420 $checksumget = md5(join(',', $checksumconcat));
421 $checksumtoget = trim((string) $xml->dolibarr_htdocs_dir_checksum);
422
423 //var_dump(count($file_list['added']));
424 //var_dump($checksumget);
425 //var_dump($checksumtoget);
426 //var_dump($checksumget == $checksumtoget);
427
428 $resultcomment = '';
429
430 $outexpectedchecksum = ($checksumtoget ? $checksumtoget : $langs->trans("Unknown"));
431 if ($checksumget == $checksumtoget) {
432 if (is_array($file_list['added']) && count($file_list['added'])) {
433 $resultcode = 'warning';
434 $resultcomment = 'FileIntegrityIsOkButFilesWereAdded';
435 $outcurrentchecksum = $checksumget.' - <span class="'.$resultcode.'">'.$langs->trans($resultcomment).'</span>';
436 } else {
437 $resultcode = 'ok';
438 $resultcomment = 'Success';
439 $outcurrentchecksum = '<span class="'.$resultcode.'">'.$checksumget.'</span>';
440 }
441 } else {
442 $resultcode = 'error';
443 $resultcomment = 'Error';
444 $outcurrentchecksum = '<span class="'.$resultcode.'">'.$checksumget.'</span>';
445 }
446
447 // Show warning
448 if (empty($tmpfilelist) && empty($tmpfilelist2) && empty($tmpfilelist3) && $resultcode == 'ok') {
449 setEventMessages($langs->trans("FileIntegrityIsStrictlyConformedWithReference"), null, 'mesgs');
450 } else {
451 if ($resultcode == 'warning') {
452 setEventMessages($langs->trans($resultcomment), null, 'warnings');
453 } else {
454 setEventMessages($langs->trans("FileIntegritySomeFilesWereRemovedOrModified"), null, 'errors');
455 }
456 }
457
458 print load_fiche_titre($langs->trans("GlobalChecksum"));
459 print $langs->trans("ExpectedChecksum").' = '.$outexpectedchecksum.'<br>';
460 print $langs->trans("CurrentChecksum").' = '.$outcurrentchecksum;
461
462 print '<br>';
463 print '<br>';
464
465 // Output detail
466 print $out;
467}
468
469// End of page
470llxFooter();
471$db->close();
472
473exit($error);
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Definition wrapper.php:55
llxFooter()
Empty footer.
Definition wrapper.php:69
getFilesUpdated(&$file_list, SimpleXMLElement $dir, $path='', $pathref='', &$checksumconcat=array())
Function to get list of updated or modified files.
dol_filemtime($pathoffile)
Return time of a file.
dol_filesize($pathoffile)
Return size of a file.
dol_uncompress($inputfile, $outputdir)
Uncompress a file.
dol_is_file($pathoffile)
Return if path is a file.
dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0, $nbsecondsold=0)
Scan a directory and return a list of files/directories.
Definition files.lib.php:62
dol_print_size($size, $shortvalue=0, $shortunit=0)
Return string with formated size.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
dol_sort_array(&$array, $index, $order='asc', $natsort=0, $case_sensitive=0, $keepindex=0)
Advanced sort array by second index function, which produces ascending (default) or descending output...
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
dol_trunc($string, $size=40, $trunc='right', $stringencoding='UTF-8', $nodot=0, $display=0)
Truncate a string to a particular length adding '…' if string larger than length.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
dol_mkdir($dir, $dataroot='', $newmask='')
Creation of a directory (this can create recursive subdir)
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
getURLContent($url, $postorget='GET', $param='', $followlocation=1, $addheaders=array(), $allowedschemes=array('http', 'https'), $localurl=0, $ssl_verifypeer=-1)
Function to get a content from an URL (use proxy if proxy defined).
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.