Merge branch 'master' into 2.4

This commit is contained in:
Thomas Zilio 2018-01-02 17:04:57 +01:00
commit c01242f71b
9 changed files with 926 additions and 761 deletions

View File

@ -22,7 +22,7 @@
}],
"type": "project",
"require": {
"php": ">=5.4",
"php": ">=5.6",
"aluguest/ical-easy-reader": "^1.5",
"danielstjules/stringy": "^3.1",
"ezyang/htmlpurifier": "^4.8",
@ -30,15 +30,16 @@
"ifsnop/mysqldump-php": "^2.3",
"intervention/image": "^2.3",
"ircmaxell/password-compat": "^1.0",
"maximebf/debugbar": "^1.13",
"maximebf/debugbar": "^1.15",
"monolog/monolog": "^1.22",
"mpdf/mpdf": "^6.1",
"mpdf/mpdf": "^7.0",
"paragonie/random_compat": "^2.0",
"phpmailer/phpmailer": "^5.2",
"phpmailer/phpmailer": "^6.0",
"spipu/html2pdf": "^5.0",
"symfony/filesystem": "^3.3",
"symfony/finder": "^3.3",
"symfony/translation": "^3.3"
"symfony/translation": "^3.3",
"symfony/var-dumper": "^3.3"
},
"autoload": {
"psr-4": {

View File

@ -260,8 +260,7 @@ gulp.task('release', function () {
del([
'./vendor/tecnickcom/tcpdf/fonts/*',
'!./vendor/tecnickcom/tcpdf/fonts/*helvetica*',
'./vendor/mpdf/mpdf/iccprofiles/*',
'./vendor/mpdf/mpdf/qrcode/*',
'./vendor/mpdf/mpdf/tmp/*',
'./vendor/mpdf/mpdf/ttfonts/*',
'./vendor/maximebf/debugbar/src/DebugBar/Resources/vendor/*',
]);

View File

@ -892,6 +892,8 @@ function getURLPath()
if (substr($path, 0, strlen($prefix)) == $prefix) {
$path = substr($path, strlen($prefix));
} else {
$path = str_replace(DOCROOT, ROOTDIR, $path);
}
return slashes($path);

File diff suppressed because it is too large Load Diff

View File

@ -94,7 +94,7 @@ switch (get('op')) {
$tooltip_text = '<b>'.tr('Numero intervento').'</b>: '.$id.'<br/>';
$tooltip_text .= '<b>'.tr('Ragione sociale').'</b>: '.nl2br($rs[0]['ragione_sociale']).'<br/>';
if (!empty($rs[0]['telefono'] != '')) {
if (!empty($rs[0]['telefono'])) {
$tooltip_text .= '<b>'.tr('Telefono').'</b>: '.nl2br($rs[0]['telefono']).'<br/>';
}

View File

@ -423,7 +423,8 @@ if ($vista == 'mese') {
var calendar = $('#calendar').fullCalendar({
locale: globals.locale,
<?php
if (!empty(get_var('Visualizzare la domenica sul calendario'))) {
$domenica = get_var('Visualizzare la domenica sul calendario');
if (empty($domenica)) {
echo '
hiddenDays: [ 0 ],';
}
@ -438,7 +439,8 @@ if (!empty(get_var('Visualizzare la domenica sul calendario'))) {
slotDuration: '00:15:00',
defaultView: '<?php echo $def; ?>',
<?php
if (!empty(get_var('Abilitare orario lavorativo'))) {
$orario_lavorativo = get_var('Abilitare orario lavorativo');
if (!empty($orario_lavorativo)) {
echo "
minTime: '08:00:00',
maxTime: '20:00:00',";
@ -518,7 +520,6 @@ if (Modules::getPermission('Interventi') == 'rw') {
});
},
<?php
}
?>
eventAfterRender: function(event, element) {
@ -553,7 +554,6 @@ if (get_var('Utilizzare i tooltip sul calendario') == '1') {
}
});
<?php
}
?>
},

View File

@ -5,7 +5,7 @@
*
* @since 2.3
*/
class Mail extends PHPMailer
class Mail extends PHPMailer\PHPMailer\PHPMailer
{
/** @var array Elenco degli account email disponibili */
protected static $accounts = [];

View File

@ -219,10 +219,14 @@ class Modules
$select .= $data['query'].(!empty($data['name']) ? " AS '".$data['name']."', " : '');
if ($data['enabled']) {
$data['name'] = trim($data['name']);
$data['search_inside'] = trim($data['search_inside']);
$data['order_by'] = trim($data['order_by']);
$fields[] = trim($data['name']);
$search_inside[] = !empty(trim($data['search_inside'])) ? trim($data['search_inside']) : trim($data['name']);
$order_by[] = !empty(trim($data['order_by'])) ? trim($data['order_by']) : trim($data['name']);
$search_inside[] = !empty($data['search_inside']) ? $data['search_inside'] : $data['name'];
$order_by[] = !empty($data['order_by']) ? $data['order_by'] : $data['name'];
$search[] = $data['search'];
$slow[] = $data['slow'];
$format[] = $data['format'];

View File

@ -322,19 +322,18 @@ class Prints
$settings['format'] = is_string($settings['format']) ? $settings['format'].($settings['orientation'] == 'L' ? '-L' : '') : $settings['format'];
// Instanziamento dell'oggetto mPDF
$mpdf = new mPDF(
'c',
$settings['format'],
$settings['font-size'],
'helvetica',
$settings['margins']['left'],
$settings['margins']['right'],
$settings['margins']['top'] + $settings['header-height'],
$settings['margins']['bottom'] + $settings['footer-height'],
$settings['margins']['top'],
$settings['margins']['bottom'],
$settings['orientation']
);
$mpdf = new \Mpdf\Mpdf([
'mode' => 'c',
'format' => $settings['format'],
'orientation' => $settings['orientation'],
'font-size' => $settings['font-size'],
'margin_left' => $settings['margins']['left'],
'margin_right' => $settings['margins']['right'],
'margin_top' => $settings['margins']['top'] + $settings['header-height'],
'margin_bottom' => $settings['margins']['bottom'] + $settings['footer-height'],
'margin_header' => $settings['margins']['top'],
'margin_footer' => $settings['margins']['bottom'],
]);
// Impostazione di header e footer
$mpdf->SetHTMLFooter($foot);