dolibarr  17.0.4
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
28 require '../../main.inc.php';
29 require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
30 require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
31 
32 $langs->load("admin");
33 
34 if (!$user->admin) {
36 }
37 
38 $error = 0;
39 
40 
41 /*
42  * View
43  */
44 
45 @set_time_limit(300);
46 
47 llxHeader();
48 
49 print load_fiche_titre($langs->trans("FileCheckDolibarr"), '', 'title_setup');
50 
51 print '<span class="opacitymedium">'.$langs->trans("FileCheckDesc").'</span><br><br>';
52 
53 // Version
54 print '<div class="div-table-responsive-no-min">';
55 print '<table class="noborder centpercent">';
56 print '<tr class="liste_titre"><td>'.$langs->trans("Version").'</td><td>'.$langs->trans("Value").'</td></tr>'."\n";
57 print '<tr class="oddeven"><td width="300">'.$langs->trans("VersionLastInstall").'</td><td>'.getDolGlobalString('MAIN_VERSION_LAST_INSTALL').'</td></tr>'."\n";
58 print '<tr class="oddeven"><td width="300">'.$langs->trans("VersionLastUpgrade").'</td><td>'.getDolGlobalString('MAIN_VERSION_LAST_UPGRADE').'</td></tr>'."\n";
59 print '<tr class="oddeven"><td width="300">'.$langs->trans("VersionProgram").'</td><td>'.DOL_VERSION;
60 // If current version differs from last upgrade
61 if (empty($conf->global->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 }
72 print '</td></tr>'."\n";
73 print '</table>';
74 print '</div>';
75 print '<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.(empty($conf->global->MAIN_FILECHECK_LOCAL_SUFFIX) ? '' : $conf->global->MAIN_FILECHECK_LOCAL_SUFFIX).'.xml'.(empty($conf->global->MAIN_FILECHECK_LOCAL_EXT) ? '' : $conf->global->MAIN_FILECHECK_LOCAL_EXT));
83 
84 $xmlfile = DOL_DOCUMENT_ROOT.'/install/'.$xmlshortfile;
85 if (!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');
91 if (empty($xmlremote) && !empty($conf->global->MAIN_FILECHECK_URL)) {
92  $xmlremote = $conf->global->MAIN_FILECHECK_URL;
93 }
94 $param = 'MAIN_FILECHECK_URL_'.DOL_VERSION;
95 if (empty($xmlremote) && !empty($conf->global->$param)) {
96  $xmlremote = $conf->global->$param;
97 }
98 if (empty($xmlremote)) {
99  $xmlremote = 'https://www.dolibarr.org/files/stable/signatures/filelist-'.DOL_VERSION.'.xml';
100 }
101 if ($xmlremote && !preg_match('/^https?:\/\//', $xmlremote)) {
102  $langs->load("errors");
103  setEventMessages($langs->trans("ErrorURLMustStartWithHttp", $xmlremote), '', 'errors');
104  $error++;
105 } elseif ($xmlremote && !preg_match('/\.xml$/', $xmlremote)) {
106  $langs->load("errors");
107  setEventMessages($langs->trans("ErrorURLMustEndWith", $xmlremote, '.xml'), '', 'errors');
108  $error++;
109 }
110 
111 // Test if remote test is ok
112 $enableremotecheck = true;
113 if (preg_match('/beta|alpha|rc/i', DOL_VERSION) || !empty($conf->global->MAIN_ALLOW_INTEGRITY_CHECK_ON_UNSTABLE)) {
114  $enableremotecheck = false;
115 }
116 $enableremotecheck = true;
117 
118 print '<form name="check" action="'.$_SERVER["PHP_SELF"].'">';
119 print '<input type="hidden" name="token" value="'.newToken().'">';
120 print $langs->trans("MakeIntegrityAnalysisFrom").':<br>';
121 print '<!-- for a local check target=local&xmlshortfile=... -->'."\n";
122 if (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 }
132 print '<!-- for a remote target=remote&xmlremote=... -->'."\n";
133 if ($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 }
143 print '<br><div class="center"><input type="submit" name="check" class="button" value="'.$langs->trans("Check").'"></div>';
144 print '</form>';
145 print '<br>';
146 print '<br>';
147 
148 if (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 }
172 if (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  $xml = simplexml_load_string($xmlfile, 'SimpleXMLElement', LIBXML_NOCDATA|LIBXML_NONET);
180  } else {
181  $errormsg = $langs->trans('XmlNotFound').': '.$xmlremote.' - '.$xmlarray['http_code'].(($xmlarray['http_code'] == 400 && $xmlarray['content']) ? ' '.$xmlarray['content'] : '').' '.$xmlarray['curl_error_no'].' '.$xmlarray['curl_error_msg'];
182  setEventMessages($errormsg, null, 'errors');
183  $error++;
184  }
185 }
186 
187 
188 if (empty($error) && !empty($xml)) {
189  $checksumconcat = array();
190  $file_list = array();
191  $out = '';
192 
193  // Forced constants
194  if (is_object($xml->dolibarr_constants[0])) {
195  $out .= load_fiche_titre($langs->trans("ForcedConstants"));
196 
197  $out .= '<div class="div-table-responsive-no-min">';
198  $out .= '<table class="noborder">';
199  $out .= '<tr class="liste_titre">';
200  $out .= '<td>#</td>';
201  $out .= '<td>'.$langs->trans("Constant").'</td>';
202  $out .= '<td class="center">'.$langs->trans("ExpectedValue").'</td>';
203  $out .= '<td class="center">'.$langs->trans("Value").'</td>';
204  $out .= '</tr>'."\n";
205 
206  $i = 0;
207  foreach ($xml->dolibarr_constants[0]->constant as $constant) { // $constant is a simpleXMLElement
208  $constname = $constant['name'];
209  $constvalue = (string) $constant;
210  $constvalue = (empty($constvalue) ? '0' : $constvalue);
211  // Value found
212  $value = '';
213  if ($constname && getDolGlobalString($constname) != '') {
214  $value = getDolGlobalString($constname);
215  }
216  $valueforchecksum = (empty($value) ? '0' : $value);
217 
218  $checksumconcat[] = $valueforchecksum;
219 
220  $i++;
221  $out .= '<tr class="oddeven">';
222  $out .= '<td>'.$i.'</td>'."\n";
223  $out .= '<td>'.dol_escape_htmltag($constname).'</td>'."\n";
224  $out .= '<td class="center">'.dol_escape_htmltag($constvalue).'</td>'."\n";
225  $out .= '<td class="center">'.dol_escape_htmltag($valueforchecksum).'</td>'."\n";
226  $out .= "</tr>\n";
227  }
228 
229  if ($i == 0) {
230  $out .= '<tr class="oddeven"><td colspan="4" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
231  }
232  $out .= '</table>';
233  $out .= '</div>';
234 
235  $out .= '<br>';
236  }
237 
238  // Scan htdocs
239  if (is_object($xml->dolibarr_htdocs_dir[0])) {
240  //var_dump($xml->dolibarr_htdocs_dir[0]['includecustom']);exit;
241  $includecustom = (empty($xml->dolibarr_htdocs_dir[0]['includecustom']) ? 0 : $xml->dolibarr_htdocs_dir[0]['includecustom']);
242 
243  // Define qualified files (must be same than into generate_filelist_xml.php and in api_setup.class.php)
244  $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)$';
245  $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
246  $scanfiles = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude);
247 
248  // Fill file_list with files in signature, new files, modified files
249  $ret = getFilesUpdated($file_list, $xml->dolibarr_htdocs_dir[0], '', DOL_DOCUMENT_ROOT, $checksumconcat); // Fill array $file_list
250  // Complete with list of new files
251  foreach ($scanfiles as $keyfile => $valfile) {
252  $tmprelativefilename = preg_replace('/^'.preg_quote(DOL_DOCUMENT_ROOT, '/').'/', '', $valfile['fullname']);
253  if (!in_array($tmprelativefilename, $file_list['insignature'])) {
254  $md5newfile = @md5_file($valfile['fullname']); // Can fails if we don't have permission to open/read file
255  $file_list['added'][] = array('filename'=>$tmprelativefilename, 'md5'=>$md5newfile);
256  }
257  }
258 
259  // Files missings
260  $out .= load_fiche_titre($langs->trans("FilesMissing"));
261 
262  $out .= '<div class="div-table-responsive-no-min">';
263  $out .= '<table class="noborder">';
264  $out .= '<tr class="liste_titre">';
265  $out .= '<td>#</td>';
266  $out .= '<td>'.$langs->trans("Filename").'</td>';
267  $out .= '<td class="right">'.$langs->trans("ExpectedSize").'</td>';
268  $out .= '<td class="center">'.$langs->trans("ExpectedChecksum").'</td>';
269  $out .= '</tr>'."\n";
270  $tmpfilelist = dol_sort_array($file_list['missing'], 'filename');
271  if (is_array($tmpfilelist) && count($tmpfilelist)) {
272  $i = 0;
273  foreach ($tmpfilelist as $file) {
274  $i++;
275  $out .= '<tr class="oddeven">';
276  $out .= '<td>'.$i.'</td>'."\n";
277  $out .= '<td>'.dol_escape_htmltag($file['filename']).'</td>'."\n";
278  $out .= '<td class="right">';
279  if (!empty($file['expectedsize'])) {
280  $out .= dol_print_size($file['expectedsize']);
281  }
282  $out .= '</td>'."\n";
283  $out .= '<td class="center">'.dol_escape_htmltag($file['expectedmd5']).'</td>'."\n";
284  $out .= "</tr>\n";
285  }
286  } else {
287  $out .= '<tr class="oddeven"><td colspan="4" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
288  }
289  $out .= '</table>';
290  $out .= '</div>';
291 
292  $out .= '<br>';
293 
294  // Files modified
295  $out .= load_fiche_titre($langs->trans("FilesModified"));
296 
297  $totalsize = 0;
298  $out .= '<div class="div-table-responsive-no-min">';
299  $out .= '<table class="noborder">';
300  $out .= '<tr class="liste_titre">';
301  $out .= '<td>#</td>';
302  $out .= '<td>'.$langs->trans("Filename").'</td>';
303  $out .= '<td class="center">'.$langs->trans("ExpectedChecksum").'</td>';
304  $out .= '<td class="center">'.$langs->trans("CurrentChecksum").'</td>';
305  $out .= '<td class="right">'.$langs->trans("ExpectedSize").'</td>';
306  $out .= '<td class="right">'.$langs->trans("CurrentSize").'</td>';
307  $out .= '<td class="right">'.$langs->trans("DateModification").'</td>';
308  $out .= '</tr>'."\n";
309  $tmpfilelist2 = dol_sort_array($file_list['updated'], 'filename');
310  if (is_array($tmpfilelist2) && count($tmpfilelist2)) {
311  $i = 0;
312  foreach ($tmpfilelist2 as $file) {
313  $i++;
314  $out .= '<tr class="oddeven">';
315  $out .= '<td>'.$i.'</td>'."\n";
316  $out .= '<td>'.dol_escape_htmltag($file['filename']).'</td>'."\n";
317  $out .= '<td class="center">'.dol_escape_htmltag($file['expectedmd5']).'</td>'."\n";
318  $out .= '<td class="center">'.dol_escape_htmltag($file['md5']).'</td>'."\n";
319  $out .= '<td class="right">';
320  if ($file['expectedsize']) {
321  $out .= dol_print_size($file['expectedsize']);
322  }
323  $out .= '</td>'."\n";
324  $size = dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename']);
325  $totalsize += $size;
326  $out .= '<td class="right">'.dol_print_size($size).'</td>'."\n";
327  $out .= '<td class="right">'.dol_print_date(dol_filemtime(DOL_DOCUMENT_ROOT.'/'.$file['filename']), 'dayhour').'</td>'."\n";
328  $out .= "</tr>\n";
329  }
330  $out .= '<tr class="liste_total">';
331  $out .= '<td></td>'."\n";
332  $out .= '<td>'.$langs->trans("Total").'</td>'."\n";
333  $out .= '<td class="center"></td>'."\n";
334  $out .= '<td class="center"></td>'."\n";
335  $out .= '<td class="center"></td>'."\n";
336  $out .= '<td class="right">'.dol_print_size($totalsize).'</td>'."\n";
337  $out .= '<td class="right"></td>'."\n";
338  $out .= "</tr>\n";
339  } else {
340  $out .= '<tr class="oddeven"><td colspan="7" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
341  }
342  $out .= '</table>';
343  $out .= '</div>';
344 
345  $out .= '<br>';
346 
347  // Files added
348  $out .= load_fiche_titre($langs->trans("FilesAdded"));
349 
350  $totalsize = 0;
351  $out .= '<div class="div-table-responsive-no-min">';
352  $out .= '<table class="noborder">';
353  $out .= '<tr class="liste_titre">';
354  $out .= '<td>#</td>';
355  $out .= '<td>'.$langs->trans("Filename").'</td>';
356  $out .= '<td class="center">'.$langs->trans("ExpectedChecksum").'</td>';
357  $out .= '<td class="center">'.$langs->trans("CurrentChecksum").'</td>';
358  $out .= '<td class="right">'.$langs->trans("Size").'</td>';
359  $out .= '<td class="right">'.$langs->trans("DateModification").'</td>';
360  $out .= '</tr>'."\n";
361  $tmpfilelist3 = dol_sort_array($file_list['added'], 'filename');
362  if (is_array($tmpfilelist3) && count($tmpfilelist3)) {
363  $i = 0;
364  foreach ($tmpfilelist3 as $file) {
365  $i++;
366  $out .= '<tr class="oddeven">';
367  $out .= '<td>'.$i.'</td>'."\n";
368  $out .= '<td>'.dol_escape_htmltag($file['filename']);
369  if (!preg_match('/^win/i', PHP_OS)) {
370  $htmltext = $langs->trans("YouCanDeleteFileOnServerWith", 'rm '.DOL_DOCUMENT_ROOT.$file['filename']); // The slash is included int file['filename']
371  $out .= ' '.$form->textwithpicto('', $htmltext, 1, 'help', '', 0, 2, 'helprm'.$i);
372  }
373  $out .= '</td>'."\n";
374  $out .= '<td class="center">'.dol_escape_htmltag($file['expectedmd5']).'</td>'."\n";
375  $out .= '<td class="center">'.dol_escape_htmltag($file['md5']).'</td>'."\n";
376  $size = dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename']);
377  $totalsize += $size;
378  $out .= '<td class="right">'.dol_print_size($size).'</td>'."\n";
379  $out .= '<td class="right">'.dol_print_date(dol_filemtime(DOL_DOCUMENT_ROOT.'/'.$file['filename']), 'dayhour').'</td>'."\n";
380  $out .= "</tr>\n";
381  }
382  $out .= '<tr class="liste_total">';
383  $out .= '<td></td>'."\n";
384  $out .= '<td>'.$langs->trans("Total").'</td>'."\n";
385  $out .= '<td class="center"></td>'."\n";
386  $out .= '<td class="center"></td>'."\n";
387  $out .= '<td class="right">'.dol_print_size($totalsize).'</td>'."\n";
388  $out .= '<td class="right"></td>'."\n";
389  $out .= "</tr>\n";
390  } else {
391  $out .= '<tr class="oddeven"><td colspan="6" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
392  }
393  $out .= '</table>';
394  $out .= '</div>';
395  } else {
396  print '<div class="error">';
397  print 'Error: Failed to found <b>dolibarr_htdocs_dir</b> into content of XML file:<br>'.dol_escape_htmltag(dol_trunc($xmlfile, 500));
398  print '</div><br>';
399  $error++;
400  }
401 
402 
403  // Scan scripts
404  /*
405  if (is_object($xml->dolibarr_script_dir[0]))
406  {
407  $file_list = array();
408  $ret = getFilesUpdated($file_list, $xml->dolibarr_htdocs_dir[0], '', ???, $checksumconcat); // Fill array $file_list
409  }*/
410 
411 
412  asort($checksumconcat); // Sort list of checksum
413  //var_dump($checksumconcat);
414  $checksumget = md5(join(',', $checksumconcat));
415  $checksumtoget = trim((string) $xml->dolibarr_htdocs_dir_checksum);
416 
417  //var_dump(count($file_list['added']));
418  //var_dump($checksumget);
419  //var_dump($checksumtoget);
420  //var_dump($checksumget == $checksumtoget);
421 
422  $resultcomment = '';
423 
424  $outexpectedchecksum = ($checksumtoget ? $checksumtoget : $langs->trans("Unknown"));
425  if ($checksumget == $checksumtoget) {
426  if (is_array($file_list['added']) && count($file_list['added'])) {
427  $resultcode = 'warning';
428  $resultcomment = 'FileIntegrityIsOkButFilesWereAdded';
429  $outcurrentchecksum = $checksumget.' - <span class="'.$resultcode.'">'.$langs->trans($resultcomment).'</span>';
430  } else {
431  $resultcode = 'ok';
432  $resultcomment = 'Success';
433  $outcurrentchecksum = '<span class="'.$resultcode.'">'.$checksumget.'</span>';
434  }
435  } else {
436  $resultcode = 'error';
437  $resultcomment = 'Error';
438  $outcurrentchecksum = '<span class="'.$resultcode.'">'.$checksumget.'</span>';
439  }
440 
441  // Show warning
442  if (empty($tmpfilelist) && empty($tmpfilelist2) && empty($tmpfilelist3) && $resultcode == 'ok') {
443  setEventMessages($langs->trans("FileIntegrityIsStrictlyConformedWithReference"), null, 'mesgs');
444  } else {
445  if ($resultcode == 'warning') {
446  setEventMessages($langs->trans($resultcomment), null, 'warnings');
447  } else {
448  setEventMessages($langs->trans("FileIntegritySomeFilesWereRemovedOrModified"), null, 'errors');
449  }
450  }
451 
452  print load_fiche_titre($langs->trans("GlobalChecksum"));
453  print $langs->trans("ExpectedChecksum").' = '.$outexpectedchecksum.'<br>';
454  print $langs->trans("CurrentChecksum").' = '.$outcurrentchecksum;
455 
456  print '<br>';
457  print '<br>';
458 
459  // Output detail
460  print $out;
461 }
462 
463 // End of page
464 llxFooter();
465 $db->close();
466 
467 exit($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:56
llxFooter()
Empty footer.
Definition: wrapper.php:70
getFilesUpdated(&$file_list, SimpleXMLElement $dir, $path='', $pathref='', &$checksumconcat=array())
Function to get list of updated or modified files.
Definition: files.lib.php:3255
dol_filemtime($pathoffile)
Return time of a file.
Definition: files.lib.php:597
dol_filesize($pathoffile)
Return size of a file.
Definition: files.lib.php:585
dol_uncompress($inputfile, $outputdir)
Uncompress a file.
Definition: files.lib.php:2183
dol_is_file($pathoffile)
Return if path is a file.
Definition: files.lib.php:481
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:61
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_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
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.
if(!function_exists('utf8_encode')) if(!function_exists('utf8_decode')) getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
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.
dol_mkdir($dir, $dataroot='', $newmask='')
Creation of a directory (this can create recursive subdir)
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).
Definition: geturl.lib.php:41
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.