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

View File

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

View File

@ -892,6 +892,8 @@ function getURLPath()
if (substr($path, 0, strlen($prefix)) == $prefix) { if (substr($path, 0, strlen($prefix)) == $prefix) {
$path = substr($path, strlen($prefix)); $path = substr($path, strlen($prefix));
} else {
$path = str_replace(DOCROOT, ROOTDIR, $path);
} }
return slashes($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('Numero intervento').'</b>: '.$id.'<br/>';
$tooltip_text .= '<b>'.tr('Ragione sociale').'</b>: '.nl2br($rs[0]['ragione_sociale']).'<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/>'; $tooltip_text .= '<b>'.tr('Telefono').'</b>: '.nl2br($rs[0]['telefono']).'<br/>';
} }

View File

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

View File

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

View File

@ -219,10 +219,14 @@ class Modules
$select .= $data['query'].(!empty($data['name']) ? " AS '".$data['name']."', " : ''); $select .= $data['query'].(!empty($data['name']) ? " AS '".$data['name']."', " : '');
if ($data['enabled']) { 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']); $fields[] = trim($data['name']);
$search_inside[] = !empty(trim($data['search_inside'])) ? trim($data['search_inside']) : trim($data['name']); $search_inside[] = !empty($data['search_inside']) ? $data['search_inside'] : $data['name'];
$order_by[] = !empty(trim($data['order_by'])) ? trim($data['order_by']) : trim($data['name']); $order_by[] = !empty($data['order_by']) ? $data['order_by'] : $data['name'];
$search[] = $data['search']; $search[] = $data['search'];
$slow[] = $data['slow']; $slow[] = $data['slow'];
$format[] = $data['format']; $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']; $settings['format'] = is_string($settings['format']) ? $settings['format'].($settings['orientation'] == 'L' ? '-L' : '') : $settings['format'];
// Instanziamento dell'oggetto mPDF // Instanziamento dell'oggetto mPDF
$mpdf = new mPDF( $mpdf = new \Mpdf\Mpdf([
'c', 'mode' => 'c',
$settings['format'], 'format' => $settings['format'],
$settings['font-size'], 'orientation' => $settings['orientation'],
'helvetica', 'font-size' => $settings['font-size'],
$settings['margins']['left'], 'margin_left' => $settings['margins']['left'],
$settings['margins']['right'], 'margin_right' => $settings['margins']['right'],
$settings['margins']['top'] + $settings['header-height'], 'margin_top' => $settings['margins']['top'] + $settings['header-height'],
$settings['margins']['bottom'] + $settings['footer-height'], 'margin_bottom' => $settings['margins']['bottom'] + $settings['footer-height'],
$settings['margins']['top'], 'margin_header' => $settings['margins']['top'],
$settings['margins']['bottom'], 'margin_footer' => $settings['margins']['bottom'],
$settings['orientation'] ]);
);
// Impostazione di header e footer // Impostazione di header e footer
$mpdf->SetHTMLFooter($foot); $mpdf->SetHTMLFooter($foot);