diff --git a/build/generate_filelist_xml.php b/build/generate_filelist_xml.php index d5af14f9171..8a3096ef72a 100755 --- a/build/generate_filelist_xml.php +++ b/build/generate_filelist_xml.php @@ -164,7 +164,7 @@ foreach ($files as $filetmp) { if (filetype($file)=="file") { $md5=md5_file($file); $checksumconcat[]=$md5; - fputs($fp, ' '.$md5.''."\n"); + fputs($fp, ' '.$md5.''."\n"); } } fputs($fp, ' '."\n"); @@ -207,7 +207,7 @@ foreach ($files as $filetmp) { if (filetype($file)=="file") { $md5=md5_file($file); $checksumconcat[]=$md5; - fputs($fp, ' '.$md5.''."\n"); + fputs($fp, ' '.$md5.''."\n"); } } fputs($fp, ' '."\n"); diff --git a/htdocs/admin/system/filecheck.php b/htdocs/admin/system/filecheck.php index 94864123220..fabc0fc9812 100644 --- a/htdocs/admin/system/filecheck.php +++ b/htdocs/admin/system/filecheck.php @@ -239,6 +239,7 @@ if (! $error && $xml) $out.=''; $out.='#'; $out.='' . $langs->trans("Filename") . ''; + $out.='' . $langs->trans("ExpectedSize") . ''; $out.='' . $langs->trans("ExpectedChecksum") . ''; $out.=''."\n"; $tmpfilelist = dol_sort_array($file_list['missing'], 'filename'); @@ -251,6 +252,9 @@ if (! $error && $xml) $out.=''; $out.=''.$i.'' . "\n"; $out.=''.$file['filename'].'' . "\n"; + $out.=''; + if (! empty($file['expectedsize'])) $out.=dol_print_size($file['expectedsize']); + $out.='' . "\n"; $out.=''.$file['expectedmd5'].'' . "\n"; $out.="\n"; } @@ -275,7 +279,8 @@ if (! $error && $xml) $out.='' . $langs->trans("Filename") . ''; $out.='' . $langs->trans("ExpectedChecksum") . ''; $out.='' . $langs->trans("CurrentChecksum") . ''; - $out.='' . $langs->trans("Size") . ''; + $out.='' . $langs->trans("ExpectedSize") . ''; + $out.='' . $langs->trans("CurrentSize") . ''; $out.='' . $langs->trans("DateModification") . ''; $out.=''."\n"; $tmpfilelist2 = dol_sort_array($file_list['updated'], 'filename'); @@ -290,6 +295,9 @@ if (! $error && $xml) $out.=''.$file['filename'].'' . "\n"; $out.=''.$file['expectedmd5'].'' . "\n"; $out.=''.$file['md5'].'' . "\n"; + $out.=''; + if ($file['expectedsize']) $out.=dol_print_size($file['expectedsize']); + $out.='' . "\n"; $size = dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename']); $totalsize += $size; $out.=''.dol_print_size($size).'' . "\n"; @@ -301,6 +309,7 @@ if (! $error && $xml) $out.=''.$langs->trans("Total").'' . "\n"; $out.='' . "\n"; $out.='' . "\n"; + $out.='' . "\n"; $out.=''.dol_print_size($totalsize).'' . "\n"; $out.='' . "\n"; $out.="\n"; diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 711e65edaaa..90c673e9e25 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -3072,13 +3072,14 @@ function getFilesUpdated(&$file_list, SimpleXMLElement $dir, $path = '', $pathre { $filename = $path.$file['name']; $file_list['insignature'][] = $filename; + $expectedsize = (empty($file['size']) ? '' : $file['size']); $expectedmd5 = (string) $file; //if (preg_match('#'.$exclude.'#', $filename)) continue; if (!file_exists($pathref.'/'.$filename)) { - $file_list['missing'][] = array('filename'=>$filename, 'expectedmd5'=>$expectedmd5); + $file_list['missing'][] = array('filename'=>$filename, 'expectedmd5'=>$expectedmd5, 'expectedsize'=>$expectedsize); } else { @@ -3090,7 +3091,7 @@ function getFilesUpdated(&$file_list, SimpleXMLElement $dir, $path = '', $pathre } else { - if ($md5_local != $expectedmd5) $file_list['updated'][] = array('filename'=>$filename, 'expectedmd5'=>$expectedmd5, 'md5'=>(string) $md5_local); + if ($md5_local != $expectedmd5) $file_list['updated'][] = array('filename'=>$filename, 'expectedmd5'=>$expectedmd5, 'expectedsize'=>$expectedsize, 'md5'=>(string) $md5_local); $checksumconcat[] = $md5_local; } } diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 8f052636ac9..ca1344cb88c 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1796,6 +1796,8 @@ FixTZ=TimeZone fix FillFixTZOnlyIfRequired=Example: +2 (fill only if problem experienced) ExpectedChecksum=Expected Checksum CurrentChecksum=Current Checksum +ExpectedSize=Expected size +CurrentSize=Current size ForcedConstants=Required constant values MailToSendProposal=Customer proposals MailToSendOrder=Sales orders diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 494d6b351b8..589067934d5 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -181,13 +181,13 @@ class Ticket extends CommonObject 'entity' => array('type'=>'integer', 'label'=>'Entity', 'visible'=>0, 'enabled'=>1, 'position'=>5, 'notnull'=>1, 'index'=>1), 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'visible'=>1, 'enabled'=>1, 'position'=>10, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", 'css'=>''), 'track_id' => array('type'=>'varchar(255)', 'label'=>'TicketTrackId', 'visible'=>-2, 'enabled'=>1, 'position'=>11, 'notnull'=>-1, 'searchall'=>1, 'help'=>"Help text"), - 'fk_user_create' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Author', 'visible'=>1, 'enabled'=>1, 'position'=>15, 'notnull'=>1, 'css'=>'nowraponall'), + 'fk_user_create' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Author', 'visible'=>1, 'enabled'=>1, 'position'=>15, 'notnull'=>1, 'css'=>'tdoverflowmax150 maxwidth150onsmartphone'), 'origin_email' => array('type'=>'mail', 'label'=>'OriginEmail', 'visible'=>-2, 'enabled'=>1, 'position'=>16, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object"), 'subject' => array('type'=>'varchar(255)', 'label'=>'Subject', 'visible'=>1, 'enabled'=>1, 'position'=>18, 'notnull'=>-1, 'searchall'=>1, 'help'=>"", 'css'=>'maxwidth75'), 'type_code' => array('type'=>'varchar(32)', 'label'=>'Type', 'visible'=>1, 'enabled'=>1, 'position'=>20, 'notnull'=>-1, 'searchall'=>1, 'help'=>"", 'css'=>'maxwidth100'), 'category_code' => array('type'=>'varchar(32)', 'label'=>'TicketGroup', 'visible'=>-1, 'enabled'=>1, 'position'=>21, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth100'), 'severity_code' => array('type'=>'varchar(32)', 'label'=>'Severity', 'visible'=>1, 'enabled'=>1, 'position'=>22, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth100'), - 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'visible'=>1, 'enabled'=>1, 'position'=>50, 'notnull'=>-1, 'index'=>1, 'searchall'=>1, 'help'=>"LinkToThirparty"), + 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'visible'=>1, 'enabled'=>1, 'position'=>50, 'notnull'=>-1, 'index'=>1, 'searchall'=>1, 'help'=>"LinkToThirparty", 'css'=>'tdoverflowmax150 maxwidth150onsmartphone'), 'notify_tiers_at_create' => array('type'=>'integer', 'label'=>'NotifyThirdparty', 'visible'=>-1, 'enabled'=>0, 'position'=>51, 'notnull'=>1, 'index'=>1), 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php', 'label'=>'Project', 'visible'=>-1, 'enabled'=>1, 'position'=>52, 'notnull'=>-1, 'index'=>1, 'help'=>"LinkToProject"), 'timing' => array('type'=>'varchar(20)', 'label'=>'Timing', 'visible'=>-1, 'enabled'=>1, 'position'=>42, 'notnull'=>-1, 'help'=>""), diff --git a/htdocs/ticket/list.php b/htdocs/ticket/list.php index 7c6f525a0c4..2d4fe3d146f 100644 --- a/htdocs/ticket/list.php +++ b/htdocs/ticket/list.php @@ -3,6 +3,7 @@ * Copyright (C) 2016 Christophe Battarel * Copyright (C) 2018 Regis Houssin * Copyright (C) 2019 Juanjo Menent + * Copyright (C) 2019 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by