From 5ecef88b35c44b429c4731c6fb6b8a14fd08ce26 Mon Sep 17 00:00:00 2001 From: ATM john Date: Sun, 23 Feb 2020 23:04:24 +0100 Subject: [PATCH 001/313] allow in extrafield conf to choose to add extrafield in a new col or append it to description, it could be useful for html or long text extrafields --- htdocs/core/actions_extrafields.inc.php | 4 +- .../core/class/commondocgenerator.class.php | 37 +++++++++++++++---- .../facture/doc/pdf_sponge.modules.php | 24 +++++++++++- htdocs/core/tpl/admin_extrafields_add.tpl.php | 2 +- .../core/tpl/admin_extrafields_edit.tpl.php | 2 +- .../core/tpl/admin_extrafields_view.tpl.php | 2 +- 6 files changed, 58 insertions(+), 13 deletions(-) diff --git a/htdocs/core/actions_extrafields.inc.php b/htdocs/core/actions_extrafields.inc.php index 486764b167e..b61c9209aa8 100644 --- a/htdocs/core/actions_extrafields.inc.php +++ b/htdocs/core/actions_extrafields.inc.php @@ -184,7 +184,7 @@ if ($action == 'add') GETPOST('langfile', 'alpha'), 1, (GETPOST('totalizable', 'alpha')?1:0), - (GETPOST('documentpdf', 'alpha')?1:0) + GETPOST('documentpdf', 'alpha') ); if ($result > 0) { @@ -354,7 +354,7 @@ if ($action == 'update') GETPOST('langfile'), 1, (GETPOST('totalizable', 'alpha')?1:0), - (GETPOST('documentpdf', 'alpha')?1:0) + GETPOST('documentpdf', 'alpha') ); if ($result > 0) { diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index eb214516a6f..753002a39ee 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -1074,7 +1074,7 @@ abstract class CommonDocGenerator /** * print standard column content * - * @param PDF $pdf pdf object + * @param TCPDF $pdf pdf object * @param float $curY curent Y position * @param string $colKey the column key * @param string $columnText column text @@ -1179,6 +1179,8 @@ abstract class CommonDocGenerator $defaultParams = array( 'style' => '', 'display' => 'auto', // auto, table, list + 'documentpdfEnable' => array(1), + 'documentpdfEnableNotEmpty' => array(2), 'table' => array( 'maxItemsInRow' => 2, @@ -1213,7 +1215,18 @@ abstract class CommonDocGenerator foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $label) { // Enable extrafield ? - $enabled = !empty($extrafields->attributes[$object->table_element]['documentpdf'][$key]); + $enabled = 0; + $disableOnEmpty = 0; + if(!empty($extrafields->attributes[$object->table_element]['documentpdf'][$key])) { + $documentpdf = intval($extrafields->attributes[$object->table_element]['documentpdf'][$key]); + if(in_array($documentpdf,$params['documentpdfEnable']) || in_array($documentpdf,$params['documentpdfEnableNotEmpty']) ) { + $enabled = 1; + } + + if (in_array($documentpdf,$params['documentpdfEnableNotEmpty'])) { + $disableOnEmpty = 1; + } + } if(empty($enabled)){ continue; @@ -1225,6 +1238,11 @@ abstract class CommonDocGenerator $field->label = $outputlangs->transnoentities($label); $field->type = $extrafields->attributes[$object->table_element]['type'][$key]; + // dont display if empty + if($disableOnEmpty && empty($field->content)) { + continue; + } + $fields[] = $field; } } @@ -1234,10 +1252,7 @@ abstract class CommonDocGenerator // Sort extrafields by rank uasort($fields, function ($a, $b) { return ($a->rank > $b->rank) ? -1 : 1; - } - ); - - + }); // define some HTML content with style $html.= ''; @@ -1425,8 +1440,16 @@ abstract class CommonDocGenerator } // Enable extrafield ? - $enabled = !empty($extrafields->attributes[$object->table_element]['documentpdf'][$key]); + $enabled = 0; + if(!empty($extrafields->attributes[$object->table_element]['documentpdf'][$key])) { + $documentpdf = intval($extrafields->attributes[$object->table_element]['documentpdf'][$key]); + if($documentpdf === 1 || $documentpdf === 2) { + $enabled = 1; + } + // Note : if $documentpdf === 3 or 4 so, it's displayed after line description not in cols + } + if (!$enabled){ continue; } // don't wast resourses if we don't need them... // Load language if required if (!empty($extrafields->attributes[$object->table_element]['langfile'][$key])) $outputlangs->load($extrafields->attributes[$object->table_element]['langfile'][$key]); diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index cd9327e25b9..90290caaf61 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -638,12 +638,34 @@ class pdf_sponge extends ModelePDFFactures { $pdf->startTransaction(); pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc); + $posYAfterDescription = $pdf->GetY(); + $params = array( + 'display' => 'list', + 'documentpdfEnable' => array(3), + 'documentpdfEnableNotEmpty' => array(4) + ); + $extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params); + if(!empty($extrafieldDesc)){ + $this->printStdColumnContent($pdf, $posYAfterDescription, 'desc', $extrafieldDesc); + } + $pageposafter = $pdf->getPage(); if ($pageposafter > $pageposbefore) // There is a pagebreak { $pdf->rollbackTransaction(true); $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc); + $posYAfterDescription = $pdf->GetY(); + $params = array( + 'display' => 'list', + 'documentpdfEnable' => array(3), + 'documentpdfEnableNotEmpty' => array(4) + ); + $extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params); + if(!empty($extrafieldDesc)){ + $this->printStdColumnContent($pdf, $posYAfterDescription, 'desc', $extrafieldDesc); + } + $pageposafter = $pdf->getPage(); $posyafter = $pdf->GetY(); //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; @@ -673,7 +695,7 @@ class pdf_sponge extends ModelePDFFactures $posYAfterDescription = $pdf->GetY(); } - $nexY = $pdf->GetY(); + $nexY = $pdf->GetY(); $pageposafter = $pdf->getPage(); $pdf->setPage($pageposbefore); $pdf->setTopMargin($this->marge_haute); diff --git a/htdocs/core/tpl/admin_extrafields_add.tpl.php b/htdocs/core/tpl/admin_extrafields_add.tpl.php index 37872f2a5c0..a31b83309af 100644 --- a/htdocs/core/tpl/admin_extrafields_add.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_add.tpl.php @@ -198,7 +198,7 @@ $langs->load("modulebuilder"); textwithpicto($langs->trans("DisplayOnPdf"), $langs->trans("DisplayOnPdfDesc")); ?> -> + trans("Totalizable"); ?>> diff --git a/htdocs/core/tpl/admin_extrafields_edit.tpl.php b/htdocs/core/tpl/admin_extrafields_edit.tpl.php index 8e14ad978ca..f92bdd1ada6 100644 --- a/htdocs/core/tpl/admin_extrafields_edit.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_edit.tpl.php @@ -267,7 +267,7 @@ else textwithpicto($langs->trans("DisplayOnPdf"), $langs->trans("DisplayOnPdfDesc")); ?> -> + textwithpicto($langs->trans("Totalizable"), $langs->trans("TotalizableDesc")); ?>> textwithpicto($langs->trans("HelpOnTooltip"), $langs->trans("HelpOnTooltipDesc")); ?> diff --git a/htdocs/core/tpl/admin_extrafields_view.tpl.php b/htdocs/core/tpl/admin_extrafields_view.tpl.php index 3bec8cb8d6f..6ed1480a0ea 100644 --- a/htdocs/core/tpl/admin_extrafields_view.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_view.tpl.php @@ -93,7 +93,7 @@ if (is_array($extrafields->attributes[$elementtype]['type']) && count($extrafiel print ''.yn($extrafields->attributes[$elementtype]['required'][$key])."\n"; print ''.yn($extrafields->attributes[$elementtype]['alwayseditable'][$key])."\n"; print ''.$extrafields->attributes[$elementtype]['list'][$key]."\n"; - print ''.yn($extrafields->attributes[$elementtype]['documentpdf'][$key])."\n"; + print ''.$extrafields->attributes[$elementtype]['documentpdf'][$key]."\n"; print ''.yn($extrafields->attributes[$elementtype]['totalizable'][$key])."\n"; if (! empty($conf->multicompany->enabled)) { print ''; From 316fa4068aecb20fe11b0e10d77095edd3993f8d Mon Sep 17 00:00:00 2001 From: ATM john Date: Sun, 23 Feb 2020 23:14:01 +0100 Subject: [PATCH 002/313] revert commit fdfc45bbe978afa2e7c460749304e6fa30282c2f and fix y position --- htdocs/core/class/commondocgenerator.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 753002a39ee..c0656758789 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -1094,9 +1094,9 @@ abstract class CommonDocGenerator if (!$reshook) { if (empty($columnText)) return; - $pdf->SetXY($this->getColumnContentXStart($colKey) - 1, $curY); // Set curent position + $pdf->SetXY($this->getColumnContentXStart($colKey), $curY); // Set curent position $colDef = $this->cols[$colKey]; - $pdf->writeHTMLCell($this->getColumnContentWidth($colKey) + 2, 2, $this->getColumnContentXStart($colKey) - 1, $curY, $columnText, 0, 0, 0, true, $colDef['content']['align']); + $pdf->writeHTMLCell($this->getColumnContentWidth($colKey), 2, $this->getColumnContentXStart($colKey), $curY, $columnText, 0, 1, 0, true, $colDef['content']['align']); } } From acacbfd85e8651d396db7b07e5c59f0cf643dbd6 Mon Sep 17 00:00:00 2001 From: ATM john Date: Sun, 23 Feb 2020 23:17:10 +0100 Subject: [PATCH 003/313] Fix list separator on first loop --- htdocs/core/class/commondocgenerator.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index c0656758789..e54527c0173 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -1255,7 +1255,7 @@ abstract class CommonDocGenerator }); // define some HTML content with style - $html.= ''; + $html.= !empty($params['style'])?'':''; // auto select display format if($params['display'] == 'auto') { @@ -1270,10 +1270,12 @@ abstract class CommonDocGenerator if($params['display'] == 'list') { // Display in list format + $i=0; foreach ($fields as $field) { - $html .= !empty($html)?$params['list']['separator']:''; + $html .= !empty($i)?$params['list']['separator']:''; $html .= '' . $field->label . ' : '; $html .= $field->content; + $i++; } } elseif($params['display'] == 'table') { From 33f3083f7039752e4de21840300c0d69cbd3a73a Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 23 Feb 2020 22:26:27 +0000 Subject: [PATCH 004/313] Fixing style errors. --- htdocs/core/class/commondocgenerator.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index e54527c0173..80e5ec53181 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -1219,11 +1219,11 @@ abstract class CommonDocGenerator $disableOnEmpty = 0; if(!empty($extrafields->attributes[$object->table_element]['documentpdf'][$key])) { $documentpdf = intval($extrafields->attributes[$object->table_element]['documentpdf'][$key]); - if(in_array($documentpdf,$params['documentpdfEnable']) || in_array($documentpdf,$params['documentpdfEnableNotEmpty']) ) { + if(in_array($documentpdf, $params['documentpdfEnable']) || in_array($documentpdf, $params['documentpdfEnableNotEmpty']) ) { $enabled = 1; } - if (in_array($documentpdf,$params['documentpdfEnableNotEmpty'])) { + if (in_array($documentpdf, $params['documentpdfEnableNotEmpty'])) { $disableOnEmpty = 1; } } From fab34d5114b04096d995cb9b7be48850ab6537a4 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 23 Feb 2020 22:40:41 +0000 Subject: [PATCH 005/313] Fixing style errors. --- htdocs/core/class/commondocgenerator.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index d53cb5ebc69..7fa97349f01 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -1219,11 +1219,11 @@ abstract class CommonDocGenerator $disableOnEmpty = 0; if(!empty($extrafields->attributes[$object->table_element]['printable'][$key])) { $printable = intval($extrafields->attributes[$object->table_element]['printable'][$key]); - if(in_array($printable,$params['printableEnable']) || in_array($printable,$params['printableEnableNotEmpty']) ) { + if(in_array($printable, $params['printableEnable']) || in_array($printable, $params['printableEnableNotEmpty']) ) { $enabled = 1; } - if (in_array($printable,$params['printableEnableNotEmpty'])) { + if (in_array($printable, $params['printableEnableNotEmpty'])) { $disableOnEmpty = 1; } } From 377b9a6b88d1f2c18c1038abf053f7af8fa643ed Mon Sep 17 00:00:00 2001 From: ATM john Date: Mon, 24 Feb 2020 00:14:43 +0100 Subject: [PATCH 006/313] Add extrafields on PDF object lines desc for compatible pdf --- .../commande/doc/pdf_eratosthene.modules.php | 15 ++++++++++- .../expedition/doc/pdf_espadon.modules.php | 27 ++++++++++++++++++- .../facture/doc/pdf_sponge.modules.php | 11 +++++--- .../modules/propale/doc/pdf_cyan.modules.php | 25 +++++++++++++++++ .../supplier_order/doc/pdf_cornas.modules.php | 26 ++++++++++++++++++ 5 files changed, 98 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index fc1d737a7d5..18945fc6c43 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -604,7 +604,20 @@ class pdf_eratosthene extends ModelePDFCommandes { $pdf->startTransaction(); pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc); - $pageposafter = $pdf->getPage(); + $posYAfterDescription = $pdf->GetY(); + + // Display extrafield if needed + $params = array( + 'display' => 'list', + 'printableEnable' => array(3), + 'printableEnableNotEmpty' => array(4) + ); + $extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params); + if(!empty($extrafieldDesc)){ + $this->printStdColumnContent($pdf, $posYAfterDescription, 'desc', $extrafieldDesc); + } + + $pageposafter = $pdf->getPage(); if ($pageposafter > $pageposbefore) // There is a pagebreak { $pdf->rollbackTransaction(true); diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php index 0ef7acc7bef..29dee279924 100644 --- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php @@ -474,7 +474,20 @@ class pdf_espadon extends ModelePdfExpedition { $pdf->startTransaction(); pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc); - $pageposafter = $pdf->getPage(); + $posYAfterDescription = $pdf->GetY(); + + // Display extrafield if needed + $params = array( + 'display' => 'list', + 'printableEnable' => array(3), + 'printableEnableNotEmpty' => array(4) + ); + $extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params); + if(!empty($extrafieldDesc)){ + $this->printStdColumnContent($pdf, $posYAfterDescription, 'desc', $extrafieldDesc); + } + + $pageposafter = $pdf->getPage(); if ($pageposafter > $pageposbefore) // There is a pagebreak { $pdf->rollbackTransaction(true); @@ -482,6 +495,18 @@ class pdf_espadon extends ModelePdfExpedition //print $pageposafter.'-'.$pageposbefore;exit; $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc); + $posYAfterDescription = $pdf->GetY(); + + // Display extrafield if needed + $params = array( + 'display' => 'list', + 'printableEnable' => array(3), + 'printableEnableNotEmpty' => array(4) + ); + $extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params); + if(!empty($extrafieldDesc)){ + $this->printStdColumnContent($pdf, $posYAfterDescription, 'desc', $extrafieldDesc); + } $pageposafter = $pdf->getPage(); $posyafter = $pdf->GetY(); diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 90290caaf61..c4e0ef792ac 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -639,10 +639,13 @@ class pdf_sponge extends ModelePDFFactures $pdf->startTransaction(); pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc); $posYAfterDescription = $pdf->GetY(); + + // Display extrafield if needed + $params = array( 'display' => 'list', - 'documentpdfEnable' => array(3), - 'documentpdfEnableNotEmpty' => array(4) + 'printableEnable' => array(3), + 'printableEnableNotEmpty' => array(4) ); $extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params); if(!empty($extrafieldDesc)){ @@ -658,8 +661,8 @@ class pdf_sponge extends ModelePDFFactures $posYAfterDescription = $pdf->GetY(); $params = array( 'display' => 'list', - 'documentpdfEnable' => array(3), - 'documentpdfEnableNotEmpty' => array(4) + 'printableEnable' => array(3), + 'printableEnableNotEmpty' => array(4) ); $extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params); if(!empty($extrafieldDesc)){ diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index 702202be988..f55fd370132 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -622,6 +622,19 @@ class pdf_cyan extends ModelePDFPropales { $pdf->startTransaction(); pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc); + $posYAfterDescription = $pdf->GetY(); + + // Display extrafield if needed + $params = array( + 'display' => 'list', + 'printableEnable' => array(3), + 'printableEnableNotEmpty' => array(4) + ); + $extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params); + if(!empty($extrafieldDesc)){ + $this->printStdColumnContent($pdf, $posYAfterDescription, 'desc', $extrafieldDesc); + } + $pageposafter = $pdf->getPage(); if ($pageposafter > $pageposbefore) // There is a pagebreak { @@ -630,6 +643,18 @@ class pdf_cyan extends ModelePDFPropales //print $pageposafter.'-'.$pageposbefore;exit; $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc); + $posYAfterDescription = $pdf->GetY(); + + // Display extrafield if needed + $params = array( + 'display' => 'list', + 'printableEnable' => array(3), + 'printableEnableNotEmpty' => array(4) + ); + $extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params); + if(!empty($extrafieldDesc)){ + $this->printStdColumnContent($pdf, $posYAfterDescription, 'desc', $extrafieldDesc); + } $pageposafter = $pdf->getPage(); $posyafter = $pdf->GetY(); diff --git a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php index 92bc5219688..24ad06fee38 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php @@ -556,6 +556,19 @@ class pdf_cornas extends ModelePDFSuppliersOrders { $pdf->startTransaction(); pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc); + $posYAfterDescription = $pdf->GetY(); + + // Display extrafield if needed + $params = array( + 'display' => 'list', + 'printableEnable' => array(3), + 'printableEnableNotEmpty' => array(4) + ); + $extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params); + if(!empty($extrafieldDesc)){ + $this->printStdColumnContent($pdf, $posYAfterDescription, 'desc', $extrafieldDesc); + } + $pageposafter = $pdf->getPage(); if ($pageposafter > $pageposbefore) // There is a pagebreak { @@ -564,6 +577,19 @@ class pdf_cornas extends ModelePDFSuppliersOrders //print $pageposafter.'-'.$pageposbefore;exit; $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc); + $posYAfterDescription = $pdf->GetY(); + + // Display extrafield if needed + $params = array( + 'display' => 'list', + 'printableEnable' => array(3), + 'printableEnableNotEmpty' => array(4) + ); + $extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params); + if(!empty($extrafieldDesc)){ + $this->printStdColumnContent($pdf, $posYAfterDescription, 'desc', $extrafieldDesc); + } + $pageposafter = $pdf->getPage(); $posyafter = $pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) // There is no space left for total+free text From 98407347e77b35c34282c5a62807580bf1836766 Mon Sep 17 00:00:00 2001 From: John Botella Date: Mon, 24 Feb 2020 13:44:26 +0100 Subject: [PATCH 007/313] Update extrafield printable desc --- htdocs/langs/en_US/modulebuilder.lang | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_US/modulebuilder.lang b/htdocs/langs/en_US/modulebuilder.lang index 9f64e93f9d1..9dd6e9c9b30 100644 --- a/htdocs/langs/en_US/modulebuilder.lang +++ b/htdocs/langs/en_US/modulebuilder.lang @@ -84,7 +84,7 @@ ListOfPermissionsDefined=List of defined permissions SeeExamples=See examples here EnabledDesc=Condition to have this field active (Examples: 1 or $conf->global->MYMODULE_MYOPTION) VisibleDesc=Is the field visible ? (Examples: 0=Never visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create), 5=Visible on list end view form only (not create, not update). Using a negative value means field is not shown by default on list but can be selected for viewing). It can be an expression, for example:
preg_match('/public/', $_SERVER['PHP_SELF'])?0:1
($user->rights->holiday->define_holiday ? 1 : 0) -DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.
Currently, known compatibles PDF models are : eratostene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order) +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.
Currently, known compatibles PDF models are : eratostene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)

For document :
0 = not displayed
1 = display
2 = display only if not empty

For document lines :
0 = not displayed
1 = displayed in a column
3 = display in line description column after the description
4 = display in description column after the description only if not empty DisplayOnPdf=Display on PDF IsAMeasureDesc=Can the value of field be cumulated to get a total into list? (Examples: 1 or 0) SearchAllDesc=Is the field used to make a search from the quick search tool? (Examples: 1 or 0) @@ -138,4 +138,4 @@ NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:
varchar(99), double(24,8), real, text, html, datetime, timestamp, integer, integer:ClassName:relativepath/to/classfile.class.php[:1[:filter]] ('1' means we add a + button after the combo to create the record, 'filter' can be 'status=1 AND fk_user = __USER_ID AND entity IN (__SHARED_ENTITIES__)' for example) AsciiToHtmlConverter=Ascii to HTML converter -AsciiToPdfConverter=Ascii to PDF converter \ No newline at end of file +AsciiToPdfConverter=Ascii to PDF converter From 06b2d459c03ea622e4e71d8ce353f3f12a4d276e Mon Sep 17 00:00:00 2001 From: John Botella Date: Mon, 24 Feb 2020 14:18:49 +0100 Subject: [PATCH 008/313] Fix cell padding --- htdocs/core/class/commondocgenerator.class.php | 4 ++++ htdocs/core/modules/facture/doc/pdf_sponge.modules.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 7fa97349f01..9e78672f0bd 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -1096,7 +1096,11 @@ abstract class CommonDocGenerator if (empty($columnText)) return; $pdf->SetXY($this->getColumnContentXStart($colKey), $curY); // Set curent position $colDef = $this->cols[$colKey]; + $curentCellPaddinds = $pdf->getCellPaddings(); + $pdf->setCellPadding(0); $pdf->writeHTMLCell($this->getColumnContentWidth($colKey), 2, $this->getColumnContentXStart($colKey), $curY, $columnText, 0, 1, 0, true, $colDef['content']['align']); + $curentCellPaddinds = $pdf->getCellPaddings(); + $pdf->setCellPaddings( $curentCellPaddinds['L'], $curentCellPaddinds['T'], $curentCellPaddinds['R'], $curentCellPaddinds['B']); } } diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index c4e0ef792ac..68101161ce1 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -2242,7 +2242,7 @@ class pdf_sponge extends ModelePDFFactures // Default field style for content $this->defaultContentsFieldsStyle = array( 'align' => 'R', // R,C,L - 'padding' => array(0.5, 0.5, 0.5, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + 'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ); // Default field style for content From d07e2ab8fba5e825686107196d3eaa28cc9eaeda Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Mon, 24 Feb 2020 16:44:46 +0000 Subject: [PATCH 009/313] Fixing style errors. --- htdocs/core/class/commondocgenerator.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 9e78672f0bd..6ba5d446ecf 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -1100,7 +1100,7 @@ abstract class CommonDocGenerator $pdf->setCellPadding(0); $pdf->writeHTMLCell($this->getColumnContentWidth($colKey), 2, $this->getColumnContentXStart($colKey), $curY, $columnText, 0, 1, 0, true, $colDef['content']['align']); $curentCellPaddinds = $pdf->getCellPaddings(); - $pdf->setCellPaddings( $curentCellPaddinds['L'], $curentCellPaddinds['T'], $curentCellPaddinds['R'], $curentCellPaddinds['B']); + $pdf->setCellPaddings($curentCellPaddinds['L'], $curentCellPaddinds['T'], $curentCellPaddinds['R'], $curentCellPaddinds['B']); } } From 1ca1f0677b51c9a72387daed2dfc200e9215ea8c Mon Sep 17 00:00:00 2001 From: John Botella Date: Mon, 24 Feb 2020 17:48:01 +0100 Subject: [PATCH 010/313] fix PDF cell padding --- htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php | 4 ++-- htdocs/core/modules/expedition/doc/pdf_espadon.modules.php | 4 ++-- htdocs/core/modules/facture/doc/pdf_sponge.modules.php | 2 +- htdocs/core/modules/propale/doc/pdf_cyan.modules.php | 4 ++-- htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 18945fc6c43..69bb0be2529 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -1704,7 +1704,7 @@ class pdf_eratosthene extends ModelePDFCommandes // Default field style for content $this->defaultContentsFieldsStyle = array( 'align' => 'R', // R,C,L - 'padding' => array(0.5, 0.5, 0.5, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + 'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ); // Default field style for content @@ -1741,7 +1741,7 @@ class pdf_eratosthene extends ModelePDFCommandes 'align' => 'L', // 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label // 'label' => ' ', // the final label - 'padding' => array(0.5, 0.5, 0.5, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + 'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ), 'content' => array( 'align' => 'L', diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php index 29dee279924..7843eb6e087 100644 --- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php @@ -1146,7 +1146,7 @@ class pdf_espadon extends ModelePdfExpedition // Default field style for content $this->defaultContentsFieldsStyle = array( 'align' => 'R', // R,C,L - 'padding' => array(0.5, 0.5, 0.5, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + 'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ); // Default field style for content @@ -1183,7 +1183,7 @@ class pdf_espadon extends ModelePdfExpedition 'align' => 'L', // 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label // 'label' => ' ', // the final label - 'padding' => array(0.5, 0.5, 0.5, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + 'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ), 'content' => array( 'align' => 'L', diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 68101161ce1..3c914dbd478 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -2279,7 +2279,7 @@ class pdf_sponge extends ModelePDFFactures 'align' => 'L', // 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label // 'label' => ' ', // the final label - 'padding' => array(0.5, 0.5, 0.5, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + 'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ), 'content' => array( 'align' => 'L', diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index f55fd370132..aaa64b266de 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -1865,7 +1865,7 @@ class pdf_cyan extends ModelePDFPropales // Default field style for content $this->defaultContentsFieldsStyle = array( 'align' => 'R', // R,C,L - 'padding' => array(0.5, 0.5, 0.5, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + 'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ); // Default field style for content @@ -1902,7 +1902,7 @@ class pdf_cyan extends ModelePDFPropales 'align' => 'L', // 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label // 'label' => ' ', // the final label - 'padding' => array(0.5, 0.5, 0.5, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + 'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ), 'content' => array( 'align' => 'L', diff --git a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php index 24ad06fee38..e454e29835c 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php @@ -1509,7 +1509,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Default field style for content $this->defaultContentsFieldsStyle = array( 'align' => 'R', // R,C,L - 'padding' => array(0.5, 0.5, 0.5, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + 'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ); // Default field style for content @@ -1546,7 +1546,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders 'align' => 'L', // 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label // 'label' => ' ', // the final label - 'padding' => array(0.5, 0.5, 0.5, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + 'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ), 'content' => array( 'align' => 'L', From 3c4e7f7b07825a6fedd7299374f2119a460c1eb0 Mon Sep 17 00:00:00 2001 From: ATM john Date: Mon, 24 Feb 2020 20:47:19 +0100 Subject: [PATCH 011/313] Fix cell padding sponge --- .../core/class/commondocgenerator.class.php | 50 +++++++++++++++++-- .../facture/doc/pdf_sponge.modules.php | 41 ++++----------- 2 files changed, 56 insertions(+), 35 deletions(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 6ba5d446ecf..048c70e7f68 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -1096,14 +1096,58 @@ abstract class CommonDocGenerator if (empty($columnText)) return; $pdf->SetXY($this->getColumnContentXStart($colKey), $curY); // Set curent position $colDef = $this->cols[$colKey]; + // save curent cell padding $curentCellPaddinds = $pdf->getCellPaddings(); - $pdf->setCellPadding(0); - $pdf->writeHTMLCell($this->getColumnContentWidth($colKey), 2, $this->getColumnContentXStart($colKey), $curY, $columnText, 0, 1, 0, true, $colDef['content']['align']); - $curentCellPaddinds = $pdf->getCellPaddings(); + // set cell padding with column content definition + $pdf->setCellPaddings($colDef['content']['padding'][3], $colDef['content']['padding'][0], $colDef['content']['padding'][1], $colDef['content']['padding'][2]); + $pdf->writeHTMLCell($colDef['width'], 2, $colDef['xStartPos'], $curY, $columnText, 0, 1, 0, true, $colDef['content']['align']); + + // restore cell padding $pdf->setCellPaddings($curentCellPaddinds['L'], $curentCellPaddinds['T'], $curentCellPaddinds['R'], $curentCellPaddinds['B']); } } + + /** + * print standard column content + * + * @param TCPDF $pdf pdf object + * @param object $object CommonObject + * @param string $colKey the column key + * @param $i + * @param $outputlangs + * @param float $curY curent Y position + * @param $hideref + * @param $hidedesc + * @param $issupplierline + */ + function printColDescContent($pdf, &$curY, $colKey, $object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, $issupplierline = 0){ + // load desc col params + $colDef = $this->cols[$colKey]; + // save curent cell padding + $curentCellPaddinds = $pdf->getCellPaddings(); + // set cell padding with column content definition + $pdf->setCellPaddings($colDef['content']['padding'][3], $colDef['content']['padding'][0], $colDef['content']['padding'][1], $colDef['content']['padding'][2]); + + // line description + pdf_writelinedesc($pdf, $object, $i, $outputlangs, $colDef['width'], 3, $colDef['xStartPos'], $curY, $hideref, $hidedesc, $issupplierline); + $posYAfterDescription = $pdf->GetY() - $colDef['content']['padding'][0]; + + // restore cell padding + $pdf->setCellPaddings($curentCellPaddinds['L'], $curentCellPaddinds['T'], $curentCellPaddinds['R'], $curentCellPaddinds['B']); + + // Display extrafield if needed + $params = array( + 'display' => 'list', + 'printableEnable' => array(3), + 'printableEnableNotEmpty' => array(4) + ); + $extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params); + if(!empty($extrafieldDesc)){ + $this->printStdColumnContent($pdf, $posYAfterDescription, $colKey, $extrafieldDesc); + } + } + /** * get extrafield content for pdf writeHtmlCell compatibility * usage for PDF line columns and object note block diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 3c914dbd478..224f3522382 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -584,7 +584,7 @@ class pdf_sponge extends ModelePDFFactures $iniY = $tab_top + $this->tabTitleHeight + 2; $curY = $tab_top + $this->tabTitleHeight + 2; - $nexY = $tab_top + $this->tabTitleHeight + 2; + $nexY = $tab_top + $this->tabTitleHeight + 0; // Loop on each lines $pageposbeforeprintlines = $pdf->getPage(); @@ -637,37 +637,15 @@ class pdf_sponge extends ModelePDFFactures if ($this->getColumnStatus('desc')) { $pdf->startTransaction(); - pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc); - $posYAfterDescription = $pdf->GetY(); - - // Display extrafield if needed - - $params = array( - 'display' => 'list', - 'printableEnable' => array(3), - 'printableEnableNotEmpty' => array(4) - ); - $extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params); - if(!empty($extrafieldDesc)){ - $this->printStdColumnContent($pdf, $posYAfterDescription, 'desc', $extrafieldDesc); - } + $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); if ($pageposafter > $pageposbefore) // There is a pagebreak { $pdf->rollbackTransaction(true); $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. - pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc); - $posYAfterDescription = $pdf->GetY(); - $params = array( - 'display' => 'list', - 'printableEnable' => array(3), - 'printableEnableNotEmpty' => array(4) - ); - $extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params); - if(!empty($extrafieldDesc)){ - $this->printStdColumnContent($pdf, $posYAfterDescription, 'desc', $extrafieldDesc); - } + + $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); $posyafter = $pdf->GetY(); @@ -695,7 +673,6 @@ class pdf_sponge extends ModelePDFFactures { $pdf->commitTransaction(); } - $posYAfterDescription = $pdf->GetY(); } $nexY = $pdf->GetY(); @@ -848,12 +825,10 @@ class pdf_sponge extends ModelePDFFactures $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80))); //$pdf->SetDrawColor(190,190,200); - $pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1); + $pdf->line($this->marge_gauche, $nexY, $this->page_largeur - $this->marge_droite, $nexY); $pdf->SetLineStyle(array('dash'=>0)); } - $nexY += 2; // Add space between lines - // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) { $pdf->setPage($pagenb); @@ -2242,7 +2217,7 @@ class pdf_sponge extends ModelePDFFactures // Default field style for content $this->defaultContentsFieldsStyle = array( 'align' => 'R', // R,C,L - 'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + 'padding' => array(1, 0.5, 1, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ); // Default field style for content @@ -2279,10 +2254,11 @@ class pdf_sponge extends ModelePDFFactures 'align' => 'L', // 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label // 'label' => ' ', // the final label - 'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + 'padding' => array(0.5, 0.5, 0.5, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ), 'content' => array( 'align' => 'L', + 'padding' => array(1, 0.5, 1, 1.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ), ); @@ -2429,4 +2405,5 @@ class pdf_sponge extends ModelePDFFactures $this->cols = $hookmanager->resArray; } } + } From 6de74e774ec0d4af6ae43e2812448941553f2d6f Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Mon, 24 Feb 2020 19:50:07 +0000 Subject: [PATCH 012/313] Fixing style errors. --- htdocs/core/class/commondocgenerator.class.php | 3 ++- htdocs/core/modules/facture/doc/pdf_sponge.modules.php | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 048c70e7f68..886e0a6df26 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -1121,7 +1121,8 @@ abstract class CommonDocGenerator * @param $hidedesc * @param $issupplierline */ - function printColDescContent($pdf, &$curY, $colKey, $object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, $issupplierline = 0){ + function printColDescContent($pdf, &$curY, $colKey, $object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, $issupplierline = 0) + { // load desc col params $colDef = $this->cols[$colKey]; // save curent cell padding diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 224f3522382..b47fc724c63 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -2405,5 +2405,4 @@ class pdf_sponge extends ModelePDFFactures $this->cols = $hookmanager->resArray; } } - } From 7f2dd19bb07621f975d60b108d4d3a5096f24470 Mon Sep 17 00:00:00 2001 From: ATM john Date: Mon, 24 Feb 2020 21:43:33 +0100 Subject: [PATCH 013/313] Fix pdf cell padding for model cyan, erathosthene, espadon, cornas --- .../core/class/commondocgenerator.class.php | 7 +-- .../commande/doc/pdf_eratosthene.modules.php | 32 ++++--------- .../expedition/doc/pdf_espadon.modules.php | 44 +++--------------- .../facture/doc/pdf_sponge.modules.php | 6 +-- .../modules/propale/doc/pdf_cyan.modules.php | 46 +++++-------------- .../supplier_order/doc/pdf_cornas.modules.php | 43 +++-------------- 6 files changed, 39 insertions(+), 139 deletions(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 886e0a6df26..d1334a5cf03 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -1112,16 +1112,17 @@ abstract class CommonDocGenerator * print standard column content * * @param TCPDF $pdf pdf object - * @param object $object CommonObject + * @param float $curY curent Y position * @param string $colKey the column key + * @param object $object CommonObject * @param $i * @param $outputlangs - * @param float $curY curent Y position * @param $hideref * @param $hidedesc * @param $issupplierline + * @return null */ - function printColDescContent($pdf, &$curY, $colKey, $object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, $issupplierline = 0) + public function printColDescContent($pdf, &$curY, $colKey, $object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, $issupplierline = 0) { // load desc col params $colDef = $this->cols[$colKey]; diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 69bb0be2529..e83e164d076 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -546,9 +546,7 @@ class pdf_eratosthene extends ModelePDFCommandes $this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop); $pdf->rollbackTransaction(true); - $iniY = $tab_top + $this->tabTitleHeight + 2; - $curY = $tab_top + $this->tabTitleHeight + 2; - $nexY = $tab_top + $this->tabTitleHeight + 2; + $nexY = $tab_top + $this->tabTitleHeight; // Loop on each lines $pageposbeforeprintlines = $pdf->getPage(); @@ -567,12 +565,9 @@ class pdf_eratosthene extends ModelePDFCommandes $pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext + $heightforinfotot); // The only function to edit the bottom margin of current page to set it. $pageposbefore = $pdf->getPage(); - // Description of product line - $curX = $this->posxdesc - 1; $showpricebeforepagebreak = 1; $posYAfterImage = 0; - $posYAfterDescription = 0; if ($this->getColumnStatus('photo')) { @@ -603,19 +598,8 @@ class pdf_eratosthene extends ModelePDFCommandes if ($this->getColumnStatus('desc')) { $pdf->startTransaction(); - pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc); - $posYAfterDescription = $pdf->GetY(); - // Display extrafield if needed - $params = array( - 'display' => 'list', - 'printableEnable' => array(3), - 'printableEnableNotEmpty' => array(4) - ); - $extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params); - if(!empty($extrafieldDesc)){ - $this->printStdColumnContent($pdf, $posYAfterDescription, 'desc', $extrafieldDesc); - } + $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); if ($pageposafter > $pageposbefore) // There is a pagebreak @@ -624,7 +608,8 @@ class pdf_eratosthene extends ModelePDFCommandes $pageposafter = $pageposbefore; //print $pageposafter.'-'.$pageposbefore;exit; $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. - pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc); + + $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); $posyafter = $pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) // There is no space left for total+free text @@ -651,7 +636,6 @@ class pdf_eratosthene extends ModelePDFCommandes { $pdf->commitTransaction(); } - $posYAfterDescription = $pdf->GetY(); } @@ -788,11 +772,10 @@ class pdf_eratosthene extends ModelePDFCommandes $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80))); //$pdf->SetDrawColor(190,190,200); - $pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1); + $pdf->line($this->marge_gauche, $nexY, $this->page_largeur - $this->marge_droite, $nexY); $pdf->SetLineStyle(array('dash'=>0)); } - $nexY += 2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) @@ -1704,7 +1687,7 @@ class pdf_eratosthene extends ModelePDFCommandes // Default field style for content $this->defaultContentsFieldsStyle = array( 'align' => 'R', // R,C,L - 'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + 'padding' => array(1, 0.5, 1, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ); // Default field style for content @@ -1741,10 +1724,11 @@ class pdf_eratosthene extends ModelePDFCommandes 'align' => 'L', // 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label // 'label' => ' ', // the final label - 'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + 'padding' => array(0.5, 1, 0.5, 1.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ), 'content' => array( 'align' => 'L', + 'padding' => array(1, 0.5, 1, 1.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ), ); diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php index 7843eb6e087..6268f84d127 100644 --- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php @@ -418,9 +418,7 @@ class pdf_espadon extends ModelePdfExpedition $pdf->rollbackTransaction(true); - $iniY = $tab_top + $this->tabTitleHeight + 2; - $curY = $tab_top + $this->tabTitleHeight + 2; - $nexY = $tab_top + $this->tabTitleHeight + 2; + $nexY = $tab_top + $this->tabTitleHeight; // Loop on each lines for ($i = 0; $i < $nblines; $i++) @@ -473,40 +471,15 @@ class pdf_espadon extends ModelePdfExpedition if ($this->getColumnStatus('desc')) { $pdf->startTransaction(); - pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc); - $posYAfterDescription = $pdf->GetY(); - // Display extrafield if needed - $params = array( - 'display' => 'list', - 'printableEnable' => array(3), - 'printableEnableNotEmpty' => array(4) - ); - $extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params); - if(!empty($extrafieldDesc)){ - $this->printStdColumnContent($pdf, $posYAfterDescription, 'desc', $extrafieldDesc); - } + $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); if ($pageposafter > $pageposbefore) // There is a pagebreak { $pdf->rollbackTransaction(true); - $pageposafter = $pageposbefore; - //print $pageposafter.'-'.$pageposbefore;exit; - $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. - pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc); - $posYAfterDescription = $pdf->GetY(); - // Display extrafield if needed - $params = array( - 'display' => 'list', - 'printableEnable' => array(3), - 'printableEnableNotEmpty' => array(4) - ); - $extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params); - if(!empty($extrafieldDesc)){ - $this->printStdColumnContent($pdf, $posYAfterDescription, 'desc', $extrafieldDesc); - } + $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); $posyafter = $pdf->GetY(); @@ -607,16 +580,13 @@ class pdf_espadon extends ModelePdfExpedition } } - $nexY += 3; - if ($weighttxt && $voltxt) $nexY += 2; - // Add line if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80))); //$pdf->SetDrawColor(190,190,200); - $pdf->line($this->marge_gauche, $nexY - 1, $this->page_largeur - $this->marge_droite, $nexY - 1); + $pdf->line($this->marge_gauche, $nexY, $this->page_largeur - $this->marge_droite, $nexY); $pdf->SetLineStyle(array('dash'=>0)); } @@ -1146,7 +1116,7 @@ class pdf_espadon extends ModelePdfExpedition // Default field style for content $this->defaultContentsFieldsStyle = array( 'align' => 'R', // R,C,L - 'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + 'padding' => array(1, 0.5, 1, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ); // Default field style for content @@ -1183,10 +1153,10 @@ class pdf_espadon extends ModelePdfExpedition 'align' => 'L', // 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label // 'label' => ' ', // the final label - 'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + 'padding' => array(0.5, 1, 0.5, 1.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ), 'content' => array( - 'align' => 'L', + 'padding' => array(1, 0.5, 1, 1.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ), ); diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index b47fc724c63..09acbbda46a 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -582,9 +582,7 @@ class pdf_sponge extends ModelePDFFactures $this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop); $pdf->rollbackTransaction(true); - $iniY = $tab_top + $this->tabTitleHeight + 2; - $curY = $tab_top + $this->tabTitleHeight + 2; - $nexY = $tab_top + $this->tabTitleHeight + 0; + $nexY = $tab_top + $this->tabTitleHeight; // Loop on each lines $pageposbeforeprintlines = $pdf->getPage(); @@ -605,7 +603,6 @@ class pdf_sponge extends ModelePDFFactures $showpricebeforepagebreak = 1; $posYAfterImage = 0; - $posYAfterDescription = 0; if ($this->getColumnStatus('photo')) { @@ -640,6 +637,7 @@ class pdf_sponge extends ModelePDFFactures $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); + if ($pageposafter > $pageposbefore) // There is a pagebreak { $pdf->rollbackTransaction(true); diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index aaa64b266de..c45db2f8380 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -564,9 +564,7 @@ class pdf_cyan extends ModelePDFPropales $this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop); $pdf->rollbackTransaction(true); - $iniY = $tab_top + $this->tabTitleHeight + 2; - $curY = $tab_top + $this->tabTitleHeight + 2; - $nexY = $tab_top + $this->tabTitleHeight + 2; + $nexY = $tab_top + $this->tabTitleHeight; // Loop on each lines $pageposbeforeprintlines = $pdf->getPage(); @@ -621,40 +619,17 @@ class pdf_cyan extends ModelePDFPropales if ($this->getColumnStatus('desc')) { $pdf->startTransaction(); - pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc); - $posYAfterDescription = $pdf->GetY(); - - // Display extrafield if needed - $params = array( - 'display' => 'list', - 'printableEnable' => array(3), - 'printableEnableNotEmpty' => array(4) - ); - $extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params); - if(!empty($extrafieldDesc)){ - $this->printStdColumnContent($pdf, $posYAfterDescription, 'desc', $extrafieldDesc); - } + $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); + if ($pageposafter > $pageposbefore) // There is a pagebreak { $pdf->rollbackTransaction(true); - $pageposafter = $pageposbefore; - //print $pageposafter.'-'.$pageposbefore;exit; - $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. - pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc); - $posYAfterDescription = $pdf->GetY(); - // Display extrafield if needed - $params = array( - 'display' => 'list', - 'printableEnable' => array(3), - 'printableEnableNotEmpty' => array(4) - ); - $extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params); - if(!empty($extrafieldDesc)){ - $this->printStdColumnContent($pdf, $posYAfterDescription, 'desc', $extrafieldDesc); - } + $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. + + $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); $posyafter = $pdf->GetY(); @@ -819,11 +794,11 @@ class pdf_cyan extends ModelePDFPropales $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80))); //$pdf->SetDrawColor(190,190,200); - $pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1); + $pdf->line($this->marge_gauche, $nexY, $this->page_largeur - $this->marge_droite, $nexY); $pdf->SetLineStyle(array('dash'=>0)); } - $nexY += 2; // Add space between lines + // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) @@ -1865,7 +1840,7 @@ class pdf_cyan extends ModelePDFPropales // Default field style for content $this->defaultContentsFieldsStyle = array( 'align' => 'R', // R,C,L - 'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + 'padding' => array(1, 0.5, 1, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ); // Default field style for content @@ -1902,10 +1877,11 @@ class pdf_cyan extends ModelePDFPropales 'align' => 'L', // 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label // 'label' => ' ', // the final label - 'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + 'padding' => array(0.5, 1, 0.5, 1.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ), 'content' => array( 'align' => 'L', + 'padding' => array(1, 0.5, 1, 1.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ), ); diff --git a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php index e454e29835c..2d3c766a7c2 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php @@ -496,9 +496,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $height_note = 0; } - $iniY = $tab_top + 7; - $curY = $tab_top + 7; - $nexY = $tab_top + 7; + $nexY = $tab_top + 5; // Use new auto collum system $this->prepareArrayColumnField($object, $outputlangs, $hidedetails, $hidedesc, $hideref); @@ -555,40 +553,14 @@ class pdf_cornas extends ModelePDFSuppliersOrders if ($this->getColumnStatus('desc')) { $pdf->startTransaction(); - pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc); - $posYAfterDescription = $pdf->GetY(); - - // Display extrafield if needed - $params = array( - 'display' => 'list', - 'printableEnable' => array(3), - 'printableEnableNotEmpty' => array(4) - ); - $extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params); - if(!empty($extrafieldDesc)){ - $this->printStdColumnContent($pdf, $posYAfterDescription, 'desc', $extrafieldDesc); - } + $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc, 1); $pageposafter = $pdf->getPage(); if ($pageposafter > $pageposbefore) // There is a pagebreak { $pdf->rollbackTransaction(true); - $pageposafter = $pageposbefore; - //print $pageposafter.'-'.$pageposbefore;exit; - $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. - pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc); - $posYAfterDescription = $pdf->GetY(); - // Display extrafield if needed - $params = array( - 'display' => 'list', - 'printableEnable' => array(3), - 'printableEnableNotEmpty' => array(4) - ); - $extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params); - if(!empty($extrafieldDesc)){ - $this->printStdColumnContent($pdf, $posYAfterDescription, 'desc', $extrafieldDesc); - } + $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc, 1); $pageposafter = $pdf->getPage(); $posyafter = $pdf->GetY(); @@ -750,12 +722,10 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80))); //$pdf->SetDrawColor(190,190,200); - $pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1); + $pdf->line($this->marge_gauche, $nexY, $this->page_largeur - $this->marge_droite, $nexY); $pdf->SetLineStyle(array('dash'=>0)); } - $nexY += 2; // Add space between lines - // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) { @@ -1509,7 +1479,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Default field style for content $this->defaultContentsFieldsStyle = array( 'align' => 'R', // R,C,L - 'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + 'padding' => array(1, 0.5, 1, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ); // Default field style for content @@ -1546,10 +1516,11 @@ class pdf_cornas extends ModelePDFSuppliersOrders 'align' => 'L', // 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label // 'label' => ' ', // the final label - 'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + 'padding' => array(0.5, 1, 0.5, 1.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ), 'content' => array( 'align' => 'L', + 'padding' => array(1, 0.5, 1, 1.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left ), ); From ae890d021c60d43169bc1abda18155615bd9b01e Mon Sep 17 00:00:00 2001 From: ATM john Date: Mon, 24 Feb 2020 21:50:01 +0100 Subject: [PATCH 014/313] Fix comments --- htdocs/core/class/commondocgenerator.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index d1334a5cf03..bf1fabb7d19 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -1109,17 +1109,17 @@ abstract class CommonDocGenerator /** - * print standard column content + * print description column content * * @param TCPDF $pdf pdf object * @param float $curY curent Y position * @param string $colKey the column key * @param object $object CommonObject - * @param $i - * @param $outputlangs - * @param $hideref - * @param $hidedesc - * @param $issupplierline + * @param int $i + * @param Translate $outputlangs Output language + * @param int $hideref hide ref + * @param int $hidedesc hide desc + * @param int $issupplierline if object need supplier product * @return null */ public function printColDescContent($pdf, &$curY, $colKey, $object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, $issupplierline = 0) From 3e492b8a5bbf1c5aede1cc33149c64932914442d Mon Sep 17 00:00:00 2001 From: ATM john Date: Mon, 24 Feb 2020 22:08:04 +0100 Subject: [PATCH 015/313] Fix title padding --- .../core/class/commondocgenerator.class.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index bf1fabb7d19..7f56832ece8 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -1400,7 +1400,7 @@ abstract class CommonDocGenerator /** * Print standard column content * - * @param PDF $pdf Pdf object + * @param TCPDI $pdf Pdf object * @param float $tab_top Tab top position * @param float $tab_height Default tab height * @param Translate $outputlangs Output language @@ -1436,18 +1436,27 @@ abstract class CommonDocGenerator } if (empty($hidetop)) { - $pdf->SetXY($colDef['xStartPos'] + $colDef['title']['padding'][3], $tab_top + $colDef['title']['padding'][0]); - $textWidth = $colDef['width'] - $colDef['title']['padding'][3] - $colDef['title']['padding'][1]; + + // save curent cell padding + $curentCellPaddinds = $pdf->getCellPaddings(); + // set cell padding with column content definition + $pdf->setCellPaddings($colDef['content']['padding'][3], $colDef['content']['padding'][0], $colDef['content']['padding'][1], $colDef['content']['padding'][2]); + + $pdf->SetXY($colDef['xStartPos'], $tab_top); + $textWidth = $colDef['width']; $pdf->MultiCell($textWidth, 2, $colDef['title']['label'], '', $colDef['title']['align']); global $outputlangsbis; if (is_object($outputlangsbis)) { - $pdf->SetXY($colDef['xStartPos'] + $colDef['title']['padding'][3], $tab_top + $colDef['title']['padding'][0] + 4); + $pdf->SetXY($colDef['xStartPos'], $pdf->GetY() - $colDef['content']['padding'][0]); $textbis = $outputlangsbis->transnoentities($colDef['title']['textkey']); $pdf->MultiCell($textWidth, 2, $textbis, '', $colDef['title']['align']); } - $this->tabTitleHeight = max($pdf->GetY() - $tab_top + $colDef['title']['padding'][2], $this->tabTitleHeight); + $this->tabTitleHeight = max($pdf->GetY() - $tab_top, $this->tabTitleHeight); + + // restore cell padding + $pdf->setCellPaddings($curentCellPaddinds['L'], $curentCellPaddinds['T'], $curentCellPaddinds['R'], $curentCellPaddinds['B']); } } } From 5a77716b93b3ac55e0aa102ef68cbe76c7bcd5d1 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Mon, 24 Feb 2020 21:10:14 +0000 Subject: [PATCH 016/313] Fixing style errors. --- htdocs/core/class/commondocgenerator.class.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 7f56832ece8..4c256537609 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -1436,7 +1436,6 @@ abstract class CommonDocGenerator } if (empty($hidetop)) { - // save curent cell padding $curentCellPaddinds = $pdf->getCellPaddings(); // set cell padding with column content definition From 9c1fdf1c5273ed03f91bbc96db46af5d35d38cfd Mon Sep 17 00:00:00 2001 From: ATM john Date: Mon, 24 Feb 2020 22:12:36 +0100 Subject: [PATCH 017/313] Fix missing php doc --- htdocs/core/class/commondocgenerator.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 7f56832ece8..932edd92901 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -1115,7 +1115,7 @@ abstract class CommonDocGenerator * @param float $curY curent Y position * @param string $colKey the column key * @param object $object CommonObject - * @param int $i + * @param int $i the $object->lines array key * @param Translate $outputlangs Output language * @param int $hideref hide ref * @param int $hidedesc hide desc From c216b7cae5c2fdcf89a27db33971f988c0610b40 Mon Sep 17 00:00:00 2001 From: ATM john Date: Mon, 24 Feb 2020 22:34:34 +0100 Subject: [PATCH 018/313] fix title padding definition source --- htdocs/core/class/commondocgenerator.class.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index f1065e170a8..6b82f3f11c1 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -1438,16 +1438,25 @@ abstract class CommonDocGenerator if (empty($hidetop)) { // save curent cell padding $curentCellPaddinds = $pdf->getCellPaddings(); - // set cell padding with column content definition - $pdf->setCellPaddings($colDef['content']['padding'][3], $colDef['content']['padding'][0], $colDef['content']['padding'][1], $colDef['content']['padding'][2]); + + global $outputlangsbis; + if (is_object($outputlangsbis)) { + // set cell padding with column title definition + $pdf->setCellPaddings($colDef['title']['padding'][3], $colDef['title']['padding'][0], $colDef['title']['padding'][1], 0.5); + } + else{ + // set cell padding with column title definition + $pdf->setCellPaddings($colDef['title']['padding'][3], $colDef['title']['padding'][0], $colDef['title']['padding'][1], $colDef['title']['padding'][2]); + } $pdf->SetXY($colDef['xStartPos'], $tab_top); $textWidth = $colDef['width']; $pdf->MultiCell($textWidth, 2, $colDef['title']['label'], '', $colDef['title']['align']); - global $outputlangsbis; + if (is_object($outputlangsbis)) { - $pdf->SetXY($colDef['xStartPos'], $pdf->GetY() - $colDef['content']['padding'][0]); + $pdf->setCellPaddings($colDef['title']['padding'][3], 0, $colDef['title']['padding'][1], $colDef['title']['padding'][2]); + $pdf->SetXY($colDef['xStartPos'], $pdf->GetY()); $textbis = $outputlangsbis->transnoentities($colDef['title']['textkey']); $pdf->MultiCell($textWidth, 2, $textbis, '', $colDef['title']['align']); } From d9b9913e8a106060b7abafe3e24f5939713ca787 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sun, 1 Mar 2020 04:52:12 +0100 Subject: [PATCH 019/313] NEW: Accountancy - Add mode intra & export for product or service bought --- htdocs/accountancy/admin/defaultaccounts.php | 12 +- htdocs/accountancy/admin/productaccount.php | 125 ++++++++++++++++-- htdocs/accountancy/supplier/index.php | 21 ++- htdocs/accountancy/supplier/list.php | 89 ++++++++++--- htdocs/core/modules/modProduct.class.php | 17 ++- htdocs/core/modules/modService.class.php | 13 +- .../install/mysql/migration/11.0.0-12.0.0.sql | 3 + htdocs/install/mysql/tables/llx_product.sql | 2 + htdocs/langs/en_US/accountancy.lang | 9 ++ htdocs/langs/en_US/products.lang | 4 +- htdocs/product/card.php | 114 ++++++++++++++++ htdocs/product/class/product.class.php | 45 +++++-- htdocs/product/list.php | 38 +++++- 13 files changed, 429 insertions(+), 63 deletions(-) diff --git a/htdocs/accountancy/admin/defaultaccounts.php b/htdocs/accountancy/admin/defaultaccounts.php index c0c3f835481..7f3ba99a157 100644 --- a/htdocs/accountancy/admin/defaultaccounts.php +++ b/htdocs/accountancy/admin/defaultaccounts.php @@ -54,19 +54,27 @@ $list_account_main = array ( $list_account = array (); $list_account[] = '---Product---'; -$list_account[] = 'ACCOUNTING_PRODUCT_BUY_ACCOUNT'; $list_account[] = 'ACCOUNTING_PRODUCT_SOLD_ACCOUNT'; if ($mysoc->isInEEC()) { $list_account[] = 'ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT'; } $list_account[] = 'ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT'; +$list_account[] = 'ACCOUNTING_PRODUCT_BUY_ACCOUNT'; +if ($mysoc->isInEEC()) { + $list_account[] = 'ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT'; +} +$list_account[] = 'ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT'; $list_account[] = '---Service---'; -$list_account[] = 'ACCOUNTING_SERVICE_BUY_ACCOUNT'; $list_account[] = 'ACCOUNTING_SERVICE_SOLD_ACCOUNT'; if ($mysoc->isInEEC()) { $list_account[] = 'ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT'; } $list_account[] = 'ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT'; +$list_account[] = 'ACCOUNTING_SERVICE_BUY_ACCOUNT'; +if ($mysoc->isInEEC()) { + $list_account[] = 'ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT'; +} +$list_account[] = 'ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT'; $list_account[] = '---Other---'; $list_account[] = 'ACCOUNTING_VAT_BUY_ACCOUNT'; $list_account[] = 'ACCOUNTING_VAT_SOLD_ACCOUNT'; diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index 60c9c88f0c8..0e68703846e 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -117,7 +117,9 @@ if ($action == 'update') { 'ACCOUNTANCY_SELL', 'ACCOUNTANCY_SELL_INTRA', 'ACCOUNTANCY_SELL_EXPORT', - 'ACCOUNTANCY_BUY' + 'ACCOUNTANCY_BUY', + 'ACCOUNTANCY_BUY_INTRA', + 'ACCOUNTANCY_BUY_EXPORT' ); if (in_array($accounting_product_mode, $accounting_product_modes)) { @@ -159,6 +161,12 @@ if ($action == 'update') { if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { $sql .= " SET accountancy_code_buy = ".$accounting->account_number; } + if ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') { + $sql .= " SET accountancy_code_buy = ".$accounting->account_number; + } + if ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') { + $sql .= " SET accountancy_code_buy = ".$accounting->account_number; + } if ($accounting_product_mode == 'ACCOUNTANCY_SELL') { $sql .= " SET accountancy_code_sell = ".$accounting->account_number; } @@ -204,7 +212,11 @@ $form = new FormAccounting($db); $accounting = new AccountingAccount($db); // TODO: we should need to check if result is already exists accountaccount rowid..... $aarowid_servbuy = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT, 1); +$aarowid_servbuy_intra = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT, 1); +$aarowid_servbuy_export = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT, 1); $aarowid_prodbuy = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT, 1); +$aarowid_prodbuy_intra = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT, 1); +$aarowid_prodbuy_export = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT, 1); $aarowid_servsell = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT, 1); $aarowid_servsell_intra = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT, 1); $aarowid_servsell_export = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT, 1); @@ -213,7 +225,11 @@ $aarowid_prodsell_intra = $accounting->fetch('', $conf->global->ACCOUNTING_P $aarowid_prodsell_export = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT, 1); $aacompta_servbuy = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef")); +$aacompta_servbuy_intra = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); +$aacompta_servbuy_export = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); $aacompta_prodbuy = (! empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef")); +$aacompta_prodbuy_intra = (! empty($conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); +$aacompta_prodbuy_export = (! empty($conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); $aacompta_servsell = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); $aacompta_servsell_intra = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); $aacompta_servsell_export = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); @@ -228,7 +244,8 @@ $pcgvercode = dol_getIdFromCode($db, $pcgverid, 'accounting_system', 'rowid', 'p if (empty($pcgvercode)) $pcgvercode=$pcgverid; $sql = "SELECT p.rowid, p.ref, p.label, p.description, p.tosell, p.tobuy,"; -$sql.= " p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export, p.accountancy_code_buy,"; +$sql.= " p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export,"; +$sql.= " p.accountancy_code_buy, p.accountancy_code_buy_intra, p.accountancy_code_buy_export,"; $sql.= " p.tms, p.fk_product_type as product_type,"; $sql.= " aa.rowid as aaid"; $sql.= " FROM " . MAIN_DB_PREFIX . "product as p"; @@ -236,6 +253,14 @@ $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON"; if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { $sql.=" p.accountancy_code_buy = aa.account_number AND aa.fk_pcg_version = '" . $pcgvercode . "'"; } +elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') +{ + $sql.=" p.accountancy_code_buy_intra = aa.account_number AND aa.fk_pcg_version = '" . $pcgvercode . "'"; +} +elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') +{ + $sql.=" p.accountancy_code_buy_export = aa.account_number AND aa.fk_pcg_version = '" . $pcgvercode . "'"; +} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL') { $sql.=" p.accountancy_code_sell = aa.account_number AND aa.fk_pcg_version = '" . $pcgvercode . "'"; @@ -253,6 +278,14 @@ if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { if (strlen(trim($search_current_account))) { $sql .= natural_search("p.accountancy_code_buy", $search_current_account); } +} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') { + if (strlen(trim($search_current_account))) { + $sql .= natural_search("p.accountancy_code_buy_intra", $search_current_account); + } +} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') { + if (strlen(trim($search_current_account))) { + $sql .= natural_search("p.accountancy_code_buy_export", $search_current_account); + } } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL') { if (strlen(trim($search_current_account))) { $sql .= natural_search("p.accountancy_code_sell", $search_current_account); @@ -356,6 +389,13 @@ if ($result) print "\n"; print ' ' . $langs->trans('OptionModeProductBuy') . ''; print ''.$langs->trans('OptionModeProductBuyDesc')."\n"; + if ($mysoc->isInEEC()) + { + print ' ' . $langs->trans('OptionModeProductBuyIntra') . ''; + print '' . $langs->trans('OptionModeProductBuyDesc') . "\n"; + } + print ' ' . $langs->trans('OptionModeProductBuyExport') . ''; + print ''.$langs->trans('OptionModeProductBuyDesc')."\n"; print "\n"; print '
'; @@ -386,7 +426,7 @@ if ($result) print ''.$form->selectyesno('search_onsell', $search_onsell, 1, false, 1).''; } // On buy - elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY') { + elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY' || $accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA' || $accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') { print ''.$form->selectyesno('search_onpurchase', $search_onpurchase, 1, false, 1).''; } // Current account @@ -416,10 +456,16 @@ if ($result) } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') { print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, '', $sortfield, $sortorder, 'center '); $fieldtosortaccount="p.accountancy_code_sell_export"; - } else { - if ($accounting_product_mode == 'ACCOUNTANCY_BUY') print_liste_field_titre("OnBuy", $_SERVER["PHP_SELF"], "p.tobuy", "", $param, '', $sortfield, $sortorder, 'center '); + } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY') { + print_liste_field_titre("OnBuy", $_SERVER["PHP_SELF"], "p.tobuy", "", $param, '', $sortfield, $sortorder, 'center '); $fieldtosortaccount="p.accountancy_code_buy"; - } + } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') { + print_liste_field_titre("OnBuy", $_SERVER["PHP_SELF"], "p.tobuy", "", $param, '', $sortfield, $sortorder, 'center '); + $fieldtosortaccount="p.accountancy_code_buy_intra"; + } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') { + print_liste_field_titre("OnBuy", $_SERVER["PHP_SELF"], "p.tobuy", "", $param, '', $sortfield, $sortorder, 'center '); + $fieldtosortaccount="p.accountancy_code_buy_export"; + } print_liste_field_titre("CurrentDedicatedAccountingAccount", $_SERVER["PHP_SELF"], $fieldtosortaccount, "", $param, '', $sortfield, $sortorder); print_liste_field_titre("AssignDedicatedAccountingAccount"); $clickpitco=$form->showCheckAddButtons('checkforselect', 1); @@ -482,11 +528,40 @@ if ($result) // Purchases if ($obj->product_type == 0) { - $compta_prodbuy = (! empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef")); - $compta_prodbuy_id = $aarowid_prodbuy; - } else { - $compta_prodbuy = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef")); - $compta_prodbuy_id = $aarowid_servbuy; + if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { + $compta_prodbuy = (! empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodbuy_id = $aarowid_prodbuy; + } + elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') { + $compta_prodbuy = (! empty($conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodbuy_id = $aarowid_prodbuy_intra; + } + elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') { + $compta_prodbuy = (! empty($conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodbuy_id = $aarowid_prodbuy_export; + } + else { + $compta_prodbuy = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodbuy_id = $aarowid_servbuy; + } + } + else { + if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { + $compta_prodbuy = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodbuy_id = $aarowid_prodbuy; + } + elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') { + $compta_prodbuy = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodbuy_id = $aarowid_prodbuy_intra; + } + elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') { + $compta_prodbuy = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodbuy_id = $aarowid_prodbuy_export; + } + else { + $compta_prodbuy = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodbuy_id = $aarowid_servbuy; + } } print ''; @@ -509,7 +584,7 @@ if ($result) if ($accounting_product_mode == 'ACCOUNTANCY_SELL' || $accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA' || $accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') print ''.$product_static->getLibStatut(3, 0).''; - if ($accounting_product_mode == 'ACCOUNTANCY_BUY') + if ($accounting_product_mode == 'ACCOUNTANCY_BUY' || $accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA' || $accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') print ''.$product_static->getLibStatut(3, 1).''; // Current accounting account @@ -517,6 +592,12 @@ if ($result) if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { print length_accountg($obj->accountancy_code_buy); if ($obj->accountancy_code_buy && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount")); + } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') { + print length_accountg($obj->accountancy_code_buy_intra); + if ($obj->accountancy_code_sell && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount")); + } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') { + print length_accountg($obj->accountancy_code_buy_export); + if ($obj->accountancy_code_sell && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount")); } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL') { print length_accountg($obj->accountancy_code_sell); if ($obj->accountancy_code_sell && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount")); @@ -540,6 +621,26 @@ if ($result) if (! empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid print $form->select_account($defaultvalue, 'codeventil_' . $product_static->id, 1, array(), 1); print ''; + } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') { + // Accounting account buy intra (In EEC) + print ''; + //$defaultvalue=GETPOST('codeventil_' . $product_static->id,'alpha'); This is id and we need a code + if (empty($defaultvalue)) $defaultvalue=$compta_prodbuy_intra; + $codesell=length_accountg($obj->accountancy_code_buy_intra); + //var_dump($defaultvalue.' - '.$codesell.' - '.$compta_prodsell); + if (! empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid + print $form->select_account($defaultvalue, 'codeventil_' . $product_static->id, 1, array(), 1); + print ''; + } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') { + // Accounting account buy export (Out of EEC) + print ''; + //$defaultvalue=GETPOST('codeventil_' . $product_static->id,'alpha'); This is id and we need a code + if (empty($defaultvalue)) $defaultvalue=$compta_prodbuy_export; + $codesell=length_accountg($obj->accountancy_code_buy_export); + //var_dump($defaultvalue.' - '.$codesell.' - '.$compta_prodsell); + if (! empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid + print $form->select_account($defaultvalue, 'codeventil_' . $product_static->id, 1, array(), 1); + print ''; } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL') { // Accounting account sell print ''; diff --git a/htdocs/accountancy/supplier/index.php b/htdocs/accountancy/supplier/index.php index 3bc44698029..3d32694218d 100644 --- a/htdocs/accountancy/supplier/index.php +++ b/htdocs/accountancy/supplier/index.php @@ -119,8 +119,9 @@ if ($action == 'validatehistory') { // Supplier Invoice Lines (must be same request than into page list.php for manual binding) $sql = "SELECT f.rowid as facid, f.ref, f.ref_supplier, f.libelle as invoice_label, f.datef, f.type as ftype,"; $sql .= " l.rowid, l.fk_product, l.description, l.total_ht, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, l.vat_src_code,"; - $sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_buy as code_buy, p.tva_tx as tva_tx_prod,"; - $sql .= " aa.rowid as aarowid,"; + $sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type,"; + $sql .= " p.accountancy_code_buy as code_buy, p.accountancy_code_buy_intra as code_buy_intra, p.accountancy_code_buy_export as code_buy_export, p.tva_tx as tva_tx_prod,"; + $sql .= " aa.rowid as aarowid, aa2.rowid as aarowid_intra, aa3.rowid as aarowid_export,"; $sql .= " co.code as country_code, co.label as country_label,"; $sql .= " s.tva_intra"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; @@ -128,7 +129,9 @@ if ($action == 'validatehistory') { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as co ON co.rowid = s.fk_pays "; $sql .= " INNER JOIN ".MAIN_DB_PREFIX."facture_fourn_det as l ON f.rowid = l.fk_facture_fourn"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = l.fk_product"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON p.accountancy_code_buy = aa.account_number AND aa.active = 1 AND aa.fk_pcg_version = '".$chartaccountcode."' AND aa.entity = ".$conf->entity; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON p.accountancy_code_buy = aa.account_number AND aa.active = 1 AND aa.fk_pcg_version = '".$chartaccountcode."' AND aa.entity = ".$conf->entity; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa2 ON p.accountancy_code_buy_intra = aa2.account_number AND aa2.active = 1 AND aa2.fk_pcg_version = '".$chartaccountcode."' AND aa2.entity = ".$conf->entity; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa3 ON p.accountancy_code_buy_export = aa3.account_number AND aa3.active = 1 AND aa3.fk_pcg_version = '".$chartaccountcode."' AND aa3.entity = ".$conf->entity; $sql .= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0"; $sql .= " AND l.product_type <= 2"; @@ -157,16 +160,12 @@ if ($action == 'validatehistory') { $suggestedaccountingaccountfor = ''; } else { if ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale - //$objp->code_buy_p = $objp->code_buy_intra; - $objp->code_buy_p = $objp->code_buy; - //$objp->aarowid_suggest = $objp->aarowid_intra; - $objp->aarowid_suggest = $objp->aarowid; + $objp->code_buy_p = $objp->code_buy_intra; + $objp->aarowid_suggest = $objp->aarowid_intra; $suggestedaccountingaccountfor = 'eec'; } else { // Foreign sale - //$objp->code_buy_p = $objp->code_buy_export; - $objp->code_buy_p = $objp->code_buy; - //$objp->aarowid_suggest = $objp->aarowid_export; - $objp->aarowid_suggest = $objp->aarowid; + $objp->code_buy_p = $objp->code_buy_export; + $objp->aarowid_suggest = $objp->aarowid_export; $suggestedaccountingaccountfor = 'export'; } } diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index ecd41f2f9da..d7a650e1f3d 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -211,7 +211,8 @@ if (empty($chartaccountcode)) $sql = "SELECT f.rowid as facid, f.ref, f.ref_supplier, f.libelle as invoice_label, f.datef, f.type as ftype,"; $sql .= " l.rowid, l.fk_product, l.description, l.total_ht, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, l.vat_src_code,"; $sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_buy as code_buy, p.tva_tx as tva_tx_prod,"; -$sql .= " aa.rowid as aarowid,"; +$sql .= " p.accountancy_code_buy_intra as code_buy_intra, p.accountancy_code_buy_export as code_buy_export,"; +$sql .= " aa.rowid as aarowid, aa2.rowid as aarowid_intra, aa3.rowid as aarowid_export,"; $sql .= " co.code as country_code, co.label as country_label,"; $sql .= " s.tva_intra"; $parameters = array(); @@ -222,7 +223,9 @@ $sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as co ON co.rowid = s.fk_pays "; $sql .= " INNER JOIN ".MAIN_DB_PREFIX."facture_fourn_det as l ON f.rowid = l.fk_facture_fourn"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = l.fk_product"; -$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON p.accountancy_code_buy = aa.account_number AND aa.active = 1 AND aa.fk_pcg_version = '".$chartaccountcode."' AND aa.entity = ".$conf->entity; +$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON p.accountancy_code_sell = aa.account_number AND aa.active = 1 AND aa.fk_pcg_version = '".$chartaccountcode."' AND aa.entity = ".$conf->entity; +$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa2 ON p.accountancy_code_sell_intra = aa2.account_number AND aa2.active = 1 AND aa2.fk_pcg_version = '".$chartaccountcode."' AND aa2.entity = ".$conf->entity; +$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa3 ON p.accountancy_code_sell_export = aa3.account_number AND aa3.active = 1 AND aa3.fk_pcg_version = '".$chartaccountcode."' AND aa3.entity = ".$conf->entity; $sql .= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0"; $sql .= " AND l.product_type <= 2"; // Add search filter like @@ -414,7 +417,6 @@ if ($result) { // issue : if we change product_type value in product DB it should differ from the value stored in facturedet DB ! $objp->code_buy_l = ''; $objp->code_buy_p = ''; - $objp->aarowid_suggest = ''; $product_static->ref = $objp->product_ref; $product_static->id = $objp->product_id; @@ -426,28 +428,67 @@ if ($result) { $facturefourn_static->type = $objp->type; $code_buy_p_notset = ''; - $objp->aarowid_suggest = $objp->aarowid; + $objp->aarowid_suggest = ''; // Will be set later + $isBuyerInEEC = isInEEC($objp); + + $suggestedaccountingaccountbydefaultfor = ''; if ($objp->type_l == 1) { - $objp->code_buy_l = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : ''); - if ($objp->aarowid == '') - $objp->aarowid_suggest = $aarowid_s; + if ($objp->country_code == $mysoc->country_code || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country) + $objp->code_buy_l = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : ''); + $suggestedaccountingaccountbydefaultfor = ''; + } else { + if ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale + $objp->code_buy_l = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT : ''); + $suggestedaccountingaccountbydefaultfor = 'eec'; + } else { // Foreign sale + $objp->code_buy_l = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT : ''); + $suggestedaccountingaccountbydefaultfor = 'export'; + } + } } elseif ($objp->type_l == 0) { - $objp->code_buy_l = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : ''); - if ($objp->aarowid == '') - $objp->aarowid_suggest = $aarowid_p; + if ($objp->country_code == $mysoc->country_code || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country) + $objp->code_buy_l = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : ''); + $suggestedaccountingaccountbydefaultfor = ''; + } else { + if ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale + $objp->code_buy_l = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT : ''); + $suggestedaccountingaccountbydefaultfor = 'eec'; + } else { + $objp->code_buy_l = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT : ''); + $suggestedaccountingaccountbydefaultfor = 'export'; + } + } } - if ($objp->code_buy_l == -1) $objp->code_buy_l = ''; + if ($objp->code_sell_l == -1) $objp->code_sell_l = ''; - if (!empty($objp->code_buy)) { - $objp->code_buy_p = $objp->code_buy; // Code on product + // Search suggested account for product/service + $suggestedaccountingaccountfor = ''; + if (($objp->country_code == $mysoc->country_code) || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country) + $objp->code_buy_p = $objp->code_buy; + $objp->aarowid_suggest = $objp->aarowid; + $suggestedaccountingaccountfor = ''; + } else { + if ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale + $objp->code_buy_p = $objp->code_buy_intra; + $objp->aarowid_suggest = $objp->aarowid_intra; + $suggestedaccountingaccountfor = 'eec'; + } else { // Foreign sale + $objp->code_buy_p = $objp->code_buy_export; + $objp->aarowid_suggest = $objp->aarowid_export; + $suggestedaccountingaccountfor = 'export'; + } + } + + if (! empty($objp->code_buy_p)) { + // Value was defined previously } else { $code_buy_p_notset = 'color:orange'; } if (empty($objp->code_buy_l) && empty($objp->code_buy_p)) $code_buy_p_notset = 'color:red'; - // $objp->code_buy_p is now code of product/service - // $objp->code_buy_l is now default code of product/service + // $objp->code_sell_l is now default code of product/service + // $objp->code_sell_p is now code of product/service print ''; @@ -520,6 +561,21 @@ if ($result) { // Suggested accounting account print ''; $suggestedid = $objp->aarowid_suggest; + if (empty($suggestedid) && empty($objp->code_buy_p) && ! empty($objp->code_buy_l) && empty($conf->global->ACCOUNTANCY_DO_NOT_AUTOFILL_ACCOUNT_WITH_GENERIC)) + { + if (empty($accountingaccount_codetotid_cache[$objp->code_buy_l])) + { + $tmpaccount = new AccountingAccount($db); + $tmpaccount->fetch(0, $objp->code_buy_l, 1); + if ($tmpaccount->id > 0) { + $suggestedid = $tmpaccount->id; + } + $accountingaccount_codetotid_cache[$objp->code_buy_l] = $tmpaccount->id; + } + else { + $suggestedid = $accountingaccount_codetotid_cache[$objp->code_buy_l]; + } + } print $formaccounting->select_account($suggestedid, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth200 maxwidthonsmartphone', 'cachewithshowemptyone'); print ''; @@ -540,6 +596,9 @@ if ($result) { } else { print $db->error(); } +if ($db->type == 'mysqli') { + $db->query("SET SQL_BIG_SELECTS=0"); // Enable MAX_JOIN_SIZE limitation +} // Add code to auto check the box when we select an account print ''."\n"; } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Build a graph using Chart library. Input when calling this method should be: + * $this->data = array(array(0=>'labelxA',1=>yA), array('labelxB',yB)); + * $this->data = array(array(0=>'labelxA',1=>yA1,...,n=>yAn), array('labelxB',yB1,...yBn)); // or when there is n series to show for each x + * $this->data = array(array('label'=>'labelxA','data'=>yA), array('labelxB',yB)); // Syntax deprecated + * $this->legend= array("Val1",...,"Valn"); // list of n series name + * $this->type = array('bars',...'lines', 'linesnopoint'); or array('pie') or array('polar'); + * $this->mode = 'depth' ??? + * $this->bgcolorgrid + * $this->datacolor + * $this->shownodatagraph + * + * @param string $file Image file name to use to save onto disk (also used as javascript unique id) + * @param string $fileurl Url path to show image if saved onto disk. Never used here. + * @return void + */ + private function draw_chart($file, $fileurl) + { + // phpcs:enable + global $conf, $langs; + + dol_syslog(get_class($this)."::draw_chart this->type=".join(',', $this->type)." this->MaxValue=".$this->MaxValue); + + if (empty($this->width) && empty($this->height)) + { + print 'Error width or height not set'; + return; + } + + $legends = array(); + $nblot = 0; + if (is_array($this->data) && is_array($this->data[0])) { + $nblot = count($this->data[0]) - 1; // -1 to remove legend + } + if ($nblot < 0) dol_syslog('Bad value for property ->data. Must be set by mydolgraph->SetData before calling mydolgrapgh->draw', LOG_WARNING); + $firstlot = 0; + // Works with line but not with bars + //if ($nblot > 2) $firstlot = ($nblot - 2); // We limit nblot to 2 because jflot can't manage more than 2 bars on same x + + $i = $firstlot; + $serie = array(); + while ($i < $nblot) // Loop on each serie + { + $values = array(); // Array with horizontal y values (specific values of a serie) for each abscisse x + $serie[$i] = ""; + + // Fill array $values + $x = 0; + foreach ($this->data as $valarray) // Loop on each x + { + $legends[$x] = $valarray[0]; + $values[$x] = (is_numeric($valarray[$i + 1]) ? $valarray[$i + 1] : null); + $x++; + } + + // TODO Avoid push by adding generated long array... + if (isset($this->type[$firstlot]) && $this->type[$firstlot] == 'pie') + { + $j = 0; + foreach ($values as $x => $y) { + //if (isset($y)) $serie[$i] .= 'd'.$i.'.push({"label":"'.dol_escape_js($legends[$x]).'", "data":'.$y.'});'."\n"; + if (isset($y)) { + //$serie[$i][] = $y; + $serie[$i] .= ($j > 0 ? ", " : "").$y; + $j++; + } + } + } + else + { + $j = 0; + foreach ($values as $x => $y) { + if (isset($y)) { + $serie[$i] .= ($j > 0 ? ", " : "").$y; + $j++; + } + } + } + + unset($values); + $i++; + } + $tag = dol_escape_htmltag(dol_string_unaccent(dol_string_nospecial(basename($file), '_', array('-', '.')))); + + $this->stringtoshow = ''."\n"; + if (!empty($this->title)) $this->stringtoshow .= '
'.$this->title.'
'; + if (!empty($this->shownographyet)) + { + $this->stringtoshow .= '
'; + $this->stringtoshow .= '
'.$langs->trans("NotEnoughDataYet").'
'; + return; + } + + // Start the div that will contains all the graph + $dolxaxisvertical=''; + if (count($this->data) > 20) $dolxaxisvertical='dol-xaxis-vertical'; + // No height for the pie grah + $this->stringtoshow .= '
'."\n"; + + $this->stringtoshow .= ''."\n"; + } + + /** * Output HTML string to total value * diff --git a/htdocs/includes/chart/.codeclimate.yml b/htdocs/includes/chart/.codeclimate.yml new file mode 100644 index 00000000000..0b8340feb58 --- /dev/null +++ b/htdocs/includes/chart/.codeclimate.yml @@ -0,0 +1,19 @@ +version: "2" +plugins: + duplication: + enabled: true + config: + languages: + - javascript + fixme: + enabled: true +exclude_patterns: + - "dist/" + - "docs/" + - "samples/" + - "scripts/" + - "test/" + - "*.js" + - "*.json" + - "*.md" + - ".*" diff --git a/htdocs/includes/chart/.editorconfig b/htdocs/includes/chart/.editorconfig new file mode 100644 index 00000000000..922810ad734 --- /dev/null +++ b/htdocs/includes/chart/.editorconfig @@ -0,0 +1,18 @@ +# https://editorconfig.org +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[gulpfile.js] +indent_style = space +indent_size = 2 + +[*.yml] +indent_style = space +indent_size = 2 diff --git a/htdocs/includes/chart/.eslintignore b/htdocs/includes/chart/.eslintignore new file mode 100644 index 00000000000..96212a3593b --- /dev/null +++ b/htdocs/includes/chart/.eslintignore @@ -0,0 +1 @@ +**/*{.,-}min.js diff --git a/htdocs/includes/chart/.eslintrc.yml b/htdocs/includes/chart/.eslintrc.yml new file mode 100644 index 00000000000..b0d9d5695a9 --- /dev/null +++ b/htdocs/includes/chart/.eslintrc.yml @@ -0,0 +1,7 @@ +extends: chartjs + +env: + browser: true + node: true + +plugins: ['html'] diff --git a/htdocs/includes/chart/.gitignore b/htdocs/includes/chart/.gitignore new file mode 100644 index 00000000000..6a066b92f38 --- /dev/null +++ b/htdocs/includes/chart/.gitignore @@ -0,0 +1,17 @@ +/_book +/coverage +/custom +/dist +/docs/index.md +/gh-pages +/jsdoc +/node_modules +.DS_Store +.idea +.project +.settings +.vscode +bower.json +*.log +*.swp +*.stackdump diff --git a/htdocs/includes/chart/.htmllintrc b/htdocs/includes/chart/.htmllintrc new file mode 100644 index 00000000000..1ab933490de --- /dev/null +++ b/htdocs/includes/chart/.htmllintrc @@ -0,0 +1,19 @@ +{ + "indent-style": "tabs", + "line-end-style": false, + "attr-quote-style": "double", + "spec-char-escape": false, + "attr-bans": [ + "align", + "background", + "bgcolor", + "border", + "frameborder", + "longdesc", + "marginwidth", + "marginheight", + "scrolling" + ], + "tag-bans": [ "b", "i" ], + "id-class-style": false +} diff --git a/htdocs/includes/chart/.travis.yml b/htdocs/includes/chart/.travis.yml new file mode 100644 index 00000000000..beb8789b46b --- /dev/null +++ b/htdocs/includes/chart/.travis.yml @@ -0,0 +1,55 @@ +language: node_js +node_js: + - lts/* + +before_install: + - "export CHROME_BIN=/usr/bin/google-chrome" + - "export DISPLAY=:99.0" + - "sh -e /etc/init.d/xvfb start" + +script: + - gulp build + - gulp test --coverage + - gulp docs + - gulp package + - gulp bower + - cat ./coverage/lcov.info | ./node_modules/.bin/coveralls || true + +sudo: required +dist: trusty + +addons: + chrome: stable + firefox: latest + +# IMPORTANT: scripts require GITHUB_AUTH_TOKEN and GITHUB_AUTH_EMAIL environment variables +# IMPORTANT: scripts has to be set executables in the Git repository (error 127) +# https://github.com/travis-ci/travis-ci/issues/5538#issuecomment-225025939 + +deploy: +- provider: script + script: ./scripts/deploy.sh + skip_cleanup: true + on: + all_branches: true +- provider: script + script: ./scripts/release.sh + skip_cleanup: true + on: + branch: release +- provider: releases + api_key: $GITHUB_AUTH_TOKEN + skip_cleanup: true + file_glob: true + file: + - ./dist/*.css + - ./dist/*.js + - ./dist/*.zip + on: + tags: true +- provider: npm + email: $NPM_AUTH_EMAIL + api_key: $NPM_AUTH_TOKEN + skip_cleanup: true + on: + tags: true diff --git a/htdocs/includes/chart/LICENSE.md b/htdocs/includes/chart/LICENSE.md new file mode 100644 index 00000000000..29c941dcccf --- /dev/null +++ b/htdocs/includes/chart/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) 2018 Chart.js Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/htdocs/includes/chart/MAINTAINING.md b/htdocs/includes/chart/MAINTAINING.md new file mode 100644 index 00000000000..288b03945ff --- /dev/null +++ b/htdocs/includes/chart/MAINTAINING.md @@ -0,0 +1,36 @@ +# Maintaining +## Release Process +Chart.js relies on [Travis CI](https://travis-ci.org/) to automate the library [releases](https://github.com/chartjs/Chart.js/releases). + +### Releasing a New Version + +1. draft release notes on [GitHub](https://github.com/chartjs/Chart.js/releases/new) for the upcoming tag +1. update `master` `package.json` version using [semver](https://semver.org/) semantic +1. merge `master` into the `release` branch +1. follow the build process on [Travis CI](https://travis-ci.org/chartjs/Chart.js) + +> **Note:** if `master` is merged in `release` with a `package.json` version that already exists, the tag +creation fails and the release process is aborted. + +### Automated Tasks +Merging into the `release` branch kicks off the automated release process: + +* build of the `dist/*.js` files +* `bower.json` is generated from `package.json` +* `dist/*.js` and `bower.json` are added to a detached branch +* a tag is created from the `package.json` version +* tag (with dist files) is pushed to GitHub + +Creation of this tag triggers a new build: + +* `Chart.js.zip` package is generated, containing dist files and examples +* `dist/*.js` and `Chart.js.zip` are attached to the GitHub release (downloads) +* a new npm package is published on [npmjs](https://www.npmjs.com/package/chart.js) + +Finally, [cdnjs](https://cdnjs.com/libraries/Chart.js) is automatically updated from the npm release. + +### Further Reading + +* [Travis GitHub releases](https://github.com/chartjs/Chart.js/pull/2555) +* [Bower support and dist/* files](https://github.com/chartjs/Chart.js/issues/3033) +* [cdnjs npm auto update](https://github.com/cdnjs/cdnjs/pull/8401) diff --git a/htdocs/includes/chart/README.md b/htdocs/includes/chart/README.md new file mode 100644 index 00000000000..5a522a5e915 --- /dev/null +++ b/htdocs/includes/chart/README.md @@ -0,0 +1,32 @@ +

+
+ Simple yet flexible JavaScript charting for designers & developers +

+ +

+ Downloads + Builds + Coverage + Awesome + Slack +

+ +## Documentation + +- [Introduction](https://www.chartjs.org/docs/latest/) +- [Getting Started](https://www.chartjs.org/docs/latest/getting-started/) +- [General](https://www.chartjs.org/docs/latest/general/) +- [Configuration](https://www.chartjs.org/docs/latest/configuration/) +- [Charts](https://www.chartjs.org/docs/latest/charts/) +- [Axes](https://www.chartjs.org/docs/latest/axes/) +- [Developers](https://www.chartjs.org/docs/latest/developers/) +- [Popular Extensions](https://github.com/chartjs/awesome) +- [Samples](https://www.chartjs.org/samples/) + +## Contributing + +Instructions on building and testing Chart.js can be found in [the documentation](https://github.com/chartjs/Chart.js/blob/master/docs/developers/contributing.md#building-and-testing). Before submitting an issue or a pull request, please take a moment to look over the [contributing guidelines](https://github.com/chartjs/Chart.js/blob/master/docs/developers/contributing.md) first. For support, please post questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/chartjs) with the `chartjs` tag. + +## License + +Chart.js is available under the [MIT license](https://opensource.org/licenses/MIT). diff --git a/htdocs/includes/chart/book.json b/htdocs/includes/chart/book.json new file mode 100644 index 00000000000..22acbde968c --- /dev/null +++ b/htdocs/includes/chart/book.json @@ -0,0 +1,32 @@ +{ + "root": "./docs", + "title": "Chart.js documentation", + "author": "chartjs", + "gitbook": "3.2.2", + "plugins": [ + "-lunr", + "-search", + "search-plus", + "anchorjs", + "chartjs", + "ga", + "redirect" + ], + "pluginsConfig": { + "anchorjs": { + "icon": "#", + "placement": "left", + "visible": "always" + }, + "ga": { + "token": "UA-28909194-3", + "configuration": "auto" + }, + "theme-default": { + "showLevel": false, + "styles": { + "website": "style.css" + } + } + } +} diff --git a/htdocs/includes/chart/composer.json b/htdocs/includes/chart/composer.json new file mode 100644 index 00000000000..b332bb0f595 --- /dev/null +++ b/htdocs/includes/chart/composer.json @@ -0,0 +1,26 @@ +{ + "name": "nnnick/chartjs", + "type": "library", + "description": "Simple HTML5 charts using the canvas element.", + "keywords": [ + "chart", + "js" + ], + "homepage": "https://www.chartjs.org/", + "license": "MIT", + "authors": [ + { + "name": "NICK DOWNIE", + "email": "hello@nickdownie.com" + } + ], + "require": { + "php": ">=5.3.3" + }, + "minimum-stability": "stable", + "extra": { + "branch-alias": { + "release/2.0": "v2.0-dev" + } + } +} diff --git a/htdocs/includes/chart/gulpfile.js b/htdocs/includes/chart/gulpfile.js new file mode 100644 index 00000000000..972b492f7a3 --- /dev/null +++ b/htdocs/includes/chart/gulpfile.js @@ -0,0 +1,172 @@ +var gulp = require('gulp'); +var eslint = require('gulp-eslint'); +var file = require('gulp-file'); +var replace = require('gulp-replace'); +var size = require('gulp-size'); +var streamify = require('gulp-streamify'); +var terser = require('gulp-terser'); +var zip = require('gulp-zip'); +var exec = require('child_process').exec; +var karma = require('karma'); +var merge = require('merge-stream'); +var yargs = require('yargs'); +var path = require('path'); +var htmllint = require('gulp-htmllint'); +var pkg = require('./package.json'); + +var argv = yargs + .option('verbose', {default: false}) + .argv; + +var srcDir = './src/'; +var outDir = './dist/'; + +gulp.task('bower', bowerTask); +gulp.task('build', buildTask); +gulp.task('package', packageTask); +gulp.task('lint-html', lintHtmlTask); +gulp.task('lint-js', lintJsTask); +gulp.task('lint', gulp.parallel('lint-html', 'lint-js')); +gulp.task('docs', docsTask); +gulp.task('unittest', unittestTask); +gulp.task('test', gulp.parallel('lint', 'unittest')); +gulp.task('library-size', librarySizeTask); +gulp.task('module-sizes', moduleSizesTask); +gulp.task('size', gulp.parallel('library-size', 'module-sizes')); +gulp.task('default', gulp.parallel('build')); + +function run(bin, args, done) { + return new Promise(function(resolve, reject) { + var exe = '"' + process.execPath + '"'; + var src = require.resolve(bin); + var cmd = [exe, src].concat(args || []).join(' '); + var ps = exec(cmd); + + ps.stdout.pipe(process.stdout); + ps.stderr.pipe(process.stderr); + ps.on('close', function(error) { + if (error) { + reject(error); + } else { + resolve(); + } + }); + }); +} + +/** + * Generates the bower.json manifest file which will be pushed along release tags. + * Specs: https://github.com/bower/spec/blob/master/json.md + */ +function bowerTask() { + var json = JSON.stringify({ + name: pkg.name, + description: pkg.description, + homepage: pkg.homepage, + license: pkg.license, + version: pkg.version, + main: outDir + 'Chart.js', + ignore: [ + '.github', + '.codeclimate.yml', + '.gitignore', + '.npmignore', + '.travis.yml', + 'scripts' + ] + }, null, 2); + + return file('bower.json', json, { src: true }) + .pipe(gulp.dest('./')); +} + +function buildTask() { + return run('rollup/dist/bin/rollup', ['-c', argv.watch ? '--watch' : '']); +} + +function packageTask() { + return merge( + // gather "regular" files landing in the package root + gulp.src([outDir + '*.js', outDir + '*.css', 'LICENSE.md']), + + // since we moved the dist files one folder up (package root), we need to rewrite + // samples src="../dist/ to src="../ and then copy them in the /samples directory. + gulp.src('./samples/**/*', { base: '.' }) + .pipe(streamify(replace(/src="((?:\.\.\/)+)dist\//g, 'src="$1'))) + ) + // finally, create the zip archive + .pipe(zip('Chart.js.zip')) + .pipe(gulp.dest(outDir)); +} + +function lintJsTask() { + var files = [ + 'samples/**/*.html', + 'samples/**/*.js', + 'src/**/*.js', + 'test/**/*.js' + ]; + + // NOTE(SB) codeclimate has 'complexity' and 'max-statements' eslint rules way too strict + // compare to what the current codebase can support, and since it's not straightforward + // to fix, let's turn them as warnings and rewrite code later progressively. + var options = { + rules: { + 'complexity': [1, 10], + 'max-statements': [1, 30] + } + }; + + return gulp.src(files) + .pipe(eslint(options)) + .pipe(eslint.format()) + .pipe(eslint.failAfterError()); +} + +function lintHtmlTask() { + return gulp.src('samples/**/*.html') + .pipe(htmllint({ + failOnError: true, + })); +} + +function docsTask() { + var bin = 'gitbook-cli/bin/gitbook.js'; + var cmd = argv.watch ? 'serve' : 'build'; + + return run(bin, ['install', './']) + .then(() => run(bin, [cmd, './', './dist/docs'])); +} + +function unittestTask(done) { + new karma.Server({ + configFile: path.join(__dirname, 'karma.conf.js'), + singleRun: !argv.watch, + args: { + coverage: !!argv.coverage, + inputs: (argv.inputs || 'test/specs/**/*.js').split(';'), + watch: argv.watch + } + }, + // https://github.com/karma-runner/gulp-karma/issues/18 + function(error) { + error = error ? new Error('Karma returned with the error code: ' + error) : undefined; + done(error); + }).start(); +} + +function librarySizeTask() { + return gulp.src('dist/Chart.bundle.min.js') + .pipe(size({ + gzip: true + })); +} + +function moduleSizesTask() { + return gulp.src(srcDir + '**/*.js') + .pipe(terser()) + .pipe(size({ + showFiles: true, + gzip: true + })); +} diff --git a/htdocs/includes/chart/karma.conf.js b/htdocs/includes/chart/karma.conf.js new file mode 100644 index 00000000000..d7aae642a2e --- /dev/null +++ b/htdocs/includes/chart/karma.conf.js @@ -0,0 +1,108 @@ +/* eslint-env es6 */ + +const commonjs = require('rollup-plugin-commonjs'); +const istanbul = require('rollup-plugin-istanbul'); +const resolve = require('rollup-plugin-node-resolve'); +const builds = require('./rollup.config'); + +module.exports = function(karma) { + const args = karma.args || {}; + + // Use the same rollup config as our dist files: when debugging (--watch), + // we will prefer the unminified build which is easier to browse and works + // better with source mapping. In other cases, pick the minified build to + // make sure that the minification process (terser) doesn't break anything. + const regex = args.watch ? /Chart\.js$/ : /Chart\.min\.js$/; + const build = builds.filter(v => v.output.file.match(regex))[0]; + + if (args.watch) { + build.output.sourcemap = 'inline'; + } + + karma.set({ + frameworks: ['jasmine'], + reporters: ['progress', 'kjhtml'], + browsers: ['chrome', 'firefox'], + logLevel: karma.LOG_WARN, + + // Explicitly disable hardware acceleration to make image + // diff more stable when ran on Travis and dev machine. + // https://github.com/chartjs/Chart.js/pull/5629 + customLaunchers: { + chrome: { + base: 'Chrome', + flags: [ + '--disable-accelerated-2d-canvas' + ] + }, + firefox: { + base: 'Firefox', + prefs: { + 'layers.acceleration.disabled': true + } + } + }, + + files: [ + {pattern: 'test/fixtures/**/*.js', included: false}, + {pattern: 'test/fixtures/**/*.json', included: false}, + {pattern: 'test/fixtures/**/*.png', included: false}, + 'node_modules/moment/min/moment.min.js', + 'test/index.js', + 'src/index.js' + ].concat(args.inputs), + + preprocessors: { + 'test/index.js': ['rollup'], + 'src/index.js': ['sources'] + }, + + rollupPreprocessor: { + plugins: [ + resolve(), + commonjs() + ], + output: { + name: 'test', + format: 'umd' + } + }, + + customPreprocessors: { + sources: { + base: 'rollup', + options: build + } + }, + + // These settings deal with browser disconnects. We had seen test flakiness from Firefox + // [Firefox 56.0.0 (Linux 0.0.0)]: Disconnected (1 times), because no message in 10000 ms. + // https://github.com/jasmine/jasmine/issues/1327#issuecomment-332939551 + browserDisconnectTolerance: 3 + }); + + // https://swizec.com/blog/how-to-run-javascript-tests-in-chrome-on-travis/swizec/6647 + if (process.env.TRAVIS) { + karma.customLaunchers.chrome.flags.push('--no-sandbox'); + } + + if (args.coverage) { + karma.reporters.push('coverage'); + karma.coverageReporter = { + dir: 'coverage/', + reporters: [ + {type: 'html', subdir: 'html'}, + {type: 'lcovonly', subdir: '.'} + ] + }; + [ + karma.rollupPreprocessor, + karma.customPreprocessors.sources.options + ].forEach(v => { + (v.plugins || (v.plugins = [])).unshift( + istanbul({ + include: 'src/**/*.js' + })); + }); + } +}; diff --git a/htdocs/includes/chart/package-lock.json b/htdocs/includes/chart/package-lock.json new file mode 100644 index 00000000000..b6259567a6e --- /dev/null +++ b/htdocs/includes/chart/package-lock.json @@ -0,0 +1,12752 @@ +{ + "name": "chart.js", + "version": "2.9.3", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", + "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "dev": true, + "requires": { + "@babel/highlight": "^7.0.0" + } + }, + "@babel/highlight": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", + "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + } + }, + "@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true + }, + "@types/node": { + "version": "12.12.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.3.tgz", + "integrity": "sha512-opgSsy+cEF9N8MgaVPnWVtdJ3o4mV2aMHvDq7thkQUFt0EuOHJon4rQpJfhjmNHB+ikl0Cd6WhWIErOyQ+f7tw==", + "dev": true + }, + "@types/resolve": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", + "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "abbrev": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", + "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", + "dev": true + }, + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "dev": true, + "requires": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + } + }, + "acorn": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz", + "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==", + "dev": true + }, + "acorn-jsx": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz", + "integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==", + "dev": true + }, + "after": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", + "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=", + "dev": true + }, + "ajv": { + "version": "6.10.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", + "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true, + "optional": true + }, + "ansi-colors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", + "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", + "dev": true, + "requires": { + "ansi-wrap": "^0.1.0" + } + }, + "ansi-cyan": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-cyan/-/ansi-cyan-0.1.1.tgz", + "integrity": "sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, + "ansi-gray": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", + "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-red": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz", + "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "ansi-wrap": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", + "dev": true + }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "append-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz", + "integrity": "sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE=", + "dev": true, + "requires": { + "buffer-equal": "^1.0.0" + } + }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-filter": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/arr-filter/-/arr-filter-1.1.2.tgz", + "integrity": "sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4=", + "dev": true, + "requires": { + "make-iterator": "^1.0.0" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/arr-map/-/arr-map-2.0.2.tgz", + "integrity": "sha1-Onc0X/wc814qkYJWAfnljy4kysQ=", + "dev": true, + "requires": { + "make-iterator": "^1.0.0" + } + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", + "dev": true + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "array-initial": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz", + "integrity": "sha1-L6dLJnOTccOUe9enrcc74zSz15U=", + "dev": true, + "requires": { + "array-slice": "^1.0.0", + "is-number": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + } + } + }, + "array-last": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/array-last/-/array-last-1.3.0.tgz", + "integrity": "sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==", + "dev": true, + "requires": { + "is-number": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + } + } + }, + "array-slice": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", + "dev": true + }, + "array-sort": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-sort/-/array-sort-1.0.0.tgz", + "integrity": "sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg==", + "dev": true, + "requires": { + "default-compare": "^1.0.0", + "get-value": "^2.0.6", + "kind-of": "^5.0.2" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "arraybuffer.slice": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", + "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==", + "dev": true + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", + "dev": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, + "requires": { + "lodash": "^4.17.14" + } + }, + "async-done": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.2.tgz", + "integrity": "sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.2", + "process-nextick-args": "^2.0.0", + "stream-exhaust": "^1.0.1" + } + }, + "async-each": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", + "dev": true + }, + "async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", + "dev": true + }, + "async-settle": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-settle/-/async-settle-1.0.0.tgz", + "integrity": "sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs=", + "dev": true, + "requires": { + "async-done": "^1.2.2" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "babel-generator": { + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", + "dev": true, + "requires": { + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "dev": true, + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, + "bach": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz", + "integrity": "sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA=", + "dev": true, + "requires": { + "arr-filter": "^1.1.1", + "arr-flatten": "^1.0.1", + "arr-map": "^2.0.0", + "array-each": "^1.0.0", + "array-initial": "^1.0.0", + "array-last": "^1.1.1", + "async-done": "^1.2.2", + "async-settle": "^1.0.0", + "now-and-later": "^2.0.0" + } + }, + "backo2": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", + "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "base64-arraybuffer": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", + "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=", + "dev": true + }, + "base64id": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz", + "integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY=", + "dev": true + }, + "bash-color": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/bash-color/-/bash-color-0.0.4.tgz", + "integrity": "sha1-6b6M4zVAytpIgXaMWb1jhlc26RM=", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "better-assert": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", + "integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=", + "dev": true, + "requires": { + "callsite": "1.0.0" + } + }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true + }, + "binaryextensions": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-2.1.2.tgz", + "integrity": "sha512-xVNN69YGDghOqCCtA6FI7avYrr02mTJjOgB0/f1VPD3pJC8QEvjTKWc4epDx8AqxxA75NI0QpVM2gPJXUbE4Tg==", + "dev": true + }, + "blob": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz", + "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==", + "dev": true + }, + "bluebird": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.1.tgz", + "integrity": "sha512-DdmyoGCleJnkbp3nkbxTLJ18rjDsE4yCggEwKNXkeV123sPNfOCYeDoeuOY+F2FrSjO1YXcTU+dsy96KMy+gcg==", + "dev": true + }, + "body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "dev": true, + "requires": { + "bytes": "3.1.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", + "dev": true + } + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "dev": true, + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", + "dev": true + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true + }, + "buffer-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", + "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=", + "dev": true + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", + "dev": true + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "builtin-modules": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz", + "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==", + "dev": true + }, + "bulk-require": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bulk-require/-/bulk-require-1.0.1.tgz", + "integrity": "sha1-yz0DnmmBOaRE/FdLJh1rOyz0TIk=", + "dev": true, + "requires": { + "glob": "^7.1.1" + } + }, + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", + "dev": true + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "callsite": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", + "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", + "dev": true + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + }, + "dependencies": { + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + } + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "chartjs-color": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chartjs-color/-/chartjs-color-2.4.1.tgz", + "integrity": "sha512-haqOg1+Yebys/Ts/9bLo/BqUcONQOdr/hoEr2LLTRl6C5LXctUdHxsCYfvQVg5JIxITrfCNUDr4ntqmQk9+/0w==", + "requires": { + "chartjs-color-string": "^0.6.0", + "color-convert": "^1.9.3" + } + }, + "chartjs-color-string": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/chartjs-color-string/-/chartjs-color-string-0.6.0.tgz", + "integrity": "sha512-TIB5OKn1hPJvO7JcteW4WY/63v6KwEdt6udfnDE9iCAZgy+V4SrbSxoIbTw/xkUIapjEI4ExGtD0+6D3KyFd7A==", + "requires": { + "color-name": "^1.0.0" + } + }, + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + } + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "clean-css": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz", + "integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==", + "dev": true, + "requires": { + "source-map": "~0.6.0" + } + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, + "clone-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", + "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", + "dev": true + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "cloneable-readable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz", + "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "process-nextick-args": "^2.0.0", + "readable-stream": "^2.3.5" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "collection-map": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-map/-/collection-map-1.0.0.tgz", + "integrity": "sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw=", + "dev": true, + "requires": { + "arr-map": "^2.0.2", + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + }, + "dependencies": { + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + } + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true + }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", + "dev": true + }, + "component-bind": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", + "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=", + "dev": true + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true + }, + "component-inherit": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", + "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "connect": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", + "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", + "dev": true, + "requires": { + "debug": "2.6.9", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", + "utils-merge": "1.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "dev": true + }, + "convert-source-map": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", + "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", + "dev": true + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "copy-props": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.4.tgz", + "integrity": "sha512-7cjuUME+p+S3HZlbllgsn2CDwS+5eCCX16qBgNC4jgSTf49qR1VKy/Zhl400m0IQXl/bPGEVqncgUUMjrr4s8A==", + "dev": true, + "requires": { + "each-props": "^1.3.0", + "is-plain-object": "^2.0.1" + } + }, + "core-js": { + "version": "2.6.10", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.10.tgz", + "integrity": "sha512-I39t74+4t+zau64EN1fE5v2W31Adtc/REhzWN+gWRRXg6WH5qAsZm62DHpQ1+Yhe4047T55jvzz7MUqF/dBBlA==", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "coveralls": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.0.7.tgz", + "integrity": "sha512-mUuH2MFOYB2oBaA4D4Ykqi9LaEYpMMlsiOMJOrv358yAjP6enPIk55fod2fNJ8AvwoYXStWQls37rA+s5e7boA==", + "dev": true, + "requires": { + "growl": "~> 1.10.0", + "js-yaml": "^3.13.1", + "lcov-parse": "^0.0.10", + "log-driver": "^1.2.7", + "minimist": "^1.2.0", + "request": "^2.86.0" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "^1.0.1" + } + }, + "custom-event": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", + "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=", + "dev": true + }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dev": true, + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "date-format": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-2.1.0.tgz", + "integrity": "sha512-bYQuGLeFxhkxNOF3rcMtiZxvCBAquGzZm6oWA1oZ0g2THUzivaRhv8uOhdr19LmoobSOLoIAxeUK2RdbM8IFTA==", + "dev": true + }, + "dateformat": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz", + "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1", + "meow": "^3.3.0" + } + }, + "debounce": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.0.tgz", + "integrity": "sha512-mYtLl1xfZLi1m4RtQYlZgJUNQjl4ZxVnHzIR8nLLgi4q1YT8o/WM+MK/f8yfcc9s5Ir5zRaPZyZU6xs1Syoocg==", + "dev": true + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "default-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/default-compare/-/default-compare-1.0.0.tgz", + "integrity": "sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ==", + "dev": true, + "requires": { + "kind-of": "^5.0.2" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "default-resolution": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-resolution/-/default-resolution-2.0.0.tgz", + "integrity": "sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ=", + "dev": true + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true + }, + "detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", + "dev": true + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "di": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", + "integrity": "sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw=", + "dev": true + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "dom-serialize": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", + "integrity": "sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs=", + "dev": true, + "requires": { + "custom-event": "~1.0.0", + "ent": "~2.2.0", + "extend": "^3.0.0", + "void-elements": "^2.0.0" + } + }, + "dom-serializer": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.1.tgz", + "integrity": "sha512-sK3ujri04WyjwQXVoK4PU3y8ula1stq10GJZpqHIUgoGZdsGzAGu65BnU3d08aTVSvO7mGPZUc0wTEDL+qGE0Q==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + }, + "dependencies": { + "domelementtype": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz", + "integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==", + "dev": true + }, + "entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz", + "integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==", + "dev": true + } + } + }, + "domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", + "dev": true + }, + "domhandler": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", + "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "domutils": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", + "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "duplexer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", + "dev": true + }, + "duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dev": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "each-props": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/each-props/-/each-props-1.3.2.tgz", + "integrity": "sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.1", + "object.defaults": "^1.1.0" + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "editions": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/editions/-/editions-1.3.4.tgz", + "integrity": "sha512-gzao+mxnYDzIysXKMQi/+M1mjy/rjestjg6OPoYTtI+3Izp23oiGZitsl9lPDPiTGXbcSIk1iJWhliSaglxnUg==", + "dev": true + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "engine.io": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.2.1.tgz", + "integrity": "sha512-+VlKzHzMhaU+GsCIg4AoXF1UdDFjHHwMmMKqMJNDNLlUlejz58FCy4LBqB2YVJskHGYl06BatYWKP2TVdVXE5w==", + "dev": true, + "requires": { + "accepts": "~1.3.4", + "base64id": "1.0.0", + "cookie": "0.3.1", + "debug": "~3.1.0", + "engine.io-parser": "~2.1.0", + "ws": "~3.3.1" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "engine.io-client": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.2.1.tgz", + "integrity": "sha512-y5AbkytWeM4jQr7m/koQLc5AxpRKC1hEVUb/s1FUAWEJq5AzJJ4NLvzuKPuxtDi5Mq755WuDvZ6Iv2rXj4PTzw==", + "dev": true, + "requires": { + "component-emitter": "1.2.1", + "component-inherit": "0.0.3", + "debug": "~3.1.0", + "engine.io-parser": "~2.1.1", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "parseqs": "0.0.5", + "parseuri": "0.0.5", + "ws": "~3.3.1", + "xmlhttprequest-ssl": "~1.5.4", + "yeast": "0.1.2" + }, + "dependencies": { + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "engine.io-parser": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.3.tgz", + "integrity": "sha512-6HXPre2O4Houl7c4g7Ic/XzPnHBvaEmN90vtRO9uLmwtRqQmTOw0QMevL1TOfL2Cpu1VzsaTmMotQgMdkzGkVA==", + "dev": true, + "requires": { + "after": "0.8.2", + "arraybuffer.slice": "~0.0.7", + "base64-arraybuffer": "0.1.5", + "blob": "0.0.5", + "has-binary2": "~1.0.2" + } + }, + "ent": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", + "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=", + "dev": true + }, + "entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "dev": true + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es5-ext": { + "version": "0.10.52", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.52.tgz", + "integrity": "sha512-bWCbE9fbpYQY4CU6hJbJ1vSz70EClMlDgJ7BmwI+zEJhxrwjesZRPglGJlsZhu0334U3hI+gaspwksH9IGD6ag==", + "dev": true, + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.2", + "next-tick": "~1.0.0" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dev": true, + "requires": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "escodegen": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", + "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", + "dev": true, + "requires": { + "esprima": "^2.7.1", + "estraverse": "^1.9.1", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.2.0" + }, + "dependencies": { + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true + }, + "estraverse": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", + "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", + "dev": true + }, + "source-map": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", + "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", + "dev": true, + "optional": true, + "requires": { + "amdefine": ">=0.0.4" + } + } + } + }, + "eslint": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", + "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.9.1", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^4.0.3", + "eslint-utils": "^1.3.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^5.0.1", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.7.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^6.2.2", + "js-yaml": "^3.13.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.11", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^5.5.1", + "strip-ansi": "^4.0.0", + "strip-json-comments": "^2.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0" + } + }, + "eslint-config-chartjs": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-chartjs/-/eslint-config-chartjs-0.1.0.tgz", + "integrity": "sha512-oHVKBYO1tQQt82Q9ZOe9dM5y0f5iqXOSWVU7ni9Xd2omEOdnqCrMsBSh+4ME+rYjhKppfglSi+WkXJIvpn6xbA==", + "dev": true + }, + "eslint-plugin-html": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-html/-/eslint-plugin-html-5.0.5.tgz", + "integrity": "sha512-v/33i3OD0fuXcRXexVyXXBOe4mLBLBQoF1UO1Uy9D+XLq4MC8K45GcQKfqjC/FnHAHp3pYUjpHHktYNCtShGmg==", + "dev": true, + "requires": { + "htmlparser2": "^3.10.0" + } + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", + "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", + "dev": true + }, + "espree": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", + "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", + "dev": true, + "requires": { + "acorn": "^6.0.7", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "dev": true, + "requires": { + "estraverse": "^4.0.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "eventemitter3": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.0.tgz", + "integrity": "sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg==", + "dev": true + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "dependencies": { + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "ext": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.1.2.tgz", + "integrity": "sha512-/KLjJdTNyDepCihrk4HQt57nAE1IRCEo5jUt+WgWGCr1oARhibDvmI2DMcSNWood1T9AUWwq+jaV1wvRqaXfnA==", + "dev": true, + "requires": { + "type": "^2.0.0" + }, + "dependencies": { + "type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.0.0.tgz", + "integrity": "sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow==", + "dev": true + } + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fancy-log": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz", + "integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==", + "dev": true, + "requires": { + "ansi-gray": "^0.1.1", + "color-support": "^1.1.3", + "parse-node-version": "^1.0.0", + "time-stamp": "^1.0.0" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "findup-sync": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", + "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + } + }, + "fined": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", + "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^2.0.3", + "object.defaults": "^1.1.0", + "object.pick": "^1.2.0", + "parse-filepath": "^1.0.1" + } + }, + "flagged-respawn": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", + "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", + "dev": true + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "flatted": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", + "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", + "dev": true + }, + "flush-write-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "follow-redirects": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.9.0.tgz", + "integrity": "sha512-CRcPzsSIbXyVDl0QI01muNDu69S8trU4jArW9LpOt2WtC6LyUJetcIrmfHsRBx7/Jb6GHJUiuqyYxPooFfNt6A==", + "dev": true, + "requires": { + "debug": "^3.0.0" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fs-access": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", + "integrity": "sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o=", + "dev": true, + "requires": { + "null-check": "^1.0.0" + } + }, + "fs-extra": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-3.0.1.tgz", + "integrity": "sha1-N5TzeMWLNC6n27sjCVEJxLO2IpE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^3.0.0", + "universalify": "^0.1.0" + } + }, + "fs-mkdirp-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", + "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "through2": "^2.0.3" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", + "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", + "dev": true, + "optional": true, + "requires": { + "nan": "^2.12.1", + "node-pre-gyp": "^0.12.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "^2.1.1" + } + }, + "deep-extend": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.24", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true, + "optional": true + }, + "minipass": { + "version": "2.3.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.3.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "^4.1.0", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.12.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.4.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.7.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "yallist": { + "version": "3.0.3", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "dev": true + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "gitbook-cli": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/gitbook-cli/-/gitbook-cli-2.3.2.tgz", + "integrity": "sha512-eyGtkY7jKHhmgpfuvgAP5fZcUob/FBz4Ld0aLRdEmiTrS1RklimN9epzPp75dd4MWpGhYvSbiwxnpyLiv1wh6A==", + "dev": true, + "requires": { + "bash-color": "0.0.4", + "commander": "2.11.0", + "fs-extra": "3.0.1", + "lodash": "4.17.4", + "npm": "5.1.0", + "npmi": "1.0.1", + "optimist": "0.6.1", + "q": "1.5.0", + "semver": "5.3.0", + "tmp": "0.0.31", + "user-home": "2.0.0" + }, + "dependencies": { + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", + "dev": true + }, + "semver": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", + "dev": true + }, + "tmp": { + "version": "0.0.31", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.31.tgz", + "integrity": "sha1-jzirlDjhcxXl29izZX6L+yd65Kc=", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.1" + } + } + } + }, + "glob": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.5.tgz", + "integrity": "sha512-J9dlskqUXK1OeTOYBEn5s8aMukWMwWfs+rPTn/jn50Ux4MNXVhubL1wu/j2t+H4NVI+cXEcCaYellqaPVGXNqQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "glob-stream": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", + "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=", + "dev": true, + "requires": { + "extend": "^3.0.0", + "glob": "^7.1.1", + "glob-parent": "^3.1.0", + "is-negated-glob": "^1.0.0", + "ordered-read-streams": "^1.0.0", + "pumpify": "^1.3.5", + "readable-stream": "^2.1.5", + "remove-trailing-separator": "^1.0.1", + "to-absolute-glob": "^2.0.0", + "unique-stream": "^2.0.2" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "glob-watcher": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.3.tgz", + "integrity": "sha512-8tWsULNEPHKQ2MR4zXuzSmqbdyV5PtwwCaWSGQ1WwHsJ07ilNeN1JB8ntxhckbnpSHaf9dXFUHzIWvm1I13dsg==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-done": "^1.2.0", + "chokidar": "^2.0.0", + "is-negated-glob": "^1.0.0", + "just-debounce": "^1.0.0", + "object.defaults": "^1.1.0" + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "glogg": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz", + "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==", + "dev": true, + "requires": { + "sparkles": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", + "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", + "dev": true + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "gulp": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz", + "integrity": "sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA==", + "dev": true, + "requires": { + "glob-watcher": "^5.0.3", + "gulp-cli": "^2.2.0", + "undertaker": "^1.2.1", + "vinyl-fs": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "gulp-cli": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.2.0.tgz", + "integrity": "sha512-rGs3bVYHdyJpLqR0TUBnlcZ1O5O++Zs4bA0ajm+zr3WFCfiSLjGwoCBqFs18wzN+ZxahT9DkOK5nDf26iDsWjA==", + "dev": true, + "requires": { + "ansi-colors": "^1.0.1", + "archy": "^1.0.0", + "array-sort": "^1.0.0", + "color-support": "^1.1.3", + "concat-stream": "^1.6.0", + "copy-props": "^2.0.1", + "fancy-log": "^1.3.2", + "gulplog": "^1.0.0", + "interpret": "^1.1.0", + "isobject": "^3.0.1", + "liftoff": "^3.1.0", + "matchdep": "^2.0.0", + "mute-stdout": "^1.0.0", + "pretty-hrtime": "^1.0.0", + "replace-homedir": "^1.0.0", + "semver-greatest-satisfied-range": "^1.1.0", + "v8flags": "^3.0.1", + "yargs": "^7.1.0" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "yargs": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", + "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", + "dev": true, + "requires": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^5.0.0" + } + } + } + }, + "gulp-eslint": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/gulp-eslint/-/gulp-eslint-5.0.0.tgz", + "integrity": "sha512-9GUqCqh85C7rP9120cpxXuZz2ayq3BZc85pCTuPJS03VQYxne0aWPIXWx6LSvsGPa3uRqtSO537vaugOh+5cXg==", + "dev": true, + "requires": { + "eslint": "^5.0.1", + "fancy-log": "^1.3.2", + "plugin-error": "^1.0.1" + } + }, + "gulp-file": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/gulp-file/-/gulp-file-0.4.0.tgz", + "integrity": "sha1-RRNWoqxQicbbkaBEQlKgVDZXAGs=", + "dev": true, + "requires": { + "through2": "^0.4.1", + "vinyl": "^2.1.0" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "object-keys": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", + "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "through2": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.4.2.tgz", + "integrity": "sha1-2/WGYDEVHsg1K7bE22SiKSqEC5s=", + "dev": true, + "requires": { + "readable-stream": "~1.0.17", + "xtend": "~2.1.1" + } + }, + "xtend": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", + "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", + "dev": true, + "requires": { + "object-keys": "~0.4.0" + } + } + } + }, + "gulp-htmllint": { + "version": "0.0.16", + "resolved": "https://registry.npmjs.org/gulp-htmllint/-/gulp-htmllint-0.0.16.tgz", + "integrity": "sha512-7lE9Doz/NgPVSKKJyCnzWwXTj+sd8opUC9AvuDsy35dniOvDqc2oNX4sB4MR29aCucauFmpeqMvR3XNPHO3YJA==", + "dev": true, + "requires": { + "ansi-colors": "^2.0.5", + "fancy-log": "^1.3.2", + "htmllint": "^0.7.2", + "plugin-error": "^1.0.1", + "through2": "^2.0.3" + }, + "dependencies": { + "ansi-colors": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-2.0.5.tgz", + "integrity": "sha512-yAdfUZ+c2wetVNIFsNRn44THW+Lty6S5TwMpUfLA/UaGhiXbBv/F8E60/1hMLd0cnF/CDoWH8vzVaI5bAcHCjw==", + "dev": true + } + } + }, + "gulp-replace": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulp-replace/-/gulp-replace-1.0.0.tgz", + "integrity": "sha512-lgdmrFSI1SdhNMXZQbrC75MOl1UjYWlOWNbNRnz+F/KHmgxt3l6XstBoAYIdadwETFyG/6i+vWUSCawdC3pqOw==", + "dev": true, + "requires": { + "istextorbinary": "2.2.1", + "readable-stream": "^2.0.1", + "replacestream": "^4.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "gulp-size": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/gulp-size/-/gulp-size-3.0.0.tgz", + "integrity": "sha1-yxrI5rqD3t5SQwxH/QOTJPAD/4I=", + "dev": true, + "requires": { + "chalk": "^2.3.0", + "fancy-log": "^1.3.2", + "gzip-size": "^4.1.0", + "plugin-error": "^0.1.2", + "pretty-bytes": "^4.0.2", + "stream-counter": "^1.0.0", + "through2": "^2.0.0" + }, + "dependencies": { + "arr-diff": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz", + "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1", + "array-slice": "^0.2.3" + } + }, + "arr-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz", + "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=", + "dev": true + }, + "array-slice": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", + "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=", + "dev": true + }, + "extend-shallow": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", + "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", + "dev": true, + "requires": { + "kind-of": "^1.1.0" + } + }, + "kind-of": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", + "dev": true + }, + "plugin-error": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz", + "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", + "dev": true, + "requires": { + "ansi-cyan": "^0.1.1", + "ansi-red": "^0.1.1", + "arr-diff": "^1.0.1", + "arr-union": "^2.0.1", + "extend-shallow": "^1.1.2" + } + } + } + }, + "gulp-streamify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/gulp-streamify/-/gulp-streamify-1.0.2.tgz", + "integrity": "sha1-ANazgU1IbAiPeHOO0HZqvBY4nk0=", + "dev": true, + "requires": { + "plexer": "1.0.1" + } + }, + "gulp-terser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gulp-terser/-/gulp-terser-1.2.0.tgz", + "integrity": "sha512-lf+jE2DALg2w32p0HRiYMlFYRYelKZPNunHp2pZccCYrrdCLOs0ItbZcN63yr2pbz116IyhUG9mD/QbtRO1FKA==", + "dev": true, + "requires": { + "plugin-error": "^1.0.1", + "terser": "^4.0.0", + "through2": "^3.0.1", + "vinyl-sourcemaps-apply": "^0.2.1" + }, + "dependencies": { + "through2": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", + "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", + "dev": true, + "requires": { + "readable-stream": "2 || 3" + } + } + } + }, + "gulp-zip": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/gulp-zip/-/gulp-zip-4.2.0.tgz", + "integrity": "sha512-I+697f6jf+PncdTrqfuwoauxgnLG1yHRg3vlmvDgmJuEnlEHy4meBktJ/oHgfyg4tp6X25wuZqUOraVeVg97wQ==", + "dev": true, + "requires": { + "get-stream": "^3.0.0", + "plugin-error": "^0.1.2", + "through2": "^2.0.1", + "vinyl": "^2.1.0", + "yazl": "^2.1.0" + }, + "dependencies": { + "arr-diff": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz", + "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1", + "array-slice": "^0.2.3" + } + }, + "arr-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz", + "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=", + "dev": true + }, + "array-slice": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", + "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=", + "dev": true + }, + "extend-shallow": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", + "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", + "dev": true, + "requires": { + "kind-of": "^1.1.0" + } + }, + "kind-of": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", + "dev": true + }, + "plugin-error": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz", + "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", + "dev": true, + "requires": { + "ansi-cyan": "^0.1.1", + "ansi-red": "^0.1.1", + "arr-diff": "^1.0.1", + "arr-union": "^2.0.1", + "extend-shallow": "^1.1.2" + } + } + } + }, + "gulplog": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", + "dev": true, + "requires": { + "glogg": "^1.0.0" + } + }, + "gzip-size": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-4.1.0.tgz", + "integrity": "sha1-iuCWJX6r59acRb4rZ8RIEk/7UXw=", + "dev": true, + "requires": { + "duplexer": "^0.1.1", + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "handlebars": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.1.tgz", + "integrity": "sha512-C29UoFzHe9yM61lOsIlCE5/mQVGrnIOrOq7maQl76L7tYPCgC1og0Ajt6uWnX4ZTxBPnjw+CUvawphwCfJgUnA==", + "dev": true, + "requires": { + "neo-async": "^2.6.0", + "optimist": "^0.6.1", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "dev": true, + "requires": { + "ajv": "^6.5.5", + "har-schema": "^2.0.0" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + } + } + }, + "has-binary2": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", + "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", + "dev": true, + "requires": { + "isarray": "2.0.1" + }, + "dependencies": { + "isarray": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", + "dev": true + } + } + }, + "has-cors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", + "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "dev": true, + "requires": { + "parse-passwd": "^1.0.0" + } + }, + "hosted-git-info": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz", + "integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==", + "dev": true + }, + "htmllint": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/htmllint/-/htmllint-0.7.3.tgz", + "integrity": "sha512-h8wfCu0CC0FVo18Jkygv7xqj0fa23Xlv4QsR2n34LDr8eqpf4glfbNg1HTbiCqpT3ONioMOfk8EkFUbZgrO1KA==", + "dev": true, + "requires": { + "bulk-require": "^1.0.1", + "htmlparser2": "^3.10.0", + "lodash": "^4.17.11", + "promise": "^8.0.2" + } + }, + "htmlparser2": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", + "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", + "dev": true, + "requires": { + "domelementtype": "^1.3.1", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^3.1.1" + } + }, + "http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + } + } + }, + "http-proxy": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.0.tgz", + "integrity": "sha512-84I2iJM/n1d4Hdgc6y2+qY5mDaz2PUVjlg9znE9byl+q0uC3DeByqBGReQu5tpLK0TAqTIXScRUV+dg7+bUPpQ==", + "dev": true, + "requires": { + "eventemitter3": "^4.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.1.0.tgz", + "integrity": "sha512-PpuksHKGt8rXfWEr9m9EHIpgyyaltBy8+eF6GJM0QCAxMgxCfucMF3mjecK2QsJr0amJW7gTqh5/wht0z2UhEQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, + "inquirer": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", + "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", + "dev": true, + "requires": { + "ansi-escapes": "^3.2.0", + "chalk": "^2.4.2", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^2.0.0", + "lodash": "^4.17.12", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^6.4.0", + "string-width": "^2.1.0", + "strip-ansi": "^5.1.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "interpret": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", + "dev": true + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "dev": true, + "requires": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", + "dev": true + }, + "is-negated-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", + "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=", + "dev": true + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-reference": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.4.tgz", + "integrity": "sha512-uJA/CDPO3Tao3GTrxYn6AwkM4nUPJiGGYu5+cB8qbC7WGFlrKZbiRo7SFKxUAEpFUfiHofWCXBUNhvYJMh+6zw==", + "dev": true, + "requires": { + "@types/estree": "0.0.39" + } + }, + "is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "dev": true, + "requires": { + "is-unc-path": "^1.0.0" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "dev": true, + "requires": { + "unc-path-regex": "^0.1.2" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-valid-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", + "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "is-wsl": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.1.1.tgz", + "integrity": "sha512-umZHcSrwlDHo2TGMXv0DZ8dIUGunZ2Iv68YZnrmCiBPkZ4aaOhtv7pXJKeki9k3qJ3RJr0cDyitcl5wEH3AYog==", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isbinaryfile": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.3.tgz", + "integrity": "sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw==", + "dev": true, + "requires": { + "buffer-alloc": "^1.2.0" + } + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "istanbul": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", + "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", + "dev": true, + "requires": { + "abbrev": "1.0.x", + "async": "1.x", + "escodegen": "1.8.x", + "esprima": "2.7.x", + "glob": "^5.0.15", + "handlebars": "^4.0.1", + "js-yaml": "3.x", + "mkdirp": "0.5.x", + "nopt": "3.x", + "once": "1.x", + "resolve": "1.1.x", + "supports-color": "^3.1.0", + "which": "^1.1.1", + "wordwrap": "^1.0.0" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true + }, + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } + } + } + }, + "istanbul-lib-coverage": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz", + "integrity": "sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ==", + "dev": true + }, + "istanbul-lib-instrument": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz", + "integrity": "sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A==", + "dev": true, + "requires": { + "babel-generator": "^6.18.0", + "babel-template": "^6.16.0", + "babel-traverse": "^6.18.0", + "babel-types": "^6.18.0", + "babylon": "^6.18.0", + "istanbul-lib-coverage": "^1.2.1", + "semver": "^5.3.0" + } + }, + "istextorbinary": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-2.2.1.tgz", + "integrity": "sha512-TS+hoFl8Z5FAFMK38nhBkdLt44CclNRgDHWeMgsV8ko3nDlr/9UI2Sf839sW7enijf8oKsZYXRvM8g0it9Zmcw==", + "dev": true, + "requires": { + "binaryextensions": "2", + "editions": "^1.3.3", + "textextensions": "2" + } + }, + "jasmine": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-3.5.0.tgz", + "integrity": "sha512-DYypSryORqzsGoMazemIHUfMkXM7I7easFaxAvNM3Mr6Xz3Fy36TupTrAOxZWN8MVKEU5xECv22J4tUQf3uBzQ==", + "dev": true, + "requires": { + "glob": "^7.1.4", + "jasmine-core": "~3.5.0" + } + }, + "jasmine-core": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-3.5.0.tgz", + "integrity": "sha512-nCeAiw37MIMA9w9IXso7bRaLl+c/ef3wnxsoSAlYrzS+Ot0zTG6nU8G/cIfGkqpkjX2wNaIW9RFG0TwIFnG6bA==", + "dev": true + }, + "jest-worker": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.9.0.tgz", + "integrity": "sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw==", + "dev": true, + "requires": { + "merge-stream": "^2.0.0", + "supports-color": "^6.1.0" + }, + "dependencies": { + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "jsesc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "jsonfile": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-3.0.1.tgz", + "integrity": "sha1-pezG9l9T9mLEQVx2daAzHQmS7GY=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "just-debounce": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.0.0.tgz", + "integrity": "sha1-h/zPrv/AtozRnVX2cilD+SnqNeo=", + "dev": true + }, + "karma": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/karma/-/karma-4.4.1.tgz", + "integrity": "sha512-L5SIaXEYqzrh6b1wqYC42tNsFMx2PWuxky84pK9coK09MvmL7mxii3G3bZBh/0rvD27lqDd0le9jyhzvwif73A==", + "dev": true, + "requires": { + "bluebird": "^3.3.0", + "body-parser": "^1.16.1", + "braces": "^3.0.2", + "chokidar": "^3.0.0", + "colors": "^1.1.0", + "connect": "^3.6.0", + "di": "^0.0.1", + "dom-serialize": "^2.2.0", + "flatted": "^2.0.0", + "glob": "^7.1.1", + "graceful-fs": "^4.1.2", + "http-proxy": "^1.13.0", + "isbinaryfile": "^3.0.0", + "lodash": "^4.17.14", + "log4js": "^4.0.0", + "mime": "^2.3.1", + "minimatch": "^3.0.2", + "optimist": "^0.6.1", + "qjobs": "^1.1.4", + "range-parser": "^1.2.0", + "rimraf": "^2.6.0", + "safe-buffer": "^5.0.1", + "socket.io": "2.1.1", + "source-map": "^0.6.1", + "tmp": "0.0.33", + "useragent": "2.3.0" + }, + "dependencies": { + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "binary-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", + "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", + "dev": true + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "chokidar": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.2.3.tgz", + "integrity": "sha512-GtrxGuRf6bzHQmXWRepvsGnXpkQkVU+D2/9a7dAe4a7v1NhrfZOZ2oKf76M3nOs46fFYL8D+Q8JYA4GYeJ8Cjw==", + "dev": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.2.0" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "fsevents": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.1.tgz", + "integrity": "sha512-4FRPXWETxtigtJW/gxzEDsX1LVbPAM93VleB83kZB+ellqbHMkyt2aJfuzNLRvFPnGi6bcE5SvfxgbXPeKteJw==", + "dev": true, + "optional": true + }, + "glob-parent": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", + "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "readdirp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", + "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", + "dev": true, + "requires": { + "picomatch": "^2.0.4" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + } + } + }, + "karma-chrome-launcher": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz", + "integrity": "sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==", + "dev": true, + "requires": { + "fs-access": "^1.0.0", + "which": "^1.2.1" + } + }, + "karma-coverage": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/karma-coverage/-/karma-coverage-1.1.2.tgz", + "integrity": "sha512-eQawj4Cl3z/CjxslYy9ariU4uDh7cCNFZHNWXWRpl0pNeblY/4wHR7M7boTYXWrn9bY0z2pZmr11eKje/S/hIw==", + "dev": true, + "requires": { + "dateformat": "^1.0.6", + "istanbul": "^0.4.0", + "lodash": "^4.17.0", + "minimatch": "^3.0.0", + "source-map": "^0.5.1" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "karma-firefox-launcher": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/karma-firefox-launcher/-/karma-firefox-launcher-1.2.0.tgz", + "integrity": "sha512-j9Zp8M8+VLq1nI/5xZGfzeaEPtGQ/vk3G+Y8vpmFWLvKLNZ2TDjD6cu2dUu7lDbu1HXNgatsAX4jgCZTkR9qhQ==", + "dev": true, + "requires": { + "is-wsl": "^2.1.0" + } + }, + "karma-jasmine": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-2.0.1.tgz", + "integrity": "sha512-iuC0hmr9b+SNn1DaUD2QEYtUxkS1J+bSJSn7ejdEexs7P8EYvA1CWkEdrDQ+8jVH3AgWlCNwjYsT1chjcNW9lA==", + "dev": true, + "requires": { + "jasmine-core": "^3.3" + } + }, + "karma-jasmine-html-reporter": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-1.4.2.tgz", + "integrity": "sha512-7g0gPj8+9JepCNJR9WjDyQ2RkZ375jpdurYQyAYv8PorUCadepl8vrD6LmMqOGcM17cnrynBawQYZHaumgDjBw==", + "dev": true + }, + "karma-rollup-preprocessor": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/karma-rollup-preprocessor/-/karma-rollup-preprocessor-7.0.2.tgz", + "integrity": "sha512-A+kr5FoiMr/S8dIPij/nuzB9PLhkrh3umFowjumAOKBDVQRhPYs3kKmQ82hP3+2MB6CICqeB4MmiIE4iTwUmDQ==", + "dev": true, + "requires": { + "chokidar": "^3.0.2", + "debounce": "^1.2.0" + }, + "dependencies": { + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "binary-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", + "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", + "dev": true + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "chokidar": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.2.3.tgz", + "integrity": "sha512-GtrxGuRf6bzHQmXWRepvsGnXpkQkVU+D2/9a7dAe4a7v1NhrfZOZ2oKf76M3nOs46fFYL8D+Q8JYA4GYeJ8Cjw==", + "dev": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.2.0" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "fsevents": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.1.tgz", + "integrity": "sha512-4FRPXWETxtigtJW/gxzEDsX1LVbPAM93VleB83kZB+ellqbHMkyt2aJfuzNLRvFPnGi6bcE5SvfxgbXPeKteJw==", + "dev": true, + "optional": true + }, + "glob-parent": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", + "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "readdirp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", + "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", + "dev": true, + "requires": { + "picomatch": "^2.0.4" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + } + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "last-run": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz", + "integrity": "sha1-RblpQsF7HHnHchmCWbqUO+v4yls=", + "dev": true, + "requires": { + "default-resolution": "^2.0.0", + "es6-weak-map": "^2.0.1" + } + }, + "lazystream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", + "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", + "dev": true, + "requires": { + "readable-stream": "^2.0.5" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "lcov-parse": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz", + "integrity": "sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=", + "dev": true + }, + "lead": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz", + "integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=", + "dev": true, + "requires": { + "flush-write-stream": "^1.0.2" + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "liftoff": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz", + "integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==", + "dev": true, + "requires": { + "extend": "^3.0.0", + "findup-sync": "^3.0.0", + "fined": "^1.0.1", + "flagged-respawn": "^1.0.0", + "is-plain-object": "^2.0.4", + "object.map": "^1.0.0", + "rechoir": "^0.6.2", + "resolve": "^1.1.7" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "dependencies": { + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, + "log-driver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", + "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", + "dev": true + }, + "log4js": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-4.5.1.tgz", + "integrity": "sha512-EEEgFcE9bLgaYUKuozyFfytQM2wDHtXn4tAN41pkaxpNjAykv11GVdeI4tHtmPWW4Xrgh9R/2d7XYghDVjbKKw==", + "dev": true, + "requires": { + "date-format": "^2.0.0", + "debug": "^4.1.1", + "flatted": "^2.0.0", + "rfdc": "^1.1.4", + "streamroller": "^1.0.6" + } + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + } + }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "magic-string": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.4.tgz", + "integrity": "sha512-oycWO9nEVAP2RVPbIoDoA4Y7LFIJ3xRYov93gAyJhZkET1tNuB0u7uWkZS2LpBWTJUWnmau/To8ECWRC+jKNfw==", + "dev": true, + "requires": { + "sourcemap-codec": "^1.4.4" + } + }, + "make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + }, + "map-age-cleaner": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", + "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "dev": true, + "requires": { + "p-defer": "^1.0.0" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "matchdep": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz", + "integrity": "sha1-xvNINKDY28OzfCfui7yyfHd1WC4=", + "dev": true, + "requires": { + "findup-sync": "^2.0.0", + "micromatch": "^3.0.4", + "resolve": "^1.4.0", + "stack-trace": "0.0.10" + }, + "dependencies": { + "findup-sync": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + } + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "dev": true + }, + "mem": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", + "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", + "dev": true, + "requires": { + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^2.0.0", + "p-is-promise": "^2.0.0" + }, + "dependencies": { + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + } + } + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + } + }, + "merge-stream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", + "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", + "dev": true, + "requires": { + "readable-stream": "^2.0.1" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "mime": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz", + "integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==", + "dev": true + }, + "mime-db": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", + "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==", + "dev": true + }, + "mime-types": { + "version": "2.1.24", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", + "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", + "dev": true, + "requires": { + "mime-db": "1.40.0" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, + "moment": { + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz", + "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==" + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "mute-stdout": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz", + "integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg==", + "dev": true + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "nan": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", + "dev": true, + "optional": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", + "dev": true + }, + "neo-async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", + "dev": true + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "dev": true, + "requires": { + "abbrev": "1" + } + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "now-and-later": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", + "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==", + "dev": true, + "requires": { + "once": "^1.3.2" + } + }, + "npm": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm/-/npm-5.1.0.tgz", + "integrity": "sha512-pt5ClxEmY/dLpb60SmGQQBKi3nB6Ljx1FXmpoCUdAULlGqGVn2uCyXxPCWFbcuHGthT7qGiaGa1wOfs/UjGYMw==", + "dev": true, + "requires": { + "JSONStream": "~1.3.1", + "abbrev": "~1.1.0", + "ansi-regex": "~3.0.0", + "ansicolors": "~0.3.2", + "ansistyles": "~0.1.3", + "aproba": "~1.1.2", + "archy": "~1.0.0", + "bluebird": "~3.5.0", + "cacache": "~9.2.9", + "call-limit": "~1.1.0", + "chownr": "~1.0.1", + "cmd-shim": "~2.0.2", + "columnify": "~1.5.4", + "config-chain": "~1.1.11", + "debuglog": "*", + "detect-indent": "~5.0.0", + "dezalgo": "~1.0.3", + "editor": "~1.0.0", + "fs-vacuum": "~1.2.10", + "fs-write-stream-atomic": "~1.0.10", + "fstream": "~1.0.11", + "fstream-npm": "~1.2.1", + "glob": "~7.1.2", + "graceful-fs": "~4.1.11", + "has-unicode": "~2.0.1", + "hosted-git-info": "~2.5.0", + "iferr": "~0.1.5", + "imurmurhash": "*", + "inflight": "~1.0.6", + "inherits": "~2.0.3", + "ini": "~1.3.4", + "init-package-json": "~1.10.1", + "lazy-property": "~1.0.0", + "lockfile": "~1.0.3", + "lodash._baseindexof": "*", + "lodash._baseuniq": "~4.6.0", + "lodash._bindcallback": "*", + "lodash._cacheindexof": "*", + "lodash._createcache": "*", + "lodash._getnative": "*", + "lodash.clonedeep": "~4.5.0", + "lodash.restparam": "*", + "lodash.union": "~4.6.0", + "lodash.uniq": "~4.5.0", + "lodash.without": "~4.4.0", + "lru-cache": "~4.1.1", + "mississippi": "~1.3.0", + "mkdirp": "~0.5.1", + "move-concurrently": "~1.0.1", + "node-gyp": "~3.6.2", + "nopt": "~4.0.1", + "normalize-package-data": "~2.4.0", + "npm-cache-filename": "~1.0.2", + "npm-install-checks": "~3.0.0", + "npm-package-arg": "~5.1.2", + "npm-registry-client": "~8.4.0", + "npm-user-validate": "~1.0.0", + "npmlog": "~4.1.2", + "once": "~1.4.0", + "opener": "~1.4.3", + "osenv": "~0.1.4", + "pacote": "~2.7.38", + "path-is-inside": "~1.0.2", + "promise-inflight": "~1.0.1", + "read": "~1.0.7", + "read-cmd-shim": "~1.0.1", + "read-installed": "~4.0.3", + "read-package-json": "~2.0.9", + "read-package-tree": "~5.1.6", + "readable-stream": "~2.3.2", + "readdir-scoped-modules": "*", + "request": "~2.81.0", + "retry": "~0.10.1", + "rimraf": "~2.6.1", + "safe-buffer": "~5.1.1", + "semver": "~5.3.0", + "sha": "~2.0.1", + "slide": "~1.1.6", + "sorted-object": "~2.0.1", + "sorted-union-stream": "~2.1.3", + "ssri": "~4.1.6", + "strip-ansi": "~4.0.0", + "tar": "~2.2.1", + "text-table": "~0.2.0", + "uid-number": "0.0.6", + "umask": "~1.1.0", + "unique-filename": "~1.1.0", + "unpipe": "~1.0.0", + "update-notifier": "~2.2.0", + "uuid": "~3.1.0", + "validate-npm-package-license": "*", + "validate-npm-package-name": "~3.0.0", + "which": "~1.2.14", + "worker-farm": "~1.3.1", + "wrappy": "~1.0.2", + "write-file-atomic": "~2.1.0" + }, + "dependencies": { + "JSONStream": { + "version": "1.3.1", + "bundled": true, + "dev": true, + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + }, + "dependencies": { + "jsonparse": { + "version": "1.3.1", + "bundled": true, + "dev": true + }, + "through": { + "version": "2.3.8", + "bundled": true, + "dev": true + } + } + }, + "abbrev": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "ansicolors": { + "version": "0.3.2", + "bundled": true, + "dev": true + }, + "ansistyles": { + "version": "0.1.3", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.1.2", + "bundled": true, + "dev": true + }, + "archy": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "bluebird": { + "version": "3.5.0", + "bundled": true, + "dev": true + }, + "cacache": { + "version": "9.2.9", + "bundled": true, + "dev": true, + "requires": { + "bluebird": "^3.5.0", + "chownr": "^1.0.1", + "glob": "^7.1.2", + "graceful-fs": "^4.1.11", + "lru-cache": "^4.1.1", + "mississippi": "^1.3.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.1", + "ssri": "^4.1.6", + "unique-filename": "^1.1.0", + "y18n": "^3.2.1" + }, + "dependencies": { + "lru-cache": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + }, + "dependencies": { + "pseudomap": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "2.1.2", + "bundled": true, + "dev": true + } + } + }, + "y18n": { + "version": "3.2.1", + "bundled": true, + "dev": true + } + } + }, + "call-limit": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "chownr": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "cmd-shim": { + "version": "2.0.2", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "mkdirp": "~0.5.0" + } + }, + "columnify": { + "version": "1.5.4", + "bundled": true, + "dev": true, + "requires": { + "strip-ansi": "^3.0.0", + "wcwidth": "^1.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + } + } + }, + "wcwidth": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "defaults": "^1.0.3" + }, + "dependencies": { + "defaults": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "requires": { + "clone": "^1.0.2" + }, + "dependencies": { + "clone": { + "version": "1.0.2", + "bundled": true, + "dev": true + } + } + } + } + } + } + }, + "config-chain": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "requires": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + }, + "dependencies": { + "proto-list": { + "version": "1.2.4", + "bundled": true, + "dev": true + } + } + }, + "debuglog": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "detect-indent": { + "version": "5.0.0", + "bundled": true, + "dev": true + }, + "dezalgo": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "requires": { + "asap": "^2.0.0", + "wrappy": "1" + }, + "dependencies": { + "asap": { + "version": "2.0.5", + "bundled": true, + "dev": true + } + } + }, + "editor": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "fs-vacuum": { + "version": "1.2.10", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "path-is-inside": "^1.0.1", + "rimraf": "^2.5.2" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + } + }, + "fstream": { + "version": "1.0.11", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" + } + }, + "fstream-npm": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "requires": { + "fstream-ignore": "^1.0.0", + "inherits": "2" + }, + "dependencies": { + "fstream-ignore": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "requires": { + "fstream": "^1.0.0", + "inherits": "2", + "minimatch": "^3.0.0" + }, + "dependencies": { + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.8", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + }, + "dependencies": { + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + } + } + } + } + } + } + } + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "dependencies": { + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.8", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + }, + "dependencies": { + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + } + } + } + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true + } + } + }, + "graceful-fs": { + "version": "4.1.11", + "bundled": true, + "dev": true + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true + }, + "hosted-git-info": { + "version": "2.5.0", + "bundled": true, + "dev": true + }, + "iferr": { + "version": "0.1.5", + "bundled": true, + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "bundled": true, + "dev": true + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.4", + "bundled": true, + "dev": true + }, + "init-package-json": { + "version": "1.10.1", + "bundled": true, + "dev": true, + "requires": { + "glob": "^7.1.1", + "npm-package-arg": "^4.0.0 || ^5.0.0", + "promzard": "^0.3.0", + "read": "~1.0.1", + "read-package-json": "1 || 2", + "semver": "2.x || 3.x || 4 || 5", + "validate-npm-package-license": "^3.0.1", + "validate-npm-package-name": "^3.0.0" + }, + "dependencies": { + "promzard": { + "version": "0.3.0", + "bundled": true, + "dev": true, + "requires": { + "read": "1" + } + } + } + }, + "lazy-property": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "lockfile": { + "version": "1.0.3", + "bundled": true, + "dev": true + }, + "lodash._baseindexof": { + "version": "3.1.0", + "bundled": true, + "dev": true + }, + "lodash._baseuniq": { + "version": "4.6.0", + "bundled": true, + "dev": true, + "requires": { + "lodash._createset": "~4.0.0", + "lodash._root": "~3.0.0" + }, + "dependencies": { + "lodash._createset": { + "version": "4.0.3", + "bundled": true, + "dev": true + }, + "lodash._root": { + "version": "3.0.1", + "bundled": true, + "dev": true + } + } + }, + "lodash._bindcallback": { + "version": "3.0.1", + "bundled": true, + "dev": true + }, + "lodash._cacheindexof": { + "version": "3.0.2", + "bundled": true, + "dev": true + }, + "lodash._createcache": { + "version": "3.1.2", + "bundled": true, + "dev": true, + "requires": { + "lodash._getnative": "^3.0.0" + } + }, + "lodash._getnative": { + "version": "3.9.1", + "bundled": true, + "dev": true + }, + "lodash.clonedeep": { + "version": "4.5.0", + "bundled": true, + "dev": true + }, + "lodash.restparam": { + "version": "3.6.1", + "bundled": true, + "dev": true + }, + "lodash.union": { + "version": "4.6.0", + "bundled": true, + "dev": true + }, + "lodash.uniq": { + "version": "4.5.0", + "bundled": true, + "dev": true + }, + "lodash.without": { + "version": "4.4.0", + "bundled": true, + "dev": true + }, + "lru-cache": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + }, + "dependencies": { + "pseudomap": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "2.1.2", + "bundled": true, + "dev": true + } + } + }, + "mississippi": { + "version": "1.3.0", + "bundled": true, + "dev": true, + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^1.0.0", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + }, + "dependencies": { + "concat-stream": { + "version": "1.6.0", + "bundled": true, + "dev": true, + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + }, + "dependencies": { + "typedarray": { + "version": "0.0.6", + "bundled": true, + "dev": true + } + } + }, + "duplexify": { + "version": "3.5.0", + "bundled": true, + "dev": true, + "requires": { + "end-of-stream": "1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + }, + "dependencies": { + "end-of-stream": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "once": "~1.3.0" + }, + "dependencies": { + "once": { + "version": "1.3.3", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1" + } + } + } + }, + "stream-shift": { + "version": "1.0.0", + "bundled": true, + "dev": true + } + } + }, + "end-of-stream": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "flush-write-stream": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.4" + } + }, + "from2": { + "version": "2.3.0", + "bundled": true, + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "parallel-transform": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "cyclist": "~0.2.2", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + }, + "dependencies": { + "cyclist": { + "version": "0.2.2", + "bundled": true, + "dev": true + } + } + }, + "pump": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "requires": { + "duplexify": "^3.1.2", + "inherits": "^2.0.1", + "pump": "^1.0.0" + } + }, + "stream-each": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + }, + "dependencies": { + "stream-shift": { + "version": "1.0.0", + "bundled": true, + "dev": true + } + } + }, + "through2": { + "version": "2.0.3", + "bundled": true, + "dev": true, + "requires": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + }, + "dependencies": { + "xtend": { + "version": "4.0.1", + "bundled": true, + "dev": true + } + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + } + } + }, + "move-concurrently": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "aproba": "^1.1.1", + "copy-concurrently": "^1.0.0", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" + }, + "dependencies": { + "copy-concurrently": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "requires": { + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" + } + }, + "run-queue": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "requires": { + "aproba": "^1.1.1" + } + } + } + }, + "node-gyp": { + "version": "3.6.2", + "bundled": true, + "dev": true, + "requires": { + "fstream": "^1.0.0", + "glob": "^7.0.3", + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "mkdirp": "^0.5.0", + "nopt": "2 || 3", + "npmlog": "0 || 1 || 2 || 3 || 4", + "osenv": "0", + "request": "2", + "rimraf": "2", + "semver": "~5.3.0", + "tar": "^2.0.0", + "which": "1" + }, + "dependencies": { + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.8", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + }, + "dependencies": { + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + } + } + } + } + }, + "nopt": { + "version": "3.0.6", + "bundled": true, + "dev": true, + "requires": { + "abbrev": "1" + } + } + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "normalize-package-data": { + "version": "2.4.0", + "bundled": true, + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "is-builtin-module": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "builtin-modules": "^1.0.0" + }, + "dependencies": { + "builtin-modules": { + "version": "1.1.1", + "bundled": true, + "dev": true + } + } + } + } + }, + "npm-cache-filename": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "npm-install-checks": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "semver": "^2.3.0 || 3.x || 4 || 5" + } + }, + "npm-package-arg": { + "version": "5.1.2", + "bundled": true, + "dev": true, + "requires": { + "hosted-git-info": "^2.4.2", + "osenv": "^0.1.4", + "semver": "^5.1.0", + "validate-npm-package-name": "^3.0.0" + } + }, + "npm-registry-client": { + "version": "8.4.0", + "bundled": true, + "dev": true, + "requires": { + "concat-stream": "^1.5.2", + "graceful-fs": "^4.1.6", + "normalize-package-data": "~1.0.1 || ^2.0.0", + "npm-package-arg": "^3.0.0 || ^4.0.0 || ^5.0.0", + "npmlog": "2 || ^3.1.0 || ^4.0.0", + "once": "^1.3.3", + "request": "^2.74.0", + "retry": "^0.10.0", + "semver": "2 >=2.2.1 || 3.x || 4 || 5", + "slide": "^1.1.3", + "ssri": "^4.1.2" + }, + "dependencies": { + "concat-stream": { + "version": "1.6.0", + "bundled": true, + "dev": true, + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + }, + "dependencies": { + "typedarray": { + "version": "0.0.6", + "bundled": true, + "dev": true + } + } + } + } + }, + "npm-user-validate": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + }, + "dependencies": { + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + }, + "dependencies": { + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true + } + } + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + }, + "dependencies": { + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "dependencies": { + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + }, + "dependencies": { + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + } + } + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + } + } + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "requires": { + "string-width": "^1.0.2" + } + } + } + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true + } + } + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "opener": { + "version": "1.4.3", + "bundled": true, + "dev": true + }, + "osenv": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + }, + "dependencies": { + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true + } + } + }, + "pacote": { + "version": "2.7.38", + "bundled": true, + "dev": true, + "requires": { + "bluebird": "^3.5.0", + "cacache": "^9.2.9", + "glob": "^7.1.2", + "lru-cache": "^4.1.1", + "make-fetch-happen": "^2.4.13", + "minimatch": "^3.0.4", + "mississippi": "^1.2.0", + "normalize-package-data": "^2.4.0", + "npm-package-arg": "^5.1.2", + "npm-pick-manifest": "^1.0.4", + "osenv": "^0.1.4", + "promise-inflight": "^1.0.1", + "promise-retry": "^1.1.1", + "protoduck": "^4.0.0", + "safe-buffer": "^5.1.1", + "semver": "^5.3.0", + "ssri": "^4.1.6", + "tar-fs": "^1.15.3", + "tar-stream": "^1.5.4", + "unique-filename": "^1.1.0", + "which": "^1.2.12" + }, + "dependencies": { + "make-fetch-happen": { + "version": "2.4.13", + "bundled": true, + "dev": true, + "requires": { + "agentkeepalive": "^3.3.0", + "cacache": "^9.2.9", + "http-cache-semantics": "^3.7.3", + "http-proxy-agent": "^2.0.0", + "https-proxy-agent": "^2.0.0", + "lru-cache": "^4.1.1", + "mississippi": "^1.2.0", + "node-fetch-npm": "^2.0.1", + "promise-retry": "^1.1.1", + "socks-proxy-agent": "^3.0.0", + "ssri": "^4.1.6" + }, + "dependencies": { + "agentkeepalive": { + "version": "3.3.0", + "bundled": true, + "dev": true, + "requires": { + "humanize-ms": "^1.2.1" + }, + "dependencies": { + "humanize-ms": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "requires": { + "ms": "^2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "http-cache-semantics": { + "version": "3.7.3", + "bundled": true, + "dev": true + }, + "http-proxy-agent": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "agent-base": "4", + "debug": "2" + }, + "dependencies": { + "agent-base": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "requires": { + "es6-promisify": "^5.0.0" + }, + "dependencies": { + "es6-promisify": { + "version": "5.0.0", + "bundled": true, + "dev": true, + "requires": { + "es6-promise": "^4.0.3" + }, + "dependencies": { + "es6-promise": { + "version": "4.1.1", + "bundled": true, + "dev": true + } + } + } + } + }, + "debug": { + "version": "2.6.8", + "bundled": true, + "dev": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "https-proxy-agent": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "agent-base": "^4.1.0", + "debug": "^2.4.1" + }, + "dependencies": { + "agent-base": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "requires": { + "es6-promisify": "^5.0.0" + }, + "dependencies": { + "es6-promisify": { + "version": "5.0.0", + "bundled": true, + "dev": true, + "requires": { + "es6-promise": "^4.0.3" + }, + "dependencies": { + "es6-promise": { + "version": "4.1.1", + "bundled": true, + "dev": true + } + } + } + } + }, + "debug": { + "version": "2.6.8", + "bundled": true, + "dev": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "node-fetch-npm": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "encoding": "^0.1.11", + "json-parse-helpfulerror": "^1.0.3", + "safe-buffer": "^5.0.1" + }, + "dependencies": { + "encoding": { + "version": "0.1.12", + "bundled": true, + "dev": true, + "requires": { + "iconv-lite": "~0.4.13" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.18", + "bundled": true, + "dev": true + } + } + }, + "json-parse-helpfulerror": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "requires": { + "jju": "^1.1.0" + }, + "dependencies": { + "jju": { + "version": "1.3.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "socks-proxy-agent": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "agent-base": "^4.0.1", + "socks": "^1.1.10" + }, + "dependencies": { + "agent-base": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "requires": { + "es6-promisify": "^5.0.0" + }, + "dependencies": { + "es6-promisify": { + "version": "5.0.0", + "bundled": true, + "dev": true, + "requires": { + "es6-promise": "^4.0.3" + }, + "dependencies": { + "es6-promise": { + "version": "4.1.1", + "bundled": true, + "dev": true + } + } + } + } + }, + "socks": { + "version": "1.1.10", + "bundled": true, + "dev": true, + "requires": { + "ip": "^1.1.4", + "smart-buffer": "^1.0.13" + }, + "dependencies": { + "ip": { + "version": "1.1.5", + "bundled": true, + "dev": true + }, + "smart-buffer": { + "version": "1.1.15", + "bundled": true, + "dev": true + } + } + } + } + } + } + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.8", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + }, + "dependencies": { + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + } + } + } + } + }, + "npm-pick-manifest": { + "version": "1.0.4", + "bundled": true, + "dev": true, + "requires": { + "npm-package-arg": "^5.1.2", + "semver": "^5.3.0" + } + }, + "promise-retry": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "requires": { + "err-code": "^1.0.0", + "retry": "^0.10.0" + }, + "dependencies": { + "err-code": { + "version": "1.1.2", + "bundled": true, + "dev": true + } + } + }, + "protoduck": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "genfun": "^4.0.1" + }, + "dependencies": { + "genfun": { + "version": "4.0.1", + "bundled": true, + "dev": true + } + } + }, + "tar-fs": { + "version": "1.15.3", + "bundled": true, + "dev": true, + "requires": { + "chownr": "^1.0.1", + "mkdirp": "^0.5.1", + "pump": "^1.0.0", + "tar-stream": "^1.1.2" + }, + "dependencies": { + "pump": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + }, + "dependencies": { + "end-of-stream": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "once": "^1.4.0" + } + } + } + } + } + }, + "tar-stream": { + "version": "1.5.4", + "bundled": true, + "dev": true, + "requires": { + "bl": "^1.0.0", + "end-of-stream": "^1.0.0", + "readable-stream": "^2.0.0", + "xtend": "^4.0.0" + }, + "dependencies": { + "bl": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "requires": { + "readable-stream": "^2.0.5" + } + }, + "end-of-stream": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "xtend": { + "version": "4.0.1", + "bundled": true, + "dev": true + } + } + } + } + }, + "path-is-inside": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "promise-inflight": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "read": { + "version": "1.0.7", + "bundled": true, + "dev": true, + "requires": { + "mute-stream": "~0.0.4" + }, + "dependencies": { + "mute-stream": { + "version": "0.0.7", + "bundled": true, + "dev": true + } + } + }, + "read-cmd-shim": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "^4.1.2" + } + }, + "read-installed": { + "version": "4.0.3", + "bundled": true, + "dev": true, + "requires": { + "debuglog": "^1.0.1", + "graceful-fs": "^4.1.2", + "read-package-json": "^2.0.0", + "readdir-scoped-modules": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "slide": "~1.1.3", + "util-extend": "^1.0.1" + }, + "dependencies": { + "util-extend": { + "version": "1.0.3", + "bundled": true, + "dev": true + } + } + }, + "read-package-json": { + "version": "2.0.9", + "bundled": true, + "dev": true, + "requires": { + "glob": "^7.1.1", + "graceful-fs": "^4.1.2", + "json-parse-helpfulerror": "^1.0.2", + "normalize-package-data": "^2.0.0" + }, + "dependencies": { + "json-parse-helpfulerror": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "requires": { + "jju": "^1.1.0" + }, + "dependencies": { + "jju": { + "version": "1.3.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "read-package-tree": { + "version": "5.1.6", + "bundled": true, + "dev": true, + "requires": { + "debuglog": "^1.0.1", + "dezalgo": "^1.0.0", + "once": "^1.3.0", + "read-package-json": "^2.0.0", + "readdir-scoped-modules": "^1.0.0" + } + }, + "readable-stream": { + "version": "2.3.2", + "bundled": true, + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "safe-buffer": "~5.1.0", + "string_decoder": "~1.0.0", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "process-nextick-args": { + "version": "1.0.7", + "bundled": true, + "dev": true + }, + "string_decoder": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true + } + } + }, + "readdir-scoped-modules": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "debuglog": "^1.0.1", + "dezalgo": "^1.0.0", + "graceful-fs": "^4.1.2", + "once": "^1.3.0" + } + }, + "request": { + "version": "2.81.0", + "bundled": true, + "dev": true, + "requires": { + "aws-sign2": "~0.6.0", + "aws4": "^1.2.1", + "caseless": "~0.12.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.0", + "forever-agent": "~0.6.1", + "form-data": "~2.1.1", + "har-validator": "~4.2.1", + "hawk": "~3.1.3", + "http-signature": "~1.1.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.7", + "oauth-sign": "~0.8.1", + "performance-now": "^0.2.0", + "qs": "~6.4.0", + "safe-buffer": "^5.0.1", + "stringstream": "~0.0.4", + "tough-cookie": "~2.3.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.0.0" + }, + "dependencies": { + "aws-sign2": { + "version": "0.6.0", + "bundled": true, + "dev": true + }, + "aws4": { + "version": "1.6.0", + "bundled": true, + "dev": true + }, + "caseless": { + "version": "0.12.0", + "bundled": true, + "dev": true + }, + "combined-stream": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + }, + "dependencies": { + "delayed-stream": { + "version": "1.0.0", + "bundled": true, + "dev": true + } + } + }, + "extend": { + "version": "3.0.1", + "bundled": true, + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "bundled": true, + "dev": true + }, + "form-data": { + "version": "2.1.4", + "bundled": true, + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.5", + "mime-types": "^2.1.12" + }, + "dependencies": { + "asynckit": { + "version": "0.4.0", + "bundled": true, + "dev": true + } + } + }, + "har-validator": { + "version": "4.2.1", + "bundled": true, + "dev": true, + "requires": { + "ajv": "^4.9.1", + "har-schema": "^1.0.5" + }, + "dependencies": { + "ajv": { + "version": "4.11.8", + "bundled": true, + "dev": true, + "requires": { + "co": "^4.6.0", + "json-stable-stringify": "^1.0.1" + }, + "dependencies": { + "co": { + "version": "4.6.0", + "bundled": true, + "dev": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "jsonify": "~0.0.0" + }, + "dependencies": { + "jsonify": { + "version": "0.0.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "har-schema": { + "version": "1.0.5", + "bundled": true, + "dev": true + } + } + }, + "hawk": { + "version": "3.1.3", + "bundled": true, + "dev": true, + "requires": { + "boom": "2.x.x", + "cryptiles": "2.x.x", + "hoek": "2.x.x", + "sntp": "1.x.x" + }, + "dependencies": { + "boom": { + "version": "2.10.1", + "bundled": true, + "dev": true, + "requires": { + "hoek": "2.x.x" + } + }, + "cryptiles": { + "version": "2.0.5", + "bundled": true, + "dev": true, + "requires": { + "boom": "2.x.x" + } + }, + "hoek": { + "version": "2.16.3", + "bundled": true, + "dev": true + }, + "sntp": { + "version": "1.0.9", + "bundled": true, + "dev": true, + "requires": { + "hoek": "2.x.x" + } + } + } + }, + "http-signature": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "requires": { + "assert-plus": "^0.2.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "dependencies": { + "assert-plus": { + "version": "0.2.0", + "bundled": true, + "dev": true + }, + "jsprim": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.0.2", + "json-schema": "0.2.3", + "verror": "1.3.6" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "extsprintf": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "bundled": true, + "dev": true + }, + "verror": { + "version": "1.3.6", + "bundled": true, + "dev": true, + "requires": { + "extsprintf": "1.0.2" + } + } + } + }, + "sshpk": { + "version": "1.13.1", + "bundled": true, + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "tweetnacl": "~0.14.0" + }, + "dependencies": { + "asn1": { + "version": "0.2.3", + "bundled": true, + "dev": true + }, + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "dashdash": { + "version": "1.14.1", + "bundled": true, + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "ecc-jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsbn": "~0.1.0" + } + }, + "getpass": { + "version": "0.1.7", + "bundled": true, + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tweetnacl": { + "version": "0.14.5", + "bundled": true, + "dev": true, + "optional": true + } + } + } + } + }, + "is-typedarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "isstream": { + "version": "0.1.2", + "bundled": true, + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "bundled": true, + "dev": true + }, + "mime-types": { + "version": "2.1.15", + "bundled": true, + "dev": true, + "requires": { + "mime-db": "~1.27.0" + }, + "dependencies": { + "mime-db": { + "version": "1.27.0", + "bundled": true, + "dev": true + } + } + }, + "oauth-sign": { + "version": "0.8.2", + "bundled": true, + "dev": true + }, + "performance-now": { + "version": "0.2.0", + "bundled": true, + "dev": true + }, + "qs": { + "version": "6.4.0", + "bundled": true, + "dev": true + }, + "stringstream": { + "version": "0.0.5", + "bundled": true, + "dev": true + }, + "tough-cookie": { + "version": "2.3.2", + "bundled": true, + "dev": true, + "requires": { + "punycode": "^1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "bundled": true, + "dev": true + } + } + }, + "tunnel-agent": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + } + } + }, + "retry": { + "version": "0.10.1", + "bundled": true, + "dev": true + }, + "rimraf": { + "version": "2.6.1", + "bundled": true, + "dev": true, + "requires": { + "glob": "^7.0.5" + } + }, + "safe-buffer": { + "version": "5.1.1", + "bundled": true, + "dev": true + }, + "semver": { + "version": "5.3.0", + "bundled": true, + "dev": true + }, + "sha": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "readable-stream": "^2.0.2" + } + }, + "slide": { + "version": "1.1.6", + "bundled": true, + "dev": true + }, + "sorted-object": { + "version": "2.0.1", + "bundled": true, + "dev": true + }, + "sorted-union-stream": { + "version": "2.1.3", + "bundled": true, + "dev": true, + "requires": { + "from2": "^1.3.0", + "stream-iterate": "^1.1.0" + }, + "dependencies": { + "from2": { + "version": "1.3.0", + "bundled": true, + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "~1.1.10" + }, + "dependencies": { + "readable-stream": { + "version": "1.1.14", + "bundled": true, + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + }, + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "isarray": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "string_decoder": { + "version": "0.10.31", + "bundled": true, + "dev": true + } + } + } + } + }, + "stream-iterate": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "requires": { + "readable-stream": "^2.1.5", + "stream-shift": "^1.0.0" + }, + "dependencies": { + "stream-shift": { + "version": "1.0.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "ssri": { + "version": "4.1.6", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "bundled": true, + "dev": true + } + } + }, + "tar": { + "version": "2.2.1", + "bundled": true, + "dev": true, + "requires": { + "block-stream": "*", + "fstream": "^1.0.2", + "inherits": "2" + }, + "dependencies": { + "block-stream": { + "version": "0.0.9", + "bundled": true, + "dev": true, + "requires": { + "inherits": "~2.0.0" + } + } + } + }, + "text-table": { + "version": "0.2.0", + "bundled": true, + "dev": true + }, + "uid-number": { + "version": "0.0.6", + "bundled": true, + "dev": true + }, + "umask": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "unique-filename": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "unique-slug": "^2.0.0" + }, + "dependencies": { + "unique-slug": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "imurmurhash": "^0.1.4" + } + } + } + }, + "unpipe": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "update-notifier": { + "version": "2.2.0", + "bundled": true, + "dev": true, + "requires": { + "boxen": "^1.0.0", + "chalk": "^1.0.0", + "configstore": "^3.0.0", + "import-lazy": "^2.1.0", + "is-npm": "^1.0.0", + "latest-version": "^3.0.0", + "semver-diff": "^2.0.0", + "xdg-basedir": "^3.0.0" + }, + "dependencies": { + "boxen": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-align": "^2.0.0", + "camelcase": "^4.0.0", + "chalk": "^1.1.1", + "cli-boxes": "^1.0.0", + "string-width": "^2.0.0", + "term-size": "^0.1.0", + "widest-line": "^1.0.0" + }, + "dependencies": { + "ansi-align": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "string-width": "^2.0.0" + } + }, + "camelcase": { + "version": "4.1.0", + "bundled": true, + "dev": true + }, + "cli-boxes": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "string-width": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "term-size": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "requires": { + "execa": "^0.4.0" + }, + "dependencies": { + "execa": { + "version": "0.4.0", + "bundled": true, + "dev": true, + "requires": { + "cross-spawn-async": "^2.1.1", + "is-stream": "^1.1.0", + "npm-run-path": "^1.0.0", + "object-assign": "^4.0.1", + "path-key": "^1.0.0", + "strip-eof": "^1.0.0" + }, + "dependencies": { + "cross-spawn-async": { + "version": "2.2.5", + "bundled": true, + "dev": true, + "requires": { + "lru-cache": "^4.0.0", + "which": "^1.2.8" + } + }, + "is-stream": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "npm-run-path": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "path-key": "^1.0.0" + } + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true + }, + "path-key": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "strip-eof": { + "version": "1.0.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "widest-line": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "string-width": "^1.0.1" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "dependencies": { + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + }, + "dependencies": { + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + } + } + } + } + } + } + } + } + }, + "chalk": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "bundled": true, + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "bundled": true, + "dev": true + }, + "has-ansi": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + } + } + }, + "supports-color": { + "version": "2.0.0", + "bundled": true, + "dev": true + } + } + }, + "configstore": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "dot-prop": "^4.1.0", + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "unique-string": "^1.0.0", + "write-file-atomic": "^2.0.0", + "xdg-basedir": "^3.0.0" + }, + "dependencies": { + "dot-prop": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "requires": { + "is-obj": "^1.0.0" + }, + "dependencies": { + "is-obj": { + "version": "1.0.1", + "bundled": true, + "dev": true + } + } + }, + "make-dir": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "pify": "^2.3.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "bundled": true, + "dev": true + } + } + }, + "unique-string": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "crypto-random-string": "^1.0.0" + }, + "dependencies": { + "crypto-random-string": { + "version": "1.0.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "import-lazy": { + "version": "2.1.0", + "bundled": true, + "dev": true + }, + "is-npm": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "latest-version": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "package-json": "^4.0.0" + }, + "dependencies": { + "package-json": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "requires": { + "got": "^6.7.1", + "registry-auth-token": "^3.0.1", + "registry-url": "^3.0.3", + "semver": "^5.1.0" + }, + "dependencies": { + "got": { + "version": "6.7.1", + "bundled": true, + "dev": true, + "requires": { + "create-error-class": "^3.0.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-redirect": "^1.0.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "lowercase-keys": "^1.0.0", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "unzip-response": "^2.0.1", + "url-parse-lax": "^1.0.0" + }, + "dependencies": { + "create-error-class": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "requires": { + "capture-stack-trace": "^1.0.0" + }, + "dependencies": { + "capture-stack-trace": { + "version": "1.0.0", + "bundled": true, + "dev": true + } + } + }, + "duplexer3": { + "version": "0.1.4", + "bundled": true, + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "is-redirect": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "is-retry-allowed": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "lowercase-keys": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "timed-out": { + "version": "4.0.1", + "bundled": true, + "dev": true + }, + "unzip-response": { + "version": "2.0.1", + "bundled": true, + "dev": true + }, + "url-parse-lax": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "prepend-http": "^1.0.1" + }, + "dependencies": { + "prepend-http": { + "version": "1.0.4", + "bundled": true, + "dev": true + } + } + } + } + }, + "registry-auth-token": { + "version": "3.3.1", + "bundled": true, + "dev": true, + "requires": { + "rc": "^1.1.6", + "safe-buffer": "^5.0.1" + }, + "dependencies": { + "rc": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "requires": { + "deep-extend": "~0.4.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "deep-extend": { + "version": "0.4.2", + "bundled": true, + "dev": true + }, + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true + } + } + } + } + }, + "registry-url": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "rc": "^1.0.1" + }, + "dependencies": { + "rc": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "requires": { + "deep-extend": "~0.4.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "deep-extend": { + "version": "0.4.2", + "bundled": true, + "dev": true + }, + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true + } + } + } + } + } + } + } + } + }, + "semver-diff": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "semver": "^5.0.3" + } + }, + "xdg-basedir": { + "version": "3.0.0", + "bundled": true, + "dev": true + } + } + }, + "uuid": { + "version": "3.1.0", + "bundled": true, + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "spdx-correct": "~1.0.0", + "spdx-expression-parse": "~1.0.0" + }, + "dependencies": { + "spdx-correct": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "spdx-license-ids": "^1.0.2" + }, + "dependencies": { + "spdx-license-ids": { + "version": "1.2.2", + "bundled": true, + "dev": true + } + } + }, + "spdx-expression-parse": { + "version": "1.0.4", + "bundled": true, + "dev": true + } + } + }, + "validate-npm-package-name": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "builtins": "^1.0.3" + }, + "dependencies": { + "builtins": { + "version": "1.0.3", + "bundled": true, + "dev": true + } + } + }, + "which": { + "version": "1.2.14", + "bundled": true, + "dev": true, + "requires": { + "isexe": "^2.0.0" + }, + "dependencies": { + "isexe": { + "version": "2.0.0", + "bundled": true, + "dev": true + } + } + }, + "worker-farm": { + "version": "1.3.1", + "bundled": true, + "dev": true, + "requires": { + "errno": ">=0.1.1 <0.2.0-0", + "xtend": ">=4.0.0 <4.1.0-0" + }, + "dependencies": { + "errno": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "requires": { + "prr": "~0.0.0" + }, + "dependencies": { + "prr": { + "version": "0.0.0", + "bundled": true, + "dev": true + } + } + }, + "xtend": { + "version": "4.0.1", + "bundled": true, + "dev": true + } + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "write-file-atomic": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" + } + } + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "npmi": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/npmi/-/npmi-1.0.1.tgz", + "integrity": "sha1-FddpJzVHVF5oCdzwzhiu1IsCkOI=", + "dev": true, + "requires": { + "npm": "^2.1.12", + "semver": "^4.1.0" + }, + "dependencies": { + "npm": { + "version": "2.15.12", + "resolved": "https://registry.npmjs.org/npm/-/npm-2.15.12.tgz", + "integrity": "sha1-33w+1aJ3w/nUtdgZsFMR0QogCuY=", + "dev": true, + "requires": { + "abbrev": "~1.0.9", + "ansi": "~0.3.1", + "ansi-regex": "*", + "ansicolors": "~0.3.2", + "ansistyles": "~0.1.3", + "archy": "~1.0.0", + "async-some": "~1.0.2", + "block-stream": "0.0.9", + "char-spinner": "~1.0.1", + "chmodr": "~1.0.2", + "chownr": "~1.0.1", + "cmd-shim": "~2.0.2", + "columnify": "~1.5.4", + "config-chain": "~1.1.10", + "dezalgo": "~1.0.3", + "editor": "~1.0.0", + "fs-vacuum": "~1.2.9", + "fs-write-stream-atomic": "~1.0.8", + "fstream": "~1.0.10", + "fstream-npm": "~1.1.1", + "github-url-from-git": "~1.4.0", + "github-url-from-username-repo": "~1.0.2", + "glob": "~7.0.6", + "graceful-fs": "~4.1.6", + "hosted-git-info": "~2.1.5", + "imurmurhash": "*", + "inflight": "~1.0.4", + "inherits": "~2.0.3", + "ini": "~1.3.4", + "init-package-json": "~1.9.4", + "lockfile": "~1.0.1", + "lru-cache": "~4.0.1", + "minimatch": "~3.0.3", + "mkdirp": "~0.5.1", + "node-gyp": "~3.6.0", + "nopt": "~3.0.6", + "normalize-git-url": "~3.0.2", + "normalize-package-data": "~2.3.5", + "npm-cache-filename": "~1.0.2", + "npm-install-checks": "~1.0.7", + "npm-package-arg": "~4.1.0", + "npm-registry-client": "~7.2.1", + "npm-user-validate": "~0.1.5", + "npmlog": "~2.0.4", + "once": "~1.4.0", + "opener": "~1.4.1", + "osenv": "~0.1.3", + "path-is-inside": "~1.0.0", + "read": "~1.0.7", + "read-installed": "~4.0.3", + "read-package-json": "~2.0.4", + "readable-stream": "~2.1.5", + "realize-package-specifier": "~3.0.1", + "request": "~2.74.0", + "retry": "~0.10.0", + "rimraf": "~2.5.4", + "semver": "~5.1.0", + "sha": "~2.0.1", + "slide": "~1.1.6", + "sorted-object": "~2.0.0", + "spdx-license-ids": "~1.2.2", + "strip-ansi": "~3.0.1", + "tar": "~2.2.1", + "text-table": "~0.2.0", + "uid-number": "0.0.6", + "umask": "~1.1.0", + "validate-npm-package-license": "~3.0.1", + "validate-npm-package-name": "~2.2.2", + "which": "~1.2.11", + "wrappy": "~1.0.2", + "write-file-atomic": "~1.1.4" + }, + "dependencies": { + "abbrev": { + "version": "1.0.9", + "bundled": true, + "dev": true + }, + "ansi": { + "version": "0.3.1", + "bundled": true, + "dev": true + }, + "ansi-regex": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "ansicolors": { + "version": "0.3.2", + "bundled": true, + "dev": true + }, + "ansistyles": { + "version": "0.1.3", + "bundled": true, + "dev": true + }, + "archy": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "async-some": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "dezalgo": "^1.0.2" + } + }, + "block-stream": { + "version": "0.0.9", + "bundled": true, + "dev": true, + "requires": { + "inherits": "~2.0.0" + } + }, + "char-spinner": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "chmodr": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "chownr": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "cmd-shim": { + "version": "2.0.2", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "mkdirp": "~0.5.0" + } + }, + "columnify": { + "version": "1.5.4", + "bundled": true, + "dev": true, + "requires": { + "strip-ansi": "^3.0.0", + "wcwidth": "^1.0.0" + }, + "dependencies": { + "wcwidth": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "defaults": "^1.0.0" + }, + "dependencies": { + "defaults": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "requires": { + "clone": "^1.0.2" + }, + "dependencies": { + "clone": { + "version": "1.0.2", + "bundled": true, + "dev": true + } + } + } + } + } + } + }, + "config-chain": { + "version": "1.1.10", + "bundled": true, + "dev": true, + "requires": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + }, + "dependencies": { + "proto-list": { + "version": "1.2.4", + "bundled": true, + "dev": true + } + } + }, + "dezalgo": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "requires": { + "asap": "^2.0.0", + "wrappy": "1" + }, + "dependencies": { + "asap": { + "version": "2.0.3", + "bundled": true, + "dev": true + } + } + }, + "editor": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "fs-vacuum": { + "version": "1.2.9", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "path-is-inside": "^1.0.1", + "rimraf": "^2.5.2" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.8", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + }, + "dependencies": { + "iferr": { + "version": "0.1.5", + "bundled": true, + "dev": true + } + } + }, + "fstream": { + "version": "1.0.10", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" + } + }, + "fstream-npm": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "requires": { + "fstream-ignore": "^1.0.0", + "inherits": "2" + }, + "dependencies": { + "fstream-ignore": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "requires": { + "fstream": "^1.0.0", + "inherits": "2", + "minimatch": "^3.0.0" + } + } + } + }, + "github-url-from-git": { + "version": "1.4.0", + "bundled": true, + "dev": true + }, + "github-url-from-username-repo": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "glob": { + "version": "7.0.6", + "bundled": true, + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.2", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "dependencies": { + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "path-is-absolute": { + "version": "1.0.0", + "bundled": true, + "dev": true + } + } + }, + "graceful-fs": { + "version": "4.1.6", + "bundled": true, + "dev": true + }, + "hosted-git-info": { + "version": "2.1.5", + "bundled": true, + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "bundled": true, + "dev": true + }, + "inflight": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.4", + "bundled": true, + "dev": true + }, + "init-package-json": { + "version": "1.9.4", + "bundled": true, + "dev": true, + "requires": { + "glob": "^6.0.0", + "npm-package-arg": "^4.0.0", + "promzard": "^0.3.0", + "read": "~1.0.1", + "read-package-json": "1 || 2", + "semver": "2.x || 3.x || 4 || 5", + "validate-npm-package-license": "^3.0.1", + "validate-npm-package-name": "^2.0.1" + }, + "dependencies": { + "glob": { + "version": "6.0.4", + "bundled": true, + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "dependencies": { + "path-is-absolute": { + "version": "1.0.0", + "bundled": true, + "dev": true + } + } + }, + "promzard": { + "version": "0.3.0", + "bundled": true, + "dev": true, + "requires": { + "read": "1" + } + } + } + }, + "lockfile": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "lru-cache": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "requires": { + "pseudomap": "^1.0.1", + "yallist": "^2.0.0" + }, + "dependencies": { + "pseudomap": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "2.0.0", + "bundled": true, + "dev": true + } + } + }, + "minimatch": { + "version": "3.0.3", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "^1.0.0" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.6", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "^0.4.1", + "concat-map": "0.0.1" + }, + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + } + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + } + } + }, + "node-gyp": { + "version": "3.6.0", + "bundled": true, + "dev": true, + "requires": { + "fstream": "^1.0.0", + "glob": "^7.0.3", + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "mkdirp": "^0.5.0", + "nopt": "2 || 3", + "npmlog": "0 || 1 || 2 || 3 || 4", + "osenv": "0", + "request": "2", + "rimraf": "2", + "semver": "~5.3.0", + "tar": "^2.0.0", + "which": "1" + }, + "dependencies": { + "semver": { + "version": "5.3.0", + "bundled": true, + "dev": true + } + } + }, + "nopt": { + "version": "3.0.6", + "bundled": true, + "dev": true, + "requires": { + "abbrev": "1" + } + }, + "normalize-git-url": { + "version": "3.0.2", + "bundled": true, + "dev": true + }, + "normalize-package-data": { + "version": "2.3.5", + "bundled": true, + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "is-builtin-module": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "builtin-modules": "^1.0.0" + }, + "dependencies": { + "builtin-modules": { + "version": "1.1.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "npm-cache-filename": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "npm-install-checks": { + "version": "1.0.7", + "bundled": true, + "dev": true, + "requires": { + "npmlog": "0.1 || 1 || 2", + "semver": "^2.3.0 || 3.x || 4 || 5" + } + }, + "npm-package-arg": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "semver": "4 || 5" + } + }, + "npm-registry-client": { + "version": "7.2.1", + "bundled": true, + "dev": true, + "requires": { + "concat-stream": "^1.5.2", + "graceful-fs": "^4.1.6", + "normalize-package-data": "~1.0.1 || ^2.0.0", + "npm-package-arg": "^3.0.0 || ^4.0.0", + "npmlog": "~2.0.0 || ~3.1.0", + "once": "^1.3.3", + "request": "^2.74.0", + "retry": "^0.10.0", + "semver": "2 >=2.2.1 || 3.x || 4 || 5", + "slide": "^1.1.3" + }, + "dependencies": { + "concat-stream": { + "version": "1.5.2", + "bundled": true, + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "~2.0.0", + "typedarray": "~0.0.5" + }, + "dependencies": { + "readable-stream": { + "version": "2.0.6", + "bundled": true, + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "process-nextick-args": { + "version": "1.0.7", + "bundled": true, + "dev": true + }, + "string_decoder": { + "version": "0.10.31", + "bundled": true, + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true + } + } + }, + "typedarray": { + "version": "0.0.6", + "bundled": true, + "dev": true + } + } + }, + "retry": { + "version": "0.10.0", + "bundled": true, + "dev": true + } + } + }, + "npm-user-validate": { + "version": "0.1.5", + "bundled": true, + "dev": true + }, + "npmlog": { + "version": "2.0.4", + "bundled": true, + "dev": true, + "requires": { + "ansi": "~0.3.1", + "are-we-there-yet": "~1.1.2", + "gauge": "~1.2.5" + }, + "dependencies": { + "are-we-there-yet": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.0 || ^1.1.13" + }, + "dependencies": { + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true + } + } + }, + "gauge": { + "version": "1.2.7", + "bundled": true, + "dev": true, + "requires": { + "ansi": "^0.3.0", + "has-unicode": "^2.0.0", + "lodash.pad": "^4.1.0", + "lodash.padend": "^4.1.0", + "lodash.padstart": "^4.1.0" + }, + "dependencies": { + "has-unicode": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "lodash._baseslice": { + "version": "4.0.0", + "bundled": true, + "dev": true + }, + "lodash._basetostring": { + "version": "4.12.0", + "bundled": true, + "dev": true + }, + "lodash.pad": { + "version": "4.4.0", + "bundled": true, + "dev": true, + "requires": { + "lodash._baseslice": "~4.0.0", + "lodash._basetostring": "~4.12.0", + "lodash.tostring": "^4.0.0" + } + }, + "lodash.padend": { + "version": "4.5.0", + "bundled": true, + "dev": true, + "requires": { + "lodash._baseslice": "~4.0.0", + "lodash._basetostring": "~4.12.0", + "lodash.tostring": "^4.0.0" + } + }, + "lodash.padstart": { + "version": "4.5.0", + "bundled": true, + "dev": true, + "requires": { + "lodash._baseslice": "~4.0.0", + "lodash._basetostring": "~4.12.0", + "lodash.tostring": "^4.0.0" + } + }, + "lodash.tostring": { + "version": "4.1.4", + "bundled": true, + "dev": true + } + } + } + } + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "opener": { + "version": "1.4.1", + "bundled": true, + "dev": true + }, + "osenv": { + "version": "0.1.3", + "bundled": true, + "dev": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + }, + "dependencies": { + "os-homedir": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "os-tmpdir": { + "version": "1.0.1", + "bundled": true, + "dev": true + } + } + }, + "path-is-inside": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "read": { + "version": "1.0.7", + "bundled": true, + "dev": true, + "requires": { + "mute-stream": "~0.0.4" + }, + "dependencies": { + "mute-stream": { + "version": "0.0.5", + "bundled": true, + "dev": true + } + } + }, + "read-installed": { + "version": "4.0.3", + "bundled": true, + "dev": true, + "requires": { + "debuglog": "^1.0.1", + "graceful-fs": "^4.1.2", + "read-package-json": "^2.0.0", + "readdir-scoped-modules": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "slide": "~1.1.3", + "util-extend": "^1.0.1" + }, + "dependencies": { + "debuglog": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "readdir-scoped-modules": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "debuglog": "^1.0.1", + "dezalgo": "^1.0.0", + "graceful-fs": "^4.1.2", + "once": "^1.3.0" + } + }, + "util-extend": { + "version": "1.0.1", + "bundled": true, + "dev": true + } + } + }, + "read-package-json": { + "version": "2.0.4", + "bundled": true, + "dev": true, + "requires": { + "glob": "^6.0.0", + "graceful-fs": "^4.1.2", + "json-parse-helpfulerror": "^1.0.2", + "normalize-package-data": "^2.0.0" + }, + "dependencies": { + "glob": { + "version": "6.0.4", + "bundled": true, + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "dependencies": { + "path-is-absolute": { + "version": "1.0.0", + "bundled": true, + "dev": true + } + } + }, + "json-parse-helpfulerror": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "requires": { + "jju": "^1.1.0" + }, + "dependencies": { + "jju": { + "version": "1.3.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "readable-stream": { + "version": "2.1.5", + "bundled": true, + "dev": true, + "requires": { + "buffer-shims": "^1.0.0", + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "buffer-shims": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "process-nextick-args": { + "version": "1.0.7", + "bundled": true, + "dev": true + }, + "string_decoder": { + "version": "0.10.31", + "bundled": true, + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true + } + } + }, + "realize-package-specifier": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "dezalgo": "^1.0.1", + "npm-package-arg": "^4.0.0" + } + }, + "request": { + "version": "2.74.0", + "bundled": true, + "dev": true, + "requires": { + "aws-sign2": "~0.6.0", + "aws4": "^1.2.1", + "bl": "~1.1.2", + "caseless": "~0.11.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.0", + "forever-agent": "~0.6.1", + "form-data": "~1.0.0-rc4", + "har-validator": "~2.0.6", + "hawk": "~3.1.3", + "http-signature": "~1.1.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.7", + "node-uuid": "~1.4.7", + "oauth-sign": "~0.8.1", + "qs": "~6.2.0", + "stringstream": "~0.0.4", + "tough-cookie": "~2.3.0", + "tunnel-agent": "~0.4.1" + }, + "dependencies": { + "aws-sign2": { + "version": "0.6.0", + "bundled": true, + "dev": true + }, + "aws4": { + "version": "1.4.1", + "bundled": true, + "dev": true + }, + "bl": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "requires": { + "readable-stream": "~2.0.5" + }, + "dependencies": { + "readable-stream": { + "version": "2.0.6", + "bundled": true, + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "process-nextick-args": { + "version": "1.0.7", + "bundled": true, + "dev": true + }, + "string_decoder": { + "version": "0.10.31", + "bundled": true, + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true + } + } + } + } + }, + "caseless": { + "version": "0.11.0", + "bundled": true, + "dev": true + }, + "combined-stream": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + }, + "dependencies": { + "delayed-stream": { + "version": "1.0.0", + "bundled": true, + "dev": true + } + } + }, + "extend": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "bundled": true, + "dev": true + }, + "form-data": { + "version": "1.0.0-rc4", + "bundled": true, + "dev": true, + "requires": { + "async": "^1.5.2", + "combined-stream": "^1.0.5", + "mime-types": "^2.1.10" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "bundled": true, + "dev": true + } + } + }, + "har-validator": { + "version": "2.0.6", + "bundled": true, + "dev": true, + "requires": { + "chalk": "^1.1.1", + "commander": "^2.9.0", + "is-my-json-valid": "^2.12.4", + "pinkie-promise": "^2.0.0" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "bundled": true, + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "bundled": true, + "dev": true + }, + "has-ansi": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "bundled": true, + "dev": true + } + } + }, + "commander": { + "version": "2.9.0", + "bundled": true, + "dev": true, + "requires": { + "graceful-readlink": ">= 1.0.0" + }, + "dependencies": { + "graceful-readlink": { + "version": "1.0.1", + "bundled": true, + "dev": true + } + } + }, + "is-my-json-valid": { + "version": "2.13.1", + "bundled": true, + "dev": true, + "requires": { + "generate-function": "^2.0.0", + "generate-object-property": "^1.1.0", + "jsonpointer": "2.0.0", + "xtend": "^4.0.0" + }, + "dependencies": { + "generate-function": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "generate-object-property": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "requires": { + "is-property": "^1.0.0" + }, + "dependencies": { + "is-property": { + "version": "1.0.2", + "bundled": true, + "dev": true + } + } + }, + "jsonpointer": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "xtend": { + "version": "4.0.1", + "bundled": true, + "dev": true + } + } + }, + "pinkie-promise": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "pinkie": "^2.0.0" + }, + "dependencies": { + "pinkie": { + "version": "2.0.4", + "bundled": true, + "dev": true + } + } + } + } + }, + "hawk": { + "version": "3.1.3", + "bundled": true, + "dev": true, + "requires": { + "boom": "2.x.x", + "cryptiles": "2.x.x", + "hoek": "2.x.x", + "sntp": "1.x.x" + }, + "dependencies": { + "boom": { + "version": "2.10.1", + "bundled": true, + "dev": true, + "requires": { + "hoek": "2.x.x" + } + }, + "cryptiles": { + "version": "2.0.5", + "bundled": true, + "dev": true, + "requires": { + "boom": "2.x.x" + } + }, + "hoek": { + "version": "2.16.3", + "bundled": true, + "dev": true + }, + "sntp": { + "version": "1.0.9", + "bundled": true, + "dev": true, + "requires": { + "hoek": "2.x.x" + } + } + } + }, + "http-signature": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "requires": { + "assert-plus": "^0.2.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "dependencies": { + "assert-plus": { + "version": "0.2.0", + "bundled": true, + "dev": true + }, + "jsprim": { + "version": "1.3.0", + "bundled": true, + "dev": true, + "requires": { + "extsprintf": "1.0.2", + "json-schema": "0.2.2", + "verror": "1.3.6" + }, + "dependencies": { + "extsprintf": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "json-schema": { + "version": "0.2.2", + "bundled": true, + "dev": true + }, + "verror": { + "version": "1.3.6", + "bundled": true, + "dev": true, + "requires": { + "extsprintf": "1.0.2" + } + } + } + }, + "sshpk": { + "version": "1.9.2", + "bundled": true, + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jodid25519": "^1.0.0", + "jsbn": "~0.1.0", + "tweetnacl": "~0.13.0" + }, + "dependencies": { + "asn1": { + "version": "0.2.3", + "bundled": true, + "dev": true + }, + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "dashdash": { + "version": "1.14.0", + "bundled": true, + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "ecc-jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsbn": "~0.1.0" + } + }, + "getpass": { + "version": "0.1.6", + "bundled": true, + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "jodid25519": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsbn": "~0.1.0" + } + }, + "jsbn": { + "version": "0.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "tweetnacl": { + "version": "0.13.3", + "bundled": true, + "dev": true, + "optional": true + } + } + } + } + }, + "is-typedarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "isstream": { + "version": "0.1.2", + "bundled": true, + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "bundled": true, + "dev": true + }, + "mime-types": { + "version": "2.1.11", + "bundled": true, + "dev": true, + "requires": { + "mime-db": "~1.23.0" + }, + "dependencies": { + "mime-db": { + "version": "1.23.0", + "bundled": true, + "dev": true + } + } + }, + "node-uuid": { + "version": "1.4.7", + "bundled": true, + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "bundled": true, + "dev": true + }, + "qs": { + "version": "6.2.1", + "bundled": true, + "dev": true + }, + "stringstream": { + "version": "0.0.5", + "bundled": true, + "dev": true + }, + "tough-cookie": { + "version": "2.3.1", + "bundled": true, + "dev": true + }, + "tunnel-agent": { + "version": "0.4.3", + "bundled": true, + "dev": true + } + } + }, + "retry": { + "version": "0.10.0", + "bundled": true, + "dev": true + }, + "rimraf": { + "version": "2.5.4", + "bundled": true, + "dev": true, + "requires": { + "glob": "^7.0.5" + } + }, + "semver": { + "version": "5.1.0", + "bundled": true, + "dev": true + }, + "sha": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "readable-stream": "^2.0.2" + }, + "dependencies": { + "readable-stream": { + "version": "2.0.2", + "bundled": true, + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "process-nextick-args": "~1.0.0", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "core-util-is": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "isarray": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "process-nextick-args": { + "version": "1.0.3", + "bundled": true, + "dev": true + }, + "string_decoder": { + "version": "0.10.31", + "bundled": true, + "dev": true + }, + "util-deprecate": { + "version": "1.0.1", + "bundled": true, + "dev": true + } + } + } + } + }, + "slide": { + "version": "1.1.6", + "bundled": true, + "dev": true + }, + "sorted-object": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "spdx-license-ids": { + "version": "1.2.2", + "bundled": true, + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "tar": { + "version": "2.2.1", + "bundled": true, + "dev": true, + "requires": { + "block-stream": "*", + "fstream": "^1.0.2", + "inherits": "2" + } + }, + "text-table": { + "version": "0.2.0", + "bundled": true, + "dev": true + }, + "uid-number": { + "version": "0.0.6", + "bundled": true, + "dev": true + }, + "umask": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "spdx-correct": "~1.0.0", + "spdx-expression-parse": "~1.0.0" + }, + "dependencies": { + "spdx-correct": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "spdx-license-ids": "^1.0.2" + } + }, + "spdx-expression-parse": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "spdx-exceptions": "^1.0.4", + "spdx-license-ids": "^1.0.0" + }, + "dependencies": { + "spdx-exceptions": { + "version": "1.0.4", + "bundled": true, + "dev": true + } + } + } + } + }, + "validate-npm-package-name": { + "version": "2.2.2", + "bundled": true, + "dev": true, + "requires": { + "builtins": "0.0.7" + }, + "dependencies": { + "builtins": { + "version": "0.0.7", + "bundled": true, + "dev": true + } + } + }, + "which": { + "version": "1.2.11", + "bundled": true, + "dev": true, + "requires": { + "isexe": "^1.1.1" + }, + "dependencies": { + "isexe": { + "version": "1.1.2", + "bundled": true, + "dev": true + } + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "write-file-atomic": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "imurmurhash": "^0.1.4", + "slide": "^1.1.5" + } + } + } + }, + "semver": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", + "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", + "dev": true + } + } + }, + "null-check": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/null-check/-/null-check-1.0.0.tgz", + "integrity": "sha1-l33/1xdgErnsMNKjnbXPcqBDnt0=", + "dev": true + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-component": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz", + "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "dev": true, + "requires": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "object.map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", + "dev": true, + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "object.reduce": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.reduce/-/object.reduce-1.0.1.tgz", + "integrity": "sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60=", + "dev": true, + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + }, + "dependencies": { + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", + "dev": true + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + } + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + } + }, + "ordered-read-streams": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", + "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=", + "dev": true, + "requires": { + "readable-stream": "^2.0.1" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true, + "requires": { + "lcid": "^1.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "p-defer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", + "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", + "dev": true + }, + "p-limit": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-filepath": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", + "dev": true, + "requires": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "parse-node-version": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", + "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", + "dev": true + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "dev": true + }, + "parseqs": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", + "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", + "dev": true, + "requires": { + "better-assert": "~1.0.0" + } + }, + "parseuri": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz", + "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", + "dev": true, + "requires": { + "better-assert": "~1.0.0" + } + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "dev": true, + "requires": { + "path-root-regex": "^0.1.0" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", + "dev": true + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "picomatch": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.1.0.tgz", + "integrity": "sha512-uhnEDzAbrcJ8R3g2fANnSuXZMBtkpSjxTTgn2LeSiQlfmq72enQJWdQllXW24MBLYnA1SBD2vfvx2o0Zw3Ielw==", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pixelmatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/pixelmatch/-/pixelmatch-4.0.2.tgz", + "integrity": "sha1-j0fc7FARtHe2fbA8JDvB8wheiFQ=", + "dev": true, + "requires": { + "pngjs": "^3.0.0" + } + }, + "plexer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/plexer/-/plexer-1.0.1.tgz", + "integrity": "sha1-qAG2Ur+BRXOXlepNO/CvlGwwwN0=", + "dev": true, + "requires": { + "isstream": "^0.1.2", + "readable-stream": "^2.0.2" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "plugin-error": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", + "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==", + "dev": true, + "requires": { + "ansi-colors": "^1.0.1", + "arr-diff": "^4.0.0", + "arr-union": "^3.1.0", + "extend-shallow": "^3.0.2" + } + }, + "pngjs": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz", + "integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==", + "dev": true + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "pretty-bytes": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-4.0.2.tgz", + "integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=", + "dev": true + }, + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "promise": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.0.3.tgz", + "integrity": "sha512-HeRDUL1RJiLhyA0/grn+PTShlBAcLuh/1BJGtrvjwbvRDCTLLMEz9rOGCV+R3vHY4MixIuoMEd9Yq/XvsTPcjw==", + "dev": true, + "requires": { + "asap": "~2.0.6" + } + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "psl": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.4.0.tgz", + "integrity": "sha512-HZzqCGPecFLyoRj5HLfuDSKYTJkAfB5thKBIkRHtGjWwY7p1dAyveIbXIq4tO0KYfDF2tHqPUgY9SDnGm00uFw==", + "dev": true + }, + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "q": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.0.tgz", + "integrity": "sha1-3QG6ydBtMObyGa7LglPunr3DCPE=", + "dev": true + }, + "qjobs": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", + "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", + "dev": true + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true + }, + "raw-body": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "dev": true, + "requires": { + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "readable-stream": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", + "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + } + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, + "remove-bom-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", + "integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==", + "dev": true, + "requires": { + "is-buffer": "^1.1.5", + "is-utf8": "^0.2.1" + } + }, + "remove-bom-stream": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz", + "integrity": "sha1-BfGlk/FuQuH7kOv1nejlaVJflSM=", + "dev": true, + "requires": { + "remove-bom-buffer": "^3.0.0", + "safe-buffer": "^5.1.0", + "through2": "^2.0.3" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", + "dev": true + }, + "replace-homedir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-homedir/-/replace-homedir-1.0.0.tgz", + "integrity": "sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1", + "is-absolute": "^1.0.0", + "remove-trailing-separator": "^1.1.0" + } + }, + "replacestream": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/replacestream/-/replacestream-4.0.3.tgz", + "integrity": "sha512-AC0FiLS352pBBiZhd4VXB1Ab/lh0lEgpP+GGvZqbQh8a5cmXVoTe5EX/YeTFArnp4SRGTHh1qCHu9lGs1qG8sA==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.3", + "object-assign": "^4.0.1", + "readable-stream": "^2.0.2" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "request": { + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", + "dev": true + }, + "resolve": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz", + "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "resolve-options": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz", + "integrity": "sha1-MrueOcBtZzONyTeMDW1gdFZq0TE=", + "dev": true, + "requires": { + "value-or-function": "^3.0.0" + } + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "rfdc": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.1.4.tgz", + "integrity": "sha512-5C9HXdzK8EAqN7JDif30jqsBzavB7wLpaubisuQIGHWf2gUXSpzy6ArX/+Da8RjFpagWsCn+pIgxTMAmKw9Zug==", + "dev": true + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "rollup": { + "version": "1.26.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.26.0.tgz", + "integrity": "sha512-5HljNYn9icFvXX+Oe97qY5TWvnWhKqgGT0HGeWWqFPx7w7+Anzg7dfHMtUif7YYy6QxAgynDSwK6uxbgcrVUxw==", + "dev": true, + "requires": { + "@types/estree": "*", + "@types/node": "*", + "acorn": "^7.1.0" + }, + "dependencies": { + "acorn": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz", + "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==", + "dev": true + } + } + }, + "rollup-plugin-commonjs": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-10.1.0.tgz", + "integrity": "sha512-jlXbjZSQg8EIeAAvepNwhJj++qJWNJw1Cl0YnOqKtP5Djx+fFGkp3WRh+W0ASCaFG5w1jhmzDxgu3SJuVxPF4Q==", + "dev": true, + "requires": { + "estree-walker": "^0.6.1", + "is-reference": "^1.1.2", + "magic-string": "^0.25.2", + "resolve": "^1.11.0", + "rollup-pluginutils": "^2.8.1" + } + }, + "rollup-plugin-istanbul": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-istanbul/-/rollup-plugin-istanbul-2.0.1.tgz", + "integrity": "sha512-5X1ExH74moFY/pHqCrAZQ0V8RyEMCmrUSuo1t1bDzv9UHTd54s79ALDaK8N87PgNzA6UuKtBVAP/tsaSYzIUVQ==", + "dev": true, + "requires": { + "istanbul-lib-instrument": "^1.9.1", + "rollup-pluginutils": "^2.0.1" + } + }, + "rollup-plugin-node-resolve": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.2.0.tgz", + "integrity": "sha512-jUlyaDXts7TW2CqQ4GaO5VJ4PwwaV8VUGA7+km3n6k6xtOEacf61u0VXwN80phY/evMcaS+9eIeJ9MOyDxt5Zw==", + "dev": true, + "requires": { + "@types/resolve": "0.0.8", + "builtin-modules": "^3.1.0", + "is-module": "^1.0.0", + "resolve": "^1.11.1", + "rollup-pluginutils": "^2.8.1" + } + }, + "rollup-plugin-terser": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-5.1.2.tgz", + "integrity": "sha512-sWKBCOS+vUkRtHtEiJPAf+WnBqk/C402fBD9AVHxSIXMqjsY7MnYWKYEUqGixtr0c8+1DjzUEPlNgOYQPVrS1g==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "jest-worker": "^24.6.0", + "rollup-pluginutils": "^2.8.1", + "serialize-javascript": "^1.7.0", + "terser": "^4.1.0" + } + }, + "rollup-pluginutils": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", + "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", + "dev": true, + "requires": { + "estree-walker": "^0.6.1" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, + "rxjs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz", + "integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "safe-buffer": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", + "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "semver-greatest-satisfied-range": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz", + "integrity": "sha1-E+jCZYq5aRywzXEJMkAoDTb3els=", + "dev": true, + "requires": { + "sver-compat": "^1.5.0" + } + }, + "serialize-javascript": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.9.1.tgz", + "integrity": "sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A==", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + } + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "socket.io": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.1.1.tgz", + "integrity": "sha512-rORqq9c+7W0DAK3cleWNSyfv/qKXV99hV4tZe+gGLfBECw3XEhBy7x85F3wypA9688LKjtwO9pX9L33/xQI8yA==", + "dev": true, + "requires": { + "debug": "~3.1.0", + "engine.io": "~3.2.0", + "has-binary2": "~1.0.2", + "socket.io-adapter": "~1.1.0", + "socket.io-client": "2.1.1", + "socket.io-parser": "~3.2.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "socket.io-adapter": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz", + "integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs=", + "dev": true + }, + "socket.io-client": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.1.1.tgz", + "integrity": "sha512-jxnFyhAuFxYfjqIgduQlhzqTcOEQSn+OHKVfAxWaNWa7ecP7xSNk2Dx/3UEsDcY7NcFafxvNvKPmmO7HTwTxGQ==", + "dev": true, + "requires": { + "backo2": "1.0.2", + "base64-arraybuffer": "0.1.5", + "component-bind": "1.0.0", + "component-emitter": "1.2.1", + "debug": "~3.1.0", + "engine.io-client": "~3.2.0", + "has-binary2": "~1.0.2", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "object-component": "0.0.3", + "parseqs": "0.0.5", + "parseuri": "0.0.5", + "socket.io-parser": "~3.2.0", + "to-array": "0.1.4" + }, + "dependencies": { + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "socket.io-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.2.0.tgz", + "integrity": "sha512-FYiBx7rc/KORMJlgsXysflWx/RIvtqZbyGLlHZvjfmPTPeuD/I8MaW7cfFrj5tRltICJdgwflhfZ3NVVbVLFQA==", + "dev": true, + "requires": { + "component-emitter": "1.2.1", + "debug": "~3.1.0", + "isarray": "2.0.1" + }, + "dependencies": { + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "isarray": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz", + "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "sourcemap-codec": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.6.tgz", + "integrity": "sha512-1ZooVLYFxC448piVLBbtOxFcXwnymH9oUF8nRd3CuYDVvkRBxRl6pB4Mtas5a4drtL+E8LDgFkQNcgIw6tc8Hg==", + "dev": true + }, + "sparkles": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", + "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==", + "dev": true + }, + "spdx-correct": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "dev": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", + "dev": true + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true + }, + "stream-counter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-counter/-/stream-counter-1.0.0.tgz", + "integrity": "sha1-kc8lac5NxQYf6816yyY5SloRR1E=", + "dev": true + }, + "stream-exhaust": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz", + "integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==", + "dev": true + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "dev": true + }, + "streamroller": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-1.0.6.tgz", + "integrity": "sha512-3QC47Mhv3/aZNFpDDVO44qQb9gwB9QggMEE0sQmkTAwBVYdBRWISdsywlkfm5II1Q5y/pmrHflti/IgmIzdDBg==", + "dev": true, + "requires": { + "async": "^2.6.2", + "date-format": "^2.0.0", + "debug": "^3.2.6", + "fs-extra": "^7.0.1", + "lodash": "^4.17.14" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + } + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "requires": { + "safe-buffer": "~5.2.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "sver-compat": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz", + "integrity": "sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg=", + "dev": true, + "requires": { + "es6-iterator": "^2.0.1", + "es6-symbol": "^3.1.1" + } + }, + "table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "dev": true, + "requires": { + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "terser": { + "version": "4.3.9", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.3.9.tgz", + "integrity": "sha512-NFGMpHjlzmyOtPL+fDw3G7+6Ueh/sz4mkaUYa4lJCxOPTNzd0Uj0aZJOmsDYoSQyfuVoWDMSWTPU3huyOm2zdA==", + "dev": true, + "requires": { + "commander": "^2.20.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.12" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "textextensions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-2.5.0.tgz", + "integrity": "sha512-1IkVr355eHcomgK7fgj1Xsokturx6L5S2JRT5WcRdA6v5shk9sxWuO/w/VbpQexwkXJMQIa/j1dBi3oo7+HhcA==", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "through2-filter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", + "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", + "dev": true, + "requires": { + "through2": "~2.0.0", + "xtend": "~4.0.0" + } + }, + "time-stamp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", + "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-absolute-glob": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", + "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=", + "dev": true, + "requires": { + "is-absolute": "^1.0.0", + "is-negated-glob": "^1.0.0" + } + }, + "to-array": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", + "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=", + "dev": true + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "to-through": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz", + "integrity": "sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY=", + "dev": true, + "requires": { + "through2": "^2.0.3" + } + }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", + "dev": true + }, + "tough-cookie": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "dev": true, + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } + } + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, + "tslib": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "uglify-js": { + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.5.tgz", + "integrity": "sha512-7L3W+Npia1OCr5Blp4/Vw83tK1mu5gnoIURtT1fUVfQ3Kf8WStWV6NJz0fdoBJZls0KlweruRTLVe6XLafmy5g==", + "dev": true, + "optional": true, + "requires": { + "commander": "~2.20.3", + "source-map": "~0.6.1" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "optional": true + } + } + }, + "ultron": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", + "dev": true + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", + "dev": true + }, + "undertaker": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.2.1.tgz", + "integrity": "sha512-71WxIzDkgYk9ZS+spIB8iZXchFhAdEo2YU8xYqBYJ39DIUIqziK78ftm26eecoIY49X0J2MLhG4hr18Yp6/CMA==", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1", + "arr-map": "^2.0.0", + "bach": "^1.0.0", + "collection-map": "^1.0.0", + "es6-weak-map": "^2.0.1", + "last-run": "^1.1.0", + "object.defaults": "^1.0.0", + "object.reduce": "^1.0.0", + "undertaker-registry": "^1.0.0" + } + }, + "undertaker-registry": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/undertaker-registry/-/undertaker-registry-1.0.1.tgz", + "integrity": "sha1-XkvaMI5KiirlhPm5pDWaSZglzFA=", + "dev": true + }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "unique-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", + "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", + "dev": true, + "requires": { + "json-stable-stringify-without-jsonify": "^1.0.1", + "through2-filter": "^3.0.0" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + }, + "upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "dev": true + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "user-home": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz", + "integrity": "sha1-nHC/2Babwdy/SGBODwS4tJzenp8=", + "dev": true, + "requires": { + "os-homedir": "^1.0.0" + } + }, + "useragent": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.3.0.tgz", + "integrity": "sha512-4AoH4pxuSvHCjqLO04sU6U/uE65BYza8l/KKBS0b0hnUPWi+cQ2BpeTEwejCSx9SPV5/U03nniDTrWx5NrmKdw==", + "dev": true, + "requires": { + "lru-cache": "4.1.x", + "tmp": "0.0.x" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "dev": true + }, + "uuid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", + "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==", + "dev": true + }, + "v8flags": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.3.tgz", + "integrity": "sha512-amh9CCg3ZxkzQ48Mhcb8iX7xpAfYJgePHxWMQCBWECpOSqJUXgY26ncA61UTV0BkPqfhcy6mzwCIoP4ygxpW8w==", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "value-or-function": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz", + "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=", + "dev": true + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "vinyl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", + "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", + "dev": true, + "requires": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + } + }, + "vinyl-fs": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz", + "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==", + "dev": true, + "requires": { + "fs-mkdirp-stream": "^1.0.0", + "glob-stream": "^6.1.0", + "graceful-fs": "^4.0.0", + "is-valid-glob": "^1.0.0", + "lazystream": "^1.0.0", + "lead": "^1.0.0", + "object.assign": "^4.0.4", + "pumpify": "^1.3.5", + "readable-stream": "^2.3.3", + "remove-bom-buffer": "^3.0.0", + "remove-bom-stream": "^1.2.0", + "resolve-options": "^1.1.0", + "through2": "^2.0.0", + "to-through": "^2.0.0", + "value-or-function": "^3.0.0", + "vinyl": "^2.0.0", + "vinyl-sourcemap": "^1.1.0" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "vinyl-sourcemap": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz", + "integrity": "sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY=", + "dev": true, + "requires": { + "append-buffer": "^1.0.2", + "convert-source-map": "^1.5.0", + "graceful-fs": "^4.1.6", + "normalize-path": "^2.1.1", + "now-and-later": "^2.0.0", + "remove-bom-buffer": "^3.0.0", + "vinyl": "^2.0.0" + } + }, + "vinyl-sourcemaps-apply": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz", + "integrity": "sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=", + "dev": true, + "requires": { + "source-map": "^0.5.1" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "void-elements": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", + "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=", + "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "dev": true + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + }, + "ws": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", + "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", + "dev": true, + "requires": { + "async-limiter": "~1.0.0", + "safe-buffer": "~5.1.0", + "ultron": "~1.1.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, + "xmlhttprequest-ssl": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz", + "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4=", + "dev": true + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yargs": { + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^1.0.1", + "os-locale": "^3.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", + "dev": true + }, + "lcid": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "dev": true, + "requires": { + "invert-kv": "^2.0.0" + } + }, + "os-locale": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "dev": true, + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "yargs-parser": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "yargs-parser": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", + "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", + "dev": true, + "requires": { + "camelcase": "^3.0.0" + } + }, + "yazl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.5.1.tgz", + "integrity": "sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==", + "dev": true, + "requires": { + "buffer-crc32": "~0.2.3" + } + }, + "yeast": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", + "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=", + "dev": true + } + } +} diff --git a/htdocs/includes/chart/package.json b/htdocs/includes/chart/package.json new file mode 100644 index 00000000000..afb129b7dcd --- /dev/null +++ b/htdocs/includes/chart/package.json @@ -0,0 +1,69 @@ +{ + "name": "chart.js", + "homepage": "https://www.chartjs.org", + "description": "Simple HTML5 charts using the canvas element.", + "version": "2.9.3", + "license": "MIT", + "jsdelivr": "dist/Chart.min.js", + "unpkg": "dist/Chart.min.js", + "main": "dist/Chart.js", + "keywords": [ + "canvas", + "charts", + "data", + "graphs", + "html5", + "responsive" + ], + "repository": { + "type": "git", + "url": "https://github.com/chartjs/Chart.js.git" + }, + "bugs": { + "url": "https://github.com/chartjs/Chart.js/issues" + }, + "files": [ + "bower.json", + "composer.json", + "dist/*.css", + "dist/*.js" + ], + "devDependencies": { + "clean-css": "^4.2.1", + "coveralls": "^3.0.0", + "eslint": "^5.9.0", + "eslint-config-chartjs": "^0.1.0", + "eslint-plugin-html": "^5.0.0", + "gitbook-cli": "^2.3.2", + "gulp": "^4.0.0", + "gulp-eslint": "^5.0.0", + "gulp-file": "^0.4.0", + "gulp-htmllint": "^0.0.16", + "gulp-replace": "^1.0.0", + "gulp-size": "^3.0.0", + "gulp-streamify": "^1.0.2", + "gulp-terser": "^1.1.6", + "gulp-zip": "^4.2.0", + "jasmine": "^3.3.0", + "jasmine-core": "^3.3.0", + "karma": "^4.0.0", + "karma-chrome-launcher": "^2.2.0", + "karma-coverage": "^1.1.1", + "karma-firefox-launcher": "^1.0.1", + "karma-jasmine": "^2.0.1", + "karma-jasmine-html-reporter": "^1.4.0", + "karma-rollup-preprocessor": "^7.0.0", + "merge-stream": "^1.0.1", + "pixelmatch": "^4.0.2", + "rollup": "^1.0.0", + "rollup-plugin-commonjs": "^10.0.0", + "rollup-plugin-istanbul": "^2.0.1", + "rollup-plugin-node-resolve": "^5.0.0", + "rollup-plugin-terser": "^5.0.0", + "yargs": "^12.0.5" + }, + "dependencies": { + "chartjs-color": "^2.1.0", + "moment": "^2.10.2" + } +} diff --git a/htdocs/includes/chart/rollup.config.js b/htdocs/includes/chart/rollup.config.js new file mode 100644 index 00000000000..fc53f1a7460 --- /dev/null +++ b/htdocs/includes/chart/rollup.config.js @@ -0,0 +1,119 @@ +/* eslint-env es6 */ + +const commonjs = require('rollup-plugin-commonjs'); +const resolve = require('rollup-plugin-node-resolve'); +const terser = require('rollup-plugin-terser').terser; +const optional = require('./rollup.plugins').optional; +const stylesheet = require('./rollup.plugins').stylesheet; +const pkg = require('./package.json'); + +const input = 'src/index.js'; +const banner = `/*! + * Chart.js v${pkg.version} + * ${pkg.homepage} + * (c) ${new Date().getFullYear()} Chart.js Contributors + * Released under the MIT License + */`; + +module.exports = [ + // UMD builds (excluding moment) + // dist/Chart.min.js + // dist/Chart.js + { + input: input, + plugins: [ + resolve(), + commonjs(), + stylesheet({ + extract: true + }), + optional({ + include: ['moment'] + }) + ], + output: { + name: 'Chart', + file: 'dist/Chart.js', + banner: banner, + format: 'umd', + indent: false, + globals: { + moment: 'moment' + } + }, + external: [ + 'moment' + ] + }, + { + input: input, + plugins: [ + resolve(), + commonjs(), + optional({ + include: ['moment'] + }), + stylesheet({ + extract: true, + minify: true + }), + terser({ + output: { + preamble: banner + } + }) + ], + output: { + name: 'Chart', + file: 'dist/Chart.min.js', + format: 'umd', + indent: false, + globals: { + moment: 'moment' + } + }, + external: [ + 'moment' + ] + }, + + // UMD builds (including moment) + // dist/Chart.bundle.min.js + // dist/Chart.bundle.js + { + input: input, + plugins: [ + resolve(), + commonjs(), + stylesheet() + ], + output: { + name: 'Chart', + file: 'dist/Chart.bundle.js', + banner: banner, + format: 'umd', + indent: false + } + }, + { + input: input, + plugins: [ + resolve(), + commonjs(), + stylesheet({ + minify: true + }), + terser({ + output: { + preamble: banner + } + }) + ], + output: { + name: 'Chart', + file: 'dist/Chart.bundle.min.js', + format: 'umd', + indent: false + } + } +]; diff --git a/htdocs/includes/chart/rollup.plugins.js b/htdocs/includes/chart/rollup.plugins.js new file mode 100644 index 00000000000..8c8dd9624c1 --- /dev/null +++ b/htdocs/includes/chart/rollup.plugins.js @@ -0,0 +1,110 @@ +/* eslint-env es6 */ +const cleancss = require('clean-css'); +const path = require('path'); + +const UMD_WRAPPER_RE = /(\(function \(global, factory\) \{)((?:\s.*?)*)(\}\(this,)/; +const CJS_FACTORY_RE = /(module.exports = )(factory\(.*?\))( :)/; +const AMD_FACTORY_RE = /(define\()(.*?, factory)(\) :)/; + +function optional(config = {}) { + return { + name: 'optional', + renderChunk(code, chunk, options) { + if (options.format !== 'umd') { + this.error('only UMD format is currently supported'); + } + + const wrapper = UMD_WRAPPER_RE.exec(code); + const include = config.include; + if (!wrapper) { + this.error('failed to parse the UMD wrapper'); + } + + let content = wrapper[2]; + let factory = (CJS_FACTORY_RE.exec(content) || [])[2]; + let updated = false; + + for (let lib of chunk.imports) { + if (!include || include.indexOf(lib) !== -1) { + const regex = new RegExp(`require\\('${lib}'\\)`); + if (!regex.test(factory)) { + this.error(`failed to parse the CJS require for ${lib}`); + } + + // We need to write inline try / catch with explicit require + // in order to enable statical extraction of dependencies: + // try { return require('moment'); } catch(e) {} + const loader = `function() { try { return require('${lib}'); } catch(e) { } }()`; + factory = factory.replace(regex, loader); + updated = true; + } + } + + if (!updated) { + return; + } + + // Replace the CJS factory by our updated one. + content = content.replace(CJS_FACTORY_RE, `$1${factory}$3`); + + // Replace the AMD factory by our updated one: we need to use the + // following AMD form in order to be able to try/catch require: + // define(['require'], function(require) { ... require(...); ... }) + // https://github.com/amdjs/amdjs-api/wiki/AMD#using-require-and-exports + content = content.replace(AMD_FACTORY_RE, `$1['require'], function(require) { return ${factory}; }$3`); + + return code.replace(UMD_WRAPPER_RE, `$1${content}$3`); + } + }; +} + +// https://github.com/chartjs/Chart.js/issues/5208 +function stylesheet(config = {}) { + const minifier = new cleancss(); + const styles = []; + + return { + name: 'stylesheet', + transform(code, id) { + // Note that 'id' can be mapped to a CJS proxy import, in which case + // 'id' will start with 'commonjs-proxy', so let's first check if we + // are importing an existing css file (i.e. startsWith()). + if (!id.startsWith(path.resolve('.')) || !id.endsWith('.css')) { + return; + } + + if (config.minify) { + code = minifier.minify(code).styles; + } + + // keep track of all imported stylesheets (already minified) + styles.push(code); + + return { + code: 'export default ' + JSON.stringify(code) + }; + }, + generateBundle(opts, bundle) { + if (!config.extract) { + return; + } + + const entry = Object.keys(bundle).find(v => bundle[v].isEntry); + const name = (entry || '').replace(/\.js$/i, '.css'); + if (!name) { + this.error('failed to guess the output file name'); + } + + this.emitFile({ + type: 'asset', + source: styles.filter(v => !!v).join(''), + fileName: name + }); + } + }; +} + +module.exports = { + optional, + stylesheet +}; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 56c32847e62..8773d2262e4 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1382,32 +1382,41 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr print ''."\n"; } // Flot - if (empty($conf->global->MAIN_DISABLE_JQUERY_FLOT) && !defined('DISABLE_JQUERY_FLOT')) + if (empty($conf->global->MAIN_JS_GRAPH) || $conf->global->MAIN_JS_GRAPH == 'jflot') { - if (constant('JS_JQUERY_FLOT')) + if (empty($conf->global->MAIN_DISABLE_JQUERY_FLOT) && !defined('DISABLE_JQUERY_FLOT')) { - print ''."\n"; - print ''."\n"; - print ''."\n"; - } - else - { - print ''."\n"; - print ''."\n"; - print ''."\n"; - /* Test for jflot 4.2 -> not better than current - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - */ + if (constant('JS_JQUERY_FLOT')) + { + print ''."\n"; + print ''."\n"; + print ''."\n"; + } + else + { + print ''."\n"; + print ''."\n"; + print ''."\n"; + /* Test for jflot 4.2 -> not better than current + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + */ + } } } + // Chart + if ($conf->global->MAIN_JS_GRAPH == 'chart') + { + print ''."\n"; + } + // jQuery jeditable if (!empty($conf->global->MAIN_USE_JQUERY_JEDITABLE) && !defined('DISABLE_JQUERY_JEDITABLE')) { From aa1552dbc02b188b6d4cbc5118dbb1618bfb9ea7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 5 Mar 2020 00:17:16 +0100 Subject: [PATCH 067/313] Enhance graphs --- htdocs/compta/bank/graph.php | 40 +++++++++++++---------- htdocs/core/class/dolgraph.class.php | 16 +++++---- htdocs/product/index.php | 4 +-- htdocs/projet/graph_opportunities.inc.php | 2 +- htdocs/theme/eldy/global.inc.php | 1 + htdocs/theme/md/style.css.php | 1 + 6 files changed, 36 insertions(+), 28 deletions(-) diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php index 2e1f36cbeea..ccf677fa2b8 100644 --- a/htdocs/compta/bank/graph.php +++ b/htdocs/compta/bank/graph.php @@ -350,10 +350,11 @@ else } $datamin[$i] = $object->min_desired; $dataall[$i] = $object->min_allowed; - if ($xday == '15') + /*if ($xday == '15') // Set only some label for jflot { $labels[$i] = dol_print_date($day, "%b"); - } + }*/ + $labels[$i] = dol_print_date($day, "%Y%m"); $day += 86400; $textdate = strftime("%Y%m%d", $day); $xyear = substr($textdate, 0, 4); @@ -465,10 +466,11 @@ else } $datamin[$i] = $object->min_desired; $dataall[$i] = $object->min_allowed; - if (substr($textdate, 6, 2) == '01' || $i == 0) + /*if (substr($textdate, 6, 2) == '01' || $i == 0) // Set only few label for jflot { - $labels[$i] = substr($textdate, 4, 2); - } + $labels[$i] = substr($textdate, 0, 6); + }*/ + $labels[$i] = substr($textdate, 0, 6); $day += 86400; $textdate = strftime("%Y%m%d", $day); @@ -815,6 +817,8 @@ else } print '

'; +print ''; + // Graphs if ($mode == 'standard') @@ -826,39 +830,39 @@ if ($mode == 'standard') // For month $link = "".img_previous('', 'class="valignbottom"')." ".$langs->trans("Month")." ".img_next('', 'class="valignbottom"').""; - print ''.$link.''; + print '
'.$link.'
'; - print ''; + print '
'; $file = "movement".$account."-".$year.$month.".png"; print $show4; - print ''; + print '
'; - print ''; + print '
'; print $show1; - print ''; + print '
'; // For year $prevyear = $year - 1; $nextyear = $year + 1; $link = "".img_previous('', 'class="valignbottom"')." ".$langs->trans("Year")." ".img_next('', 'class="valignbottom"').""; - print ''.$link.''; - print ''; + print '
'.$link.'
'; + + print '
'; print $show5; - print ''; + print '
'; - print ''; + print '
'; print $show2; - print ''; + print '
'; } if ($mode == 'showalltime') { - print ''; + print '
'; print $show3; - print ''; + print '
'; } -print ''; // End of page llxFooter(); diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 72ce01ed4ef..0616a2e82e6 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -1036,7 +1036,9 @@ class DolGraph $dolxaxisvertical=''; if (count($this->data) > 20) $dolxaxisvertical='dol-xaxis-vertical'; // No height for the pie grah - $this->stringtoshow .= '
'."\n"; + $cssfordiv = 'dolgraphchart'; + if (isset($this->type[$firstlot]) && ($this->type[$firstlot] == 'pie' || $this->type[$firstlot] == 'polar')) $cssfordiv .= ' dolgraphcharpie'; + $this->stringtoshow .= '
'."\n"; $this->stringtoshow .= ' '; if ($invoice->socid != $conf->global->$constforcompanyid) { - print ''; print '

'; - print $langs->trans("Customer").': '.$soc->name; $constantforkey = 'CASHDESK_NO_DECREASE_STOCK'.$_SESSION["takeposterminal"]; if (!empty($conf->stock->enabled) && $conf->global->$constantforkey != "1") diff --git a/htdocs/takepos/takepos.php b/htdocs/takepos/takepos.php index 8d4f8f929c8..13689eed6ff 100644 --- a/htdocs/takepos/takepos.php +++ b/htdocs/takepos/takepos.php @@ -672,7 +672,7 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) { echo ' - '.dol_print_date(dol_now(), "day").''; ?> - trans("Customer"); ?> + trans("Customer"); ?>

-
+
"parent.$.colorbox.close();", - "span" => "id='printtext'", - "text" => $langs->trans("Cancel"), + "span" => "id='printtext' style='font-weight: bold; font-size: 18pt;'", + "text" => "X", "class" => "poscolordelete" ), ); $numpad = $conf->global->TAKEPOS_NUMPAD; + +print ''; +print ''; +print ''; ?> - - - 0) { $paycode = $paiements[0]->code; - if ($paycode == 'LIQ') $paycode = 'cash'; - if ($paycode == 'CB') $paycode = 'card'; - if ($paycode == 'CHQ') $paycode = 'cheque'; - ?> - - - - - - - + $payIcon = ''; + if ($paycode == 'LIQ') { + $paycode = 'cash'; + $payIcon = 'coins'; + } elseif ($paycode == 'CB') { + $paycode = 'card'; + $payIcon = 'credit-card'; + } elseif ($paycode == 'CHQ') { + $paycode = 'cheque'; + $payIcon = 'money-check'; + } + + print ''; + +} else { + print ''; +} + +print ''; +print ''; +print ''; +?> 1) { $paycode = $paiements[1]->code; - if ($paycode == 'LIQ') $paycode = 'cash'; - if ($paycode == 'CB') $paycode = 'card'; - if ($paycode == 'CHQ') $paycode = 'cheque'; - ?> - - - - - - - + $payIcon = ''; + if ($paycode == 'LIQ') { + $paycode = 'cash'; + $payIcon = 'coins'; + } elseif ($paycode == 'CB') { + $paycode = 'card'; + $payIcon = 'credit-card'; + } elseif ($paycode == 'CHQ') { + $paycode = 'cheque'; + $payIcon = 'money-check'; + } + + print ''; +} else { + $button = array_pop($action_buttons); + print ''; +} + +print ''; +print ''; +print ''; +?> 2) { $paycode = $paiements[2]->code; - if ($paycode == 'LIQ') $paycode = 'cash'; - if ($paycode == 'CB') $paycode = 'card'; - if ($paycode == 'CHQ') $paycode = 'cheque'; - ?> - -trans($paycode).'\');">' . (!empty($payIcon) ? '' : $langs->trans("PaymentTypeShort".$paiements[2]->code)) . ''; +} else { $button = array_pop($action_buttons); - ?> - - - - - -' . $button["text"] . ''; +} + +print ''; +print ''; +print ''; + $i = 3; while ($i < count($paiements)) { - ?> - - trans($paiements[$i]->code).'\');">' . $langs->trans("PaymentTypeShort".$paiements[$i]->code) . ''; $i = $i + 1; } @@ -320,9 +347,7 @@ if ($conf->global->TAKEPOS_ENABLE_SUMUP) { $class = ($i == 3) ? "calcbutton3" : "calcbutton2"; foreach ($action_buttons as $button) { $newclass = $class.($button["class"] ? " ".$button["class"] : ""); - ?> - - '.$button["text"].''; } ?>
From e2a918b9d26454acf3d652a5c09e9cb2efe4697c Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Tue, 10 Mar 2020 11:33:39 +0100 Subject: [PATCH 165/313] FIX blank failure --- htdocs/takepos/pay.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/takepos/pay.php b/htdocs/takepos/pay.php index ad663c90750..4c3762f672e 100644 --- a/htdocs/takepos/pay.php +++ b/htdocs/takepos/pay.php @@ -270,7 +270,6 @@ print ''; - } else { print ''; } From 29e1012dbaa2ee877dfd535da16ab03e5f4d9fe0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 10 Mar 2020 11:48:02 +0100 Subject: [PATCH 166/313] Restore stale but no automatic closing --- .../{stale-issues.yml.disabled => stale-issues.yml} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename .github/workflows/{stale-issues.yml.disabled => stale-issues.yml} (54%) diff --git a/.github/workflows/stale-issues.yml.disabled b/.github/workflows/stale-issues.yml similarity index 54% rename from .github/workflows/stale-issues.yml.disabled rename to .github/workflows/stale-issues.yml index d36a0122b28..c7e18db27bf 100644 --- a/.github/workflows/stale-issues.yml.disabled +++ b/.github/workflows/stale-issues.yml @@ -12,13 +12,13 @@ jobs: - uses: Dolibarr/stale@master with: repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-issue-message: 'This issue is stale because it has been open 6 month with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue will be closed automatically by stale bot in 6 month.' + stale-issue-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 15 days.' stale-issue-label: 'Issue Stale (automatic label)' exempt-issue-label: 'Priority High / Blocking' - days-before-stale: 182 - days-before-close: 183 + days-before-stale: 365 + days-before-close: -1 operations-per-run: 50 - #stale-pr-message: 'This PR is stale because it has been open 6 month with no activity. If this PR is still mergeable (no conflict, nor Continuous Integration errors), please comment to confirm this merge is still expected. Without comment, this issue will be closed automatically by stale bot in 6 month.' + #stale-pr-message: 'This PR is stale because it has been open 1 year with no activity. If this PR is still mergeable (no conflict, nor Continuous Integration errors), please comment to confirm this merge is still expected. Without comment, this issue will be closed automatically by stale bot in 15 days.' stale-pr-label: 'PR Stale (automatic label)' stale-pr-message: exempt-pr-label: 'Priority Top Strategic' From 9c683fb95102b992f4ceb969a2c67a7d3c513076 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 10 Mar 2020 12:01:55 +0100 Subject: [PATCH 167/313] Try safe stale --- .github/workflows/stale-issues-safe.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/stale-issues-safe.yml diff --git a/.github/workflows/stale-issues-safe.yml b/.github/workflows/stale-issues-safe.yml new file mode 100644 index 00000000000..0ac40364368 --- /dev/null +++ b/.github/workflows/stale-issues-safe.yml @@ -0,0 +1,22 @@ +# See syntax file on https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions +name: "Close stale issues (bugs and feature requests)" + +on: + schedule: + - cron: "0 21 * * *" + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: DeMoorJasper/stale@v2.0.1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 15 days.' + stale-label: 'Issue Stale (automatic label)' + exempt-label: 'Priority High / Blocking' + days-before-stale: 365 + days-before-close: 15 + operations-per-run: 50 + dry-run: true + \ No newline at end of file From cef268536886a4ac99cb3ed8f202add702edb74f Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Tue, 10 Mar 2020 14:08:28 +0100 Subject: [PATCH 168/313] NEW search on key code "enter" if defined in cash desk --- htdocs/takepos/takepos.php | 52 ++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/htdocs/takepos/takepos.php b/htdocs/takepos/takepos.php index 8d4f8f929c8..93d1a96e805 100644 --- a/htdocs/takepos/takepos.php +++ b/htdocs/takepos/takepos.php @@ -446,28 +446,36 @@ function New() { */ function Search2(keyCodeForEnter) { console.log("Search2 Call ajax search to replace products"); - if(window.event.keyCode == keyCodeForEnter) var key=13; - pageproducts=0; - jQuery(".wrapper2 .catwatermark").hide(); - $.getJSON('/takepos/ajax/ajax.php?action=search&term='+$('#search').val(), function(data) { - for (i = 0; i < ; i++) { - if (typeof (data[i]) == "undefined"){ - $("#prodesc"+i).text(""); - $("#proimg"+i).attr("src","genimg/empty.png"); - $("#prodiv"+i).data("rowid",""); - continue; + + var search = false; + var eventKeyCode = window.event.keyCode; + if (typeof keyCodeForEnter === 'undefined' || eventKeyCode == keyCodeForEnter) { + search = true; + } + + if (search === true) { + pageproducts = 0; + jQuery(".wrapper2 .catwatermark").hide(); + $.getJSON('/takepos/ajax/ajax.php?action=search&term=' + $('#search').val(), function (data) { + for (i = 0; i < ; i++) { + if (typeof (data[i]) == "undefined") { + $("#prodesc" + i).text(""); + $("#proimg" + i).attr("src", "genimg/empty.png"); + $("#prodiv" + i).data("rowid", ""); + continue; + } + var titlestring = 'transnoentities('Ref') . ': '); ?>' + data[i]['ref']; + $("#prodesc" + i).text(data[i]['label']); + $("#prodivdesc" + i).show(); + $("#proimg" + i).attr("title", titlestring); + $("#proimg" + i).attr("src", "genimg/index.php?query=pro&id=" + data[i]['rowid']); + $("#prodiv" + i).data("rowid", data[i]['rowid']); + $("#prodiv" + i).data("iscat", 0); } - var titlestring = 'transnoentities('Ref').': '); ?>'+data[i]['ref']; - $("#prodesc"+i).text(data[i]['label']); - $("#prodivdesc"+i).show(); - $("#proimg"+i).attr("title", titlestring); - $("#proimg"+i).attr("src", "genimg/index.php?query=pro&id="+data[i]['rowid']); - $("#prodiv"+i).data("rowid", data[i]['rowid']); - $("#prodiv"+i).data("iscat", 0); - } - }).always(function(data) { - if(key==13 && data.length==1) ClickProduct(0); - }); + }).always(function (data) { + if (eventKeyCode == keyCodeForEnter && data.length == 1) ClickProduct(0); + }); + } } function Edit(number) { @@ -655,7 +663,7 @@ $( document ).ready(function() { '.$langs->trans('TerminalSelect').'
'; -$keyCodeForEnter = $conf->global->{'CASHDESK_READER_KEYCODE_FOR_ENTER'.$_SESSION['takeposterminal']} > 0 ? $conf->global->{'CASHDESK_READER_KEYCODE_FOR_ENTER'.$_SESSION['takeposterminal']} : 13; +$keyCodeForEnter = $conf->global->{'CASHDESK_READER_KEYCODE_FOR_ENTER'.$_SESSION['takeposterminal']} > 0 ? $conf->global->{'CASHDESK_READER_KEYCODE_FOR_ENTER'.$_SESSION['takeposterminal']} : ''; ?>
From 31e59bbe870d0a45a5412ab0c8cfcc4c7b5863e5 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Tue, 10 Mar 2020 14:18:39 +0100 Subject: [PATCH 169/313] NEW add product if only one found --- htdocs/takepos/takepos.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/takepos.php b/htdocs/takepos/takepos.php index 93d1a96e805..ebced38c37f 100644 --- a/htdocs/takepos/takepos.php +++ b/htdocs/takepos/takepos.php @@ -473,7 +473,7 @@ function Search2(keyCodeForEnter) { $("#prodiv" + i).data("iscat", 0); } }).always(function (data) { - if (eventKeyCode == keyCodeForEnter && data.length == 1) ClickProduct(0); + if (data.length == 1) ClickProduct(0); }); } } From 8f768c6ecae7720b310675385d0d738bc35a4977 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Tue, 10 Mar 2020 14:33:58 +0100 Subject: [PATCH 170/313] NEW add a parameter to sort product by label in cash desk --- htdocs/takepos/admin/setup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index 0e8ba28e0bb..19ba5755e7b 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -175,7 +175,7 @@ print ''; print $langs->trans("SortProductField"); print ''; $prod = new Product($db); -$array = array('rowid' => 'ID', 'ref' => 'Ref', 'datec' => 'DateCreation', 'tms' => 'DateModification'); +$array = array('rowid' => 'ID', 'ref' => 'Ref', 'label' => 'Label', 'datec' => 'DateCreation', 'tms' => 'DateModification'); print $form->selectarray('TAKEPOS_SORTPRODUCTFIELD', $array, (empty($conf->global->TAKEPOS_SORTPRODUCTFIELD) ? 'rowid' : $conf->global->TAKEPOS_SORTPRODUCTFIELD), 0, 0, 0, '', 1); print "\n"; From 35f32391a0310834d77c6d9e914837b570de1cd5 Mon Sep 17 00:00:00 2001 From: atm-lena Date: Tue, 10 Mar 2020 14:46:15 +0100 Subject: [PATCH 171/313] FIX - Clone Fourn Command, add line's extrafields --- htdocs/fourn/class/fournisseur.commande.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index a4283ee5162..377151536b7 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1288,6 +1288,10 @@ class CommandeFournisseur extends CommonOrder $this->db->begin(); + // get extrafields so they will be clone + foreach($this->lines as $line) + $line->fetch_optionals($line->rowid); + // Load source object $objFrom = clone $this; From 078112c6490e48470340c19403932648d03ac639 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 10 Mar 2020 15:19:24 +0100 Subject: [PATCH 172/313] Fix trans --- htdocs/langs/en_US/other.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index 46424590f31..3a15443b961 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -268,7 +268,7 @@ WEBSITE_PAGEURL=URL of page WEBSITE_TITLE=Title WEBSITE_DESCRIPTION=Description WEBSITE_IMAGE=Image -WEBSITE_IMAGEDesc=Relative path of the image media. You can keep this empty as this is rarely used (it can be used by dynamic content to show a thumbnail in a list of blog posts). Use __WEBSITEKEY__ in the path if path depends on website name. +WEBSITE_IMAGEDesc=Relative path of the image media. You can keep this empty as this is rarely used (it can be used by dynamic content to show a thumbnail in a list of blog posts). Use __WEBSITE_KEY__ in the path if path depends on website name (for example: image/__WEBSITE_KEY__/stories/myimage.png). WEBSITE_KEYWORDS=Keywords LinesToImport=Lines to import From d6966dd42975653302eae333ce6a3700cd756c59 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 10 Mar 2020 15:59:48 +0100 Subject: [PATCH 173/313] Add method to count number of blogs in website --- htdocs/langs/en_US/other.lang | 2 +- htdocs/website/class/websitepage.class.php | 53 ++++++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index 00259d976bc..ad08da1f4fa 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -274,7 +274,7 @@ WEBSITE_PAGEURL=URL of page WEBSITE_TITLE=Title WEBSITE_DESCRIPTION=Description WEBSITE_IMAGE=Image -WEBSITE_IMAGEDesc=Relative path of the image media. You can keep this empty as this is rarely used (it can be used by dynamic content to show a thumbnail in a list of blog posts). Use __WEBSITEKEY__ in the path if path depends on website name. +WEBSITE_IMAGEDesc=Relative path of the image media. You can keep this empty as this is rarely used (it can be used by dynamic content to show a thumbnail in a list of blog posts). Use __WEBSITE_KEY__ in the path if path depends on website name. WEBSITE_KEYWORDS=Keywords LinesToImport=Lines to import diff --git a/htdocs/website/class/websitepage.class.php b/htdocs/website/class/websitepage.class.php index 514f1033d55..ece8cff7e3a 100644 --- a/htdocs/website/class/websitepage.class.php +++ b/htdocs/website/class/websitepage.class.php @@ -369,6 +369,59 @@ class WebsitePage extends CommonObject } } + /** + * Count objects in the database. + * + * @param string $websiteid Web site + * @param array $filter Filter array + * @param string $filtermode Filter mode (AND or OR) + * @return int int <0 if KO, array of pages if OK + */ + public function countAll($websiteid, array $filter = array(), $filtermode = 'AND') + { + dol_syslog(__METHOD__, LOG_DEBUG); + + $result = 0; + + $sql = 'SELECT COUNT(t.rowid) as nb'; + $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; + $sql .= ' WHERE t.fk_website = '.$websiteid; + // Manage filter + $sqlwhere = array(); + if (count($filter) > 0) { + foreach ($filter as $key => $value) { + if ($key == 't.rowid' || $key == 't.fk_website') { + $sqlwhere[] = $key.'='.$value; + } elseif ($key == 'lang' || $key == 't.lang') { + $sqlwhere[] = $key." = '".$this->db->escape(substr($value, 0, 2))."'"; + } else { + $sqlwhere[] = $key.' LIKE \'%'.$this->db->escape($value).'%\''; + } + } + } + if (count($sqlwhere) > 0) { + $sql .= ' AND ('.implode(' '.$filtermode.' ', $sqlwhere).')'; + } + + $resql = $this->db->query($sql); + if ($resql) { + $obj = $this->db->fetch_object($resql); + if ($obj) { + $result = $obj->nb; + } + + $this->db->free($resql); + + return $result; + } else { + $this->error = 'Error '.$this->db->lasterror(); + $this->errors[] = $this->error; + dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR); + + return -1; + } + } + /** * Update object into database * From 7b170ff4e605fef500aed59ca711999719db0112 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 10 Mar 2020 16:23:55 +0100 Subject: [PATCH 174/313] Work on migrate script --- .../website/migrate_news_joomla2dolibarr.php | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 scripts/website/migrate_news_joomla2dolibarr.php diff --git a/scripts/website/migrate_news_joomla2dolibarr.php b/scripts/website/migrate_news_joomla2dolibarr.php new file mode 100644 index 00000000000..1ef38529a48 --- /dev/null +++ b/scripts/website/migrate_news_joomla2dolibarr.php @@ -0,0 +1,46 @@ +#!/usr/bin/env php + + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file scripts/website/migrate_newsèjoomla2dolibarr.php + * \ingroup scripts + * \brief Migrate news from a Joomla databse into a Dolibarr website + */ + +$sapi_type = php_sapi_name(); +$script_file = basename(__FILE__); +$path = __DIR__ . '/'; + +// Test if batch mode +if (substr($sapi_type, 0, 3) == 'cgi') { + echo "Error: You are using PHP for CGI. To execute " . $script_file . " from command line, you must use PHP for CLI mode.\n"; + exit(- 1); +} + +@set_time_limit(0); // No timeout for this script +define('EVEN_IF_ONLY_LOGIN_ALLOWED', 1); // Set this define to 0 if you want to lock your script when dolibarr setup is "locked to admin user only". + +$error = 0; + + + + + + + +exit($error); From d956222e36af219f7a56769efe241ebfeb08c969 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 10 Mar 2020 21:54:50 +0100 Subject: [PATCH 175/313] FIX cols parameter not propagated to tpl --- htdocs/core/class/canvas.class.php | 1 + htdocs/core/class/commonobject.class.php | 3 ++- htdocs/core/tpl/extrafields_add.tpl.php | 7 +++++-- htdocs/core/tpl/extrafields_edit.tpl.php | 6 ++++-- htdocs/societe/card.php | 22 ++++++---------------- 5 files changed, 18 insertions(+), 21 deletions(-) diff --git a/htdocs/core/class/canvas.class.php b/htdocs/core/class/canvas.class.php index cfdb09c527e..68f2e9b1ba8 100644 --- a/htdocs/core/class/canvas.class.php +++ b/htdocs/core/class/canvas.class.php @@ -176,6 +176,7 @@ class Canvas global $db, $conf, $langs, $user, $canvas; global $form, $formfile; + //var_dump($this->card.'-'.$action); include $this->template_dir.(!empty($this->card)?$this->card.'_':'').$this->_cleanaction($action).'.tpl.php'; // Include native PHP template } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 96a56a3fb37..da30b714db0 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6798,7 +6798,8 @@ abstract class CommonObject if ($mode != 'view' && !empty($extrafields->attributes[$this->table_element]['required'][$key])) $out .= ' *'; } else { if ($mode != 'view' && !empty($extrafields->attributes[$this->table_element]['required'][$key])) $out .= ' fieldrequired'; - $out .= '">'; + $out .= '"'; + $out .= '>'; if (!empty($extrafields->attributes[$this->table_element]['help'][$key])) $out .= $form->textwithpicto($labeltoshow, $extrafields->attributes[$this->table_element]['help'][$key]); else $out .= $labeltoshow; } diff --git a/htdocs/core/tpl/extrafields_add.tpl.php b/htdocs/core/tpl/extrafields_add.tpl.php index 0579c464d30..2ef606afa0b 100644 --- a/htdocs/core/tpl/extrafields_add.tpl.php +++ b/htdocs/core/tpl/extrafields_add.tpl.php @@ -37,11 +37,14 @@ if (empty($conf) || !is_object($conf)) executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook)) { - $params = isset($tpl_context) ? array('tpl_context' => $tpl_context) : array(); // BUG #11554 : Add tpl_context in params + $params = array(); + if (isset($tpl_context)) $params['tpl_context'] = $tpl_context; + $params['cols']=$parameters['colspanvalue']; print $object->showOptionals($extrafields, 'edit', $params); // BUG #11554 : Add context in params } diff --git a/htdocs/core/tpl/extrafields_edit.tpl.php b/htdocs/core/tpl/extrafields_edit.tpl.php index adca8b50fab..8a04aa32dea 100644 --- a/htdocs/core/tpl/extrafields_edit.tpl.php +++ b/htdocs/core/tpl/extrafields_edit.tpl.php @@ -37,11 +37,13 @@ if (empty($conf) || ! is_object($conf)) executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + $params=array(); + $params['cols']=$parameters['colspanvalue']; + print $object->showOptionals($extrafields, 'edit', $params); } ?> diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index b7bdda5d6ba..d297678a2d2 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1557,14 +1557,9 @@ else print ''; } - // Other attributes - $parameters = array('colspan' => ' colspan="3"', 'cols' => '3'); - $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - if (empty($reshook)) - { - print $object->showOptionals($extrafields, 'edit', $parameters); - } + // Other attributes + $parameters = array('socid'=>$socid, 'colspan' => ' colspan="3"', 'colspanvalue' => '3'); + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_create.tpl.php'; // Assign a sale representative print ''; @@ -2218,14 +2213,9 @@ else print ''; } - // Other attributes - $parameters = array('colspan' => ' colspan="3"', 'cols' => '3'); - $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - if (empty($reshook)) - { - print $object->showOptionals($extrafields, 'edit', $parameters); - } + // Other attributes + $parameters = array('socid'=>$socid, 'colspan' => ' colspan="3"', 'colspanvalue' => '3'); + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php'; // Webservices url/key if (!empty($conf->syncsupplierwebservices->enabled)) { From 1f5c8f682cbafed2f66ed53450006ae347c32d28 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 10 Mar 2020 21:54:50 +0100 Subject: [PATCH 176/313] FIX cols parameter not propagated to tpl --- htdocs/core/class/canvas.class.php | 1 + htdocs/core/class/commonobject.class.php | 3 ++- htdocs/core/tpl/extrafields_add.tpl.php | 7 +++++-- htdocs/core/tpl/extrafields_edit.tpl.php | 6 ++++-- htdocs/societe/card.php | 22 ++++++---------------- 5 files changed, 18 insertions(+), 21 deletions(-) diff --git a/htdocs/core/class/canvas.class.php b/htdocs/core/class/canvas.class.php index cfdb09c527e..68f2e9b1ba8 100644 --- a/htdocs/core/class/canvas.class.php +++ b/htdocs/core/class/canvas.class.php @@ -176,6 +176,7 @@ class Canvas global $db, $conf, $langs, $user, $canvas; global $form, $formfile; + //var_dump($this->card.'-'.$action); include $this->template_dir.(!empty($this->card)?$this->card.'_':'').$this->_cleanaction($action).'.tpl.php'; // Include native PHP template } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index f4ae126f096..899005c8232 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6753,7 +6753,8 @@ abstract class CommonObject if ($mode != 'view' && !empty($extrafields->attributes[$this->table_element]['required'][$key])) $out .= ' *'; } else { if ($mode != 'view' && !empty($extrafields->attributes[$this->table_element]['required'][$key])) $out .= ' fieldrequired'; - $out .= '">'; + $out .= '"'; + $out .= '>'; if (!empty($extrafields->attributes[$this->table_element]['help'][$key])) $out .= $form->textwithpicto($labeltoshow, $extrafields->attributes[$this->table_element]['help'][$key]); else $out .= $labeltoshow; } diff --git a/htdocs/core/tpl/extrafields_add.tpl.php b/htdocs/core/tpl/extrafields_add.tpl.php index 0579c464d30..2ef606afa0b 100644 --- a/htdocs/core/tpl/extrafields_add.tpl.php +++ b/htdocs/core/tpl/extrafields_add.tpl.php @@ -37,11 +37,14 @@ if (empty($conf) || !is_object($conf)) executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook)) { - $params = isset($tpl_context) ? array('tpl_context' => $tpl_context) : array(); // BUG #11554 : Add tpl_context in params + $params = array(); + if (isset($tpl_context)) $params['tpl_context'] = $tpl_context; + $params['cols']=$parameters['colspanvalue']; print $object->showOptionals($extrafields, 'edit', $params); // BUG #11554 : Add context in params } diff --git a/htdocs/core/tpl/extrafields_edit.tpl.php b/htdocs/core/tpl/extrafields_edit.tpl.php index adca8b50fab..8a04aa32dea 100644 --- a/htdocs/core/tpl/extrafields_edit.tpl.php +++ b/htdocs/core/tpl/extrafields_edit.tpl.php @@ -37,11 +37,13 @@ if (empty($conf) || ! is_object($conf)) executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + $params=array(); + $params['cols']=$parameters['colspanvalue']; + print $object->showOptionals($extrafields, 'edit', $params); } ?> diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index f570be1bebf..1ed1327684c 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1557,14 +1557,9 @@ else print ''; } - // Other attributes - $parameters = array('colspan' => ' colspan="3"', 'cols' => '3'); - $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - if (empty($reshook)) - { - print $object->showOptionals($extrafields, 'edit', $parameters); - } + // Other attributes + $parameters = array('socid'=>$socid, 'colspan' => ' colspan="3"', 'colspanvalue' => '3'); + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_create.tpl.php'; // Assign a sale representative print ''; @@ -2218,14 +2213,9 @@ else print ''; } - // Other attributes - $parameters = array('colspan' => ' colspan="3"', 'cols' => '3'); - $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - if (empty($reshook)) - { - print $object->showOptionals($extrafields, 'edit', $parameters); - } + // Other attributes + $parameters = array('socid'=>$socid, 'colspan' => ' colspan="3"', 'colspanvalue' => '3'); + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php'; // Webservices url/key if (!empty($conf->syncsupplierwebservices->enabled)) { From f2b33c0d77b4fe909a3ed021f4edc6af581902df Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Wed, 11 Mar 2020 06:20:25 +0100 Subject: [PATCH 177/313] Fix accounting files link on auguria menu --- htdocs/core/menus/init_menu_auguria.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index 8948c391899..b9a0286584a 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -281,7 +281,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left -- Balance insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2435__+MAX_llx_menu__, 'accountancy', 'balance', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/balance.php?mainmenu=accountancy&leftmenu=accountancy_balance', 'AccountBalance', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 16, __ENTITY__); -- Export accounting documents - insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2436__+MAX_llx_menu__, 'accountancy', 'accountancy_files', 2400__+MAX_llx_menu__, '/compta/compta-files.php?mainmenu=accountancy&leftmenu=accountancy_files', 'AccountantFiles', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 17, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2436__+MAX_llx_menu__, 'accountancy', 'accountancy_files', 2400__+MAX_llx_menu__, '/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files', 'AccountantFiles', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 17, __ENTITY__); -- Reports insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2440__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2400__+MAX_llx_menu__, '/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy_report', 'Reportings', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 17, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_report"', __HANDLER__, 'left', 2441__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2440__+MAX_llx_menu__, '/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy_report', 'MenuReportInOut', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 18, __ENTITY__); From e4608a1ee58182eb22b83764923ce330b82dc4dd Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Wed, 11 Mar 2020 09:15:52 +0100 Subject: [PATCH 178/313] FIX add only one product if no key code defined --- htdocs/takepos/takepos.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/takepos.php b/htdocs/takepos/takepos.php index ebced38c37f..13fc910cb9e 100644 --- a/htdocs/takepos/takepos.php +++ b/htdocs/takepos/takepos.php @@ -473,7 +473,7 @@ function Search2(keyCodeForEnter) { $("#prodiv" + i).data("iscat", 0); } }).always(function (data) { - if (data.length == 1) ClickProduct(0); + if ($('#search').val().length > 0 && data.length == 1) ClickProduct(0); }); } } From c4b5a6f54b2128690823bc825a1b75a9d0d9a115 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Mar 2020 11:00:57 +0100 Subject: [PATCH 179/313] CSS --- htdocs/theme/eldy/dropdown.inc.php | 2 +- htdocs/theme/md/dropdown.inc.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/theme/eldy/dropdown.inc.php b/htdocs/theme/eldy/dropdown.inc.php index 55f0536c02d..6a0054a3ed8 100644 --- a/htdocs/theme/eldy/dropdown.inc.php +++ b/htdocs/theme/eldy/dropdown.inc.php @@ -351,7 +351,7 @@ a.top-menu-dropdown-link { */ .dropdown-search-input { - width: 280px; + width: 100%; padding: 10px 35px 10px 20px; background-color: transparent; diff --git a/htdocs/theme/md/dropdown.inc.php b/htdocs/theme/md/dropdown.inc.php index d68df84c0c8..aae84a27c1b 100644 --- a/htdocs/theme/md/dropdown.inc.php +++ b/htdocs/theme/md/dropdown.inc.php @@ -6,6 +6,9 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> * Dropdown of user popup */ +.bookmark-footer a.top-menu-dropdown-link { + white-space: normal; +} button.dropdown-item.global-search-item { outline: none; From 6d1f62c1d95f0090e0150689c3e0484b91a7805f Mon Sep 17 00:00:00 2001 From: Florian Mortgat Date: Wed, 11 Mar 2020 11:03:19 +0100 Subject: [PATCH 180/313] FIX 10.0 - status missing from last customer invoices box when using MAIN_STATUS_USES_CSS --- htdocs/core/boxes/modules_boxes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/boxes/modules_boxes.php b/htdocs/core/boxes/modules_boxes.php index 34070520aa5..25f357ce06b 100644 --- a/htdocs/core/boxes/modules_boxes.php +++ b/htdocs/core/boxes/modules_boxes.php @@ -332,13 +332,13 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" box if (! empty($contents[$i][$j]['maxlength'])) $maxlength=$contents[$i][$j]['maxlength']; if ($maxlength) $textwithnotags=dol_trunc($textwithnotags, $maxlength); - if (preg_match('/^ Date: Wed, 11 Mar 2020 11:45:57 +0100 Subject: [PATCH 181/313] FIX 10.0 - translations for "orders" not loaded in the homepage box --- htdocs/core/boxes/box_commandes.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/boxes/box_commandes.php b/htdocs/core/boxes/box_commandes.php index 956e73b4acf..31a7b8d33de 100644 --- a/htdocs/core/boxes/box_commandes.php +++ b/htdocs/core/boxes/box_commandes.php @@ -72,6 +72,7 @@ class box_commandes extends ModeleBoxes public function loadBox($max = 5) { global $user, $langs, $db, $conf; + $langs->load('orders'); $this->max = $max; From 898007f0b454760a52e312cd1ba95c0f548a235b Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Wed, 11 Mar 2020 12:30:07 +0100 Subject: [PATCH 182/313] NEW add global reduction in cash desk --- htdocs/takepos/invoice.php | 6 + htdocs/takepos/reduction.php | 219 +++++++++++++++++++++++++++++++++++ htdocs/takepos/takepos.php | 7 ++ 3 files changed, 232 insertions(+) create mode 100644 htdocs/takepos/reduction.php diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 4660032cc15..e6811319199 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -453,6 +453,12 @@ if ($action == "updatereduction") else $result = $invoice->updateline($line->id, $line->desc, $line->multicurrency_subprice, $line->qty, $number, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit); } } + $invoice->fetch($placeid); +} elseif ($action == 'update_reduction_global') { + foreach ($invoice->lines as $line) { + $result = $invoice->updateline($line->id, $line->desc, $line->subprice, $line->qty, $number, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit); + } + $invoice->fetch($placeid); } diff --git a/htdocs/takepos/reduction.php b/htdocs/takepos/reduction.php new file mode 100644 index 00000000000..a8f77f1ffd7 --- /dev/null +++ b/htdocs/takepos/reduction.php @@ -0,0 +1,219 @@ + + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/takepos/reduction.php + * \ingroup takepos + * \brief Page with the content of the popup to enter reductions + */ + +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Not disabled cause need to load personalized language +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Not disabled cause need to load personalized language +//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); +if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); +if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); +if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); +if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); +if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); + +require '../main.inc.php'; // Load $user and permissions +require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; + +$place = (GETPOST('place', 'int') > 0 ? GETPOST('place', 'int') : 0); // $place is id of table for Ba or Restaurant + +$invoiceid = GETPOST('invoiceid', 'int'); + + +/* + * View + */ + +$invoice = new Facture($db); +if ($invoiceid > 0) +{ + $invoice->fetch($invoiceid); +} +else +{ + $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."facture where ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")'"; + $resql = $db->query($sql); + $obj = $db->fetch_object($resql); + if ($obj) + { + $invoiceid = $obj->rowid; + } + if (!$invoiceid) + { + $invoiceid = 0; // Invoice does not exist yet + } + else + { + $invoice->fetch($invoiceid); + } +} + +$arrayofcss = array('/takepos/css/pos.css.php'); +$arrayofjs = array(); + +top_htmlhead($head, '', 0, 0, $arrayofjs, $arrayofcss); + +$langs->loadLangs(array('main', 'bills', 'cashdesk')); +?> + + + + + + +
+
+trans('Reduction') . '">'; +?> +
+
+ +
+7'; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; + +?> +
+ + + diff --git a/htdocs/takepos/takepos.php b/htdocs/takepos/takepos.php index 8d4f8f929c8..da1a7f1cd1f 100644 --- a/htdocs/takepos/takepos.php +++ b/htdocs/takepos/takepos.php @@ -398,6 +398,12 @@ function History() $.colorbox({href:"../compta/facture/list.php?contextpage=poslist", width:"90%", height:"80%", transition:"none", iframe:"true", title:"trans("History"); ?>"}); } +function Reduction() { + invoiceid = $("#invoiceid").val(); + console.log("Open popup to enter reduction on invoiceid="+invoiceid); + $.colorbox({href:"reduction.php?place="+place+"&invoiceid="+invoiceid, width:"80%", height:"90%", transition:"none", iframe:"true", title:""}); +} + function CloseBill() { invoiceid = $("#invoiceid").val(); console.log("Open popup to enter payment on invoiceid="+invoiceid); @@ -766,6 +772,7 @@ if (!empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) { } $menus[$r++] = array('title'=>'
'.$langs->trans("History").'
', 'action'=>'History();'); $menus[$r++] = array('title'=>'
'.$langs->trans("FreeZone").'
', 'action'=>'FreeZone();'); +$menus[$r++] = array('title'=>'
'.$langs->trans("Reduction").'
', 'action'=>'Reduction();'); $menus[$r++] = array('title'=>'
'.$langs->trans("Payment").'
', 'action'=>'CloseBill();'); if ($conf->global->TAKEPOS_DIRECT_PAYMENT) { From 26fec2f366c7c1fe5b0bb3323ee43de56330fdd2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Mar 2020 12:53:41 +0100 Subject: [PATCH 183/313] Enhance website --- htdocs/core/lib/website.lib.php | 7 +++++-- htdocs/langs/en_US/website.lang | 3 ++- htdocs/theme/eldy/global.inc.php | 9 +++++++- htdocs/theme/md/style.css.php | 9 +++++++- htdocs/website/index.php | 35 +++++++++++++++++++++++--------- 5 files changed, 48 insertions(+), 15 deletions(-) diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php index a0a1da26b3c..2257203d25b 100644 --- a/htdocs/core/lib/website.lib.php +++ b/htdocs/core/lib/website.lib.php @@ -51,11 +51,14 @@ function dolStripPhpCode($str, $replacewith = '') $partlings = explode('?>', $part); if (!empty($partlings)) { - $phppart = $partlings[0]; + //$phppart = $partlings[0]; //remove content before closing tag if (count($partlings) > 1) $partlings[0] = ''; // Todo why a count > 1 and not >= 1 ? //append to out string - $newstr .= ''.$replacewith.''.implode('', $partlings); + //$newstr .= ''.$replacewith.''.implode('', $partlings); + //$newstr .= ''.$replacewith.''.implode('', $partlings); + $newstr .= ''.$replacewith.''.implode('', $partlings); + //$newstr .= $replacewith.implode('', $partlings); } } } diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang index ee46c9f4954..02e283babea 100644 --- a/htdocs/langs/en_US/website.lang +++ b/htdocs/langs/en_US/website.lang @@ -42,7 +42,8 @@ ViewPageInNewTab=View page in new tab SetAsHomePage=Set as Home page RealURL=Real URL ViewWebsiteInProduction=View web site using home URLs -SetHereVirtualHost=Use with Apache/NGinx/...
If you can create, on your web server (Apache, Nginx, ...), a dedicated Virtual Host with PHP enabled and a Root directory on
%s
then set the name of the virtual host you have created in the properties of web site, so the preview can be done also using this dedicated web server access instead of the internal Dolibarr server. +SetHereVirtualHost=Use with Apache/NGinx/...
Create on your web server (Apache, Nginx, ...) a dedicated Virtual Host with PHP enabled and a Root directory on
%s +ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=Use with PHP embedded server
On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running
php -S 0.0.0.0:8080 -t %s YouCanAlsoDeployToAnotherWHP=Run your web site with another Dolibarr Hosting provider
If you don't have a web server like Apache or NGinx available on internet, you can export and import your web site onto another Dolibarr instance provided by another Dolibarr hosting provider that provide full integration with the Website module. You can find a list of some Dolibarr hosting providers on https://saas.dolibarr.org CheckVirtualHostPerms=Check also that virtual host has permission %s on files into
%s diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index d1e79773558..c8cdf0a951a 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -4112,7 +4112,14 @@ tr.visible { /* Module website */ /* ============================================================================== */ -.phptag { +.exampleapachesetup { + overflow-y: auto; + height: 100px; + font-size: 0.8em; + border: 1px solid #aaa; +} + +span[phptag] { background: #ddd; border: 1px solid #ccc; border-radius: 4px; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 9026b8111c9..8f61c785f14 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -4115,7 +4115,14 @@ tr.visible { /* Module website */ /* ============================================================================== */ -.phptag { +.exampleapachesetup { + overflow-y: auto; + max-height: 100px; + font-size: 0.8em; + border: 1px solid #aaa; +} + +span[phptag] { background: #ddd; border: 1px solid #ccc; border-radius: 4px; } diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 03587b97d32..afee89e0d1f 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -2195,7 +2195,26 @@ if (!GETPOST('hide_websitemenu')) $htmltext .= '
'; $htmltext .= '
'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("ReadPerm"), DOL_DOCUMENT_ROOT); $htmltext .= '
'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("WritePerm"), DOL_DATA_ROOT.'/website
'.DOL_DATA_ROOT.'/medias'); - $htmltext .= '
'; + + $examplewithapache = ''."\n"; + $examplewithapache .= 'AllowOverride FileInfo Options + Options -Indexes -MultiViews -FollowSymLinks -ExecCGI + Require all granted + + + AllowOverride FileInfo Options + Options -Indexes -MultiViews +FollowSymLinks -ExecCGI + Require all granted + + + AllowOverride FileInfo Options + Options -Indexes -MultiViews -FollowSymLinks -ExecCGI + Require all granted + '; + + $htmltext .= '
'.$langs->trans("ExampleToUseInApacheVirtualHostConfig").':
'; + $htmltext .= '
'.dol_nl2br(dol_escape_htmltag($examplewithapache, 1, 1)).'
'; + $htmltext .= '
'; $htmltext .= $langs->trans("YouCanAlsoTestWithPHPS", $dataroot); $htmltext .= '
'; @@ -2371,12 +2390,12 @@ if (!GETPOST('hide_websitemenu')) if (! isEditingEnabled || forceenable) { console.log("Enable inline edit"); - jQuery(\'section[contenteditable="true"]\').each(function(idx){ + jQuery(\'section[contenteditable="true"],div[contenteditable="true"]\').each(function(idx){ var idtouse = $(this).attr(\'id\'); console.log("Enable inline edit for "+idtouse); CKEDITOR.inline(idtouse, { // Allow some non-standard markup that we used in the introduction. - extraAllowedContent: \'span(*);cite(*);q(*);dl(*);dt(*);dd(*);ul(*);li(*);header(*);button(*);h1(*);h2(*);\', + extraAllowedContent: \'span(*);cite(*);q(*);dl(*);dt(*);dd(*);ul(*);li(*);header(*);button(*);h1(*);h2(*);title(*);\', //extraPlugins: \'sourcedialog\', removePlugins: \'flash,stylescombo\', // Show toolbar on startup (optional). @@ -2400,7 +2419,9 @@ if (!GETPOST('hide_websitemenu')) print $langs->trans("EditInLine"); print ''; - if ($websitepage->grabbed_from) + //$disableeditinline = $websitepage->grabbed_from; + $disableeditinline = 0; + if ($disableeditinline) { //print ''; print ''.img_picto($langs->trans("OnlyEditionOfSourceForGrabbedContent"), 'switch_off', '', false, 0, 0, '', 'nomarginleft').''; @@ -2421,12 +2442,6 @@ if (!GETPOST('hide_websitemenu')) print '
'; print '
'; print $langs->trans("ShowSubcontainers"); - /*if ($websitepage->grabbed_from) - { - print ''.img_picto($langs->trans("OnlyEditionOfSourceForGrabbedContent"),'switch_off','',false,0,0,'','nomarginleft').''; - } - else - {*/ if (empty($conf->global->WEBSITE_SUBCONTAINERSINLINE)) { print ''.img_picto($langs->trans("ShowSubContainersOnOff", $langs->transnoentitiesnoconv("Off")), 'switch_off', '', false, 0, 0, '', 'nomarginleft').''; From 406c333849d0138657d070314015b64887583202 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Mar 2020 13:55:57 +0100 Subject: [PATCH 184/313] Fix trans --- htdocs/langs/en_US/website.lang | 2 +- htdocs/website/index.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang index 02e283babea..dc21411342c 100644 --- a/htdocs/langs/en_US/website.lang +++ b/htdocs/langs/en_US/website.lang @@ -85,7 +85,7 @@ SorryWebsiteIsCurrentlyOffLine=Sorry, this website is currently off line. Please WEBSITE_USE_WEBSITE_ACCOUNTS=Enable the web site account table WEBSITE_USE_WEBSITE_ACCOUNTSTooltip=Enable the table to store web site accounts (login/pass) for each website / third party YouMustDefineTheHomePage=You must first define the default Home page -OnlyEditionOfSourceForGrabbedContentFuture=Warning: Creating a web page by importing an external web page is reserved for experienced users. Depending on the complexity of source page, the result of importation may differ from the original. Also if the source page uses common CSS styles or conflicting javascript, it may break the look or features of the Website editor when working on this page. This method is a quicker way to create a page but it is recommended to create your new page from scratch or from a suggested page template.
Note also that edits of HTML source will be possible when page content has been initialized by grabbing it from an external page ("Online" editor will NOT be available) +OnlyEditionOfSourceForGrabbedContentFuture=Warning: Creating a web page by importing an external web page is reserved for experienced users. Depending on the complexity of source page, the result of importation may differ from the original. Also if the source page uses common CSS styles or conflicting javascript, it may break the look or features of the Website editor when working on this page. This method is a quicker way to create a page but it is recommended to create your new page from scratch or from a suggested page template.
Note also that the inline editor may not works correclty when used on a grabbed external page. OnlyEditionOfSourceForGrabbedContent=Only edition of HTML source is possible when content was grabbed from an external site GrabImagesInto=Grab also images found into css and page. ImagesShouldBeSavedInto=Images should be saved into directory diff --git a/htdocs/website/index.php b/htdocs/website/index.php index afee89e0d1f..ed8a863d0a7 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -2395,7 +2395,7 @@ if (!GETPOST('hide_websitemenu')) console.log("Enable inline edit for "+idtouse); CKEDITOR.inline(idtouse, { // Allow some non-standard markup that we used in the introduction. - extraAllowedContent: \'span(*);cite(*);q(*);dl(*);dt(*);dd(*);ul(*);li(*);header(*);button(*);h1(*);h2(*);title(*);\', + extraAllowedContent: \'span(*);cite(*);q(*);dl(*);dt(*);dd(*);ul(*);li(*);header(*);button(*);h1(*);h2(*);\', //extraPlugins: \'sourcedialog\', removePlugins: \'flash,stylescombo\', // Show toolbar on startup (optional). From 65fbc24b366ab3234defe0d52b406b657f310856 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Mar 2020 14:53:06 +0100 Subject: [PATCH 185/313] Work on migration script --- htdocs/langs/en_US/errors.lang | 1 + .../website/migrate_news_joomla2dolibarr.php | 43 +++++++++++++++++++ 2 files changed, 44 insertions(+) mode change 100644 => 100755 scripts/website/migrate_news_joomla2dolibarr.php diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 22c9d180f97..88e18c62943 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -59,6 +59,7 @@ ErrorPartialFile=File not received completely by server. ErrorNoTmpDir=Temporary directy %s does not exists. ErrorUploadBlockedByAddon=Upload blocked by a PHP/Apache plugin. ErrorFileSizeTooLarge=File size is too large. +ErrorFieldTooLong=Field %s is too long. ErrorSizeTooLongForIntType=Size too long for int type (%s digits maximum) ErrorSizeTooLongForVarcharType=Size too long for string type (%s chars maximum) ErrorNoValueForSelectType=Please fill value for select list diff --git a/scripts/website/migrate_news_joomla2dolibarr.php b/scripts/website/migrate_news_joomla2dolibarr.php old mode 100644 new mode 100755 index 1ef38529a48..5b93039df8b --- a/scripts/website/migrate_news_joomla2dolibarr.php +++ b/scripts/website/migrate_news_joomla2dolibarr.php @@ -37,10 +37,53 @@ define('EVEN_IF_ONLY_LOGIN_ALLOWED', 1); // Set this define to 0 if you want to $error = 0; +if (empty($argv[3]) || ! in_array($argv[1], array('test','confirm'))) { + print "Usage: $script_file (test|confirm) website login:pass@serverjoomla/tableprefix/databasejoomla\n"; + print "\n"; + print "Load joomla news and create them into Dolibarr database (if they don't alreay exist).\n"; + exit(- 1); +} + +$mode = $argv[1]; +$website = $argv[2]; +$joomlaserverinfo = $argv[3]; + +require $path . "../../htdocs/master.inc.php"; + +$langs->load('main'); + +$joomlaserverinfoarray = preg_split('/(:|@|\/)/', $joomlaserverinfo); +$joomlalogin = $joomlaserverinfoarray[0]; +$joomlapass = $joomlaserverinfoarray[1]; +$joomlahost = $joomlaserverinfoarray[2]; +$joomlaprefix = $joomlaserverinfoarray[3]; +$joomladatabase = $joomlaserverinfoarray[4]; +$joomlaport = 3306; +$dbjoomla=getDoliDBInstance('mysqli', $joomlahost, $joomlalogin, $joomlapass, $joomladatabase, $joomlaport); +if ($dbjoomla->error) +{ + dol_print_error($dbjoomla,"host=".$joomlahost.", port=".$joomlaport.", user=".$joomlalogin.", databasename=".$joomladatabase.", ".$dbjoomla->error); + exit(-1); +} +$sql = 'SELECT id, title, alias, created, introtext, `fulltext` FROM '.$joomlaprefix.'_content WHERE 1 = 1'; +$resql = $dbjoomla->query($sql); +if (! $resql) { + dol_print_error($dbjoomla); + exit; +} +while ($obj = $dbjoomla->fetch_object($resql)) { + if ($obj) { + $id = $obj->id; + $title = $obj->title; + $alias = $obj->alias; + $description = dol_string_nohtmltag($obj->introtext); + $hmtltext = $obj->fulltext; + } +} exit($error); From 20aa51f26bdc69b2aa1dadeb878a0f624d08339b Mon Sep 17 00:00:00 2001 From: atm-lena Date: Wed, 11 Mar 2020 15:26:49 +0100 Subject: [PATCH 186/313] FIX - Clone Fourn Command, add line's extrafields Part 2 --- htdocs/fourn/class/fournisseur.commande.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 377151536b7..0f91b021e00 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1178,7 +1178,7 @@ class CommandeFournisseur extends CommonOrder false, $this->lines[$i]->date_start, $this->lines[$i]->date_end, - 0, + $this->lines[$i]->array_options, $this->lines[$i]->fk_unit ); if ($result < 0) From fc4a98b29c392dfc9e0c57cb168e1ba3bab54e36 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Wed, 11 Mar 2020 15:36:36 +0100 Subject: [PATCH 187/313] NEW add const TAKEPOS_NUMPAD_USE_PAYMENT_ICON to use icons on payment buttons --- htdocs/langs/en_US/cashdesk.lang | 1 + htdocs/langs/fr_FR/cashdesk.lang | 1 + htdocs/takepos/admin/setup.php | 7 +++++++ htdocs/takepos/pay.php | 18 +++++++++--------- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index 7ddbc71f3e9..d4355566872 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -91,3 +91,4 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal +TakeposNumpadUsePaymentIcon=Use payment icon on numpad diff --git a/htdocs/langs/fr_FR/cashdesk.lang b/htdocs/langs/fr_FR/cashdesk.lang index d14acc778df..03ca0155daa 100644 --- a/htdocs/langs/fr_FR/cashdesk.lang +++ b/htdocs/langs/fr_FR/cashdesk.lang @@ -82,3 +82,4 @@ ReceiptName=Nom du reçu ProductSupplements=Suppléments de produit SupplementCategory=Catégorie des suppléments SortProductField=Champ pour le tri des produits +TakeposNumpadUsePaymentIcon=Utilisation d'icônes sur les touches des modes de règlement du pavé numérique diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index 0e8ba28e0bb..9dd398d5240 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -201,6 +201,13 @@ $array = array(0=>$langs->trans("Numberspad"), 1=>$langs->trans("BillsCoinsPad") print $form->selectarray('TAKEPOS_NUMPAD', $array, (empty($conf->global->TAKEPOS_NUMPAD) ? '0' : $conf->global->TAKEPOS_NUMPAD), 0); print "\n"; +// Numpad use payment icons +print ''; +print $langs->trans('TakeposNumpadUsePaymentIcon'); +print ''; +print ajax_constantonoff("TAKEPOS_NUMPAD_USE_PAYMENT_ICON", array(), $conf->entity, 0, 0, 1, 0); +print "\n"; + // Direct Payment print ''; print $langs->trans('DirectPaymentButton'); diff --git a/htdocs/takepos/pay.php b/htdocs/takepos/pay.php index 4c3762f672e..ce2a4943b84 100644 --- a/htdocs/takepos/pay.php +++ b/htdocs/takepos/pay.php @@ -260,13 +260,13 @@ print ''; @@ -283,13 +283,13 @@ print ''; @@ -307,13 +307,13 @@ print ''; From c8bbaa07fd340aaebc922caca052e0aa7e3c1806 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Mar 2020 15:53:08 +0100 Subject: [PATCH 188/313] FIX Look and feel v11 --- htdocs/fourn/commande/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 9adad176ab2..17d81c40c72 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1661,8 +1661,8 @@ if ($action == 'create') $langs->load('projects'); print ''.$langs->trans('Project').''; - $formproject->select_projects((empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) ? $societe->id : -1), $projectid, 'projectid', 0, 0, 1, 1); - print '   id).'">'.$langs->trans("AddProject").''; + $formproject->select_projects((empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) ? $societe->id : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth500'); + print '   id).'">'; print ''; } From 5adec1fe32f05cceb7bae8e351e5bdf352ec76ac Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Mar 2020 16:11:38 +0100 Subject: [PATCH 189/313] FIX unit price for selected supplier products not set. NaN was used. --- htdocs/core/class/html.form.class.php | 6 +++--- htdocs/core/tpl/objectline_create.tpl.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 6b240653ca9..0db01a84656 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2907,7 +2907,7 @@ class Form $objp->fprice = $price_result; if ($objp->quantity >= 1) { - $objp->unitprice = $objp->fprice / $objp->quantity; + $objp->unitprice = $objp->fprice / $objp->quantity; // Replace dynamically unitprice } } } @@ -2974,7 +2974,7 @@ class Form if (empty($objp->idprodfournprice) && empty($alsoproductwithnosupplierprice)) $opt .= ' disabled'; if (!empty($objp->idprodfournprice) && $objp->idprodfournprice > 0) { - $opt .= ' pbq="'.$objp->idprodfournprice.'" data-pbq="'.$objp->idprodfournprice.'" data-pbqqty="'.$objp->quantity.'" data-pbqpercent="'.$objp->remise_percent.'"'; + $opt .= ' pbq="'.$objp->idprodfournprice.'" data-pbq="'.$objp->idprodfournprice.'" data-pbqqty="'.$objp->quantity.'" data-pbqup="'.$objp->unitprice.'" data-pbqpercent="'.$objp->remise_percent.'"'; } $opt .= ' data-html="'.dol_escape_htmltag($optlabel).'"'; $opt .= '>'; @@ -2989,7 +2989,7 @@ class Form // "key" value of json key array is used by jQuery automatically as selected value // "label" value of json key array is used by jQuery automatically as text for combo box $out .= $opt; - array_push($outarray, array('key'=>$outkey, 'value'=>$outref, 'label'=>$outval, 'qty'=>$outqty, 'discount'=>$outdiscount, 'type'=>$outtype, 'duration_value'=>$outdurationvalue, 'duration_unit'=>$outdurationunit, 'disabled'=>(empty($objp->idprodfournprice) ?true:false))); + array_push($outarray, array('key'=>$outkey, 'value'=>$outref, 'label'=>$outval, 'qty'=>$outqty, 'up'=>$objp->unitprice, 'discount'=>$outdiscount, 'type'=>$outtype, 'duration_value'=>$outdurationvalue, 'duration_unit'=>$outdurationunit, 'disabled'=>(empty($objp->idprodfournprice) ?true:false))); // Exemple of var_dump $outarray // array(1) {[0]=>array(6) {[key"]=>string(1) "2" ["value"]=>string(3) "ppp" // ["label"]=>string(76) "ppp (fff2) - ppp - 20,00 Euros/1unité (20,00 Euros/unité)" diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index ef40e0a7caf..4e636f3d9cf 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -261,7 +261,7 @@ if ($nolinesbefore) { if ($senderissupplier != 2) { $ajaxoptions = array( - 'update' => array('qty'=>'qty', 'remise_percent' => 'discount', 'idprod' => 'idprod'), // html id tags that will be edited with which ajax json response key + 'update' => array('qty'=>'qty', 'remise_percent' => 'discount', 'idprod' => 'idprod'), // html id tags that will be edited with each ajax json response key 'option_disabled' => 'idthatdoesnotexists', // html id to disable once select is done 'warning' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'warning' (for example shown we select a disabled option into combo) ); From 2b8a06cb5e6beebe1629c7ba125a2a3b8b78aec3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Mar 2020 16:11:38 +0100 Subject: [PATCH 190/313] FIX unit price for selected supplier products not set. NaN was used. --- htdocs/core/class/html.form.class.php | 6 +++--- htdocs/core/tpl/objectline_create.tpl.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index c422bb91528..796011085dd 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2907,7 +2907,7 @@ class Form $objp->fprice = $price_result; if ($objp->quantity >= 1) { - $objp->unitprice = $objp->fprice / $objp->quantity; + $objp->unitprice = $objp->fprice / $objp->quantity; // Replace dynamically unitprice } } } @@ -2974,7 +2974,7 @@ class Form if (empty($objp->idprodfournprice) && empty($alsoproductwithnosupplierprice)) $opt .= ' disabled'; if (!empty($objp->idprodfournprice) && $objp->idprodfournprice > 0) { - $opt .= ' pbq="'.$objp->idprodfournprice.'" data-pbq="'.$objp->idprodfournprice.'" data-pbqqty="'.$objp->quantity.'" data-pbqpercent="'.$objp->remise_percent.'"'; + $opt .= ' pbq="'.$objp->idprodfournprice.'" data-pbq="'.$objp->idprodfournprice.'" data-pbqqty="'.$objp->quantity.'" data-pbqup="'.$objp->unitprice.'" data-pbqpercent="'.$objp->remise_percent.'"'; } $opt .= ' data-html="'.dol_escape_htmltag($optlabel).'"'; $opt .= '>'; @@ -2989,7 +2989,7 @@ class Form // "key" value of json key array is used by jQuery automatically as selected value // "label" value of json key array is used by jQuery automatically as text for combo box $out .= $opt; - array_push($outarray, array('key'=>$outkey, 'value'=>$outref, 'label'=>$outval, 'qty'=>$outqty, 'discount'=>$outdiscount, 'type'=>$outtype, 'duration_value'=>$outdurationvalue, 'duration_unit'=>$outdurationunit, 'disabled'=>(empty($objp->idprodfournprice) ?true:false))); + array_push($outarray, array('key'=>$outkey, 'value'=>$outref, 'label'=>$outval, 'qty'=>$outqty, 'up'=>$objp->unitprice, 'discount'=>$outdiscount, 'type'=>$outtype, 'duration_value'=>$outdurationvalue, 'duration_unit'=>$outdurationunit, 'disabled'=>(empty($objp->idprodfournprice) ?true:false))); // Exemple of var_dump $outarray // array(1) {[0]=>array(6) {[key"]=>string(1) "2" ["value"]=>string(3) "ppp" // ["label"]=>string(76) "ppp (fff2) - ppp - 20,00 Euros/1unité (20,00 Euros/unité)" diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index 2fffe30276a..7cc472e987e 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -261,7 +261,7 @@ if ($nolinesbefore) { if ($senderissupplier != 2) { $ajaxoptions = array( - 'update' => array('qty'=>'qty', 'remise_percent' => 'discount', 'idprod' => 'idprod'), // html id tags that will be edited with which ajax json response key + 'update' => array('qty'=>'qty', 'remise_percent' => 'discount', 'idprod' => 'idprod'), // html id tags that will be edited with each ajax json response key 'option_disabled' => 'idthatdoesnotexists', // html id to disable once select is done 'warning' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'warning' (for example shown we select a disabled option into combo) ); From 25eae4db9c93cdafc80be9864ec3c09578bab1f0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Mar 2020 16:28:00 +0100 Subject: [PATCH 191/313] Fix missing __USER_EMAIL__ substitution --- htdocs/core/lib/functions.lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 72f7070588e..9842a3d59e0 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -5983,7 +5983,8 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null, $substitutionarray = array_merge($substitutionarray, array( '__USER_ID__' => (string) $user->id, '__USER_LOGIN__' => (string) $user->login, - '__USER_LASTNAME__' => (string) $user->lastname, + '__USER_EMAIL__' => (string) $user->email, + '__USER_LASTNAME__' => (string) $user->lastname, '__USER_FIRSTNAME__' => (string) $user->firstname, '__USER_FULLNAME__' => (string) $user->getFullName($outputlangs), '__USER_SUPERVISOR_ID__' => (string) ($user->fk_user ? $user->fk_user : '0'), From 7e574e042943b3074659b441fb35e8817048e9c2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Mar 2020 16:47:42 +0100 Subject: [PATCH 192/313] Fix permissions --- htdocs/core/menus/init_menu_auguria.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index b9a0286584a..66ed948585f 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -281,7 +281,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left -- Balance insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2435__+MAX_llx_menu__, 'accountancy', 'balance', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/balance.php?mainmenu=accountancy&leftmenu=accountancy_balance', 'AccountBalance', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 16, __ENTITY__); -- Export accounting documents - insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2436__+MAX_llx_menu__, 'accountancy', 'accountancy_files', 2400__+MAX_llx_menu__, '/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files', 'AccountantFiles', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 17, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2436__+MAX_llx_menu__, 'accountancy', 'accountancy_files', 2400__+MAX_llx_menu__, '/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files', 'AccountantFiles', 1, 'accountancy', '$user->rights->compta->resultat->lire || $user->rights->accounting->mouvements->lire', '', 0, 17, __ENTITY__); -- Reports insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2440__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2400__+MAX_llx_menu__, '/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy_report', 'Reportings', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 17, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_report"', __HANDLER__, 'left', 2441__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2440__+MAX_llx_menu__, '/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy_report', 'MenuReportInOut', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 18, __ENTITY__); From e95e18241990eccee6ccb079bb196710c3130635 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Wed, 11 Mar 2020 16:53:27 +0100 Subject: [PATCH 193/313] NEW only auto print paid ticket in cash desk --- htdocs/takepos/invoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 17837354702..8565b5f17ec 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -556,7 +556,7 @@ if ($action == "valid" || $action == "history") $sectionwithinvoicelink .= ' '; } - if ($conf->global->TAKEPOS_AUTO_PRINT_TICKETS) $sectionwithinvoicelink .= ''; + if ($remaintopay <= 0 && $conf->global->TAKEPOS_AUTO_PRINT_TICKETS) $sectionwithinvoicelink .= ''; } /* From e4c97f0b153b9e354c944d41d81940f64d9b2bd3 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Wed, 11 Mar 2020 17:16:44 +0100 Subject: [PATCH 194/313] FIX user permission on ajax request getInvoice --- htdocs/takepos/ajax/ajax.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/ajax/ajax.php b/htdocs/takepos/ajax/ajax.php index 53f32ff48af..b43d7653b4b 100644 --- a/htdocs/takepos/ajax/ajax.php +++ b/htdocs/takepos/ajax/ajax.php @@ -120,7 +120,7 @@ elseif ($action == 'search' && $term != '') { $object->fetch($id); $ret = $printer->sendToPrinter($object, $conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$term}, $conf->global->{'TAKEPOS_PRINTER_TO_USE'.$term}); } -} elseif ($action == 'getInvoice') { +} elseif ($action == 'getInvoice' && $user->rights->facture->lire) { require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; $object = new Facture($db); From 5d740d16fbfa2ed8821023d7a618de18e11ad6d8 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Wed, 11 Mar 2020 17:42:30 +0100 Subject: [PATCH 195/313] NEW set payment method on paid ticket in cash desk --- htdocs/takepos/invoice.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 17837354702..798b2702ccf 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -240,6 +240,8 @@ if ($action == 'valid' && $user->rights->facture->creer) dol_syslog("Invoice is paid, so we set it to status Paid"); $result = $invoice->set_paid($user); if ($result > 0) $invoice->paye = 1; + // set payment method + $invoice->setPaymentMethods($paiementid); } else { dol_syslog("Invoice is not paid, remain to pay = ".$remaintopay); } From 58643d2dadf9266f53a89b5f68c260d0f3889497 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Mar 2020 17:56:47 +0100 Subject: [PATCH 196/313] WIP --- scripts/website/migrate_news_joomla2dolibarr.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/website/migrate_news_joomla2dolibarr.php b/scripts/website/migrate_news_joomla2dolibarr.php index 5b93039df8b..7504aff0812 100755 --- a/scripts/website/migrate_news_joomla2dolibarr.php +++ b/scripts/website/migrate_news_joomla2dolibarr.php @@ -77,12 +77,16 @@ if (! $resql) { } while ($obj = $dbjoomla->fetch_object($resql)) { + $i = 0; if ($obj) { + $i++; $id = $obj->id; $title = $obj->title; $alias = $obj->alias; $description = dol_string_nohtmltag($obj->introtext); $hmtltext = $obj->fulltext; + + print $i.' '.$id.' '.$title."\n"; } } From f40c8ce5075047ef15f03791e32071542bf33bb6 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Wed, 11 Mar 2020 17:58:41 +0100 Subject: [PATCH 197/313] fix getentity on comm/card.php --- htdocs/comm/card.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index d31ed9cb080..fcd3823b0c2 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -751,7 +751,7 @@ if ($object->id > 0) $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande as c"; $sql .= " WHERE c.fk_soc = s.rowid "; $sql .= " AND s.rowid = ".$object->id; - $sql .= " AND c.entity = ".$conf->entity; + $sql .= " AND c.entity IN (".getEntity('commande').')'; $sql .= " ORDER BY c.date_commande DESC"; $resql = $db->query($sql); @@ -905,7 +905,7 @@ if ($object->id > 0) $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c"; $sql .= " WHERE c.fk_soc = s.rowid "; $sql .= " AND s.rowid = ".$object->id; - $sql .= " AND c.entity = ".$conf->entity; + $sql .= " AND c.entity IN (".getEntity('contract').")"; $sql .= " ORDER BY c.datec DESC"; $resql = $db->query($sql); @@ -975,7 +975,7 @@ if ($object->id > 0) $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."fichinter as f"; $sql .= " WHERE f.fk_soc = s.rowid"; $sql .= " AND s.rowid = ".$object->id; - $sql .= " AND f.entity = ".$conf->entity; + $sql .= " AND f.entity IN (".getEntity('intervention').")"; $sql .= " ORDER BY f.tms DESC"; $resql = $db->query($sql); @@ -1044,7 +1044,7 @@ if ($object->id > 0) $sql .= ', s.nom, s.rowid as socid'; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture_rec as f"; $sql .= " WHERE f.fk_soc = s.rowid AND s.rowid = ".$object->id; - $sql .= " AND f.entity = ".$conf->entity; + $sql .= " AND f.entity IN (".getEntity('invoice').")"; $sql .= ' GROUP BY f.rowid, f.titre, f.amount, f.total, f.tva, f.total_ttc,'; $sql .= ' f.date_last_gen, f.datec, f.frequency, f.unit_frequency,'; $sql .= ' f.suspended, f.date_when,'; From 6edaa7ac1162aa988d5023a439cde6d7b09b1990 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Wed, 11 Mar 2020 18:00:35 +0100 Subject: [PATCH 198/313] fix getentity on comm/card.php --- htdocs/comm/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index fcd3823b0c2..969d7142139 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -836,7 +836,7 @@ if ($object->id > 0) $sql .= ', s.rowid as socid'; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."expedition as e"; $sql .= " WHERE e.fk_soc = s.rowid AND s.rowid = ".$object->id; - $sql .= " AND e.entity IN (".getEntity('expedition').")"; + $sql .= " AND e.entity IN (".getEntity('commande').")"; $sql .= ' GROUP BY e.rowid'; $sql .= ', e.ref'; $sql .= ', e.date_creation'; From fb73e00346cd59e25c51287472375f5148c40be0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Mar 2020 18:24:24 +0100 Subject: [PATCH 199/313] Use version in master --- .github/workflows/stale-issues-safe.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/stale-issues-safe.yml b/.github/workflows/stale-issues-safe.yml index 0ac40364368..b8d4b5eab7f 100644 --- a/.github/workflows/stale-issues-safe.yml +++ b/.github/workflows/stale-issues-safe.yml @@ -4,12 +4,14 @@ name: "Close stale issues (bugs and feature requests)" on: schedule: - cron: "0 21 * * *" + issue_comment: + - types: [created] jobs: stale: runs-on: ubuntu-latest steps: - - uses: DeMoorJasper/stale@v2.0.1 + - uses: DeMoorJasper/stale@master with: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 15 days.' From 19dca1dbaa4e7b4524502db18dffb371a60d2780 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Mar 2020 18:29:38 +0100 Subject: [PATCH 200/313] Try to fix setup --- .github/workflows/stale-issues-safe.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale-issues-safe.yml b/.github/workflows/stale-issues-safe.yml index b8d4b5eab7f..c774fdca7e7 100644 --- a/.github/workflows/stale-issues-safe.yml +++ b/.github/workflows/stale-issues-safe.yml @@ -5,7 +5,7 @@ on: schedule: - cron: "0 21 * * *" issue_comment: - - types: [created] + types: [created] jobs: stale: From 39ba08981aa6a73fe7339e0c2610b69a9233c4e9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Mar 2020 18:39:47 +0100 Subject: [PATCH 201/313] Try unstale --- .github/workflows/stale-issues-safe.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale-issues-safe.yml b/.github/workflows/stale-issues-safe.yml index c774fdca7e7..57c32e8de14 100644 --- a/.github/workflows/stale-issues-safe.yml +++ b/.github/workflows/stale-issues-safe.yml @@ -20,5 +20,5 @@ jobs: days-before-stale: 365 days-before-close: 15 operations-per-run: 50 - dry-run: true + dry-run: false \ No newline at end of file From 1c889b8de178f2fcbae9017530daa1569902c1a5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Mar 2020 19:19:21 +0100 Subject: [PATCH 202/313] Test unstale --- .github/workflows/stale-issues-safe.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stale-issues-safe.yml b/.github/workflows/stale-issues-safe.yml index 57c32e8de14..1d1957671aa 100644 --- a/.github/workflows/stale-issues-safe.yml +++ b/.github/workflows/stale-issues-safe.yml @@ -3,7 +3,7 @@ name: "Close stale issues (bugs and feature requests)" on: schedule: - - cron: "0 21 * * *" + - cron: "20 20 * * *" issue_comment: types: [created] @@ -20,5 +20,5 @@ jobs: days-before-stale: 365 days-before-close: 15 operations-per-run: 50 - dry-run: false + dry-run: true \ No newline at end of file From bf3ff713e4bad5846281c35f3f161fccfb30ba1f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Mar 2020 19:20:20 +0100 Subject: [PATCH 203/313] Text --- .github/workflows/stale-issues-safe.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale-issues-safe.yml b/.github/workflows/stale-issues-safe.yml index 1d1957671aa..4bd510ab809 100644 --- a/.github/workflows/stale-issues-safe.yml +++ b/.github/workflows/stale-issues-safe.yml @@ -14,7 +14,7 @@ jobs: - uses: DeMoorJasper/stale@master with: repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 15 days.' + stale-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 15 days (you should still be able to re-open it if required).' stale-label: 'Issue Stale (automatic label)' exempt-label: 'Priority High / Blocking' days-before-stale: 365 From 71c5c77813605ef01e701f525f7340e5d9f1441b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Mar 2020 19:21:10 +0100 Subject: [PATCH 204/313] Test unstale --- .github/workflows/stale-issues-safe.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale-issues-safe.yml b/.github/workflows/stale-issues-safe.yml index 4bd510ab809..740d35c17cf 100644 --- a/.github/workflows/stale-issues-safe.yml +++ b/.github/workflows/stale-issues-safe.yml @@ -3,7 +3,7 @@ name: "Close stale issues (bugs and feature requests)" on: schedule: - - cron: "20 20 * * *" + - cron: "21 18 * * *" issue_comment: types: [created] From 18bd2d51e70631401e6ea1c0e9d223d78912c8eb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Mar 2020 19:21:21 +0100 Subject: [PATCH 205/313] Test unstale --- .github/workflows/stale-issues-safe.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale-issues-safe.yml b/.github/workflows/stale-issues-safe.yml index 740d35c17cf..97015d81277 100644 --- a/.github/workflows/stale-issues-safe.yml +++ b/.github/workflows/stale-issues-safe.yml @@ -3,7 +3,7 @@ name: "Close stale issues (bugs and feature requests)" on: schedule: - - cron: "21 18 * * *" + - cron: "22 18 * * *" issue_comment: types: [created] From 8edcdc742f4a0feacbf364001a74990b5804a026 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Mar 2020 19:23:00 +0100 Subject: [PATCH 206/313] Real run --- .github/workflows/stale-issues-safe.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale-issues-safe.yml b/.github/workflows/stale-issues-safe.yml index 97015d81277..eb5a660d1a7 100644 --- a/.github/workflows/stale-issues-safe.yml +++ b/.github/workflows/stale-issues-safe.yml @@ -20,5 +20,5 @@ jobs: days-before-stale: 365 days-before-close: 15 operations-per-run: 50 - dry-run: true + dry-run: false \ No newline at end of file From 8f1a5c96ac764eee7f36a6f255b55bc4b8bcc147 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Mar 2020 19:23:45 +0100 Subject: [PATCH 207/313] Test --- .github/workflows/stale-issues-safe.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale-issues-safe.yml b/.github/workflows/stale-issues-safe.yml index eb5a660d1a7..8488490f096 100644 --- a/.github/workflows/stale-issues-safe.yml +++ b/.github/workflows/stale-issues-safe.yml @@ -3,7 +3,7 @@ name: "Close stale issues (bugs and feature requests)" on: schedule: - - cron: "22 18 * * *" + - cron: "24 18 * * *" issue_comment: types: [created] From 0f2fe30e41bc98380bb33f8272d8ff1607c818d7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Mar 2020 19:27:23 +0100 Subject: [PATCH 208/313] Try action --- .github/workflows/stale-issues-safe.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale-issues-safe.yml b/.github/workflows/stale-issues-safe.yml index 8488490f096..805570fe859 100644 --- a/.github/workflows/stale-issues-safe.yml +++ b/.github/workflows/stale-issues-safe.yml @@ -3,7 +3,7 @@ name: "Close stale issues (bugs and feature requests)" on: schedule: - - cron: "24 18 * * *" + - cron: "30 18 * * *" issue_comment: types: [created] From 20a695de2be1f030ba045a9c533a4cd10c334f0b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Mar 2020 19:33:12 +0100 Subject: [PATCH 209/313] Restore cron --- .github/workflows/stale-issues-safe.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale-issues-safe.yml b/.github/workflows/stale-issues-safe.yml index 805570fe859..61e059646df 100644 --- a/.github/workflows/stale-issues-safe.yml +++ b/.github/workflows/stale-issues-safe.yml @@ -3,7 +3,7 @@ name: "Close stale issues (bugs and feature requests)" on: schedule: - - cron: "30 18 * * *" + - cron: "0 21 * * *" issue_comment: types: [created] From ea0fd546c7b6d3253aafd62364efd2fe954530f9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Mar 2020 19:37:43 +0100 Subject: [PATCH 210/313] Fix phpcs --- scripts/website/migrate_news_joomla2dolibarr.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/website/migrate_news_joomla2dolibarr.php b/scripts/website/migrate_news_joomla2dolibarr.php index 7504aff0812..a4ad5b89dd5 100755 --- a/scripts/website/migrate_news_joomla2dolibarr.php +++ b/scripts/website/migrate_news_joomla2dolibarr.php @@ -64,7 +64,7 @@ $joomlaport = 3306; $dbjoomla=getDoliDBInstance('mysqli', $joomlahost, $joomlalogin, $joomlapass, $joomladatabase, $joomlaport); if ($dbjoomla->error) { - dol_print_error($dbjoomla,"host=".$joomlahost.", port=".$joomlaport.", user=".$joomlalogin.", databasename=".$joomladatabase.", ".$dbjoomla->error); + dol_print_error($dbjoomla, "host=".$joomlahost.", port=".$joomlaport.", user=".$joomlalogin.", databasename=".$joomladatabase.", ".$dbjoomla->error); exit(-1); } From efeda2e747757b3a272c68bf685f8cba783bde84 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Mar 2020 20:14:33 +0100 Subject: [PATCH 211/313] Fix add global check on perm --- htdocs/takepos/ajax/ajax.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/htdocs/takepos/ajax/ajax.php b/htdocs/takepos/ajax/ajax.php index b43d7653b4b..07de9e50a51 100644 --- a/htdocs/takepos/ajax/ajax.php +++ b/htdocs/takepos/ajax/ajax.php @@ -38,6 +38,10 @@ $action = GETPOST('action', 'alpha'); $term = GETPOST('term', 'alpha'); $id = GETPOST('id', 'int'); +if (empty($user->rights->takepos->run)) { + access_forbidden(); +} + /* * View @@ -103,14 +107,14 @@ elseif ($action == 'search' && $term != '') { } elseif ($action == "opendrawer" && $term != '') { require_once DOL_DOCUMENT_ROOT.'/core/class/dolreceiptprinter.class.php'; $printer = new dolReceiptPrinter($db); - // chek printer for terminal + // check printer for terminal if ($conf->global->{'TAKEPOS_PRINTER_TO_USE'.$term} > 0) { $printer->initPrinter($conf->global->{'TAKEPOS_PRINTER_TO_USE'.$term}); // open cashdrawer $printer->pulse(); $printer->close(); } -} elseif ($action == "printinvoiceticket" && $term != '' && $id > 0) { +} elseif ($action == "printinvoiceticket" && $term != '' && $id > 0 && ! empty($user->rights->facture->lire)) { require_once DOL_DOCUMENT_ROOT.'/core/class/dolreceiptprinter.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $printer = new dolReceiptPrinter($db); @@ -120,7 +124,7 @@ elseif ($action == 'search' && $term != '') { $object->fetch($id); $ret = $printer->sendToPrinter($object, $conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$term}, $conf->global->{'TAKEPOS_PRINTER_TO_USE'.$term}); } -} elseif ($action == 'getInvoice' && $user->rights->facture->lire) { +} elseif ($action == 'getInvoice') { require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; $object = new Facture($db); From 54da1e73ffd411ad3a9d93c2a654f7c26dfa8954 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Mar 2020 23:56:48 +0100 Subject: [PATCH 212/313] Option to show the n first line of desc into the basket --- htdocs/takepos/invoice.php | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 22c8171a46c..60854bf2407 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -845,19 +845,27 @@ if ($placeid > 0) if (empty($line->product_type)) $htmlforlines .= img_object('', 'product').' '; else $htmlforlines .= img_object('', 'service').' '; } - if ($line->product_label) $htmlforlines .= $line->product_label; - if ($line->product_label && $line->desc) $htmlforlines .= '
'; - if ($line->product_label != $line->desc) - { - $firstline = dolGetFirstLineOfText($line->desc); - if ($firstline != $line->desc) - { - $htmlforlines .= $form->textwithpicto(dolGetFirstLineOfText($line->desc), $line->desc); - } - else - { - $htmlforlines .= $line->desc; - } + if (empty($conf->global->TAKEPOS_SHOW_N_FIRST_LINES)) { + $tooltiptext = ''.$langs->trans("Ref").' : '.$line->product_ref.'
'; + $tooltiptext .= ''.$langs->trans("Label").' : '.$line->product_label.'
'; + $tooltiptext .= '
'; + $tooltiptext .= $line->desc; + $htmlforlines .= $form->textwithpicto($line->product_label ? $line->product_label : $line->product_ref, $tooltiptext); + } else { + if ($line->product_label) $htmlforlines .= $line->product_label; + if ($line->product_label && $line->desc) $htmlforlines .= '
'; + if ($line->product_label != $line->desc) + { + $firstline = dolGetFirstLineOfText($line->desc, $conf->global->TAKEPOS_SHOW_N_FIRST_LINES); + if ($firstline != $line->desc) + { + $htmlforlines .= $form->textwithpicto(dolGetFirstLineOfText($line->desc), $line->desc); + } + else + { + $htmlforlines .= $line->desc; + } + } } if (!empty($line->array_options['options_order_notes'])) $htmlforlines .= "
(".$line->array_options['options_order_notes'].")"; if ($_SESSION["basiclayout"] != 1) From af227ae164cb33339d30e67ff46b5c80aeec3dea Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Mar 2020 23:57:36 +0100 Subject: [PATCH 213/313] Add picto on selection of terminal button --- htdocs/core/js/lib_foot.js.php | 2 +- htdocs/takepos/css/pos.css.php | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/htdocs/core/js/lib_foot.js.php b/htdocs/core/js/lib_foot.js.php index 0d9b0b59ff4..c40dd571190 100644 --- a/htdocs/core/js/lib_foot.js.php +++ b/htdocs/core/js/lib_foot.js.php @@ -132,7 +132,7 @@ if (! defined('JS_JQUERY_DISABLE_DROPDOWN')) $(document).bind(\'click\', function (e) { var $clicked = $(e.target); // This is element we click on if (!$clicked.parents().hasClass("dropdown")) { - console.log("close dropdown dd ul - we click outside"); + //console.log("close dropdown dd ul - we click outside"); //$(".dropdown dd ul").hide(); $(".dropdown dd ul").removeClass("open"); diff --git a/htdocs/takepos/css/pos.css.php b/htdocs/takepos/css/pos.css.php index eaccb791b30..c228b948c3b 100644 --- a/htdocs/takepos/css/pos.css.php +++ b/htdocs/takepos/css/pos.css.php @@ -157,6 +157,16 @@ button.actionbutton { height: calc(25% - 2px); } +div[aria-describedby="dialog-info"] button:before { + content: "\f788"; + font-family: "Font Awesome 5 Free"; + font-weight: 900; + padding-right: 5px; +} +div[aria-describedby="dialog-info"].ui-dialog .ui-dialog-buttonpane { + border-width: 0; +} + .takepospay { font-size: 1.5em; } From fb8e565b535d161b2691f5db47ad1e42bcf1ca21 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 Mar 2020 00:13:42 +0100 Subject: [PATCH 214/313] Better position on screen --- htdocs/takepos/pay.php | 4 ++-- htdocs/takepos/reduction.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/takepos/pay.php b/htdocs/takepos/pay.php index ce2a4943b84..215a42e119b 100644 --- a/htdocs/takepos/pay.php +++ b/htdocs/takepos/pay.php @@ -214,7 +214,7 @@ else print "var received=0;"; } -
+
trans('TotalTTC'); ?>: total_ttc, 1, '', 1, -1, -1) ?>
@@ -233,7 +233,7 @@ else print "var received=0;";
-
+
loadLangs(array('main', 'bills', 'cashdesk')); } -
+
trans('Reduction') . '">'; From 1eda7785184ae9ebc9bf17158187eba3eab9c9de Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 Mar 2020 00:25:19 +0100 Subject: [PATCH 215/313] Increase nb of operations per run --- .github/workflows/stale-issues-safe.yml | 2 +- .github/workflows/stale-issues.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stale-issues-safe.yml b/.github/workflows/stale-issues-safe.yml index 61e059646df..c8139b37caf 100644 --- a/.github/workflows/stale-issues-safe.yml +++ b/.github/workflows/stale-issues-safe.yml @@ -19,6 +19,6 @@ jobs: exempt-label: 'Priority High / Blocking' days-before-stale: 365 days-before-close: 15 - operations-per-run: 50 + operations-per-run: 100 dry-run: false \ No newline at end of file diff --git a/.github/workflows/stale-issues.yml b/.github/workflows/stale-issues.yml index c7e18db27bf..54c886ca2f1 100644 --- a/.github/workflows/stale-issues.yml +++ b/.github/workflows/stale-issues.yml @@ -17,7 +17,7 @@ jobs: exempt-issue-label: 'Priority High / Blocking' days-before-stale: 365 days-before-close: -1 - operations-per-run: 50 + operations-per-run: 100 #stale-pr-message: 'This PR is stale because it has been open 1 year with no activity. If this PR is still mergeable (no conflict, nor Continuous Integration errors), please comment to confirm this merge is still expected. Without comment, this issue will be closed automatically by stale bot in 15 days.' stale-pr-label: 'PR Stale (automatic label)' stale-pr-message: From 618f42fc1a21217da8ffd5c9ae2e809e54f4c71f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 Mar 2020 00:26:17 +0100 Subject: [PATCH 216/313] Fix label --- .github/workflows/stale-issues.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale-issues.yml b/.github/workflows/stale-issues.yml index 54c886ca2f1..6e7dad5dc9b 100644 --- a/.github/workflows/stale-issues.yml +++ b/.github/workflows/stale-issues.yml @@ -12,7 +12,7 @@ jobs: - uses: Dolibarr/stale@master with: repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-issue-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 15 days.' + stale-issue-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 15 days (you should still be able to re-open it if required).' stale-issue-label: 'Issue Stale (automatic label)' exempt-issue-label: 'Priority High / Blocking' days-before-stale: 365 From 6ce6dc145f6fe3854cb934a13485ab7eef4db8e3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 Mar 2020 02:20:31 +0100 Subject: [PATCH 217/313] Use colors of status in donut --- htdocs/adherents/index.php | 2 -- htdocs/mrp/class/mo.class.php | 2 +- htdocs/mrp/index.php | 22 +++++++++++++++------- htdocs/mrp/mo_production.php | 2 +- htdocs/theme/eldy/dropdown.inc.php | 2 +- htdocs/theme/eldy/global.inc.php | 4 ++++ 6 files changed, 22 insertions(+), 12 deletions(-) diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 542251061d3..029cf868bb0 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -176,11 +176,9 @@ if ($conf->use_javascript_ajax) $SommeD = 0; $total = 0; $dataval = array(); - $datalabels = array(); $i = 0; foreach ($AdherentType as $key => $adhtype) { - $datalabels[] = array($i, $adhtype->getNomUrl(0, dol_size(16))); $dataval['draft'][] = array($i, isset($MemberToValidate[$key]) ? $MemberToValidate[$key] : 0); $dataval['notuptodate'][] = array($i, isset($MembersValidated[$key]) ? $MembersValidated[$key] - (isset($MemberUpToDate[$key]) ? $MemberUpToDate[$key] : 0) : 0); $dataval['uptodate'][] = array($i, isset($MemberUpToDate[$key]) ? $MemberUpToDate[$key] : 0); diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index c4024a89c57..c83a0ff1aca 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -1091,7 +1091,7 @@ class Mo extends CommonObject $statusType = 'status'.$status; if ($status == self::STATUS_VALIDATED) $statusType = 'status1'; - if ($status == self::STATUS_INPROGRESS) $statusType = 'status3'; + if ($status == self::STATUS_INPROGRESS) $statusType = 'status4'; if ($status == self::STATUS_PRODUCED) $statusType = 'status6'; if ($status == self::STATUS_CANCELED) $statusType = 'status5'; diff --git a/htdocs/mrp/index.php b/htdocs/mrp/index.php index b6e69c9c542..c95eca30770 100644 --- a/htdocs/mrp/index.php +++ b/htdocs/mrp/index.php @@ -66,6 +66,7 @@ if ($conf->use_javascript_ajax) $sql= "SELECT COUNT(t.rowid) as nb, status"; $sql.=" FROM ".MAIN_DB_PREFIX."mrp_mo as t"; $sql.=" GROUP BY t.status"; + $sql.=" ORDER BY t.status ASC"; $resql = $db->query($sql); if ($resql) @@ -74,18 +75,24 @@ if ($conf->use_javascript_ajax) $i = 0; $totalnb=0; - $dataseries=array(); - // -1=Canceled, 0=Draft, 1=Validated, (2=Accepted/On process not managed for customer orders), 3=Closed (Sent/Received, billed or not) + $dataseries = array(); + $colorseries = array(); + + include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; + while ($i < $num) { $obj = $db->fetch_object($resql); if ($obj) { - //if ($row[1]!=-1 && ($row[1]!=3 || $row[2]!=1)) - { - $dataseries[$obj->status]=array(0=>$staticmo->LibStatut($obj->status), $obj->nb); - $totalnb+=$obj->nb; - } + $dataseries[$obj->status]=array(0=>$staticmo->LibStatut($obj->status), $obj->nb); + if ($obj->status == Mo::STATUS_DRAFT) $coloseries[$obj->status] = '-'.$badgeStatus0; + if ($obj->status == Mo::STATUS_VALIDATED) $coloseries[$obj->status] = $badgeStatus1; + if ($obj->status == Mo::STATUS_INPROGRESS) $coloseries[$obj->status] = $badgeStatus4; + if ($obj->status == Mo::STATUS_PRODUCED) $coloseries[$obj->status] = $badgeStatus6; + if ($obj->status == Mo::STATUS_CANCELED) $coloseries[$obj->status] = '-'.$badgeStatus5; + + $totalnb+=$obj->nb; } $i++; } @@ -101,6 +108,7 @@ if ($conf->use_javascript_ajax) include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; $dolgraph = new DolGraph(); $dolgraph->SetData($dataseries); + $dolgraph->SetDataColor(array_values($coloseries)); $dolgraph->setShowLegend(2); $dolgraph->setShowPercent(1); $dolgraph->SetType(array('pie')); diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index 6cf45bf238b..a065cc922fe 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -621,7 +621,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if (in_array($action, array('consumeorproduce', 'consumeandproduceall', 'addconsumeline'))) { - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/theme/eldy/dropdown.inc.php b/htdocs/theme/eldy/dropdown.inc.php index 6a0054a3ed8..bfe55597316 100644 --- a/htdocs/theme/eldy/dropdown.inc.php +++ b/htdocs/theme/eldy/dropdown.inc.php @@ -190,7 +190,7 @@ a.top-menu-dropdown-link { .dropdown-menu .dropdown-header{ - padding: 5px 10px 10px 10px; + padding: 8px 8px 8px 8px; } .dropdown-menu > .user-footer { diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index c8cdf0a951a..97458577f59 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -374,6 +374,10 @@ input#onlinepaymenturl, input#directdownloadlink { opacity: 0.7; } +.formconsumeproduce { + background: #f3f3f3; + padding: 20px 0px 0px 0px; +} div#moretabsList, div#moretabsListaction { z-index: 5; From 59e4b3d634a46d1716ae5c611b5c4e6ef34f2f8a Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Thu, 12 Mar 2020 04:56:36 +0100 Subject: [PATCH 218/313] FIX: Accounting management of intra-community sales to a non-taxable thirdparty Related to this discussion : https://www.dolibarr.fr/forum/t/gestion-des-comptes-de-vente-intracommunautaire-et-vente-ce-non-exemptee-de-tva/32285 --- htdocs/accountancy/customer/list.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index d964d348889..c0e40abd8c8 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -439,7 +439,10 @@ if ($result) { $objp->code_sell_l = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : ''); $suggestedaccountingaccountbydefaultfor = ''; } else { - if ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale + if ($isSellerInEEC && $isBuyerInEEC && empty($objp->tva_intra)) { // European intravat sale without VAT intra community number + $objp->code_sell_l = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : ''); + $suggestedaccountingaccountbydefaultfor = ''; + } elseif ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale $objp->code_sell_l = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT : ''); $suggestedaccountingaccountbydefaultfor = 'eec'; } else { // Foreign sale @@ -452,7 +455,10 @@ if ($result) { $objp->code_sell_l = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : ''); $suggestedaccountingaccountbydefaultfor = ''; } else { - if ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale + if ($isSellerInEEC && $isBuyerInEEC && empty($objp->tva_intra)) { // European intravat sale without VAT intra community number + $objp->code_sell_l = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : ''); + $suggestedaccountingaccountbydefaultfor = ''; + } elseif ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale $objp->code_sell_l = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT : ''); $suggestedaccountingaccountbydefaultfor = 'eec'; } else { @@ -470,7 +476,11 @@ if ($result) { $objp->aarowid_suggest = $objp->aarowid; $suggestedaccountingaccountfor = ''; } else { - if ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale + if ($isSellerInEEC && $isBuyerInEEC && empty($objp->tva_intra)) { // European intravat sale without VAT intra community number + $objp->code_sell_p = $objp->code_sell; + $objp->aarowid_suggest = $objp->aarowid; + $suggestedaccountingaccountfor = ''; + } elseif ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale $objp->code_sell_p = $objp->code_sell_intra; $objp->aarowid_suggest = $objp->aarowid_intra; $suggestedaccountingaccountfor = 'eec'; From 29b2ea77d5ce18133bd8fba48e451883521df29b Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Thu, 12 Mar 2020 09:44:43 +0100 Subject: [PATCH 219/313] NEW : special option MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION to store in document line created form other document s lines the id of origin lines and origin class line rather than origin object id and origin object type --- htdocs/comm/propal/class/propal.class.php | 16 ++++++++++++---- htdocs/commande/class/commande.class.php | 16 ++++++++++++---- htdocs/compta/facture/class/facture.class.php | 16 ++++++++++++---- 3 files changed, 36 insertions(+), 12 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 3fa163594a2..b59dbc3887b 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -440,8 +440,8 @@ class Propal extends CommonObject * @param int $date_end End date of the line * @param array $array_options extrafields array * @param string $fk_unit Code of the unit to use. Null to use the default one - * @param string $origin 'order', ... - * @param int $origin_id Id of origin object + * @param string $origin Depend on global conf MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION can be 'orderdet', 'propaldet'..., else 'order','propal,'.... + * @param int $origin_id Depend on global conf MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION can be Id of origin object (aka line id), else object id * @param double $pu_ht_devise Unit price in currency * @param int $fk_remise_except Id discount if line is from a discount * @return int >0 if OK, <0 if KO @@ -1099,6 +1099,14 @@ class Propal extends CommonObject $vatrate = $line->tva_tx; if ($line->vat_src_code && !preg_match('/\(.*\)/', $vatrate)) $vatrate .= ' ('.$line->vat_src_code.')'; + if(!empty($conf->global->MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION)) { + $originid=$line->origin_id; + $origintype=$line->origin; + } else { + $originid=$line->id; + $origintype=$this->element; + } + $result = $this->addline( $line->desc, $line->subprice, @@ -1122,8 +1130,8 @@ class Propal extends CommonObject $line->date_end, $line->array_options, $line->fk_unit, - $this->element, - $line->id + $origintype, + $originid ); if ($result < 0) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 7249973f768..cc0040622f9 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -927,6 +927,14 @@ class Commande extends CommonOrder $vatrate = $line->tva_tx; if ($line->vat_src_code && !preg_match('/\(.*\)/', $vatrate)) $vatrate .= ' ('.$line->vat_src_code.')'; + if(!empty($conf->global->MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION)) { + $originid=$line->origin_id; + $origintype=$line->origin; + } else { + $originid=$line->id; + $origintype=$this->element; + } + $result = $this->addline( $line->desc, $line->subprice, @@ -951,8 +959,8 @@ class Commande extends CommonOrder $line->label, $line->array_options, $line->fk_unit, - $line->origin, - $line->origin_id + $origintype, + $originid ); if ($result < 0) { @@ -1355,8 +1363,8 @@ class Commande extends CommonOrder * @param string $label Label * @param array $array_options extrafields array. Example array('options_codeforfield1'=>'valueforfield1', 'options_codeforfield2'=>'valueforfield2', ...) * @param string $fk_unit Code of the unit to use. Null to use the default one - * @param string $origin 'order', ... - * @param int $origin_id Id of origin object + * @param string $origin Depend on global conf MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION can be 'orderdet', 'propaldet'..., else 'order','propal,'.... + * @param int $origin_id Depend on global conf MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION can be Id of origin object (aka line id), else object id * @param double $pu_ht_devise Unit price in currency * @return int >0 if OK, <0 if KO * diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 0549d70b10a..6ea22d77891 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -807,6 +807,14 @@ class Facture extends CommonInvoice $vatrate = $line->tva_tx; if ($line->vat_src_code && !preg_match('/\(.*\)/', $vatrate)) $vatrate .= ' ('.$line->vat_src_code.')'; + if(!empty($conf->global->MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION)) { + $originid=$line->origin_id; + $origintype=$line->origin; + } else { + $originid=$line->id; + $origintype=$this->element; + } + $result = $this->addline( $line->desc, $line->subprice, @@ -826,8 +834,8 @@ class Facture extends CommonInvoice $line->product_type, $line->rang, $line->special_code, - $this->element, - $line->id, + $origintype, + $originid, $fk_parent_line, $line->fk_fournprice, $line->pa_ht, @@ -2936,8 +2944,8 @@ class Facture extends CommonInvoice * @param int $type Type of line (0=product, 1=service). Not used if fk_product is defined, the type of product is used. * @param int $rang Position of line * @param int $special_code Special code (also used by externals modules!) - * @param string $origin 'order', ... - * @param int $origin_id Id of origin object + * @param string $origin Depend on global conf MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION can be 'orderdet', 'propaldet'..., else 'order','propal,'.... + * @param int $origin_id Depend on global conf MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION can be Id of origin object (aka line id), else object id * @param int $fk_parent_line Id of parent line * @param int $fk_fournprice Supplier price id (to calculate margin) or '' * @param int $pa_ht Buying price of line (to calculate margin) or '' From 2ae7cfeffacccdec7956eb83786db13b610131e4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 Mar 2020 10:56:25 +0100 Subject: [PATCH 220/313] Fix fields --- htdocs/ticket/class/ticket.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index e030782cc94..41ba9508ccb 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -193,12 +193,12 @@ class Ticket extends CommonObject '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'=>""), 'datec' => array('type'=>'datetime', 'label'=>'DateCreation', 'visible'=>1, 'enabled'=>1, 'position'=>500, 'notnull'=>1), - 'date_read' => array('type'=>'datetime', 'label'=>'TicketReadOn', 'visible'=>1, 'enabled'=>1, 'position'=>500, 'notnull'=>1), + 'date_read' => array('type'=>'datetime', 'label'=>'TicketReadOn', 'visible'=>1, 'enabled'=>1, 'position'=>501, 'notnull'=>1), 'fk_user_assign' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'AssignedTo', 'visible'=>1, 'enabled'=>1, 'position'=>505, 'notnull'=>1), 'date_close' => array('type'=>'datetime', 'label'=>'TicketCloseOn', 'visible'=>-1, 'enabled'=>1, 'position'=>510, 'notnull'=>1), 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'visible'=>-1, 'enabled'=>1, 'position'=>520, 'notnull'=>1), 'message' => array('type'=>'text', 'label'=>'Message', 'visible'=>-2, 'enabled'=>1, 'position'=>540, 'notnull'=>-1,), - 'progress' => array('type'=>'varchar(100)', 'label'=>'Progression', 'visible'=>-1, 'enabled'=>1, 'position'=>540, 'notnull'=>-1, 'css'=>'right', 'help'=>""), + 'progress' => array('type'=>'varchar(100)', 'label'=>'Progression', 'visible'=>-1, 'enabled'=>1, 'position'=>540, 'notnull'=>-1, 'css'=>'right', 'help'=>"", 'isameasure'=>1), 'resolution' => array('type'=>'integer', 'label'=>'Resolution', 'visible'=>-1, 'enabled'=>1, 'position'=>550, 'notnull'=>1), 'fk_statut' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'position'=>600, 'notnull'=>1, 'index'=>1, 'arrayofkeyval'=>array(0 => 'Unread', 1 => 'Read', 3 => 'Answered', 4 => 'Assigned', 5 => 'InProgress', 6 => 'Waiting', 8 => 'Closed', 9 => 'Deleted')), 'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>900), From a6f8608ffd8f96408bde8a147627b81b282cf030 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 Mar 2020 11:09:18 +0100 Subject: [PATCH 221/313] Fix when undefined key --- htdocs/core/customreports.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/customreports.php b/htdocs/core/customreports.php index b5379ef911b..753e30650ad 100644 --- a/htdocs/core/customreports.php +++ b/htdocs/core/customreports.php @@ -213,7 +213,7 @@ if ($action == 'viewgraph') { } } -// Get all possible values of fields when a 'group by' is set and save this into $arrayofvaluesforgroupby +// Get all possible values of fields when a 'group by' is set, and save this into $arrayofvaluesforgroupby if (is_array($search_groupby) && count($search_groupby)) { foreach($search_groupby as $gkey => $gval) { $gvalwithoutprefix = preg_replace('/^[a-z]+\./', '', $gval); @@ -262,6 +262,8 @@ if (is_array($search_groupby) && count($search_groupby)) { } if (!empty($object->fields[$gvalwithoutprefix]['arrayofkeyval'])) { $valuetranslated = $object->fields[$gvalwithoutprefix]['arrayofkeyval'][$obj->val]; + if (is_null($valuetranslated)) $valuetranslated = $langs->transnoentitiesnoconv("UndefinedKey"); + $valuetranslated = $langs->trans($valuetranslated); } $arrayofvaluesforgroupby['g_'.$gkey][$keytouse] = $valuetranslated; From d6a35db7543ef79e0989762963f3491460c1509c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 Mar 2020 11:13:50 +0100 Subject: [PATCH 222/313] Look and feel v12 --- htdocs/core/class/dolgraph.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 3f3f905166e..8edad43dce0 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -743,7 +743,7 @@ class DolGraph if (!empty($this->shownographyet)) { $this->stringtoshow .= '
'; - $this->stringtoshow .= '
'.$langs->trans("NotEnoughDataYet").'
'; + $this->stringtoshow .= '
'.$langs->trans("NotEnoughDataYet").'...
'; return; } @@ -1033,7 +1033,7 @@ class DolGraph if (!empty($this->shownographyet)) { $this->stringtoshow .= '
'; - $this->stringtoshow .= '
'.$langs->trans("NotEnoughDataYet").'
'; + $this->stringtoshow .= '
'.$langs->trans("NotEnoughDataYet").'...
'; return; } @@ -1313,11 +1313,11 @@ class DolGraph if ($shownographyet) { $s = '
'; - $s .= '
'; + $s .= '
'; if (is_numeric($shownographyet)) { - $s .= $langs->trans("NotEnoughDataYet"); + $s .= $langs->trans("NotEnoughDataYet").'...'; } else { - $s .= $shownographyet; + $s .= $shownographyet.'...'; } $s .= '
'; return $s; From 310bdf6062ae3403d8aeeeb2d9aac3279cd71d6f Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Thu, 12 Mar 2020 11:55:26 +0100 Subject: [PATCH 223/313] NEW : accounting export LD compta version 10 --- .../class/accountancyexport.class.php | 269 +++++++++++++++++- htdocs/langs/en_US/accountancy.lang | 1 + 2 files changed, 269 insertions(+), 1 deletion(-) diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index 847aa3ef47e..6d2398f08d2 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -54,6 +54,7 @@ class AccountancyExport public static $EXPORT_TYPE_QUADRATUS = 60; public static $EXPORT_TYPE_OPENCONCERTO = 100; public static $EXPORT_TYPE_LDCOMPTA = 110; + public static $EXPORT_TYPE_LDCOMPTA10 = 120; public static $EXPORT_TYPE_FEC = 1000; @@ -110,8 +111,9 @@ class AccountancyExport self::$EXPORT_TYPE_OPENCONCERTO => $langs->trans('Modelcsv_openconcerto'), self::$EXPORT_TYPE_SAGE50_SWISS => $langs->trans('Modelcsv_Sage50_Swiss'), self::$EXPORT_TYPE_LDCOMPTA => $langs->trans('Modelcsv_LDCompta'), + self::$EXPORT_TYPE_LDCOMPTA10 => $langs->trans('Modelcsv_LDCompta10'), self::$EXPORT_TYPE_FEC => $langs->trans('Modelcsv_FEC'), - self::$EXPORT_TYPE_CHARLEMAGNE => $langs->trans('Modelcsv_charlemagne'), + self::$EXPORT_TYPE_CHARLEMAGNE => $langs->trans('Modelcsv_charlemagne'), ); ksort($listofexporttypes, SORT_NUMERIC); @@ -140,6 +142,7 @@ class AccountancyExport self::$EXPORT_TYPE_OPENCONCERTO => 'openconcerto', self::$EXPORT_TYPE_SAGE50_SWISS => 'sage50ch', self::$EXPORT_TYPE_LDCOMPTA => 'ldcompta', + self::$EXPORT_TYPE_LDCOMPTA10 => 'ldcompta10', self::$EXPORT_TYPE_FEC => 'fec', ); @@ -201,6 +204,10 @@ class AccountancyExport self::$EXPORT_TYPE_LDCOMPTA => array( 'label' => $langs->trans('Modelcsv_LDCompta'), 'ACCOUNTING_EXPORT_FORMAT' => 'csv', + ), + self::$EXPORT_TYPE_LDCOMPTA10 => array( + 'label' => $langs->trans('Modelcsv_LDCompta10'), + 'ACCOUNTING_EXPORT_FORMAT' => 'csv', ), self::$EXPORT_TYPE_FEC => array( 'label' => $langs->trans('Modelcsv_FEC'), @@ -280,6 +287,9 @@ class AccountancyExport case self::$EXPORT_TYPE_LDCOMPTA : $this->exportLDCompta($TData); break; + case self::$EXPORT_TYPE_LDCOMPTA10 : + $this->exportLDCompta10($TData); + break; case self::$EXPORT_TYPE_FEC : $this->exportFEC($TData); break; @@ -1051,6 +1061,263 @@ class AccountancyExport } } + /** + * Export format : LD Compta version 10 & higher + * http://www.ldsysteme.fr/fileadmin/telechargement/np/ldcompta/Documentation/IntCptW10.pdf + * + * @param array $objectLines data + * + * @return void + */ + public function exportLDCompta10($objectLines) + { + require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; + + $separator = ';'; + $end_line = "\r\n"; + $last_codeinvoice = ''; + + foreach ($objectLines as $line) { + + // TYPE C + if($last_codeinvoice != $line->doc_ref){ + + //recherche societe en fonction de son code client + $sql = "SELECT code_client, fk_forme_juridique, nom, address, zip, town, fk_pays, phone, siret FROM ".MAIN_DB_PREFIX."societe WHERE code_client = '".$line->thirdparty_code ."'"; + $resql = $this->db->query($sql); + + if($resql && $this->db->num_rows($resql)>0) + { + $soc = $this->db->fetch_object($resql); + + $address = str_replace(array("\t", "\n", "\r"), " ", $soc->address); + + $type_enregistrement = 'C'; + print $type_enregistrement.$separator; + //NOCL + print $soc->code_client.$separator; + //NMCM + print $separator; + //LIBI + print $separator; + //TITR + print getFormeJuridiqueLabel($soc->fk_forme_juridique).$separator; + //RSSO + print $soc->nom.$separator; + //CAD1 + print substr($address, 0, 40).$separator; + //CAD2 + print substr($address, 41, 40).$separator; + //CAD3 + print substr($address, 82, 40).$separator; + //COPO + print $soc->zip.$separator; + //BUDI + print substr($soc->town, 0, 40).$separator; + //CPAY + print $separator; + //PAYS + print substr(getCountry($soc->fk_pays), 0, 40).$separator; + //NTEL + print $soc->phone.$separator; + //TLEX + print $separator; + //TLPO + print $separator; + //TLCY + print $separator; + //NINT + print $separator; + //COMM + print $separator; + //SIRE + print $soc->siret.$separator; + //RIBP + print $separator; + //DOBQ + print $separator; + //IBBQ + print $separator; + //COBQ + print $separator; + //GUBQ + print $separator; + //CPBQ + print $separator; + //CLBQ + print $separator; + //BIBQ + print $separator; + //MOPM + print $separator; + //DJPM + print $separator; + //DMPM + print $separator; + //REFM + print $separator; + //SLVA + print $separator; + //PLCR + print $separator; + //ECFI + print $separator; + //CREP + print $separator; + //NREP + print $separator; + //TREP + print $separator; + //MREP + print $separator; + //GRRE + print $separator; + //LTTA + print $separator; + //CACT + print $separator; + //CODV + print $separator; + //GRTR + print $separator; + //NOFP + print $separator; + //BQAF + print $separator; + //BONP + print $separator; + //CESC + print $separator; + + print $end_line; + } + } + + $date_document = dol_print_date($line->doc_date, '%Y%m%d'); + $date_creation = dol_print_date($line->date_creation, '%Y%m%d'); + $date_lim_reglement = dol_print_date($line->date_lim_reglement, '%Y%m%d'); + + // TYPE E + $type_enregistrement = 'E'; // For write movement + print $type_enregistrement.$separator; + // JNAL + print substr($line->code_journal, 0, 2).$separator; + // NECR + print $line->id.$separator; + // NPIE + print $line->piece_num.$separator; + // DATP + print $date_document.$separator; + // LIBE + print dol_trunc($line->label_operation,25,'right','UTF-8',1).$separator; + // DATH + print $date_lim_reglement.$separator; + // CNPI + if ($line->doc_type == 'supplier_invoice') { + if ($line->montant < 0) { + $nature_piece = 'AF'; + } else { + $nature_piece = 'FF'; + } + } elseif ($line->doc_type == 'customer_invoice') { + if ($line->montant < 0) { + $nature_piece = 'AC'; + } else { + $nature_piece = 'FC'; + } + } else { + $nature_piece = ''; + } + print $nature_piece.$separator; + // RACI + // if (! empty($line->subledger_account)) { + // if ($line->doc_type == 'supplier_invoice') { + // $racine_subledger_account = '40'; + // } elseif ($line->doc_type == 'customer_invoice') { + // $racine_subledger_account = '41'; + // } else { + // $racine_subledger_account = ''; + // } + // } else { + $racine_subledger_account = ''; // for records of type E leave this field blank + // } + + print $racine_subledger_account . $separator; // deprecated CPTG & CPTA use instead + // MONT + print price(abs($line->montant), 0, '', 1, 2).$separator; + // CODC + print $line->sens.$separator; + // CPTG + print length_accountg($line->numero_compte).$separator; + // DATE + print $date_document.$separator; + // CLET + print $line->lettering_code.$separator; + // DATL + print $line->date_lettering.$separator; + // CPTA + if (!empty($line->subledger_account)) { + print length_accounta($line->subledger_account).$separator; + } else { + print $separator; + } + // CNAT + if ($line->doc_type == 'supplier_invoice' && !empty($line->subledger_account)) { + print 'F'.$separator; + } elseif ($line->doc_type == 'customer_invoice' && !empty($line->subledger_account)) { + print 'C'.$separator; + } else { + print $separator; + } + // SECT + print $separator; + // CTRE + print $separator; + // NORL + print $separator; + // DATV + print $separator; + // REFD + print $line->doc_ref.$separator; + // NECA + print '0'.$separator; + // CSEC + print $separator; + // CAFF + print $separator; + // CDES + print $separator; + // QTUE + print '0'.$separator; + // MTDV + print $separator; + // CODV + print '0'.$separator; + // TXDV + print $separator; + // MOPM + print $separator; + // BONP + print $separator; + // BQAF + print $separator; + // ECES + print $separator; + // TXTL + print $separator; + // ECRM + print $separator; + // DATK + print $separator; + // HEUK + print $separator; + + print $end_line; + + $last_codeinvoice = $line->doc_ref; + } + } + /** * Export format : Charlemagne * diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index 7ae71d281ae..1fb40c399c4 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -313,6 +313,7 @@ Modelcsv_ebp=Export for EBP Modelcsv_cogilog=Export for Cogilog Modelcsv_agiris=Export for Agiris Modelcsv_LDCompta=Export for LD Compta (v9 & higher) (Test) +Modelcsv_LDCompta10=Export for LD Compta (v10 & higher) Modelcsv_openconcerto=Export for OpenConcerto (Test) Modelcsv_configurable=Export CSV Configurable Modelcsv_FEC=Export FEC From 85c8296e1050560dc105df354f65b4417e1d8942 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 12 Mar 2020 10:59:08 +0000 Subject: [PATCH 224/313] Fixing style errors. --- htdocs/accountancy/class/accountancyexport.class.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index 6d2398f08d2..7a624b0bec5 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -1078,10 +1078,8 @@ class AccountancyExport $last_codeinvoice = ''; foreach ($objectLines as $line) { - // TYPE C if($last_codeinvoice != $line->doc_ref){ - //recherche societe en fonction de son code client $sql = "SELECT code_client, fk_forme_juridique, nom, address, zip, town, fk_pays, phone, siret FROM ".MAIN_DB_PREFIX."societe WHERE code_client = '".$line->thirdparty_code ."'"; $resql = $this->db->query($sql); @@ -1209,7 +1207,7 @@ class AccountancyExport // DATP print $date_document.$separator; // LIBE - print dol_trunc($line->label_operation,25,'right','UTF-8',1).$separator; + print dol_trunc($line->label_operation, 25, 'right', 'UTF-8', 1).$separator; // DATH print $date_lim_reglement.$separator; // CNPI From c1e5178eebbf03bc950ad50d2ba9feec4e4e43e6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 Mar 2020 12:01:40 +0100 Subject: [PATCH 225/313] Doc --- ChangeLog | 40 ++++++++++++++------------- htdocs/core/class/html.form.class.php | 8 ++++-- htdocs/theme/eldy/global.inc.php | 14 ++++++++-- 3 files changed, 39 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 279fc01cfa8..0483767ac50 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,27 @@ English Dolibarr ChangeLog -------------------------------------------------------------- + +***** ChangeLog for 12.0.0 compared to 11.0.0 ***** +For Users: +NEW: Module MO (Manufacturing Order) is available as stable module. + +For Developers or integrators: + + + +WARNING: + +Following changes may create regressions for some external modules, but were necessary to make Dolibarr better: +* PHP 5.5 is no more supported. Minimum PHP is now 5.6+. +* Default mode for GETPOST function is now 'alphanohtml' instead of 'none'. So check when you make POST or GET requests + with HTML content that you make a GETPOST('myparam', 'restricthtml') or GETPOST('myparam', 'none') if you really need posted content without sanitizing + the HTML into content (in such a case, sanitize data later) +* Removed hidden constant MAIN_EXTRAFIELDS_IN_ONE_TD that was useless. +* Reference of object including a "/" are no more allowed. It is never used by default but to support setup that introduced it, the "/" will be replaced + by a "_" automatically when a reference (with a custom numbering mask that use it) is generated. + + ***** ChangeLog for 11.0.2 compared to 11.0.1 ***** FIX: #10309 FIX: #13110 @@ -66,25 +87,6 @@ FIX: Visualization rights correction on last modified contacts box. FIX: Vulnerability in module from modulebuilder. FIX: Vulnerability reported by code16 -***** ChangeLog for 12.0.0 compared to 11.0.0 ***** -For Users: -NEW: Module MO (Manufacturing Order) is available as stable module. - -For Developers or integrators: - - - -WARNING: - -Following changes may create regressions for some external modules, but were necessary to make Dolibarr better: -* PHP 5.5 is no more supported. Minimum PHP is now 5.6+. -* Default mode for GETPOST function is now 'alphanohtml' instead of 'none'. So check when you make POST or GET requests - with HTML content that you make a GETPOST('myparam', 'restricthtml') or GETPOST('myparam', 'none') if you really need posted content without sanitizing - the HTML into content (in such a case, sanitize data later) -* Removed hidden constant MAIN_EXTRAFIELDS_IN_ONE_TD that was useless. -* Reference of object including a "/" are no more allowed. It is never used by default but to support setup that introduced it, the "/" will be replaced - by a "_" automatically when a reference is generated. - ***** ChangeLog for 11.0.1 compared to 11.0.0 ***** FIX: advanced target emailing sql and ergonomy. FIX: After import of a website template, home page was not set. diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 0db01a84656..e2e1444b018 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -8077,9 +8077,13 @@ class Form $ret .= $langs->trans("Filters"); $ret .= ''; //$ret .= ''; - $ret .= '
'; - $ret .= ''; + $ret .= '
'; + $texttoshow = '
'.$langs->trans("Search").'
'; + + $ret .= '
'.$texttoshow.'
'; $ret .= '
'; + $ret .= ''; + // For compatibility with forms that show themself the search criteria in addition of this component, we output the fields foreach ($arrayofcriterias as $criterias) { foreach ($criterias as $criteriafamilykey => $criteriafamilyval) { if (in_array('search_'.$criteriafamilykey, $arrayofinputfieldsalreadyoutput)) continue; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 97458577f59..4fb723e7291 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -702,14 +702,24 @@ div.divsearchfield { -webkit-flex-flow: row wrap; flex-flow: row wrap; background: #fff; - padding: 3px; + padding-top: 3px; + padding-bottom: 3px; + padding-left: 10px; + padding-right: 10px; + border-bottom: solid 1px rgba(0,0,0,.2); + height: 24px; } -.search_component_params_input, .search_component_params_input:focus { +.search_component_searchtext { + padding-top: 2px; +} +.search_component_params_text, .search_component_params_text:focus { border-bottom: none; width: auto; margin: 0 !important; padding: 3px; } + + browser->layout == 'phone') { From e7ce9c16cbf88a296ac82d315ce0ca362aebe78e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 Mar 2020 12:15:16 +0100 Subject: [PATCH 226/313] FIX #13313 --- htdocs/core/tpl/objectline_create.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index 4e636f3d9cf..510bb888813 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -761,7 +761,7 @@ if (!empty($usemargins) && $user->rights->margins->creer) /* To process customer price per quantity (CUSTOMER_PRICE_PER_QTY works only if combo product is not an ajax after x key pressed) */ var pbq = parseInt($('option:selected', this).attr('data-pbq')); - var pbqup = parseInt($('option:selected', this).attr('data-pbqup')); + var pbqup = parseFloat($('option:selected', this).attr('data-pbqup')); var pbqbase = $('option:selected', this).attr('data-pbqbase'); var pbqqty = parseFloat($('option:selected', this).attr('data-pbqqty')); var pbqpercent = parseFloat($('option:selected', this).attr('data-pbqpercent')); From ad22820872c26ad99eee30c2bebaeb77f2dcea4d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 Mar 2020 12:15:16 +0100 Subject: [PATCH 227/313] FIX #13313 --- htdocs/core/tpl/objectline_create.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index 7cc472e987e..160d323a2c2 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -761,7 +761,7 @@ if (!empty($usemargins) && $user->rights->margins->creer) /* To process customer price per quantity (CUSTOMER_PRICE_PER_QTY works only if combo product is not an ajax after x key pressed) */ var pbq = parseInt($('option:selected', this).attr('data-pbq')); - var pbqup = parseInt($('option:selected', this).attr('data-pbqup')); + var pbqup = parseFloat($('option:selected', this).attr('data-pbqup')); var pbqbase = $('option:selected', this).attr('data-pbqbase'); var pbqqty = parseFloat($('option:selected', this).attr('data-pbqqty')); var pbqpercent = parseFloat($('option:selected', this).attr('data-pbqpercent')); From c5a4adf63fc61ad16d4f27f3c076cdf8591dd0e8 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Thu, 12 Mar 2020 12:25:19 +0100 Subject: [PATCH 228/313] update doc --- htdocs/accountancy/class/accountancyexport.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index 6d2398f08d2..f72cd9a8ee7 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -931,7 +931,7 @@ class AccountancyExport /** * Export format : LD Compta version 9 & higher - * http://www.ldsysteme.fr/fileadmin/telechargement/np/ldcompta/Documentation/IntCptW10.pdf + * http://www.ldsysteme.fr/fileadmin/telechargement/np/ldcompta/Documentation/IntCptW9.pdf * * @param array $objectLines data * From 31865d7ae59f169fdf2519422027c1b21bb68fd6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 Mar 2020 12:39:21 +0100 Subject: [PATCH 229/313] Fix doc --- htdocs/product/class/product.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 30e1d48cd18..b4070653530 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -139,10 +139,10 @@ class Product extends CommonObject */ public $price_min_ttc; - /* - * Base price ('TTC' for price including tax or 'HT' for net price) - * @var float - */ + /** + * Base price ('TTC' for price including tax or 'HT' for net price) + * @var string + */ public $price_base_type; //! Arrays for multiprices From dfe947885cba371b336f28316a3e7a9f4c84a68e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 Mar 2020 12:40:28 +0100 Subject: [PATCH 230/313] FIX params of setEventMessage($langs->trans('ErrorProductClone')... --- htdocs/product/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index e80ea9e6984..01da1eb741f 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -545,7 +545,7 @@ if (empty($reshook)) if ($result < 1) { $db->rollback(); - setEventMessage($langs->trans('ErrorProductClone'), null, 'errors'); + setEventMessages($langs->trans('ErrorProductClone'), null, 'errors'); header("Location: ".$_SERVER["PHP_SELF"]."?id=".$originalId); exit; } From f38134e44d04e18da5a7765397938e6fb806bac9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 Mar 2020 12:42:34 +0100 Subject: [PATCH 231/313] Fix non transversable var --- htdocs/product/card.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 9c315591903..7953bddb2fd 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1601,8 +1601,10 @@ else $c = new Categorie($db); $cats = $c->containing($object->id, Categorie::TYPE_PRODUCT); $arrayselected = array(); - foreach ($cats as $cat) { - $arrayselected[] = $cat->id; + if (is_array($cats)) { + foreach ($cats as $cat) { + $arrayselected[] = $cat->id; + } } print $form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, '', 0, '100%'); print ""; From 325d635c48fcc44aead95edae3bdcf025f4fb769 Mon Sep 17 00:00:00 2001 From: simicar29 <53998265+simicar29@users.noreply.github.com> Date: Thu, 12 Mar 2020 12:43:06 +0100 Subject: [PATCH 232/313] Load line extrafields when fetching supplier invoice PR to load extrafield values of lines when fetchinf supplier invoice. --- htdocs/fourn/class/fournisseur.facture.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 8b07b0fbebe..e58410fb0f0 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -859,7 +859,10 @@ class FactureFournisseur extends CommonInvoice $line->multicurrency_total_tva = $obj->multicurrency_total_tva; $line->multicurrency_total_ttc = $obj->multicurrency_total_ttc; - $this->lines[$i] = $line; + // Extra fields + $line->fetch_optionals(); + + $this->lines[$i] = $line; $i++; } From f413ce6aacc02468576500c53df58d6a3a13016d Mon Sep 17 00:00:00 2001 From: Scrutinizer Auto-Fixer Date: Thu, 12 Mar 2020 11:45:44 +0000 Subject: [PATCH 233/313] Scrutinizer Auto-Fixes This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com --- htdocs/accountancy/admin/defaultaccounts.php | 22 +- htdocs/accountancy/admin/productaccount.php | 210 +++--- htdocs/accountancy/bookkeeping/list.php | 28 +- htdocs/accountancy/supplier/list.php | 6 +- htdocs/adherents/class/adherent.class.php | 460 ++++++------- htdocs/admin/ihm.php | 120 ++-- .../comm/propal/class/api_proposals.class.php | 170 ++--- htdocs/comm/propal/class/propal.class.php | 6 +- .../comm/propal/class/propalestats.class.php | 112 ++-- htdocs/comm/propal/list.php | 14 +- htdocs/commande/class/api_orders.class.php | 160 ++--- htdocs/commande/class/commande.class.php | 4 +- htdocs/commande/class/commandestats.class.php | 96 +-- htdocs/commande/list.php | 6 +- htdocs/compta/accounting-files.php | 24 +- htdocs/compta/bank/list.php | 124 ++-- htdocs/compta/deplacement/index.php | 68 +- htdocs/compta/facture/card.php | 8 +- htdocs/compta/facture/class/facture.class.php | 16 +- .../facture/class/facturestats.class.php | 104 +-- htdocs/compta/facture/list.php | 6 +- htdocs/core/actions_extrafields.inc.php | 176 ++--- .../boxes/box_graph_product_distribution.php | 6 +- htdocs/core/class/canvas.class.php | 30 +- .../core/class/commondocgenerator.class.php | 266 ++++---- htdocs/core/class/conf.class.php | 2 +- htdocs/core/class/dolgraph.class.php | 62 +- htdocs/core/class/html.form.class.php | 2 +- htdocs/core/class/html.formother.class.php | 102 +-- htdocs/core/class/stats.class.php | 206 +++--- htdocs/core/customreports.php | 42 +- htdocs/core/lib/functions.lib.php | 8 +- htdocs/core/lib/security.lib.php | 4 +- htdocs/core/lib/website.lib.php | 212 +++--- htdocs/core/lib/website2.lib.php | 2 +- htdocs/core/modules/modProduct.class.php | 288 ++++---- htdocs/core/modules/modService.class.php | 288 ++++---- htdocs/core/tpl/admin_extrafields_add.tpl.php | 22 +- .../core/tpl/admin_extrafields_edit.tpl.php | 74 +-- .../core/tpl/admin_extrafields_view.tpl.php | 18 +- htdocs/core/tpl/contacts.tpl.php | 32 +- htdocs/core/tpl/extrafields_add.tpl.php | 4 +- htdocs/core/tpl/extrafields_edit.tpl.php | 8 +- htdocs/core/tpl/objectline_create.tpl.php | 4 +- .../interface_20_all_Logevents.class.php | 80 +-- ...terface_50_modAgenda_ActionsAuto.class.php | 620 +++++++++--------- htdocs/don/list.php | 72 +- .../class/emailcollector.class.php | 30 +- htdocs/expedition/class/expedition.class.php | 304 ++++----- htdocs/expensereport/payment/payment.php | 70 +- htdocs/fichinter/class/fichinter.class.php | 4 +- .../fichinter/class/fichinterstats.class.php | 82 +-- htdocs/fourn/commande/list.php | 92 +-- htdocs/fourn/facture/list.php | 174 ++--- .../template/class/myobject.class.php | 18 +- htdocs/mrp/index.php | 46 +- htdocs/product/class/product.class.php | 2 +- htdocs/product/stats/commande.php | 122 ++-- htdocs/product/stats/facture.php | 134 ++-- .../canvas/actions_card_common.class.php | 224 +++---- htdocs/societe/class/societe.class.php | 8 +- htdocs/supplier_proposal/list.php | 108 +-- htdocs/takepos/admin/setup.php | 2 +- htdocs/takepos/admin/terminal.php | 12 +- htdocs/takepos/invoice.php | 40 +- htdocs/takepos/pay.php | 38 +- htdocs/takepos/reduction.php | 2 +- htdocs/takepos/takepos.php | 6 +- .../website/migrate_news_joomla2dolibarr.php | 12 +- 69 files changed, 2962 insertions(+), 2962 deletions(-) diff --git a/htdocs/accountancy/admin/defaultaccounts.php b/htdocs/accountancy/admin/defaultaccounts.php index 43dc3ccea67..ad22a88f415 100644 --- a/htdocs/accountancy/admin/defaultaccounts.php +++ b/htdocs/accountancy/admin/defaultaccounts.php @@ -46,13 +46,13 @@ if (empty($user->rights->accounting->chartofaccount)) $action = GETPOST('action', 'aZ09'); -$list_account_main = array ( +$list_account_main = array( 'ACCOUNTING_ACCOUNT_CUSTOMER', 'ACCOUNTING_ACCOUNT_SUPPLIER', 'SALARIES_ACCOUNTING_ACCOUNT_PAYMENT', ); -$list_account = array (); +$list_account = array(); $list_account[] = '---Product---'; $list_account[] = 'ACCOUNTING_PRODUCT_SOLD_ACCOUNT'; if ($mysoc->isInEEC()) { @@ -120,25 +120,25 @@ if ($action == 'update') { foreach ($list_account_main as $constname) { $constvalue = GETPOST($constname, 'alpha'); - if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { - $error ++; + if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { + $error++; } } foreach ($list_account as $constname) { - $reg=array(); + $reg = array(); if (preg_match('/---(.*)---/', $constname, $reg)) { // This is a separator continue; } $constvalue = GETPOST($constname, 'alpha'); - if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { - $error ++; + if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { + $error++; } } - if (! $error) { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); @@ -190,7 +190,7 @@ foreach ($list_account_main as $key) { foreach ($list_account as $key) { - $reg=array(); + $reg = array(); if (preg_match('/---(.*)---/', $key, $reg)) { print ''.$langs->trans($reg[1]).''; } @@ -198,9 +198,9 @@ foreach ($list_account as $key) { print ''; // Param $label = $langs->trans($key); - print '' . $label . ''; + print ''.$label.''; // Value - print ''; // Do not force class=right, or it align also the content of the select box + print ''; // Do not force class=right, or it align also the content of the select box print $formaccounting->select_account($conf->global->$key, $key, 1, '', 1, 1); print ''; print ''; diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index 6946f8df831..fb909ecb7ad 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -59,7 +59,7 @@ $search_label = GETPOST('search_label', 'alpha'); $search_desc = GETPOST('search_desc', 'alpha'); $search_current_account = GETPOST('search_current_account', 'alpha'); $search_current_account_valid = GETPOST('search_current_account_valid', 'alpha'); -if ($search_current_account_valid == '') $search_current_account_valid='withoutvalidaccount'; +if ($search_current_account_valid == '') $search_current_account_valid = 'withoutvalidaccount'; $search_onsell = GETPOST('search_onsell', 'alpha'); $search_onpurchase = GETPOST('search_onpurchase', 'alpha'); @@ -67,9 +67,9 @@ $accounting_product_mode = GETPOST('accounting_product_mode', 'alpha'); $btn_changeaccount = GETPOST('changeaccount', 'alpha'); $btn_changetype = GETPOST('changetype', 'alpha'); -if (empty($accounting_product_mode)) $accounting_product_mode='ACCOUNTANCY_SELL'; +if (empty($accounting_product_mode)) $accounting_product_mode = 'ACCOUNTANCY_SELL'; -$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION); +$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION) ? $conf->liste_limit : $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION); $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); $page = GETPOST("page", 'int'); @@ -224,56 +224,56 @@ $aarowid_prodsell = $accounting->fetch('', $conf->global->ACCOUNTING_P $aarowid_prodsell_intra = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT, 1); $aarowid_prodsell_export = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT, 1); -$aacompta_servbuy = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef")); -$aacompta_servbuy_intra = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); -$aacompta_servbuy_export = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); -$aacompta_prodbuy = (! empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef")); -$aacompta_prodbuy_intra = (! empty($conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); -$aacompta_prodbuy_export = (! empty($conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); -$aacompta_servsell = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); -$aacompta_servsell_intra = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); -$aacompta_servsell_export = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); -$aacompta_prodsell = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); -$aacompta_prodsell_intra = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); -$aacompta_prodsell_export = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); +$aacompta_servbuy = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef")); +$aacompta_servbuy_intra = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); +$aacompta_servbuy_export = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); +$aacompta_prodbuy = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef")); +$aacompta_prodbuy_intra = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); +$aacompta_prodbuy_export = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); +$aacompta_servsell = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); +$aacompta_servsell_intra = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); +$aacompta_servsell_export = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); +$aacompta_prodsell = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); +$aacompta_prodsell_intra = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); +$aacompta_prodsell_export = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); llxHeader('', $langs->trans("ProductsBinding")); $pcgverid = $conf->global->CHARTOFACCOUNTS; $pcgvercode = dol_getIdFromCode($db, $pcgverid, 'accounting_system', 'rowid', 'pcg_version'); -if (empty($pcgvercode)) $pcgvercode=$pcgverid; +if (empty($pcgvercode)) $pcgvercode = $pcgverid; $sql = "SELECT p.rowid, p.ref, p.label, p.description, p.tosell, p.tobuy,"; -$sql.= " p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export,"; -$sql.= " p.accountancy_code_buy, p.accountancy_code_buy_intra, p.accountancy_code_buy_export,"; -$sql.= " p.tms, p.fk_product_type as product_type,"; -$sql.= " aa.rowid as aaid"; -$sql.= " FROM " . MAIN_DB_PREFIX . "product as p"; -$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON"; +$sql .= " p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export,"; +$sql .= " p.accountancy_code_buy, p.accountancy_code_buy_intra, p.accountancy_code_buy_export,"; +$sql .= " p.tms, p.fk_product_type as product_type,"; +$sql .= " aa.rowid as aaid"; +$sql .= " FROM ".MAIN_DB_PREFIX."product as p"; +$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON"; if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { - $sql.=" p.accountancy_code_buy = aa.account_number AND aa.fk_pcg_version = '" . $pcgvercode . "'"; + $sql .= " p.accountancy_code_buy = aa.account_number AND aa.fk_pcg_version = '".$pcgvercode."'"; } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') { - $sql.=" p.accountancy_code_buy_intra = aa.account_number AND aa.fk_pcg_version = '" . $pcgvercode . "'"; + $sql .= " p.accountancy_code_buy_intra = aa.account_number AND aa.fk_pcg_version = '".$pcgvercode."'"; } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') { - $sql.=" p.accountancy_code_buy_export = aa.account_number AND aa.fk_pcg_version = '" . $pcgvercode . "'"; + $sql .= " p.accountancy_code_buy_export = aa.account_number AND aa.fk_pcg_version = '".$pcgvercode."'"; } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL') { - $sql.=" p.accountancy_code_sell = aa.account_number AND aa.fk_pcg_version = '" . $pcgvercode . "'"; + $sql .= " p.accountancy_code_sell = aa.account_number AND aa.fk_pcg_version = '".$pcgvercode."'"; } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') { - $sql.=" p.accountancy_code_sell_intra = aa.account_number AND aa.fk_pcg_version = '" . $pcgvercode . "'"; + $sql .= " p.accountancy_code_sell_intra = aa.account_number AND aa.fk_pcg_version = '".$pcgvercode."'"; } else { - $sql.=" p.accountancy_code_sell_export = aa.account_number AND aa.fk_pcg_version = '" . $pcgvercode . "'"; + $sql .= " p.accountancy_code_sell_export = aa.account_number AND aa.fk_pcg_version = '".$pcgvercode."'"; } -$sql.= ' WHERE p.entity IN ('.getEntity('product').')'; +$sql .= ' WHERE p.entity IN ('.getEntity('product').')'; if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { if (strlen(trim($search_current_account))) { $sql .= natural_search("p.accountancy_code_buy", $search_current_account); @@ -319,8 +319,8 @@ if (strlen(trim($search_label))) { if (strlen(trim($search_desc))) { $sql .= natural_search("p.description", $search_desc); } -if ($search_onsell != '' && $search_onsell != '-1') $sql.= natural_search('p.tosell', $search_onsell, 1); -if ($search_onpurchase != '' && $search_onpurchase != '-1') $sql.= natural_search('p.tobuy', $search_onpurchase, 1); +if ($search_onsell != '' && $search_onsell != '-1') $sql .= natural_search('p.tosell', $search_onsell, 1); +if ($search_onpurchase != '' && $search_onpurchase != '-1') $sql .= natural_search('p.tobuy', $search_onpurchase, 1); $sql .= $db->order($sortfield, $sortorder); @@ -367,60 +367,60 @@ if ($result) print load_fiche_titre($langs->trans("ProductsBinding"), '', 'title_accountancy'); print '
'; - print ''.$langs->trans("InitAccountancyDesc") . '
'; + print ''.$langs->trans("InitAccountancyDesc").'
'; print '
'; // Select mode print ''; print ''; - print ''; + print ''; print "\n"; - print ''; + print ''; print '\n"; if ($mysoc->isInEEC()) { - print ''; + print ''; print '\n"; } - print ''; + print ''; print '\n"; - print ''; + print ''; print '\n"; if ($mysoc->isInEEC()) { - print ''; - print '\n"; + print ''; + print '\n"; } - print ''; + print ''; print '\n"; print "
' . $langs->trans('Options') . '' . $langs->trans('Description') . ''.$langs->trans('Options').''.$langs->trans('Description').'
' . $langs->trans('OptionModeProductSell') . '
'.$langs->trans('OptionModeProductSell').''.$langs->trans('OptionModeProductSellDesc'); print "
' . $langs->trans('OptionModeProductSellIntra') . '
'.$langs->trans('OptionModeProductSellIntra').''.$langs->trans('OptionModeProductSellIntraDesc'); print "
' . $langs->trans('OptionModeProductSellExport') . '
'.$langs->trans('OptionModeProductSellExport').''.$langs->trans('OptionModeProductSellExportDesc'); print "
' . $langs->trans('OptionModeProductBuy') . '
'.$langs->trans('OptionModeProductBuy').''.$langs->trans('OptionModeProductBuyDesc')."
' . $langs->trans('OptionModeProductBuyIntra') . '' . $langs->trans('OptionModeProductBuyDesc') . "
'.$langs->trans('OptionModeProductBuyIntra').''.$langs->trans('OptionModeProductBuyDesc')."
' . $langs->trans('OptionModeProductBuyExport') . '
'.$langs->trans('OptionModeProductBuyExport').''.$langs->trans('OptionModeProductBuyDesc')."
\n"; - print '
'; + print '
'; print "
\n"; // Filter on categories - $moreforfilter=''; - $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; - $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + $moreforfilter = ''; + $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; + $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields - $buttonsave = ''; + $buttonsave = ''; //print '
'.$buttonsave.'
'; - $texte=$langs->trans("ListOfProductsServices"); + $texte = $langs->trans("ListOfProductsServices"); print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $buttonsave, $num, $nbtotalofrecords, '', 0, '', '', $limit); print '
'; - print ''; + print '
'; print ''; - print ''; - print ''; - if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print ''; + print ''; + print ''; + if (!empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print ''; // On sell if ($accounting_product_mode == 'ACCOUNTANCY_SELL' || $accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA' || $accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') { print ''; @@ -431,13 +431,13 @@ if ($result) } // Current account print ''; print ''; print ''; print ''; @@ -445,36 +445,36 @@ if ($result) print ''; print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder); - if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "p.description", "", $param, '', $sortfield, $sortorder); + if (!empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "p.description", "", $param, '', $sortfield, $sortorder); // On sell / On purchase if ($accounting_product_mode == 'ACCOUNTANCY_SELL') { print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, '', $sortfield, $sortorder, 'center '); - $fieldtosortaccount="p.accountancy_code_sell"; + $fieldtosortaccount = "p.accountancy_code_sell"; } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') { print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, '', $sortfield, $sortorder, 'center '); - $fieldtosortaccount="p.accountancy_code_sell_intra"; + $fieldtosortaccount = "p.accountancy_code_sell_intra"; } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') { print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, '', $sortfield, $sortorder, 'center '); - $fieldtosortaccount="p.accountancy_code_sell_export"; + $fieldtosortaccount = "p.accountancy_code_sell_export"; } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY') { print_liste_field_titre("OnBuy", $_SERVER["PHP_SELF"], "p.tobuy", "", $param, '', $sortfield, $sortorder, 'center '); - $fieldtosortaccount="p.accountancy_code_buy"; + $fieldtosortaccount = "p.accountancy_code_buy"; } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') { print_liste_field_titre("OnBuy", $_SERVER["PHP_SELF"], "p.tobuy", "", $param, '', $sortfield, $sortorder, 'center '); - $fieldtosortaccount="p.accountancy_code_buy_intra"; + $fieldtosortaccount = "p.accountancy_code_buy_intra"; } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') { print_liste_field_titre("OnBuy", $_SERVER["PHP_SELF"], "p.tobuy", "", $param, '', $sortfield, $sortorder, 'center '); - $fieldtosortaccount="p.accountancy_code_buy_export"; + $fieldtosortaccount = "p.accountancy_code_buy_export"; } print_liste_field_titre("CurrentDedicatedAccountingAccount", $_SERVER["PHP_SELF"], $fieldtosortaccount, "", $param, '', $sortfield, $sortorder); print_liste_field_titre("AssignDedicatedAccountingAccount"); - $clickpitco=$form->showCheckAddButtons('checkforselect', 1); + $clickpitco = $form->showCheckAddButtons('checkforselect', 1); print_liste_field_titre($clickpitco, '', '', '', '', '', '', '', 'center '); print ''; $product_static = new Product($db); - $i=0; + $i = 0; while ($i < min($num, $limit)) { $obj = $db->fetch_object($result); @@ -491,37 +491,37 @@ if ($result) // Sales if ($obj->product_type == 0) { if ($accounting_product_mode == 'ACCOUNTANCY_SELL') { - $compta_prodsell = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodsell = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell_id = $aarowid_prodsell; } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') { - $compta_prodsell = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodsell = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell_id = $aarowid_prodsell_intra; } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') { - $compta_prodsell = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodsell = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell_id = $aarowid_prodsell_export; } else { - $compta_prodsell = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodsell = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell_id = $aarowid_prodsell; } } else { if ($accounting_product_mode == 'ACCOUNTANCY_SELL') { - $compta_prodsell = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodsell = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell_id = $aarowid_servsell; } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') { - $compta_prodsell = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodsell = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell_id = $aarowid_servsell_intra; } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') { - $compta_prodsell = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodsell = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell_id = $aarowid_servsell_export; } else { - $compta_prodsell = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodsell = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell_id = $aarowid_servsell; } } @@ -529,37 +529,37 @@ if ($result) // Purchases if ($obj->product_type == 0) { if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { - $compta_prodbuy = (! empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodbuy = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodbuy_id = $aarowid_prodbuy; } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') { - $compta_prodbuy = (! empty($conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodbuy = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodbuy_id = $aarowid_prodbuy_intra; } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') { - $compta_prodbuy = (! empty($conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodbuy = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodbuy_id = $aarowid_prodbuy_export; } else { - $compta_prodbuy = (! empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodbuy = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodbuy_id = $aarowid_prodbuy; } } else { if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { - $compta_prodbuy = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodbuy = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodbuy_id = $aarowid_servbuy; } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') { - $compta_prodbuy = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodbuy = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodbuy_id = $aarowid_servbuy_intra; } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') { - $compta_prodbuy = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodbuy = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodbuy_id = $aarowid_servbuy_export; } else { - $compta_prodbuy = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef")); + $compta_prodbuy = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodbuy_id = $aarowid_servbuy; } } @@ -611,72 +611,72 @@ if ($result) print ''; // New account to set - $defaultvalue=''; + $defaultvalue = ''; if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { // Accounting account buy print ''; } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') { // Accounting account buy intra (In EEC) print ''; } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') { // Accounting account buy export (Out of EEC) print ''; } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL') { // Accounting account sell print ''; } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') { // Accounting account sell intra (In EEC) print ''; } else { // Accounting account sell export (Out of EEC) print ''; } // Checkbox select print ''; + print ''; print ""; - $i ++; + $i++; } print '
'.$form->selectyesno('search_onsell', $search_onsell, 1, false, 1).''; - print ''; - $listofvals=array('withoutvalidaccount'=>$langs->trans("WithoutValidAccount"), 'withvalidaccount'=>$langs->trans("WithValidAccount")); + print ''; + $listofvals = array('withoutvalidaccount'=>$langs->trans("WithoutValidAccount"), 'withvalidaccount'=>$langs->trans("WithValidAccount")); print ' '.$langs->trans("or").' '.$form->selectarray('search_current_account_valid', $listofvals, $search_current_account_valid, 1); print ' '; - $searchpicto=$form->showFilterButtons(); + $searchpicto = $form->showFilterButtons(); print $searchpicto; print '
'; //$defaultvalue=GETPOST('codeventil_' . $product_static->id,'alpha'); This is id and we need a code - if (empty($defaultvalue)) $defaultvalue=$compta_prodbuy; - $codesell=length_accountg($obj->accountancy_code_buy); - if (! empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid - print $form->select_account($defaultvalue, 'codeventil_' . $product_static->id, 1, array(), 1); + if (empty($defaultvalue)) $defaultvalue = $compta_prodbuy; + $codesell = length_accountg($obj->accountancy_code_buy); + if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid + print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1); print ''; //$defaultvalue=GETPOST('codeventil_' . $product_static->id,'alpha'); This is id and we need a code - if (empty($defaultvalue)) $defaultvalue=$compta_prodbuy_intra; - $codesell=length_accountg($obj->accountancy_code_buy_intra); + if (empty($defaultvalue)) $defaultvalue = $compta_prodbuy_intra; + $codesell = length_accountg($obj->accountancy_code_buy_intra); //var_dump($defaultvalue.' - '.$codesell.' - '.$compta_prodsell); - if (! empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid - print $form->select_account($defaultvalue, 'codeventil_' . $product_static->id, 1, array(), 1); + if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid + print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1); print ''; //$defaultvalue=GETPOST('codeventil_' . $product_static->id,'alpha'); This is id and we need a code - if (empty($defaultvalue)) $defaultvalue=$compta_prodbuy_export; - $codesell=length_accountg($obj->accountancy_code_buy_export); + if (empty($defaultvalue)) $defaultvalue = $compta_prodbuy_export; + $codesell = length_accountg($obj->accountancy_code_buy_export); //var_dump($defaultvalue.' - '.$codesell.' - '.$compta_prodsell); - if (! empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid - print $form->select_account($defaultvalue, 'codeventil_' . $product_static->id, 1, array(), 1); + if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid + print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1); print ''; //$defaultvalue=GETPOST('codeventil_' . $product_static->id,'alpha'); This is id and we need a code - if (empty($defaultvalue)) $defaultvalue=$compta_prodsell; - $codesell=length_accountg($obj->accountancy_code_sell); + if (empty($defaultvalue)) $defaultvalue = $compta_prodsell; + $codesell = length_accountg($obj->accountancy_code_sell); //var_dump($defaultvalue.' - '.$codesell.' - '.$compta_prodsell); - if (! empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid - print $form->select_account($defaultvalue, 'codeventil_' . $product_static->id, 1, array(), 1); + if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid + print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1); print ''; //$defaultvalue=GETPOST('codeventil_' . $product_static->id,'alpha'); This is id and we need a code - if (empty($defaultvalue)) $defaultvalue=$compta_prodsell; - $codesell=length_accountg($obj->accountancy_code_sell_intra); + if (empty($defaultvalue)) $defaultvalue = $compta_prodsell; + $codesell = length_accountg($obj->accountancy_code_sell_intra); //var_dump($defaultvalue.' - '.$codesell.' - '.$compta_prodsell); - if (! empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid - print $form->select_account($defaultvalue, 'codeventil_' . $product_static->id, 1, array(), 1); + if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid + print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1); print ''; //$defaultvalue=GETPOST('codeventil_' . $product_static->id,'alpha'); This is id and we need a code - if (empty($defaultvalue)) $defaultvalue=$compta_prodsell; - $codesell=length_accountg($obj->accountancy_code_sell_export); - if (! empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid - print $form->select_account($defaultvalue, 'codeventil_' . $product_static->id, 1, array(), 1); + if (empty($defaultvalue)) $defaultvalue = $compta_prodsell; + $codesell = length_accountg($obj->accountancy_code_sell_export); + if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid + print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1); print ''; - print '
'; print '
'; diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 9b6ad2fbbb0..4b0337c7848 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -204,7 +204,7 @@ if (empty($reshook)) $search_debit = ''; $search_credit = ''; $search_lettering_code = ''; - $search_not_reconciled=''; + $search_not_reconciled = ''; } // Must be after the remove filter action, before the export. @@ -276,32 +276,32 @@ if (empty($reshook)) if (!empty($search_date_creation_start)) { $filter['t.date_creation>='] = $search_date_creation_start; $tmp = dol_getdate($search_date_creation_start); - $param .= '&date_creation_startmonth=' . urlencode($tmp['mon']) . '&date_creation_startday=' . urlencode($tmp['mday']) . '&date_creation_startyear=' . urlencode($tmp['year']); + $param .= '&date_creation_startmonth='.urlencode($tmp['mon']).'&date_creation_startday='.urlencode($tmp['mday']).'&date_creation_startyear='.urlencode($tmp['year']); } if (!empty($search_date_creation_end)) { $filter['t.date_creation<='] = $search_date_creation_end; $tmp = dol_getdate($search_date_creation_end); - $param .= '&date_creation_endmonth=' .urlencode($tmp['mon']) . '&date_creation_endday=' . urlencode($tmp['mday']) . '&date_creation_endyear=' . urlencode($tmp['year']); + $param .= '&date_creation_endmonth='.urlencode($tmp['mon']).'&date_creation_endday='.urlencode($tmp['mday']).'&date_creation_endyear='.urlencode($tmp['year']); } if (!empty($search_date_modification_start)) { $filter['t.tms>='] = $search_date_modification_start; $tmp = dol_getdate($search_date_modification_start); - $param .= '&date_modification_startmonth=' . urlencode($tmp['mon']) . '&date_modification_startday=' . urlencode($tmp['mday']) . '&date_modification_startyear=' . urlencode($tmp['year']); + $param .= '&date_modification_startmonth='.urlencode($tmp['mon']).'&date_modification_startday='.urlencode($tmp['mday']).'&date_modification_startyear='.urlencode($tmp['year']); } if (!empty($search_date_modification_end)) { $filter['t.tms<='] = $search_date_modification_end; $tmp = dol_getdate($search_date_modification_end); - $param .= '&date_modification_endmonth=' . urlencode($tmp['mon']) . '&date_modification_endday=' . urlencode($tmp['mday']) . '&date_modification_endyear=' . urlencode($tmp['year']); + $param .= '&date_modification_endmonth='.urlencode($tmp['mon']).'&date_modification_endday='.urlencode($tmp['mday']).'&date_modification_endyear='.urlencode($tmp['year']); } if (!empty($search_date_export_start)) { $filter['t.date_export>='] = $search_date_export_start; $tmp = dol_getdate($search_date_export_start); - $param .= '&date_export_startmonth=' . urlencode($tmp['mon']) . '&date_export_startday=' . urlencode($tmp['mday']) . '&date_export_startyear=' . urlencode($tmp['year']); + $param .= '&date_export_startmonth='.urlencode($tmp['mon']).'&date_export_startday='.urlencode($tmp['mday']).'&date_export_startyear='.urlencode($tmp['year']); } if (!empty($search_date_export_end)) { $filter['t.date_export<='] = $search_date_export_end; $tmp = dol_getdate($search_date_export_end); - $param .= '&date_export_endmonth=' . urlencode($tmp['mon']) . '&date_export_endday=' . urlencode($tmp['mday']) . '&date_export_endyear=' . urlencode($tmp['year']); + $param .= '&date_export_endmonth='.urlencode($tmp['mon']).'&date_export_endday='.urlencode($tmp['mday']).'&date_export_endyear='.urlencode($tmp['year']); } if (!empty($search_debit)) { $filter['t.debit'] = $search_debit; @@ -315,9 +315,9 @@ if (empty($reshook)) $filter['t.lettering_code'] = $search_lettering_code; $param .= '&search_lettering_code='.urlencode($search_lettering_code); } - if (! empty($search_not_reconciled)) { + if (!empty($search_not_reconciled)) { $filter['t.reconciled_option'] = $search_not_reconciled; - $param .= '&search_not_reconciled=' . urlencode($search_not_reconciled); + $param .= '&search_not_reconciled='.urlencode($search_not_reconciled); } } @@ -768,7 +768,7 @@ if (!empty($arrayfields['t.lettering_code']['checked'])) { print ''; print ''; - print '
'.$langs->trans("NotReconciled").''; + print '
'.$langs->trans("NotReconciled").''; print ''; } // Code journal @@ -953,9 +953,9 @@ while ($i < min($num, $limit)) $objectstatic->fetch($line->fk_doc); //$modulepart = 'expensereport'; - $filename=dol_sanitizeFileName($line->doc_ref); - $filedir=$conf->expensereport->dir_output . '/' . dol_sanitizeFileName($line->doc_ref); - $urlsource=$_SERVER['PHP_SELF'].'?id='.$objectstatic->id; + $filename = dol_sanitizeFileName($line->doc_ref); + $filedir = $conf->expensereport->dir_output.'/'.dol_sanitizeFileName($line->doc_ref); + $urlsource = $_SERVER['PHP_SELF'].'?id='.$objectstatic->id; $documentlink = $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir); } else @@ -969,7 +969,7 @@ while ($i < min($num, $limit)) // Picto + Ref print ''; - if($line->doc_type == 'customer_invoice' || $line->doc_type == 'supplier_invoice' || $line->doc_type == 'expense_report') + if ($line->doc_type == 'customer_invoice' || $line->doc_type == 'supplier_invoice' || $line->doc_type == 'expense_report') { print $objectstatic->getNomUrl(1, '', 0, 0, '', 0, -1, 1); print $documentlink; diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index 2c8ad2432a3..bcc042d8c71 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -480,7 +480,7 @@ if ($result) { } } - if (! empty($objp->code_buy_p)) { + if (!empty($objp->code_buy_p)) { // Value was defined previously } else { $code_buy_p_notset = 'color:orange'; @@ -561,7 +561,7 @@ if ($result) { // Suggested accounting account print ''; $suggestedid = $objp->aarowid_suggest; - if (empty($suggestedid) && empty($objp->code_buy_p) && ! empty($objp->code_buy_l) && empty($conf->global->ACCOUNTANCY_DO_NOT_AUTOFILL_ACCOUNT_WITH_GENERIC)) + if (empty($suggestedid) && empty($objp->code_buy_p) && !empty($objp->code_buy_l) && empty($conf->global->ACCOUNTANCY_DO_NOT_AUTOFILL_ACCOUNT_WITH_GENERIC)) { if (empty($accountingaccount_codetotid_cache[$objp->code_buy_l])) { @@ -597,7 +597,7 @@ if ($result) { print $db->error(); } if ($db->type == 'mysqli') { - $db->query("SET SQL_BIG_SELECTS=0"); // Enable MAX_JOIN_SIZE limitation + $db->query("SET SQL_BIG_SELECTS=0"); // Enable MAX_JOIN_SIZE limitation } // Add code to auto check the box when we select an account diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index a14cdec8fff..fa8ae9fc2f3 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -32,9 +32,9 @@ * \ingroup member * \brief File of class to manage members of a foundation */ -require_once DOL_DOCUMENT_ROOT . '/core/class/commonobject.class.php'; -require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; -require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; /** @@ -341,7 +341,7 @@ class Adherent extends CommonObject if (dol_textishtml($text, 0)) $msgishtml = 1; } - dol_syslog('send_an_email msgishtml=' . $msgishtml); + dol_syslog('send_an_email msgishtml='.$msgishtml); $texttosend = $this->makeSubstitution($text); $subjecttosend = $this->makeSubstitution($subject); @@ -351,15 +351,15 @@ class Adherent extends CommonObject $from = $conf->email_from; if (!empty($conf->global->ADHERENT_MAIL_FROM)) $from = $conf->global->ADHERENT_MAIL_FROM; - $trackid = 'mem' . $this->id; + $trackid = 'mem'.$this->id; // Send email (substitutionarray must be done just before this) - include_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php'; + include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; $mailfile = new CMailFile($subjecttosend, $this->email, $from, $texttosend, $filename_list, $mimetype_list, $mimefilename_list, $addr_cc, $addr_bcc, $deliveryreceipt, $msgishtml, '', '', $trackid, $moreinheader); if ($mailfile->sendfile()) { return 1; } else { - $this->error = $langs->trans("ErrorFailedToSendMail", $from, $this->email) . '. ' . $mailfile->error; + $this->error = $langs->trans("ErrorFailedToSendMail", $from, $this->email).'. '.$mailfile->error; return -1; } } @@ -381,26 +381,26 @@ class Adherent extends CommonObject if (dol_textishtml($text, 1)) $msgishtml = 1; $infos = ''; - if ($this->civility_id) $infos .= $langs->transnoentities("UserTitle") . ": " . $this->getCivilityLabel() . "\n"; - $infos .= $langs->transnoentities("id") . ": " . $this->id . "\n"; - $infos .= $langs->transnoentities("Lastname") . ": " . $this->lastname . "\n"; - $infos .= $langs->transnoentities("Firstname") . ": " . $this->firstname . "\n"; - $infos .= $langs->transnoentities("Company") . ": " . $this->company . "\n"; - $infos .= $langs->transnoentities("Address") . ": " . $this->address . "\n"; - $infos .= $langs->transnoentities("Zip") . ": " . $this->zip . "\n"; - $infos .= $langs->transnoentities("Town") . ": " . $this->town . "\n"; - $infos .= $langs->transnoentities("Country") . ": " . $this->country . "\n"; - $infos .= $langs->transnoentities("EMail") . ": " . $this->email . "\n"; - $infos .= $langs->transnoentities("PhonePro") . ": " . $this->phone . "\n"; - $infos .= $langs->transnoentities("PhonePerso") . ": " . $this->phone_perso . "\n"; - $infos .= $langs->transnoentities("PhoneMobile") . ": " . $this->phone_mobile . "\n"; + if ($this->civility_id) $infos .= $langs->transnoentities("UserTitle").": ".$this->getCivilityLabel()."\n"; + $infos .= $langs->transnoentities("id").": ".$this->id."\n"; + $infos .= $langs->transnoentities("Lastname").": ".$this->lastname."\n"; + $infos .= $langs->transnoentities("Firstname").": ".$this->firstname."\n"; + $infos .= $langs->transnoentities("Company").": ".$this->company."\n"; + $infos .= $langs->transnoentities("Address").": ".$this->address."\n"; + $infos .= $langs->transnoentities("Zip").": ".$this->zip."\n"; + $infos .= $langs->transnoentities("Town").": ".$this->town."\n"; + $infos .= $langs->transnoentities("Country").": ".$this->country."\n"; + $infos .= $langs->transnoentities("EMail").": ".$this->email."\n"; + $infos .= $langs->transnoentities("PhonePro").": ".$this->phone."\n"; + $infos .= $langs->transnoentities("PhonePerso").": ".$this->phone_perso."\n"; + $infos .= $langs->transnoentities("PhoneMobile").": ".$this->phone_mobile."\n"; if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { - $infos .= $langs->transnoentities("Login") . ": " . $this->login . "\n"; - $infos .= $langs->transnoentities("Password") . ": " . $this->pass . "\n"; + $infos .= $langs->transnoentities("Login").": ".$this->login."\n"; + $infos .= $langs->transnoentities("Password").": ".$this->pass."\n"; } - $infos .= $langs->transnoentities("Birthday") . ": " . $birthday . "\n"; - $infos .= $langs->transnoentities("Photo") . ": " . $this->photo . "\n"; - $infos .= $langs->transnoentities("Public") . ": " . yn($this->public); + $infos .= $langs->transnoentities("Birthday").": ".$birthday."\n"; + $infos .= $langs->transnoentities("Photo").": ".$this->photo."\n"; + $infos .= $langs->transnoentities("Public").": ".yn($this->public); // Substitutions $substitutionarray = array('__ID__' => $this->id, '__MEMBER_ID__' => $this->id, '__CIVILITY__' => $this->getCivilityLabel(), @@ -481,22 +481,22 @@ class Adherent extends CommonObject $this->db->begin(); // Insert member - $sql = "INSERT INTO " . MAIN_DB_PREFIX . "adherent"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."adherent"; $sql .= " (datec,login,fk_user_author,fk_user_mod,fk_user_valid,morphy,fk_adherent_type,entity,import_key)"; $sql .= " VALUES ("; - $sql .= " '" . $this->db->idate($this->datec) . "'"; - $sql .= ", " . ($this->login ? "'" . $this->db->escape($this->login) . "'" : "null"); - $sql .= ", " . ($user->id > 0 ? $user->id : "null"); // Can be null because member can be created by a guest or a script - $sql .= ", null, null, '" . $this->db->escape($this->morphy) . "'"; - $sql .= ", " . $this->typeid; - $sql .= ", " . $conf->entity; - $sql .= ", " . (!empty($this->import_key) ? "'" . $this->db->escape($this->import_key) . "'" : "null"); + $sql .= " '".$this->db->idate($this->datec)."'"; + $sql .= ", ".($this->login ? "'".$this->db->escape($this->login)."'" : "null"); + $sql .= ", ".($user->id > 0 ? $user->id : "null"); // Can be null because member can be created by a guest or a script + $sql .= ", null, null, '".$this->db->escape($this->morphy)."'"; + $sql .= ", ".$this->typeid; + $sql .= ", ".$conf->entity; + $sql .= ", ".(!empty($this->import_key) ? "'".$this->db->escape($this->import_key)."'" : "null"); $sql .= ")"; - dol_syslog(get_class($this) . "::create", LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { - $id = $this->db->last_insert_id(MAIN_DB_PREFIX . "adherent"); + $id = $this->db->last_insert_id(MAIN_DB_PREFIX."adherent"); if ($id > 0) { $this->id = $id; $this->ref = (string) $id; @@ -511,10 +511,10 @@ class Adherent extends CommonObject // Add link to user if ($this->user_id) { // Add link to user - $sql = "UPDATE " . MAIN_DB_PREFIX . "user SET"; - $sql .= " fk_member = " . $this->id; - $sql .= " WHERE rowid = " . $this->user_id; - dol_syslog(get_class($this) . "::create", LOG_DEBUG); + $sql = "UPDATE ".MAIN_DB_PREFIX."user SET"; + $sql .= " fk_member = ".$this->id; + $sql .= " WHERE rowid = ".$this->user_id; + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); if (!$resql) { $this->error = 'Failed to update user to make link with member'; @@ -533,7 +533,7 @@ class Adherent extends CommonObject } if (count($this->errors)) { - dol_syslog(get_class($this) . "::create " . implode(',', $this->errors), LOG_ERR); + dol_syslog(get_class($this)."::create ".implode(',', $this->errors), LOG_ERR); $this->db->rollback(); return -3; } else { @@ -542,7 +542,7 @@ class Adherent extends CommonObject } } else { $this->error = 'Failed to get last insert id'; - dol_syslog(get_class($this) . "::create " . $this->error, LOG_ERR); + dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR); $this->db->rollback(); return -2; } @@ -572,7 +572,7 @@ class Adherent extends CommonObject $nbrowsaffected = 0; $error = 0; - dol_syslog(get_class($this) . "::update notrigger=" . $notrigger . ", nosyncuser=" . $nosyncuser . ", nosyncuserpass=" . $nosyncuserpass . " nosyncthirdparty=" . $nosyncthirdparty . ", email=" . + dol_syslog(get_class($this)."::update notrigger=".$notrigger.", nosyncuser=".$nosyncuser.", nosyncuserpass=".$nosyncuserpass." nosyncthirdparty=".$nosyncthirdparty.", email=". $this->email); // Clean parameters @@ -598,43 +598,43 @@ class Adherent extends CommonObject $this->db->begin(); - $sql = "UPDATE " . MAIN_DB_PREFIX . "adherent SET"; - $sql .= " civility = " . ($this->civility_id ? "'" . $this->db->escape($this->civility_id) . "'" : "null"); - $sql .= ", firstname = " . ($this->firstname ? "'" . $this->db->escape($this->firstname) . "'" : "null"); - $sql .= ", lastname = " . ($this->lastname ? "'" . $this->db->escape($this->lastname) . "'" : "null"); - $sql .= ", gender = " . ($this->gender != -1 ? "'" . $this->db->escape($this->gender) . "'" : "null"); // 'man' or 'woman' - $sql .= ", login = " . ($this->login ? "'" . $this->db->escape($this->login) . "'" : "null"); - $sql .= ", societe = " . ($this->company ? "'" . $this->db->escape($this->company) . "'" : ($this->societe ? "'" . $this->db->escape($this->societe) . "'" : "null")); - $sql .= ", fk_soc = " . ($this->socid > 0 ? $this->db->escape($this->socid) : "null"); - $sql .= ", address = " . ($this->address ? "'" . $this->db->escape($this->address) . "'" : "null"); - $sql .= ", zip = " . ($this->zip ? "'" . $this->db->escape($this->zip) . "'" : "null"); - $sql .= ", town = " . ($this->town ? "'" . $this->db->escape($this->town) . "'" : "null"); - $sql .= ", country = " . ($this->country_id > 0 ? $this->db->escape($this->country_id) : "null"); - $sql .= ", state_id = " . ($this->state_id > 0 ? $this->db->escape($this->state_id) : "null"); - $sql .= ", email = '" . $this->db->escape($this->email) . "'"; - $sql .= ", socialnetworks = '" . $this->db->escape(json_encode($this->socialnetworks)) . "'"; - $sql .= ", phone = " . ($this->phone ? "'" . $this->db->escape($this->phone) . "'" : "null"); - $sql .= ", phone_perso = " . ($this->phone_perso ? "'" . $this->db->escape($this->phone_perso) . "'" : "null"); - $sql .= ", phone_mobile = " . ($this->phone_mobile ? "'" . $this->db->escape($this->phone_mobile) . "'" : "null"); - $sql .= ", note_private = " . ($this->note_private ? "'" . $this->db->escape($this->note_private) . "'" : "null"); - $sql .= ", note_public = " . ($this->note_public ? "'" . $this->db->escape($this->note_public) . "'" : "null"); - $sql .= ", photo = " . ($this->photo ? "'" . $this->db->escape($this->photo) . "'" : "null"); - $sql .= ", public = '" . $this->db->escape($this->public) . "'"; - $sql .= ", statut = " . $this->db->escape($this->statut); - $sql .= ", fk_adherent_type = " . $this->db->escape($this->typeid); - $sql .= ", morphy = '" . $this->db->escape($this->morphy) . "'"; - $sql .= ", birth = " . ($this->birth ? "'" . $this->db->idate($this->birth) . "'" : "null"); - if ($this->socid) $sql .= ", fk_soc = '" . $this->db->escape($this->socid) . "'"; // Must be modified only when creating from a third-party - if ($this->datefin) $sql .= ", datefin = '" . $this->db->idate($this->datefin) . "'"; // Must be modified only when deleting a subscription - if ($this->datevalid) $sql .= ", datevalid = '" . $this->db->idate($this->datevalid) . "'"; // Must be modified only when validating a member - $sql .= ", fk_user_mod = " . ($user->id > 0 ? $user->id : 'null'); // Can be null because member can be create by a guest - $sql .= " WHERE rowid = " . $this->id; + $sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET"; + $sql .= " civility = ".($this->civility_id ? "'".$this->db->escape($this->civility_id)."'" : "null"); + $sql .= ", firstname = ".($this->firstname ? "'".$this->db->escape($this->firstname)."'" : "null"); + $sql .= ", lastname = ".($this->lastname ? "'".$this->db->escape($this->lastname)."'" : "null"); + $sql .= ", gender = ".($this->gender != -1 ? "'".$this->db->escape($this->gender)."'" : "null"); // 'man' or 'woman' + $sql .= ", login = ".($this->login ? "'".$this->db->escape($this->login)."'" : "null"); + $sql .= ", societe = ".($this->company ? "'".$this->db->escape($this->company)."'" : ($this->societe ? "'".$this->db->escape($this->societe)."'" : "null")); + $sql .= ", fk_soc = ".($this->socid > 0 ? $this->db->escape($this->socid) : "null"); + $sql .= ", address = ".($this->address ? "'".$this->db->escape($this->address)."'" : "null"); + $sql .= ", zip = ".($this->zip ? "'".$this->db->escape($this->zip)."'" : "null"); + $sql .= ", town = ".($this->town ? "'".$this->db->escape($this->town)."'" : "null"); + $sql .= ", country = ".($this->country_id > 0 ? $this->db->escape($this->country_id) : "null"); + $sql .= ", state_id = ".($this->state_id > 0 ? $this->db->escape($this->state_id) : "null"); + $sql .= ", email = '".$this->db->escape($this->email)."'"; + $sql .= ", socialnetworks = '".$this->db->escape(json_encode($this->socialnetworks))."'"; + $sql .= ", phone = ".($this->phone ? "'".$this->db->escape($this->phone)."'" : "null"); + $sql .= ", phone_perso = ".($this->phone_perso ? "'".$this->db->escape($this->phone_perso)."'" : "null"); + $sql .= ", phone_mobile = ".($this->phone_mobile ? "'".$this->db->escape($this->phone_mobile)."'" : "null"); + $sql .= ", note_private = ".($this->note_private ? "'".$this->db->escape($this->note_private)."'" : "null"); + $sql .= ", note_public = ".($this->note_public ? "'".$this->db->escape($this->note_public)."'" : "null"); + $sql .= ", photo = ".($this->photo ? "'".$this->db->escape($this->photo)."'" : "null"); + $sql .= ", public = '".$this->db->escape($this->public)."'"; + $sql .= ", statut = ".$this->db->escape($this->statut); + $sql .= ", fk_adherent_type = ".$this->db->escape($this->typeid); + $sql .= ", morphy = '".$this->db->escape($this->morphy)."'"; + $sql .= ", birth = ".($this->birth ? "'".$this->db->idate($this->birth)."'" : "null"); + if ($this->socid) $sql .= ", fk_soc = '".$this->db->escape($this->socid)."'"; // Must be modified only when creating from a third-party + if ($this->datefin) $sql .= ", datefin = '".$this->db->idate($this->datefin)."'"; // Must be modified only when deleting a subscription + if ($this->datevalid) $sql .= ", datevalid = '".$this->db->idate($this->datevalid)."'"; // Must be modified only when validating a member + $sql .= ", fk_user_mod = ".($user->id > 0 ? $user->id : 'null'); // Can be null because member can be create by a guest + $sql .= " WHERE rowid = ".$this->id; // If we change the type of membership, we set also label of new type if (!empty($this->oldcopy) && $this->typeid != $this->oldcopy->typeid) { $sql2 = "SELECT libelle as label"; - $sql2 .= " FROM " . MAIN_DB_PREFIX . "adherent_type"; - $sql2 .= " WHERE rowid = " . $this->typeid; + $sql2 .= " FROM ".MAIN_DB_PREFIX."adherent_type"; + $sql2 .= " WHERE rowid = ".$this->typeid; $resql2 = $this->db->query($sql2); if ($resql2) { while ($obj = $this->db->fetch_object($resql2)) { @@ -643,7 +643,7 @@ class Adherent extends CommonObject } } - dol_syslog(get_class($this) . "::update update member", LOG_DEBUG); + dol_syslog(get_class($this)."::update update member", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { unset($this->country_code); @@ -666,7 +666,7 @@ class Adherent extends CommonObject // Update password if (!$error && $this->pass) { - dol_syslog(get_class($this) . "::update update password"); + dol_syslog(get_class($this)."::update update password"); if ($this->pass != $this->pass_indatabase && $this->pass != $this->pass_indatabase_crypted) { $isencrypted = empty($conf->global->DATABASE_PWD_ENCRYPTED) ? 0 : 1; @@ -678,9 +678,9 @@ class Adherent extends CommonObject // Remove links to user and replace with new one if (!$error) { - dol_syslog(get_class($this) . "::update update link to user"); - $sql = "UPDATE " . MAIN_DB_PREFIX . "user SET fk_member = NULL WHERE fk_member = " . $this->id; - dol_syslog(get_class($this) . "::update", LOG_DEBUG); + dol_syslog(get_class($this)."::update update link to user"); + $sql = "UPDATE ".MAIN_DB_PREFIX."user SET fk_member = NULL WHERE fk_member = ".$this->id; + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (!$resql) { $this->error = $this->db->error(); @@ -689,8 +689,8 @@ class Adherent extends CommonObject } // If there is a user linked to this member if ($this->user_id > 0) { - $sql = "UPDATE " . MAIN_DB_PREFIX . "user SET fk_member = " . $this->id . " WHERE rowid = " . $this->user_id; - dol_syslog(get_class($this) . "::update", LOG_DEBUG); + $sql = "UPDATE ".MAIN_DB_PREFIX."user SET fk_member = ".$this->id." WHERE rowid = ".$this->user_id; + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (!$resql) { $this->error = $this->db->error(); @@ -704,9 +704,9 @@ class Adherent extends CommonObject { // Update information on linked user if it is an update if (!$error && $this->user_id > 0 && !$nosyncuser) { - require_once DOL_DOCUMENT_ROOT . '/user/class/user.class.php'; + require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; - dol_syslog(get_class($this) . "::update update linked user"); + dol_syslog(get_class($this)."::update update linked user"); $luser = new User($this->db); $result = $luser->fetch($this->user_id); @@ -743,7 +743,7 @@ class Adherent extends CommonObject $result = $luser->update($user, 0, 1, 1); // Use nosync to 1 to avoid cyclic updates if ($result < 0) { $this->error = $luser->error; - dol_syslog(get_class($this) . "::update " . $this->error, LOG_ERR); + dol_syslog(get_class($this)."::update ".$this->error, LOG_ERR); $error++; } } else { @@ -754,9 +754,9 @@ class Adherent extends CommonObject // Update information on linked thirdparty if it is an update if (!$error && $this->fk_soc > 0 && !$nosyncthirdparty) { - require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php'; + require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; - dol_syslog(get_class($this) . "::update update linked thirdparty"); + dol_syslog(get_class($this)."::update update linked thirdparty"); // This member is linked with a thirdparty, so we also update thirdparty informations // if this is an update. @@ -779,7 +779,7 @@ class Adherent extends CommonObject if ($result < 0) { $this->error = $lthirdparty->error; $this->errors = $lthirdparty->errors; - dol_syslog(get_class($this) . "::update " . $this->error, LOG_ERR); + dol_syslog(get_class($this)."::update ".$this->error, LOG_ERR); $error++; } } elseif ($result < 0) { @@ -828,11 +828,11 @@ class Adherent extends CommonObject // Search for last subscription id and end date $sql = "SELECT rowid, datec as dateop, dateadh as datedeb, datef as datefin"; - $sql .= " FROM " . MAIN_DB_PREFIX . "subscription"; - $sql .= " WHERE fk_adherent=" . $this->id; + $sql .= " FROM ".MAIN_DB_PREFIX."subscription"; + $sql .= " WHERE fk_adherent=".$this->id; $sql .= " ORDER by dateadh DESC"; // Sort by start subscription date - dol_syslog(get_class($this) . "::update_end_date", LOG_DEBUG); + dol_syslog(get_class($this)."::update_end_date", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { $obj = $this->db->fetch_object($resql); @@ -840,11 +840,11 @@ class Adherent extends CommonObject $datedeb = $this->db->jdate($obj->datedeb); $datefin = $this->db->jdate($obj->datefin); - $sql = "UPDATE " . MAIN_DB_PREFIX . "adherent SET"; - $sql .= " datefin=" . ($datefin != '' ? "'" . $this->db->idate($datefin) . "'" : "null"); - $sql .= " WHERE rowid = " . $this->id; + $sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET"; + $sql .= " datefin=".($datefin != '' ? "'".$this->db->idate($datefin)."'" : "null"); + $sql .= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this) . "::update_end_date", LOG_DEBUG); + dol_syslog(get_class($this)."::update_end_date", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { $this->last_subscription_date = $dateop; @@ -893,8 +893,8 @@ class Adherent extends CommonObject } // Remove category - $sql = "DELETE FROM " . MAIN_DB_PREFIX . "categorie_member WHERE fk_member = " . $rowid; - dol_syslog(get_class($this) . "::delete", LOG_DEBUG); + $sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_member WHERE fk_member = ".$rowid; + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); if (!$resql) { $error++; @@ -904,8 +904,8 @@ class Adherent extends CommonObject // Remove subscription if (!$error) { - $sql = "DELETE FROM " . MAIN_DB_PREFIX . "subscription WHERE fk_adherent = " . $rowid; - dol_syslog(get_class($this) . "::delete", LOG_DEBUG); + $sql = "DELETE FROM ".MAIN_DB_PREFIX."subscription WHERE fk_adherent = ".$rowid; + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); if (!$resql) { $error++; @@ -932,15 +932,15 @@ class Adherent extends CommonObject if ($result < 0) { $error++; $errorflag = -4; - dol_syslog(get_class($this) . "::delete erreur " . $errorflag . " " . $this->error, LOG_ERR); + dol_syslog(get_class($this)."::delete erreur ".$errorflag." ".$this->error, LOG_ERR); } } } // Remove adherent if (!$error) { - $sql = "DELETE FROM " . MAIN_DB_PREFIX . "adherent WHERE rowid = " . $rowid; - dol_syslog(get_class($this) . "::delete", LOG_DEBUG); + $sql = "DELETE FROM ".MAIN_DB_PREFIX."adherent WHERE rowid = ".$rowid; + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); if (!$resql) { $error++; @@ -975,11 +975,11 @@ class Adherent extends CommonObject $error = 0; - dol_syslog(get_class($this) . "::setPassword user=" . $user->id . " password=" . preg_replace('/./i', '*', $password) . " isencrypted=" . $isencrypted); + dol_syslog(get_class($this)."::setPassword user=".$user->id." password=".preg_replace('/./i', '*', $password)." isencrypted=".$isencrypted); // If new password not provided, we generate one if (!$password) { - require_once DOL_DOCUMENT_ROOT . '/core/lib/security2.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; $password = getRandomPassword(false); } @@ -994,18 +994,18 @@ class Adherent extends CommonObject $this->db->begin(); // Mise a jour - $sql = "UPDATE " . MAIN_DB_PREFIX . "adherent"; - $sql .= " SET pass_crypted = '" . $this->db->escape($password_crypted) . "'"; + $sql = "UPDATE ".MAIN_DB_PREFIX."adherent"; + $sql .= " SET pass_crypted = '".$this->db->escape($password_crypted)."'"; //if (! empty($conf->global->DATABASE_PWD_ENCRYPTED)) if ($isencrypted) { $sql .= ", pass = null"; } else { - $sql .= ", pass = '" . $this->db->escape($password_indatabase) . "'"; + $sql .= ", pass = '".$this->db->escape($password_indatabase)."'"; } - $sql .= " WHERE rowid = " . $this->id; + $sql .= " WHERE rowid = ".$this->id; //dol_syslog("Adherent::Password sql=hidden"); - dol_syslog(get_class($this) . "::setPassword", LOG_DEBUG); + dol_syslog(get_class($this)."::setPassword", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { $nbaffectedrows = $this->db->affected_rows($result); @@ -1016,7 +1016,7 @@ class Adherent extends CommonObject $this->pass_indatabase_crypted = $password_crypted; if ($this->user_id && !$nosyncuser) { - require_once DOL_DOCUMENT_ROOT . '/user/class/user.class.php'; + require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; // This member is linked with a user, so we also update users informations // if this is an update. @@ -1027,7 +1027,7 @@ class Adherent extends CommonObject $result = $luser->setPassword($user, $this->pass, 0, 0, 1); if ($result < 0) { $this->error = $luser->error; - dol_syslog(get_class($this) . "::setPassword " . $this->error, LOG_ERR); + dol_syslog(get_class($this)."::setPassword ".$this->error, LOG_ERR); $error++; } } else { @@ -1074,8 +1074,8 @@ class Adherent extends CommonObject $this->db->begin(); // If user is linked to this member, remove old link to this member - $sql = "UPDATE " . MAIN_DB_PREFIX . "user SET fk_member = NULL WHERE fk_member = " . $this->id; - dol_syslog(get_class($this) . "::setUserId", LOG_DEBUG); + $sql = "UPDATE ".MAIN_DB_PREFIX."user SET fk_member = NULL WHERE fk_member = ".$this->id; + dol_syslog(get_class($this)."::setUserId", LOG_DEBUG); $resql = $this->db->query($sql); if (!$resql) { $this->error = $this->db->error(); @@ -1085,9 +1085,9 @@ class Adherent extends CommonObject // Set link to user if ($userid > 0) { - $sql = "UPDATE " . MAIN_DB_PREFIX . "user SET fk_member = " . $this->id; - $sql .= " WHERE rowid = " . $userid; - dol_syslog(get_class($this) . "::setUserId", LOG_DEBUG); + $sql = "UPDATE ".MAIN_DB_PREFIX."user SET fk_member = ".$this->id; + $sql .= " WHERE rowid = ".$userid; + dol_syslog(get_class($this)."::setUserId", LOG_DEBUG); $resql = $this->db->query($sql); if (!$resql) { $this->error = $this->db->error(); @@ -1116,18 +1116,18 @@ class Adherent extends CommonObject // Remove link to third party onto any other members if ($thirdpartyid > 0) { - $sql = "UPDATE " . MAIN_DB_PREFIX . "adherent SET fk_soc = null"; - $sql .= " WHERE fk_soc = '" . $thirdpartyid . "'"; - $sql .= " AND entity = " . $conf->entity; - dol_syslog(get_class($this) . "::setThirdPartyId", LOG_DEBUG); + $sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET fk_soc = null"; + $sql .= " WHERE fk_soc = '".$thirdpartyid."'"; + $sql .= " AND entity = ".$conf->entity; + dol_syslog(get_class($this)."::setThirdPartyId", LOG_DEBUG); $resql = $this->db->query($sql); } // Add link to third party for current member - $sql = "UPDATE " . MAIN_DB_PREFIX . "adherent SET fk_soc = " . ($thirdpartyid > 0 ? $thirdpartyid : 'null'); - $sql .= " WHERE rowid = " . $this->id; + $sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET fk_soc = ".($thirdpartyid > 0 ? $thirdpartyid : 'null'); + $sql .= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this) . "::setThirdPartyId", LOG_DEBUG); + dol_syslog(get_class($this)."::setThirdPartyId", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { $this->db->commit(); @@ -1152,9 +1152,9 @@ class Adherent extends CommonObject // phpcs:enable global $conf; - $sql = "SELECT rowid FROM " . MAIN_DB_PREFIX . "adherent"; - $sql .= " WHERE login='" . $this->db->escape($login) . "'"; - $sql .= " AND entity = " . $conf->entity; + $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."adherent"; + $sql .= " WHERE login='".$this->db->escape($login)."'"; + $sql .= " AND entity = ".$conf->entity; $resql = $this->db->query($sql); if ($resql) { @@ -1180,10 +1180,10 @@ class Adherent extends CommonObject // phpcs:enable global $conf; - $sql = "SELECT rowid FROM " . MAIN_DB_PREFIX . "adherent"; - $sql .= " WHERE firstname='" . $this->db->escape($firstname) . "'"; - $sql .= " AND lastname='" . $this->db->escape($lastname) . "'"; - $sql .= " AND entity = " . $conf->entity; + $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."adherent"; + $sql .= " WHERE firstname='".$this->db->escape($firstname)."'"; + $sql .= " AND lastname='".$this->db->escape($lastname)."'"; + $sql .= " AND entity = ".$conf->entity; $resql = $this->db->query($sql); if ($resql) { @@ -1227,24 +1227,24 @@ class Adherent extends CommonObject $sql .= " dep.nom as state, dep.code_departement as state_code,"; $sql .= " t.libelle as type, t.subscription as subscription,"; $sql .= " u.rowid as user_id, u.login as user_login"; - $sql .= " FROM " . MAIN_DB_PREFIX . "adherent_type as t, " . MAIN_DB_PREFIX . "adherent as d"; - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_country as c ON d.country = c.rowid"; - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_departements as dep ON d.state_id = dep.rowid"; - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "user as u ON d.rowid = u.fk_member"; + $sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as t, ".MAIN_DB_PREFIX."adherent as d"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON d.country = c.rowid"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as dep ON d.state_id = dep.rowid"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON d.rowid = u.fk_member"; $sql .= " WHERE d.fk_adherent_type = t.rowid"; if ($rowid) - $sql .= " AND d.rowid=" . $rowid; + $sql .= " AND d.rowid=".$rowid; elseif ($ref || $fk_soc) { - $sql .= " AND d.entity IN (" . getEntity('adherent') . ")"; + $sql .= " AND d.entity IN (".getEntity('adherent').")"; if ($ref) - $sql .= " AND d.rowid='" . $this->db->escape($ref) . "'"; + $sql .= " AND d.rowid='".$this->db->escape($ref)."'"; elseif ($fk_soc > 0) - $sql .= " AND d.fk_soc=" . $fk_soc; + $sql .= " AND d.fk_soc=".$fk_soc; } elseif ($ref_ext) { - $sql .= " AND d.ref_ext='" . $this->db->escape($ref_ext) . "'"; + $sql .= " AND d.ref_ext='".$this->db->escape($ref_ext)."'"; } - dol_syslog(get_class($this) . "::fetch", LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { if ($this->db->num_rows($resql)) { @@ -1257,7 +1257,7 @@ class Adherent extends CommonObject $this->civility_id = $obj->civility_code; // Bad. Kept for backard compatibility $this->civility_code = $obj->civility_code; - $this->civility = $obj->civility_code ? ($langs->trans("Civility" . $obj->civility_code) != ("Civility" . $obj->civility_code) ? $langs->trans("Civility" . $obj->civility_code) : $obj->civility_code) : ''; + $this->civility = $obj->civility_code ? ($langs->trans("Civility".$obj->civility_code) != ("Civility".$obj->civility_code) ? $langs->trans("Civility".$obj->civility_code) : $obj->civility_code) : ''; $this->firstname = $obj->firstname; $this->lastname = $obj->lastname; @@ -1281,8 +1281,8 @@ class Adherent extends CommonObject $this->country_id = $obj->country_id; $this->country_code = $obj->country_code; - if ($langs->trans("Country" . $obj->country_code) != "Country" . $obj->country_code) - $this->country = $langs->transnoentitiesnoconv("Country" . $obj->country_code); + if ($langs->trans("Country".$obj->country_code) != "Country".$obj->country_code) + $this->country = $langs->transnoentitiesnoconv("Country".$obj->country_code); else $this->country = $obj->country; @@ -1354,17 +1354,17 @@ class Adherent extends CommonObject // phpcs:enable global $langs; - require_once DOL_DOCUMENT_ROOT . '/adherents/class/subscription.class.php'; + require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; $sql = "SELECT c.rowid, c.fk_adherent, c.fk_type, c.subscription, c.note, c.fk_bank,"; $sql .= " c.tms as datem,"; $sql .= " c.datec as datec,"; $sql .= " c.dateadh as dateh,"; $sql .= " c.datef as datef"; - $sql .= " FROM " . MAIN_DB_PREFIX . "subscription as c"; - $sql .= " WHERE c.fk_adherent = " . $this->id; + $sql .= " FROM ".MAIN_DB_PREFIX."subscription as c"; + $sql .= " WHERE c.fk_adherent = ".$this->id; $sql .= " ORDER BY c.dateadh"; - dol_syslog(get_class($this) . "::fetch_subscriptions", LOG_DEBUG); + dol_syslog(get_class($this)."::fetch_subscriptions", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1401,7 +1401,7 @@ class Adherent extends CommonObject } return 1; } else { - $this->error = $this->db->error() . ' sql=' . $sql; + $this->error = $this->db->error().' sql='.$sql; return -1; } } @@ -1425,7 +1425,7 @@ class Adherent extends CommonObject { global $conf, $langs, $user; - require_once DOL_DOCUMENT_ROOT . '/adherents/class/subscription.class.php'; + require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; $error = 0; @@ -1505,12 +1505,12 @@ class Adherent extends CommonObject $this->invoice = null; // This will contains invoice if an invoice is created - dol_syslog("subscriptionComplementaryActions subscriptionid=" . $subscriptionid . " option=" . $option . " accountid=" . $accountid . " datesubscription=" . $datesubscription . " paymentdate=" . - $paymentdate . " label=" . $label . " amount=" . $amount . " num_chq=" . $num_chq . " autocreatethirdparty=" . $autocreatethirdparty); + dol_syslog("subscriptionComplementaryActions subscriptionid=".$subscriptionid." option=".$option." accountid=".$accountid." datesubscription=".$datesubscription." paymentdate=". + $paymentdate." label=".$label." amount=".$amount." num_chq=".$num_chq." autocreatethirdparty=".$autocreatethirdparty); // Insert into bank account directlty (if option choosed for) + link to llx_subscription if option is 'bankdirect' if ($option == 'bankdirect' && $accountid) { - require_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php'; + require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $acct = new Account($this->db); $result = $acct->fetch($accountid); @@ -1519,11 +1519,11 @@ class Adherent extends CommonObject $insertid = $acct->addline($dateop, $operation, $label, $amount, $num_chq, '', $user, $emetteur_nom, $emetteur_banque); if ($insertid > 0) { - $inserturlid = $acct->add_url_line($insertid, $this->id, DOL_URL_ROOT . '/adherents/card.php?rowid=', $this->getFullname($langs), 'member'); + $inserturlid = $acct->add_url_line($insertid, $this->id, DOL_URL_ROOT.'/adherents/card.php?rowid=', $this->getFullname($langs), 'member'); if ($inserturlid > 0) { // Update table subscription - $sql = "UPDATE " . MAIN_DB_PREFIX . "subscription SET fk_bank=" . $insertid; - $sql .= " WHERE rowid=" . $subscriptionid; + $sql = "UPDATE ".MAIN_DB_PREFIX."subscription SET fk_bank=".$insertid; + $sql .= " WHERE rowid=".$subscriptionid; dol_syslog("subscription::subscription", LOG_DEBUG); $resql = $this->db->query($sql); @@ -1546,8 +1546,8 @@ class Adherent extends CommonObject // If option choosed, we create invoice if (($option == 'bankviainvoice' && $accountid) || $option == 'invoiceonly') { - require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; - require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/paymentterm.class.php'; + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/paymentterm.class.php'; $invoice = new Facture($this->db); $customer = new Societe($this->db); @@ -1659,9 +1659,9 @@ class Adherent extends CommonObject // Add payment onto invoice if (!$error && $option == 'bankviainvoice' && $accountid) { - require_once DOL_DOCUMENT_ROOT . '/compta/paiement/class/paiement.class.php'; - require_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php'; - require_once DOL_DOCUMENT_ROOT . '/core/lib/functions.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; + require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; + require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; $amounts = array(); $amounts[$invoice->id] = price2num($amount); @@ -1695,8 +1695,8 @@ class Adherent extends CommonObject if (!$error && !empty($bank_line_id)) { // Update fk_bank into subscription table - $sql = 'UPDATE ' . MAIN_DB_PREFIX . 'subscription SET fk_bank=' . $bank_line_id; - $sql .= ' WHERE rowid=' . $subscriptionid; + $sql = 'UPDATE '.MAIN_DB_PREFIX.'subscription SET fk_bank='.$bank_line_id; + $sql .= ' WHERE rowid='.$subscriptionid; $result = $this->db->query($sql); if (!$result) { @@ -1751,19 +1751,19 @@ class Adherent extends CommonObject // Check parameters if ($this->statut == 1) { - dol_syslog(get_class($this) . "::validate statut of member does not allow this", LOG_WARNING); + dol_syslog(get_class($this)."::validate statut of member does not allow this", LOG_WARNING); return 0; } $this->db->begin(); - $sql = "UPDATE " . MAIN_DB_PREFIX . "adherent SET"; + $sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET"; $sql .= " statut = 1"; - $sql .= ", datevalid = '" . $this->db->idate($now) . "'"; - $sql .= ", fk_user_valid=" . $user->id; - $sql .= " WHERE rowid = " . $this->id; + $sql .= ", datevalid = '".$this->db->idate($now)."'"; + $sql .= ", fk_user_valid=".$user->id; + $sql .= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this) . "::validate", LOG_DEBUG); + dol_syslog(get_class($this)."::validate", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { $this->statut = 1; @@ -1803,16 +1803,16 @@ class Adherent extends CommonObject // Check parameters if ($this->statut == 0) { - dol_syslog(get_class($this) . "::resiliate statut of member does not allow this", LOG_WARNING); + dol_syslog(get_class($this)."::resiliate statut of member does not allow this", LOG_WARNING); return 0; } $this->db->begin(); - $sql = "UPDATE " . MAIN_DB_PREFIX . "adherent SET"; + $sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET"; $sql .= " statut = 0"; - $sql .= ", fk_user_valid=" . $user->id; - $sql .= " WHERE rowid = " . $this->id; + $sql .= ", fk_user_valid=".$user->id; + $sql .= " WHERE rowid = ".$this->id; $result = $this->db->query($sql); if ($result) { @@ -1848,7 +1848,7 @@ class Adherent extends CommonObject // phpcs:enable global $conf, $langs; - include_once DOL_DOCUMENT_ROOT . '/mailmanspip/class/mailmanspip.class.php'; + include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php'; $mailmanspip = new MailmanSpip($this->db); $err = 0; @@ -1898,7 +1898,7 @@ class Adherent extends CommonObject // phpcs:enable global $conf, $langs; - include_once DOL_DOCUMENT_ROOT . '/mailmanspip/class/mailmanspip.class.php'; + include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php'; $mailmanspip = new MailmanSpip($this->db); $err = 0; @@ -1949,7 +1949,7 @@ class Adherent extends CommonObject $code = (empty($this->civility_id) ? '' : $this->civility_id); if (empty($code)) return ''; - return $langs->getLabelFromKey($this->db, "Civility" . $code, "c_civility", "code", "label", $code); + return $langs->getLabelFromKey($this->db, "Civility".$code, "c_civility", "code", "label", $code); } /** @@ -1982,15 +1982,15 @@ class Adherent extends CommonObject } $label .= '
'; - $label .= '' . $langs->trans("Member") . ''; - if (!empty($this->ref)) $label .= '
' . $langs->trans('Ref') . ': ' . $this->ref; - if (!empty($this->firstname) || !empty($this->lastname)) $label .= '
' . $langs->trans('Name') . ': ' . $this->getFullName($langs); - if (!empty($this->company)) $label .= '
' . $langs->trans('Company') . ': ' . $this->company; + $label .= ''.$langs->trans("Member").''; + if (!empty($this->ref)) $label .= '
'.$langs->trans('Ref').': '.$this->ref; + if (!empty($this->firstname) || !empty($this->lastname)) $label .= '
'.$langs->trans('Name').': '.$this->getFullName($langs); + if (!empty($this->company)) $label .= '
'.$langs->trans('Company').': '.$this->company; $label .= '
'; - $url = DOL_URL_ROOT . '/adherents/card.php?rowid=' . $this->id; + $url = DOL_URL_ROOT.'/adherents/card.php?rowid='.$this->id; if ($option == 'subscription') { - $url = DOL_URL_ROOT . '/adherents/subscription.php?rowid=' . $this->id; + $url = DOL_URL_ROOT.'/adherents/subscription.php?rowid='.$this->id; } if ($option != 'nolink') { @@ -2000,19 +2000,19 @@ class Adherent extends CommonObject if ($add_save_lastsearch_values) $url .= '&save_lastsearch_values=1'; } - $linkstart .= 'global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $langs->load("users"); $label = $langs->trans("ShowUser"); - $linkclose .= ' alt="' . dol_escape_htmltag($label, 1) . '"'; + $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } - $linkclose .= ' title="' . dol_escape_htmltag($label, 1) . '"'; - $linkclose .= ' class="classfortooltip' . ($morecss ? ' ' . $morecss : '') . '"'; + $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; } - $linkstart .= $linkclose . '>'; + $linkstart .= $linkclose.'>'; $linkend = ''; $result .= $linkstart; @@ -2022,19 +2022,19 @@ class Adherent extends CommonObject if (abs($withpictoimg) == 1) $paddafterimage = 'style="margin-right: 3px;"'; // Only picto if ($withpictoimg > 0) - $picto = '' . - img_object('', 'user', $paddafterimage . ' ' . ($notooltip ? '' : 'class="classfortooltip"'), 0, 0, $notooltip ? 0 : 1) . ''; + $picto = ''. + img_object('', 'user', $paddafterimage.' '.($notooltip ? '' : 'class="classfortooltip"'), 0, 0, $notooltip ? 0 : 1).''; // Picto must be a photo else { - $picto = ''; - $picto .= Form::showphoto('memberphoto', $this, 0, 0, 0, 'userphoto' . ($withpictoimg == -3 ? 'small' : ''), 'mini', 0, 1); + $picto = ''; + $picto .= Form::showphoto('memberphoto', $this, 0, 0, 0, 'userphoto'.($withpictoimg == -3 ? 'small' : ''), 'mini', 0, 1); $picto .= ''; } $result .= $picto; } if ($withpictoimg > -2 && $withpictoimg != 2) { - if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result .= ''; + if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result .= ''; if ($mode == 'login') $result .= dol_trunc($this->login, $maxlen); elseif ($mode == 'ref') @@ -2126,9 +2126,9 @@ class Adherent extends CommonObject $this->nb = array(); $sql = "SELECT count(a.rowid) as nb"; - $sql .= " FROM " . MAIN_DB_PREFIX . "adherent as a"; + $sql .= " FROM ".MAIN_DB_PREFIX."adherent as a"; $sql .= " WHERE a.statut > 0"; - $sql .= " AND a.entity IN (" . getEntity('adherent') . ")"; + $sql .= " AND a.entity IN (".getEntity('adherent').")"; $resql = $this->db->query($sql); if ($resql) { @@ -2162,16 +2162,16 @@ class Adherent extends CommonObject $now = dol_now(); $sql = "SELECT a.rowid, a.datefin, a.statut"; - $sql .= " FROM " . MAIN_DB_PREFIX . "adherent as a"; - $sql .= ", " . MAIN_DB_PREFIX . "adherent_type as t"; + $sql .= " FROM ".MAIN_DB_PREFIX."adherent as a"; + $sql .= ", ".MAIN_DB_PREFIX."adherent_type as t"; $sql .= " WHERE a.fk_adherent_type = t.rowid"; if ($mode == 'expired') { $sql .= " AND a.statut = 1"; - $sql .= " AND a.entity IN (" . getEntity('adherent') . ")"; - $sql .= " AND ((a.datefin IS NULL or a.datefin < '" . $this->db->idate($now) . "') AND t.subscription = 1)"; + $sql .= " AND a.entity IN (".getEntity('adherent').")"; + $sql .= " AND ((a.datefin IS NULL or a.datefin < '".$this->db->idate($now)."') AND t.subscription = 1)"; } elseif ($mode == 'shift') { $sql .= " AND a.statut = -1"; - $sql .= " AND a.entity IN (" . getEntity('adherent') . ")"; + $sql .= " AND a.entity IN (".getEntity('adherent').")"; } $resql = $this->db->query($sql); @@ -2187,10 +2187,10 @@ class Adherent extends CommonObject $warning_delay = $conf->adherent->subscription->warning_delay / 60 / 60 / 24; $label = $langs->trans("MembersWithSubscriptionToReceive"); $labelShort = $langs->trans("MembersWithSubscriptionToReceiveShort"); - $url = DOL_URL_ROOT . '/adherents/list.php?mainmenu=members&statut=1&filter=outofdate'; + $url = DOL_URL_ROOT.'/adherents/list.php?mainmenu=members&statut=1&filter=outofdate'; } elseif ($mode == 'shift') { $warning_delay = $conf->adherent->subscription->warning_delay / 60 / 60 / 24; - $url = DOL_URL_ROOT . '/adherents/list.php?mainmenu=members&statut=-1'; + $url = DOL_URL_ROOT.'/adherents/list.php?mainmenu=members&statut=-1'; $label = $langs->trans("MembersListToValid"); $labelShort = $langs->trans("ToValidate"); } @@ -2331,9 +2331,9 @@ class Adherent extends CommonObject // phpcs:enable global $conf; $dn = ''; - if ($mode == 0) $dn = $conf->global->LDAP_KEY_MEMBERS . "=" . $info[$conf->global->LDAP_KEY_MEMBERS] . "," . $conf->global->LDAP_MEMBER_DN; + if ($mode == 0) $dn = $conf->global->LDAP_KEY_MEMBERS."=".$info[$conf->global->LDAP_KEY_MEMBERS].",".$conf->global->LDAP_MEMBER_DN; if ($mode == 1) $dn = $conf->global->LDAP_MEMBER_DN; - if ($mode == 2) $dn = $conf->global->LDAP_KEY_MEMBERS . "=" . $info[$conf->global->LDAP_KEY_MEMBERS]; + if ($mode == 2) $dn = $conf->global->LDAP_KEY_MEMBERS."=".$info[$conf->global->LDAP_KEY_MEMBERS]; return $dn; } @@ -2413,7 +2413,7 @@ class Adherent extends CommonObject if ($this->pass_indatabase_crypted && !empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED)) { // Create OpenLDAP MD5 password from Dolibarr MD5 password // Note: This suppose that "pass_indatabase_crypted" is a md5 (guaranted by the previous test if "(empty($conf->global->MAIN_SECURITY_HASH_ALGO))" - $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED] = '{md5}' . base64_encode(hex2bin($this->pass_indatabase_crypted)); + $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED] = '{md5}'.base64_encode(hex2bin($this->pass_indatabase_crypted)); } } } // Use $this->pass_indatabase value if exists @@ -2445,10 +2445,10 @@ class Adherent extends CommonObject $sql .= ' a.datevalid as datev,'; $sql .= ' a.tms as datem,'; $sql .= ' a.fk_user_author, a.fk_user_valid, a.fk_user_mod'; - $sql .= ' FROM ' . MAIN_DB_PREFIX . 'adherent as a'; - $sql .= ' WHERE a.rowid = ' . $id; + $sql .= ' FROM '.MAIN_DB_PREFIX.'adherent as a'; + $sql .= ' WHERE a.rowid = '.$id; - dol_syslog(get_class($this) . "::info", LOG_DEBUG); + dol_syslog(get_class($this)."::info", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { if ($this->db->num_rows($result)) { @@ -2491,8 +2491,8 @@ class Adherent extends CommonObject public function getNbOfEMailings() { $sql = "SELECT count(mc.email) as nb"; - $sql .= " FROM " . MAIN_DB_PREFIX . "mailing_cibles as mc"; - $sql .= " WHERE mc.email = '" . $this->db->escape($this->email) . "'"; + $sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc"; + $sql .= " WHERE mc.email = '".$this->db->escape($this->email)."'"; $sql .= " AND mc.statut NOT IN (-1,0)"; // -1 erreur, 0 non envoye, 1 envoye avec succes $resql = $this->db->query($sql); @@ -2526,7 +2526,7 @@ class Adherent extends CommonObject } // Get current categories - require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $c = new Categorie($this->db); $existing = $c->containing($this->id, Categorie::TYPE_MEMBER, 'id'); @@ -2627,7 +2627,7 @@ class Adherent extends CommonObject $arraydaysbeforeend = explode(';', $daysbeforeendlist); foreach ($arraydaysbeforeend as $daysbeforeend) // Loop on each delay { - dol_syslog(__METHOD__ . ' - Process delta = ' . $daysbeforeend, LOG_DEBUG); + dol_syslog(__METHOD__.' - Process delta = '.$daysbeforeend, LOG_DEBUG); if (!is_numeric($daysbeforeend)) { $blockingerrormsg = "Value for delta is not a positive or negative numeric"; @@ -2638,15 +2638,15 @@ class Adherent extends CommonObject $tmp = dol_getdate($now); $datetosearchfor = dol_time_plus_duree(dol_mktime(0, 0, 0, $tmp['mon'], $tmp['mday'], $tmp['year']), $daysbeforeend, 'd'); - $sql = 'SELECT rowid FROM ' . MAIN_DB_PREFIX . 'adherent'; - $sql .= " WHERE entity = " . $conf->entity; // Do not use getEntity('adherent').")" here, we want the batch to be on its entity only; - $sql .= " AND datefin = '" . $this->db->idate($datetosearchfor) . "'"; + $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'adherent'; + $sql .= " WHERE entity = ".$conf->entity; // Do not use getEntity('adherent').")" here, we want the batch to be on its entity only; + $sql .= " AND datefin = '".$this->db->idate($datetosearchfor)."'"; $resql = $this->db->query($sql); if ($resql) { $num_rows = $this->db->num_rows($resql); - include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php'; + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; $adherent = new Adherent($this->db); $formmail = new FormMail($this->db); @@ -2670,7 +2670,7 @@ class Adherent extends CommonObject $outputlangs = new Translate('', $conf); $outputlangs->setDefaultLang($languagecodeformember); $outputlangs->loadLangs(array("main", "members")); - dol_syslog("sendReminderForExpiredSubscription Language for member id " . $adherent->id . " set to " . $outputlangs->defaultlang . " mysoc->default_lang=" . $mysoc->default_lang); + dol_syslog("sendReminderForExpiredSubscription Language for member id ".$adherent->id." set to ".$outputlangs->defaultlang." mysoc->default_lang=".$mysoc->default_lang); $arraydefaultmessage = null; $labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION; @@ -2687,10 +2687,10 @@ class Adherent extends CommonObject $from = $conf->global->ADHERENT_MAIL_FROM; $to = $adherent->email; - $trackid = 'mem' . $adherent->id; - $moreinheader = 'X-Dolibarr-Info: sendReminderForExpiredSubscription' . "\r\n"; + $trackid = 'mem'.$adherent->id; + $moreinheader = 'X-Dolibarr-Info: sendReminderForExpiredSubscription'."\r\n"; - include_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php'; + include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; $cmail = new CMailFile($subject, $to, $from, $msg, array(), array(), array(), '', '', 0, 1, '', '', $trackid, $moreinheader); $result = $cmail->sendfile(); if (!$result) { @@ -2713,24 +2713,24 @@ class Adherent extends CommonObject $extraparams = ''; $actionmsg = ''; - $actionmsg2 = $langs->transnoentities('MailSentBy') . ' ' . CMailFile::getValidAddress($from, 4, 0, 1) . ' ' . $langs->transnoentities('To') . ' ' . + $actionmsg2 = $langs->transnoentities('MailSentBy').' '.CMailFile::getValidAddress($from, 4, 0, 1).' '.$langs->transnoentities('To').' '. CMailFile::getValidAddress($sendto, 4, 0, 1); if ($message) { - $actionmsg = $langs->transnoentities('MailFrom') . ': ' . dol_escape_htmltag($from); - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTo') . ': ' . dol_escape_htmltag($sendto)); - if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . dol_escape_htmltag($sendtocc)); - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); + $actionmsg = $langs->transnoentities('MailFrom').': '.dol_escape_htmltag($from); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTo').': '.dol_escape_htmltag($sendto)); + if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc').": ".dol_escape_htmltag($sendtocc)); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic').": ".$subject); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody').":"); $actionmsg = dol_concatdesc($actionmsg, $message); } - require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php'; + require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; // Insert record of emails sent $actioncomm = new ActionComm($this->db); $actioncomm->type_code = 'AC_OTH_AUTO'; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...) - $actioncomm->code = 'AC_' . $actioncode; + $actioncomm->code = 'AC_'.$actioncode; $actioncomm->label = $actionmsg2; $actioncomm->note_private = $actionmsg; $actioncomm->fk_project = 0; @@ -2780,8 +2780,8 @@ class Adherent extends CommonObject $this->error = $blockingerrormsg; return 1; } else { - $this->output = 'Found ' . ($nbok + $nbko) . ' members to send reminder to.'; - $this->output .= ' Send email successfuly to ' . $nbok . ' members'; + $this->output = 'Found '.($nbok + $nbko).' members to send reminder to.'; + $this->output .= ' Send email successfuly to '.$nbok.' members'; if (is_array($listofmembersok)) { $listofids = ''; $i = 0; @@ -2801,7 +2801,7 @@ class Adherent extends CommonObject $this->output .= $listofids; } if ($nbko) { - $this->output .= ' - Canceled for ' . $nbko . ' member (no email or email sending error)'; + $this->output .= ' - Canceled for '.$nbko.' member (no email or email sending error)'; if (is_array($listofmembersko)) { $listofids = ''; $i = 0; diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 70ea29360c8..2f33b3ab49b 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -36,12 +36,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; // Load translation files required by the page $langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'projects', 'hrm', 'agenda')); -if (! $user->admin) accessforbidden(); +if (!$user->admin) accessforbidden(); $action = GETPOST('action', 'aZ09'); -$contextpage=GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'adminihm'; // To manage different context of search +$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'adminihm'; // To manage different context of search -if (! defined("MAIN_MOTD")) define("MAIN_MOTD", ""); +if (!defined("MAIN_MOTD")) define("MAIN_MOTD", ""); @@ -49,13 +49,13 @@ if (! defined("MAIN_MOTD")) define("MAIN_MOTD", ""); * Action */ -$parameters=array(); -$reshook=$hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +$parameters = array(); +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); if (GETPOST('cancel', 'alpha')) { - $action=''; + $action = ''; } // Convert action set_XXX and del_XXX to set var (this is used when no javascript on for ajax_constantonoff) @@ -65,15 +65,15 @@ if (preg_match('/^(set|del)_([A-Z_]+)$/', $action, $regs)) { else dolibarr_del_const($db, $regs[2], $conf->entity); } -if ($action == 'removebackgroundlogin' && ! empty($conf->global->MAIN_LOGIN_BACKGROUND)) +if ($action == 'removebackgroundlogin' && !empty($conf->global->MAIN_LOGIN_BACKGROUND)) { - dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV+1, 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity); require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - $logofile=$conf->mycompany->dir_output.'/logos/'.$conf->global->MAIN_LOGIN_BACKGROUND; + $logofile = $conf->mycompany->dir_output.'/logos/'.$conf->global->MAIN_LOGIN_BACKGROUND; dol_delete_file($logofile); dolibarr_del_const($db, "MAIN_LOGIN_BACKGROUND", $conf->entity); - $mysoc->logo=''; + $mysoc->logo = ''; /*$logosmallfile=$conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small; dol_delete_file($logosmallfile); @@ -89,7 +89,7 @@ if ($action == 'removebackgroundlogin' && ! empty($conf->global->MAIN_LOGIN_BACK if ($action == 'update') { dolibarr_set_const($db, "MAIN_LANG_DEFAULT", GETPOST("MAIN_LANG_DEFAULT", 'aZ09'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV+1, 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity); //dolibarr_set_const($db, "MAIN_MULTILANGS", $_POST["MAIN_MULTILANGS"], 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_THEME", GETPOST("main_theme", 'aZ09'), 'chaine', 0, '', $conf->entity); @@ -98,53 +98,53 @@ if ($action == 'update') if (! $val) dolibarr_del_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', $conf->entity); else dolibarr_set_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', GETPOST('THEME_TOPMENU_DISABLE_IMAGE'), 'chaine', 0, '', $conf->entity);*/ - $val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_BACKBODY'), array())))); + $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_BACKBODY'), array())))); if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_BACKBODY', $conf->entity); else dolibarr_set_const($db, 'THEME_ELDY_BACKBODY', $val, 'chaine', 0, '', $conf->entity); - $val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TOPMENU_BACK1'), array())))); + $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TOPMENU_BACK1'), array())))); if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TOPMENU_BACK1', $conf->entity); else dolibarr_set_const($db, 'THEME_ELDY_TOPMENU_BACK1', $val, 'chaine', 0, '', $conf->entity); - $val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_VERMENU_BACK1'), array())))); + $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_VERMENU_BACK1'), array())))); if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_VERMENU_BACK1', $conf->entity); else dolibarr_set_const($db, 'THEME_ELDY_VERMENU_BACK1', $val, 'chaine', 0, '', $conf->entity); - $val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLENOTAB'), array())))); + $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLENOTAB'), array())))); if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLENOTAB', $conf->entity); else dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLENOTAB', $val, 'chaine', 0, '', $conf->entity); - $val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_BACKTITLE1'), array())))); + $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_BACKTITLE1'), array())))); if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_BACKTITLE1', $conf->entity); else dolibarr_set_const($db, 'THEME_ELDY_BACKTITLE1', $val, 'chaine', 0, '', $conf->entity); - $val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLE'), array())))); + $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLE'), array())))); if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLE', $conf->entity); else dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLE', $val, 'chaine', 0, '', $conf->entity); - $val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEIMPAIR1'), array())))); + $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEIMPAIR1'), array())))); if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_LINEIMPAIR1', $conf->entity); else dolibarr_set_const($db, 'THEME_ELDY_LINEIMPAIR1', $val, 'chaine', 0, '', $conf->entity); - $val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEIMPAIR1'), array())))); + $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEIMPAIR1'), array())))); if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_LINEIMPAIR2', $conf->entity); else dolibarr_set_const($db, 'THEME_ELDY_LINEIMPAIR2', $val, 'chaine', 0, '', $conf->entity); - $val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEPAIR1'), array())))); + $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEPAIR1'), array())))); if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_LINEPAIR1', $conf->entity); else dolibarr_set_const($db, 'THEME_ELDY_LINEPAIR1', $val, 'chaine', 0, '', $conf->entity); - $val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEPAIR1'), array())))); + $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEPAIR1'), array())))); if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_LINEPAIR2', $conf->entity); else dolibarr_set_const($db, 'THEME_ELDY_LINEPAIR2', $val, 'chaine', 0, '', $conf->entity); - $val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTLINK'), array())))); + $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTLINK'), array())))); if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TEXTLINK', $conf->entity); else dolibarr_set_const($db, 'THEME_ELDY_TEXTLINK', $val, 'chaine', 0, '', $conf->entity); - $val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_USE_HOVER'), array())))); + $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_USE_HOVER'), array())))); if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_USE_HOVER', $conf->entity); else dolibarr_set_const($db, "THEME_ELDY_USE_HOVER", $val, 'chaine', 0, '', $conf->entity); - $val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_USE_CHECKED'), array())))); + $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_USE_CHECKED'), array())))); if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_USE_CHECKED', $conf->entity); else dolibarr_set_const($db, "THEME_ELDY_USE_CHECKED", $val, 'chaine', 0, '', $conf->entity); @@ -158,29 +158,29 @@ if ($action == 'update') dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_HOURS", GETPOST("MAIN_DEFAULT_WORKING_HOURS", 'int'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", GETPOST("MAIN_FIRSTNAME_NAME_POSITION", 'aZ09'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_HELPCENTER_DISABLELINK", GETPOST('MAIN_HELPCENTER_DISABLELINK', 'aZ09'), 'chaine', 0, '', 0); // Param for all entities + dolibarr_set_const($db, "MAIN_HELPCENTER_DISABLELINK", GETPOST('MAIN_HELPCENTER_DISABLELINK', 'aZ09'), 'chaine', 0, '', 0); // Param for all entities dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr(GETPOST("main_motd", 'none')), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_HOME", dol_htmlcleanlastbr(GETPOST("main_home", 'none')), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", GETPOST("MAIN_HELP_DISABLELINK", 'aZ09'), 'chaine', 0, '', 0); // Param for all entities + dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", GETPOST("MAIN_HELP_DISABLELINK", 'aZ09'), 'chaine', 0, '', 0); // Param for all entities dolibarr_set_const($db, "MAIN_BUGTRACK_ENABLELINK", GETPOST('MAIN_BUGTRACK_ENABLELINK', 'aZ09'), 'chaine', 0, '', $conf->entity); - $varforimage='imagebackground'; $dirforimage=$conf->mycompany->dir_output.'/logos/'; + $varforimage = 'imagebackground'; $dirforimage = $conf->mycompany->dir_output.'/logos/'; if ($_FILES[$varforimage]["tmp_name"]) { $reg = array(); if (preg_match('/([^\\/:]+)$/i', $_FILES[$varforimage]["name"], $reg)) { - $original_file=$reg[1]; + $original_file = $reg[1]; - $isimage=image_format_supported($original_file); + $isimage = image_format_supported($original_file); if ($isimage >= 0) { dol_syslog("Move file ".$_FILES[$varforimage]["tmp_name"]." to ".$dirforimage.$original_file); - if (! is_dir($dirforimage)) + if (!is_dir($dirforimage)) { dol_mkdir($dirforimage); } - $result=dol_move_uploaded_file($_FILES[$varforimage]["tmp_name"], $dirforimage.$original_file, 1, 0, $_FILES[$varforimage]['error']); + $result = dol_move_uploaded_file($_FILES[$varforimage]["tmp_name"], $dirforimage.$original_file, 1, 0, $_FILES[$varforimage]['error']); if ($result > 0) { dolibarr_set_const($db, "MAIN_LOGIN_BACKGROUND", $original_file, 'chaine', 0, '', $conf->entity); @@ -189,7 +189,7 @@ if ($action == 'update') { $error++; $langs->load("errors"); - $tmparray=explode(':', $result); + $tmparray = explode(':', $result); setEventMessages($langs->trans('ErrorFileIsInfectedWithAVirus', $tmparray[1]), null, 'errors'); } else @@ -209,7 +209,7 @@ if ($action == 'update') - $_SESSION["mainmenu"]=""; // Le gestionnaire de menu a pu changer + $_SESSION["mainmenu"] = ""; // Le gestionnaire de menu a pu changer header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); exit; @@ -220,12 +220,12 @@ if ($action == 'update') * View */ -$wikihelp='EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones'; +$wikihelp = 'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones'; llxHeader('', $langs->trans("Setup"), $wikihelp); -$form=new Form($db); -$formother=new FormOther($db); -$formadmin=new FormAdmin($db); +$form = new Form($db); +$formother = new FormOther($db); +$formadmin = new FormAdmin($db); print load_fiche_titre($langs->trans("GUISetup"), '', 'title_setup'); @@ -281,12 +281,12 @@ print ' '; print ''; // Max size of lists -print ''.$langs->trans("DefaultMaxSizeList").''; +print ''.$langs->trans("DefaultMaxSizeList").''; print ' '; print ''; // Max size of short lists on customer card -print ''.$langs->trans("DefaultMaxSizeShortList").''; +print ''.$langs->trans("DefaultMaxSizeShortList").''; print ' '; print ''; @@ -301,36 +301,36 @@ print ''; // First day for weeks print ''.$langs->trans("WeekStartOnDay").''; -print $formother->select_dayofweek((isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:'1'), 'MAIN_START_WEEK', 0); +print $formother->select_dayofweek((isset($conf->global->MAIN_START_WEEK) ? $conf->global->MAIN_START_WEEK : '1'), 'MAIN_START_WEEK', 0); print ''; print ' '; print ''; // DefaultWorkingDays print ''.$langs->trans("DefaultWorkingDays").''; -print ''; +print ''; print ''; print ' '; print ''; // DefaultWorkingHours print ''.$langs->trans("DefaultWorkingHours").''; -print ''; +print ''; print ''; print ' '; print ''; // Firstname/Name print ''.$langs->trans("FirstnameNamePosition").''; -$array=array(0=>$langs->trans("Firstname").' '.$langs->trans("Lastname"), 1=>$langs->trans("Lastname").' '.$langs->trans("Firstname")); -print $form->selectarray('MAIN_FIRSTNAME_NAME_POSITION', $array, (isset($conf->global->MAIN_FIRSTNAME_NAME_POSITION)?$conf->global->MAIN_FIRSTNAME_NAME_POSITION:0)); +$array = array(0=>$langs->trans("Firstname").' '.$langs->trans("Lastname"), 1=>$langs->trans("Lastname").' '.$langs->trans("Firstname")); +print $form->selectarray('MAIN_FIRSTNAME_NAME_POSITION', $array, (isset($conf->global->MAIN_FIRSTNAME_NAME_POSITION) ? $conf->global->MAIN_FIRSTNAME_NAME_POSITION : 0)); print ''; print ' '; print ''; // Hide unauthorized button print ''.$langs->trans("ButtonHideUnauthorized").''; -print $form->selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED', isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)?$conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED:0, 1); +print $form->selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED', isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED) ? $conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED : 0, 1); print ''; print ' '; print ''; @@ -353,28 +353,28 @@ print ' '; print ''; // Hide wiki link on login page -$pictohelp=''; +$pictohelp = ''; print ''.$langs->trans("DisableLinkToHelp", $pictohelp).''; -print $form->selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0, 1); +print $form->selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK) ? $conf->global->MAIN_HELP_DISABLELINK : 0, 1); print ''; print ' '; print ''; // Message of the day on home page -$substitutionarray=getCommonSubstitutionArray($langs, 0, array('object','objectamount')); +$substitutionarray = getCommonSubstitutionArray($langs, 0, array('object', 'objectamount')); complete_substitutions_array($substitutionarray, $langs); print ''; -$texthelp=$langs->trans("FollowingConstantsWillBeSubstituted").'
'; -foreach($substitutionarray as $key => $val) +$texthelp = $langs->trans("FollowingConstantsWillBeSubstituted").'
'; +foreach ($substitutionarray as $key => $val) { - $texthelp.=$key.'
'; + $texthelp .= $key.'
'; } print $form->textwithpicto($langs->trans("MessageOfDay"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessageofday'); print ''; -$doleditor = new DolEditor('main_motd', (isset($conf->global->MAIN_MOTD)?$conf->global->MAIN_MOTD:''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%'); +$doleditor = new DolEditor('main_motd', (isset($conf->global->MAIN_MOTD) ? $conf->global->MAIN_MOTD : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%'); $doleditor->Create(); print ''."\n"; @@ -391,23 +391,23 @@ print ' '; print ''; // Message on login page -$substitutionarray=getCommonSubstitutionArray($langs, 0, array('object','objectamount','user')); +$substitutionarray = getCommonSubstitutionArray($langs, 0, array('object', 'objectamount', 'user')); complete_substitutions_array($substitutionarray, $langs); print ''; -$texthelp=$langs->trans("FollowingConstantsWillBeSubstituted").'
'; -foreach($substitutionarray as $key => $val) +$texthelp = $langs->trans("FollowingConstantsWillBeSubstituted").'
'; +foreach ($substitutionarray as $key => $val) { - $texthelp.=$key.'
'; + $texthelp .= $key.'
'; } print $form->textwithpicto($langs->trans("MessageLogin"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessagelogin'); print ''; -$doleditor = new DolEditor('main_home', (isset($conf->global->MAIN_HOME)?$conf->global->MAIN_HOME:''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%'); +$doleditor = new DolEditor('main_home', (isset($conf->global->MAIN_HOME) ? $conf->global->MAIN_HOME : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%'); $doleditor->Create(); print ''."\n"; // Hide helpcenter link on login page print ''.$langs->trans("DisableLinkToHelpCenter").''; -print $form->selectyesno('MAIN_HELPCENTER_DISABLELINK', isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0, 1); +print $form->selectyesno('MAIN_HELPCENTER_DISABLELINK', isset($conf->global->MAIN_HELPCENTER_DISABLELINK) ? $conf->global->MAIN_HELPCENTER_DISABLELINK : 0, 1); print ''; print ' '; print ''; @@ -416,13 +416,13 @@ print ''; print ''; print '
'; $disabled = ''; -if (! empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) $disabled = ' disabled="disabled"'; +if (!empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) $disabled = ' disabled="disabled"'; print ''; if ($disabled) { print '('.$langs->trans("DisabledByOptionADD_UNSPLASH_LOGIN_BACKGROUND").') '; } -if (! empty($conf->global->MAIN_LOGIN_BACKGROUND)) { +if (!empty($conf->global->MAIN_LOGIN_BACKGROUND)) { print ''.img_delete($langs->trans("Delete")).''; if (file_exists($conf->mycompany->dir_output.'/logos/'.$conf->global->MAIN_LOGIN_BACKGROUND)) { print '   '; diff --git a/htdocs/comm/propal/class/api_proposals.class.php b/htdocs/comm/propal/class/api_proposals.class.php index 9326082b193..87c91d0f621 100644 --- a/htdocs/comm/propal/class/api_proposals.class.php +++ b/htdocs/comm/propal/class/api_proposals.class.php @@ -119,16 +119,16 @@ class Proposals extends DolibarrApi */ private function _fetch($id, $ref = '', $ref_ext = '', $contact_list = 1) { - if(! DolibarrApiAccess::$user->rights->propal->lire) { + if (!DolibarrApiAccess::$user->rights->propal->lire) { throw new RestException(401); } $result = $this->propal->fetch($id, $ref, $ref_ext); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Commercial Proposal not found'); } - if( ! DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { + if (!DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -162,18 +162,18 @@ class Proposals extends DolibarrApi // If the internal user must only see his customers, force searching by him $search_sale = 0; - if (! DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) $search_sale = DolibarrApiAccess::$user->id; + if (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) $search_sale = DolibarrApiAccess::$user->id; $sql = "SELECT t.rowid"; if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects) - $sql.= " FROM ".MAIN_DB_PREFIX."propal as t"; + $sql .= " FROM ".MAIN_DB_PREFIX."propal as t"; - if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale + if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale - $sql.= ' WHERE t.entity IN ('.getEntity('propal').')'; - if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql.= " AND t.fk_soc = sc.fk_soc"; - if ($socids) $sql.= " AND t.fk_soc IN (".$socids.")"; - if ($search_sale > 0) $sql.= " AND t.rowid = sc.fk_soc"; // Join for the needed table to filter by sale + $sql .= ' WHERE t.entity IN ('.getEntity('propal').')'; + if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= " AND t.fk_soc = sc.fk_soc"; + if ($socids) $sql .= " AND t.fk_soc IN (".$socids.")"; + if ($search_sale > 0) $sql .= " AND t.rowid = sc.fk_soc"; // Join for the needed table to filter by sale // Insert sale filter if ($search_sale > 0) { @@ -182,23 +182,23 @@ class Proposals extends DolibarrApi // Add sql filters if ($sqlfilters) { - if (! DolibarrApi::_checkFilters($sqlfilters)) + if (!DolibarrApi::_checkFilters($sqlfilters)) { throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); } - $regexstring='\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql.=" AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; } - $sql.= $db->order($sortfield, $sortorder); - if ($limit) { + $sql .= $db->order($sortfield, $sortorder); + if ($limit) { if ($page < 0) { $page = 0; } $offset = $limit * $page; - $sql.= $db->plimit($limit + 1, $offset); + $sql .= $db->plimit($limit + 1, $offset); } dol_syslog("API Rest request"); @@ -213,7 +213,7 @@ class Proposals extends DolibarrApi { $obj = $db->fetch_object($result); $proposal_static = new Propal($db); - if($proposal_static->fetch($obj->rowid)) { + if ($proposal_static->fetch($obj->rowid)) { // Add external contacts ids $proposal_static->contacts_ids = $proposal_static->liste_contact(-1, 'external', 1); $obj_ret[] = $this->_cleanObjectDatas($proposal_static); @@ -224,7 +224,7 @@ class Proposals extends DolibarrApi else { throw new RestException(503, 'Error when retrieve propal list : '.$db->lasterror()); } - if( ! count($obj_ret)) { + if (!count($obj_ret)) { throw new RestException(404, 'No proposal found'); } return $obj_ret; @@ -238,13 +238,13 @@ class Proposals extends DolibarrApi */ public function post($request_data = null) { - if(! DolibarrApiAccess::$user->rights->propal->creer) { + if (!DolibarrApiAccess::$user->rights->propal->creer) { throw new RestException(401, "Insuffisant rights"); } // Check mandatory fields $result = $this->_validate($request_data); - foreach($request_data as $field => $value) { + foreach ($request_data as $field => $value) { $this->propal->$field = $value; } /*if (isset($request_data["lines"])) { @@ -272,16 +272,16 @@ class Proposals extends DolibarrApi */ public function getLines($id) { - if(! DolibarrApiAccess::$user->rights->propal->lire) { + if (!DolibarrApiAccess::$user->rights->propal->lire) { throw new RestException(401); } $result = $this->propal->fetch($id); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Commercial Proposal not found'); } - if( ! DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { + if (!DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } $this->propal->getLinesArray(); @@ -304,16 +304,16 @@ class Proposals extends DolibarrApi */ public function postLine($id, $request_data = null) { - if (! DolibarrApiAccess::$user->rights->propal->creer) { + if (!DolibarrApiAccess::$user->rights->propal->creer) { throw new RestException(401); } $result = $this->propal->fetch($id); - if (! $result) { + if (!$result) { throw new RestException(404, 'Commercial Proposal not found'); } - if (! DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { + if (!DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -368,16 +368,16 @@ class Proposals extends DolibarrApi */ public function putLine($id, $lineid, $request_data = null) { - if(! DolibarrApiAccess::$user->rights->propal->creer) { + if (!DolibarrApiAccess::$user->rights->propal->creer) { throw new RestException(401); } $result = $this->propal->fetch($id); - if($result <= 0) { + if ($result <= 0) { throw new RestException(404, 'Proposal not found'); } - if( ! DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { + if (!DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -391,27 +391,27 @@ class Proposals extends DolibarrApi $updateRes = $this->propal->updateline( $lineid, - isset($request_data->subprice)?$request_data->subprice:$propalline->subprice, - isset($request_data->qty)?$request_data->qty:$propalline->qty, - isset($request_data->remise_percent)?$request_data->remise_percent:$propalline->remise_percent, - isset($request_data->tva_tx)?$request_data->tva_tx:$propalline->tva_tx, - isset($request_data->localtax1_tx)?$request_data->localtax1_tx:$propalline->localtax1_tx, - isset($request_data->localtax2_tx)?$request_data->localtax2_tx:$propalline->localtax2_tx, - isset($request_data->desc)?$request_data->desc:$propalline->desc, + isset($request_data->subprice) ? $request_data->subprice : $propalline->subprice, + isset($request_data->qty) ? $request_data->qty : $propalline->qty, + isset($request_data->remise_percent) ? $request_data->remise_percent : $propalline->remise_percent, + isset($request_data->tva_tx) ? $request_data->tva_tx : $propalline->tva_tx, + isset($request_data->localtax1_tx) ? $request_data->localtax1_tx : $propalline->localtax1_tx, + isset($request_data->localtax2_tx) ? $request_data->localtax2_tx : $propalline->localtax2_tx, + isset($request_data->desc) ? $request_data->desc : $propalline->desc, 'HT', - isset($request_data->info_bits)?$request_data->info_bits:$propalline->info_bits, - isset($request_data->special_code)?$request_data->special_code:$propalline->special_code, - isset($request_data->fk_parent_line)?$request_data->fk_parent_line:$propalline->fk_parent_line, + isset($request_data->info_bits) ? $request_data->info_bits : $propalline->info_bits, + isset($request_data->special_code) ? $request_data->special_code : $propalline->special_code, + isset($request_data->fk_parent_line) ? $request_data->fk_parent_line : $propalline->fk_parent_line, 0, - isset($request_data->fk_fournprice)?$request_data->fk_fournprice:$propalline->fk_fournprice, - isset($request_data->pa_ht)?$request_data->pa_ht:$propalline->pa_ht, - isset($request_data->label)?$request_data->label:$propalline->label, - isset($request_data->product_type)?$request_data->product_type:$propalline->product_type, - isset($request_data->date_start)?$request_data->date_start:$propalline->date_start, - isset($request_data->date_end)?$request_data->date_end:$propalline->date_end, - isset($request_data->array_options)?$request_data->array_options:$propalline->array_options, - isset($request_data->fk_unit)?$request_data->fk_unit:$propalline->fk_unit, - isset($request_data->multicurrency_subprice)?$request_data->multicurrency_subprice:$propalline->subprice + isset($request_data->fk_fournprice) ? $request_data->fk_fournprice : $propalline->fk_fournprice, + isset($request_data->pa_ht) ? $request_data->pa_ht : $propalline->pa_ht, + isset($request_data->label) ? $request_data->label : $propalline->label, + isset($request_data->product_type) ? $request_data->product_type : $propalline->product_type, + isset($request_data->date_start) ? $request_data->date_start : $propalline->date_start, + isset($request_data->date_end) ? $request_data->date_end : $propalline->date_end, + isset($request_data->array_options) ? $request_data->array_options : $propalline->array_options, + isset($request_data->fk_unit) ? $request_data->fk_unit : $propalline->fk_unit, + isset($request_data->multicurrency_subprice) ? $request_data->multicurrency_subprice : $propalline->subprice ); if ($updateRes > 0) { @@ -438,16 +438,16 @@ class Proposals extends DolibarrApi */ public function deleteLine($id, $lineid) { - if(! DolibarrApiAccess::$user->rights->propal->creer) { + if (!DolibarrApiAccess::$user->rights->propal->creer) { throw new RestException(401); } $result = $this->propal->fetch($id); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Proposal not found'); } - if( ! DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { + if (!DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -479,13 +479,13 @@ class Proposals extends DolibarrApi */ public function postContact($id, $contactid, $type) { - if(!DolibarrApiAccess::$user->rights->propal->creer) { + if (!DolibarrApiAccess::$user->rights->propal->creer) { throw new RestException(401); } $result = $this->propal->fetch($id); - if(!$result) { + if (!$result) { throw new RestException(404, 'Proposal not found'); } @@ -493,7 +493,7 @@ class Proposals extends DolibarrApi throw new RestException(500, 'Availables types: BILLING, SHIPPING OR CUSTOMER'); } - if(!DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { + if (!DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -522,17 +522,17 @@ class Proposals extends DolibarrApi */ public function deleteContact($id, $rowid) { - if(!DolibarrApiAccess::$user->rights->propal->creer) { + if (!DolibarrApiAccess::$user->rights->propal->creer) { throw new RestException(401); } $result = $this->propal->fetch($id); - if(!$result) { + if (!$result) { throw new RestException(404, 'Proposal not found'); } - if(!DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { + if (!DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -555,16 +555,16 @@ class Proposals extends DolibarrApi */ public function put($id, $request_data = null) { - if (! DolibarrApiAccess::$user->rights->propal->creer) { + if (!DolibarrApiAccess::$user->rights->propal->creer) { throw new RestException(401); } $result = $this->propal->fetch($id); - if ( ! $result ) { + if (!$result) { throw new RestException(404, 'Proposal not found'); } - if ( ! DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { + if (!DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } foreach ($request_data as $field => $value) { @@ -579,7 +579,7 @@ class Proposals extends DolibarrApi } if (!empty($this->propal->fin_validite)) { - if($this->propal->set_echeance(DolibarrApiAccess::$user, $this->propal->fin_validite)<0) + if ($this->propal->set_echeance(DolibarrApiAccess::$user, $this->propal->fin_validite) < 0) { throw new RestException(500, $this->propal->error); } @@ -604,19 +604,19 @@ class Proposals extends DolibarrApi */ public function delete($id) { - if(! DolibarrApiAccess::$user->rights->propal->supprimer) { + if (!DolibarrApiAccess::$user->rights->propal->supprimer) { throw new RestException(401); } $result = $this->propal->fetch($id); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Commercial Proposal not found'); } - if( ! DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { + if (!DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - if( ! $this->propal->delete(DolibarrApiAccess::$user)) { + if (!$this->propal->delete(DolibarrApiAccess::$user)) { throw new RestException(500, 'Error when delete Commercial Proposal : '.$this->propal->error); } @@ -639,15 +639,15 @@ class Proposals extends DolibarrApi */ public function settodraft($id) { - if(! DolibarrApiAccess::$user->rights->propal->creer) { + if (!DolibarrApiAccess::$user->rights->propal->creer) { throw new RestException(401); } $result = $this->propal->fetch($id); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Proposal not found'); } - if( ! DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { + if (!DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -660,11 +660,11 @@ class Proposals extends DolibarrApi } $result = $this->propal->fetch($id); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Proposal not found'); } - if( ! DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { + if (!DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -696,15 +696,15 @@ class Proposals extends DolibarrApi */ public function validate($id, $notrigger = 0) { - if(! DolibarrApiAccess::$user->rights->propal->creer) { + if (!DolibarrApiAccess::$user->rights->propal->creer) { throw new RestException(401); } $result = $this->propal->fetch($id); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Commercial Proposal not found'); } - if( ! DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { + if (!DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -717,11 +717,11 @@ class Proposals extends DolibarrApi } $result = $this->propal->fetch($id); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Commercial Proposal not found'); } - if( ! DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { + if (!DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -744,15 +744,15 @@ class Proposals extends DolibarrApi */ public function close($id, $status, $note_private = '', $notrigger = 0) { - if(! DolibarrApiAccess::$user->rights->propal->creer) { + if (!DolibarrApiAccess::$user->rights->propal->creer) { throw new RestException(401); } $result = $this->propal->fetch($id); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Commercial Proposal not found'); } - if( ! DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { + if (!DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -765,11 +765,11 @@ class Proposals extends DolibarrApi } $result = $this->propal->fetch($id); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Proposal not found'); } - if( ! DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { + if (!DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -789,15 +789,15 @@ class Proposals extends DolibarrApi */ public function setinvoiced($id) { - if (! DolibarrApiAccess::$user->rights->propal->creer) { + if (!DolibarrApiAccess::$user->rights->propal->creer) { throw new RestException(401); } $result = $this->propal->fetch($id); - if ( ! $result ) { + if (!$result) { throw new RestException(404, 'Commercial Proposal not found'); } - if ( ! DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { + if (!DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -807,11 +807,11 @@ class Proposals extends DolibarrApi } $result = $this->propal->fetch($id); - if ( ! $result ) { + if (!$result) { throw new RestException(404, 'Proposal not found'); } - if( ! DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { + if (!DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index bea546eeae8..9be7f50cbbf 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -252,13 +252,13 @@ class Propal extends CommonObject /** * @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. */ - public $fields=array( + public $fields = array( 'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10), 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>15, 'index'=>1), 'ref' =>array('type'=>'varchar(30)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'showoncombobox'=>1, 'position'=>20), 'ref_client' =>array('type'=>'varchar(255)', 'label'=>'RefCustomer', 'enabled'=>1, 'visible'=>-1, 'position'=>22), 'ref_ext' =>array('type'=>'varchar(255)', 'label'=>'RefExt', 'enabled'=>1, 'visible'=>0, 'position'=>40), - 'ref_int' =>array('type'=>'varchar(255)', 'label'=>'RefInt', 'enabled'=>1, 'visible'=>0, 'position'=>45), // deprecated + 'ref_int' =>array('type'=>'varchar(255)', 'label'=>'RefInt', 'enabled'=>1, 'visible'=>0, 'position'=>45), // deprecated 'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'enabled'=>1, 'visible'=>-1, 'position'=>23), 'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Fk projet', 'enabled'=>1, 'visible'=>-1, 'position'=>24), 'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>25), @@ -290,7 +290,7 @@ class Propal extends CommonObject 'date_livraison' =>array('type'=>'date', 'label'=>'DateDeliveryPlanned', 'enabled'=>1, 'visible'=>-1, 'position'=>185), 'fk_shipping_method' =>array('type'=>'integer', 'label'=>'ShippingMethod', 'enabled'=>1, 'visible'=>-1, 'position'=>190), 'fk_availability' =>array('type'=>'integer', 'label'=>'Availability', 'enabled'=>1, 'visible'=>-1, 'position'=>195), - 'fk_delivery_address' =>array('type'=>'integer', 'label'=>'DeliveryAddress', 'enabled'=>1, 'visible'=>0, 'position'=>200), // deprecated + 'fk_delivery_address' =>array('type'=>'integer', 'label'=>'DeliveryAddress', 'enabled'=>1, 'visible'=>0, 'position'=>200), // deprecated 'fk_input_reason' =>array('type'=>'integer', 'label'=>'InputReason', 'enabled'=>1, 'visible'=>-1, 'position'=>205), 'extraparams' =>array('type'=>'varchar(255)', 'label'=>'Extraparams', 'enabled'=>1, 'visible'=>-1, 'position'=>215), 'fk_incoterms' =>array('type'=>'integer', 'label'=>'IncotermCode', 'enabled'=>'$conf->incoterm->enabled', 'visible'=>-1, 'position'=>220), diff --git a/htdocs/comm/propal/class/propalestats.class.php b/htdocs/comm/propal/class/propalestats.class.php index ee42ca26471..d5c48006430 100644 --- a/htdocs/comm/propal/class/propalestats.class.php +++ b/htdocs/comm/propal/class/propalestats.class.php @@ -24,10 +24,10 @@ * \brief File of class to manage proposals statistics */ -include_once DOL_DOCUMENT_ROOT . '/core/class/stats.class.php'; -include_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php'; -include_once DOL_DOCUMENT_ROOT . '/supplier_proposal/class/supplier_proposal.class.php'; -include_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; +include_once DOL_DOCUMENT_ROOT.'/core/class/stats.class.php'; +include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; +include_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; +include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; /** @@ -66,36 +66,36 @@ class PropaleStats extends Stats if ($mode == 'customer') { - $object=new Propal($this->db); + $object = new Propal($this->db); $this->from = MAIN_DB_PREFIX.$object->table_element." as p"; $this->from_line = MAIN_DB_PREFIX.$object->table_element_line." as tl"; - $this->field_date='p.datep'; - $this->field='total_ht'; - $this->field_line='total_ht'; + $this->field_date = 'p.datep'; + $this->field = 'total_ht'; + $this->field_line = 'total_ht'; - $this->where.= " p.fk_statut > 0"; + $this->where .= " p.fk_statut > 0"; } if ($mode == 'supplier') { - $object=new SupplierProposal($this->db); + $object = new SupplierProposal($this->db); $this->from = MAIN_DB_PREFIX.$object->table_element." as p"; $this->from_line = MAIN_DB_PREFIX.$object->table_element_line." as tl"; - $this->field_date='p.date_valid'; - $this->field='total_ht'; - $this->field_line='total_ht'; + $this->field_date = 'p.date_valid'; + $this->field = 'total_ht'; + $this->field_line = 'total_ht'; - $this->where.= " p.fk_statut > 0"; // Validated, accepted, refused and closed + $this->where .= " p.fk_statut > 0"; // Validated, accepted, refused and closed } //$this->where.= " AND p.fk_soc = s.rowid AND p.entity = ".$conf->entity; - $this->where.= " AND p.entity IN (".getEntity('propal').")"; - if (!$user->rights->societe->client->voir && !$this->socid) $this->where .= " AND p.fk_soc = sc.fk_soc AND sc.fk_user = " .$user->id; - if($this->socid) + $this->where .= " AND p.entity IN (".getEntity('propal').")"; + if (!$user->rights->societe->client->voir && !$this->socid) $this->where .= " AND p.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; + if ($this->socid) { - $this->where.=" AND p.fk_soc = ".$this->socid; + $this->where .= " AND p.fk_soc = ".$this->socid; } - if ($this->userid > 0) $this->where.=' AND fk_user_author = '.$this->userid; + if ($this->userid > 0) $this->where .= ' AND fk_user_author = '.$this->userid; } @@ -111,14 +111,14 @@ class PropaleStats extends Stats global $user; $sql = "SELECT date_format(".$this->field_date.",'%m') as dm, COUNT(*) as nb"; - $sql.= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE ".$this->field_date." BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; - $sql.= " AND ".$this->where; - $sql.= " GROUP BY dm"; - $sql.= $this->db->order('dm', 'DESC'); + $sql .= " FROM ".$this->from; + if (!$user->rights->societe->client->voir && !$user->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE ".$this->field_date." BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; + $sql .= " AND ".$this->where; + $sql .= " GROUP BY dm"; + $sql .= $this->db->order('dm', 'DESC'); - $res=$this->_getNbByMonth($year, $sql, $format); + $res = $this->_getNbByMonth($year, $sql, $format); return $res; } @@ -133,11 +133,11 @@ class PropaleStats extends Stats global $user; $sql = "SELECT date_format(".$this->field_date.",'%Y') as dm, COUNT(*) as nb, SUM(c.".$this->field.")"; - $sql.= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE ".$this->where; - $sql.= " GROUP BY dm"; - $sql.= $this->db->order('dm', 'DESC'); + $sql .= " FROM ".$this->from; + if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE ".$this->where; + $sql .= " GROUP BY dm"; + $sql .= $this->db->order('dm', 'DESC'); return $this->_getNbByYear($sql); } @@ -154,14 +154,14 @@ class PropaleStats extends Stats global $user; $sql = "SELECT date_format(".$this->field_date.",'%m') as dm, SUM(p.".$this->field.")"; - $sql.= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE ".$this->field_date." BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; - $sql.= " AND ".$this->where; - $sql.= " GROUP BY dm"; - $sql.= $this->db->order('dm', 'DESC'); + $sql .= " FROM ".$this->from; + if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE ".$this->field_date." BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; + $sql .= " AND ".$this->where; + $sql .= " GROUP BY dm"; + $sql .= $this->db->order('dm', 'DESC'); - $res=$this->_getAmountByMonth($year, $sql, $format); + $res = $this->_getAmountByMonth($year, $sql, $format); return $res; } @@ -176,12 +176,12 @@ class PropaleStats extends Stats global $user; $sql = "SELECT date_format(".$this->field_date.",'%m') as dm, AVG(p.".$this->field.")"; - $sql.= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE ".$this->field_date." BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; - $sql.= " AND ".$this->where; - $sql.= " GROUP BY dm"; - $sql.= $this->db->order('dm', 'DESC'); + $sql .= " FROM ".$this->from; + if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE ".$this->field_date." BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; + $sql .= " AND ".$this->where; + $sql .= " GROUP BY dm"; + $sql .= $this->db->order('dm', 'DESC'); return $this->_getAverageByMonth($year, $sql); } @@ -196,11 +196,11 @@ class PropaleStats extends Stats global $user; $sql = "SELECT date_format(".$this->field_date.",'%Y') as year, COUNT(*) as nb, SUM(".$this->field.") as total, AVG(".$this->field.") as avg"; - $sql.= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE ".$this->where; - $sql.= " GROUP BY year"; - $sql.= $this->db->order('year', 'DESC'); + $sql .= " FROM ".$this->from; + if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE ".$this->where; + $sql .= " GROUP BY year"; + $sql .= $this->db->order('year', 'DESC'); return $this->_getAllByYear($sql); } @@ -219,13 +219,13 @@ class PropaleStats extends Stats global $user; $sql = "SELECT product.ref, COUNT(product.ref) as nb, SUM(tl.".$this->field_line.") as total, AVG(tl.".$this->field_line.") as avg"; - $sql.= " FROM ".$this->from.", ".$this->from_line.", ".MAIN_DB_PREFIX."product as product"; - if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE ".$this->where; - $sql.= " AND p.rowid = tl.fk_propal AND tl.fk_product = product.rowid"; - $sql.= " AND ".$this->field_date." BETWEEN '".$this->db->idate(dol_get_first_day($year, 1, false))."' AND '".$this->db->idate(dol_get_last_day($year, 12, false))."'"; - $sql.= " GROUP BY product.ref"; - $sql.= $this->db->order('nb', 'DESC'); + $sql .= " FROM ".$this->from.", ".$this->from_line.", ".MAIN_DB_PREFIX."product as product"; + if (!$user->rights->societe->client->voir && !$user->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE ".$this->where; + $sql .= " AND p.rowid = tl.fk_propal AND tl.fk_product = product.rowid"; + $sql .= " AND ".$this->field_date." BETWEEN '".$this->db->idate(dol_get_first_day($year, 1, false))."' AND '".$this->db->idate(dol_get_last_day($year, 12, false))."'"; + $sql .= " GROUP BY product.ref"; + $sql .= $this->db->order('nb', 'DESC'); //$sql.= $this->db->plimit(20); return $this->_getAllByProduct($sql, $limit); diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 365308a224b..94e68b8bb02 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -167,15 +167,15 @@ $arrayfields = array( 'p.total_ht'=>array('label'=>"AmountHT", 'checked'=>1), 'p.total_vat'=>array('label'=>"AmountVAT", 'checked'=>0), 'p.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0), - 'p.total_ht_invoiced'=>array('label'=>"AmountInvoicedHT", 'checked'=>0, 'enabled'=>! empty($conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT)), - 'p.total_invoiced'=>array('label'=>"AmountInvoicedTTC", 'checked'=>0, 'enabled'=>! empty($conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT)), + 'p.total_ht_invoiced'=>array('label'=>"AmountInvoicedHT", 'checked'=>0, 'enabled'=>!empty($conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT)), + 'p.total_invoiced'=>array('label'=>"AmountInvoicedTTC", 'checked'=>0, 'enabled'=>!empty($conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT)), 'p.multicurrency_code'=>array('label'=>'Currency', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), 'p.multicurrency_tx'=>array('label'=>'CurrencyRate', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), 'p.multicurrency_total_ht'=>array('label'=>'MulticurrencyAmountHT', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), 'p.multicurrency_total_vat'=>array('label'=>'MulticurrencyAmountVAT', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), 'p.multicurrency_total_ttc'=>array('label'=>'MulticurrencyAmountTTC', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), - 'p.multicurrency_total_ht_invoiced'=>array('label'=>'MulticurrencyAmountInvoicedHT', 'checked'=>0, 'enabled'=>! empty($conf->multicurrency->enabled) && ! empty($conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT)), - 'p.multicurrency_total_invoiced'=>array('label'=>'MulticurrencyAmountInvoicedTTC', 'checked'=>0, 'enabled'=>! empty($conf->multicurrency->enabled) && ! empty($conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT)), + 'p.multicurrency_total_ht_invoiced'=>array('label'=>'MulticurrencyAmountInvoicedHT', 'checked'=>0, 'enabled'=>!empty($conf->multicurrency->enabled) && !empty($conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT)), + 'p.multicurrency_total_invoiced'=>array('label'=>'MulticurrencyAmountInvoicedTTC', 'checked'=>0, 'enabled'=>!empty($conf->multicurrency->enabled) && !empty($conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT)), 'u.login'=>array('label'=>"Author", 'checked'=>1, 'position'=>10), 'sale_representative'=>array('label'=>"SaleRepresentativesOfThirdParty", 'checked'=>1), 'p.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500), @@ -344,7 +344,7 @@ if ($search_login) $sql .= natural_search("u.login", $search_login); if ($search_montant_ht != '') $sql .= natural_search("p.total_ht", $search_montant_ht, 1); if ($search_montant_vat != '') $sql .= natural_search("p.tva", $search_montant_vat, 1); if ($search_montant_ttc != '') $sql .= natural_search("p.total", $search_montant_ttc, 1); -if ($search_multicurrency_code != '') $sql .= ' AND p.multicurrency_code = "' . $db->escape($search_multicurrency_code) . '"'; +if ($search_multicurrency_code != '') $sql .= ' AND p.multicurrency_code = "'.$db->escape($search_multicurrency_code).'"'; if ($search_multicurrency_tx != '') $sql .= natural_search('p.multicurrency_tx', $search_multicurrency_tx, 1); if ($search_multicurrency_montant_ht != '') $sql .= natural_search('p.multicurrency_total_ht', $search_multicurrency_montant_ht, 1); if ($search_multicurrency_montant_vat != '') $sql .= natural_search('p.multicurrency_total_tva', $search_multicurrency_montant_vat, 1); @@ -1099,7 +1099,7 @@ if ($resql) // Currency if (!empty($arrayfields['p.multicurrency_code']['checked'])) { - print ''.$obj->multicurrency_code . ' - ' . $langs->trans('Currency' . $obj->multicurrency_code)."\n"; + print ''.$obj->multicurrency_code.' - '.$langs->trans('Currency'.$obj->multicurrency_code)."\n"; if (!$i) $totalarray['nbfield']++; } @@ -1107,7 +1107,7 @@ if ($resql) if (!empty($arrayfields['p.multicurrency_tx']['checked'])) { print ''; - $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $obj->rowid, $obj->multicurrency_tx, 'none', $obj->multicurrency_code); + $form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$obj->rowid, $obj->multicurrency_tx, 'none', $obj->multicurrency_code); print "\n"; if (!$i) $totalarray['nbfield']++; } diff --git a/htdocs/commande/class/api_orders.class.php b/htdocs/commande/class/api_orders.class.php index 03cdf990071..eb3c165d447 100644 --- a/htdocs/commande/class/api_orders.class.php +++ b/htdocs/commande/class/api_orders.class.php @@ -118,16 +118,16 @@ class Orders extends DolibarrApi */ private function _fetch($id, $ref = '', $ref_ext = '', $contact_list = 1) { - if(! DolibarrApiAccess::$user->rights->commande->lire) { + if (!DolibarrApiAccess::$user->rights->commande->lire) { throw new RestException(401); } $result = $this->commande->fetch($id, $ref, $ref_ext); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Order not found'); } - if( ! DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { + if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -163,18 +163,18 @@ class Orders extends DolibarrApi // If the internal user must only see his customers, force searching by him $search_sale = 0; - if (! DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) $search_sale = DolibarrApiAccess::$user->id; + if (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) $search_sale = DolibarrApiAccess::$user->id; $sql = "SELECT t.rowid"; if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects) - $sql.= " FROM ".MAIN_DB_PREFIX."commande as t"; + $sql .= " FROM ".MAIN_DB_PREFIX."commande as t"; - if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale + if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale - $sql.= ' WHERE t.entity IN ('.getEntity('commande').')'; - if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql.= " AND t.fk_soc = sc.fk_soc"; - if ($socids) $sql.= " AND t.fk_soc IN (".$socids.")"; - if ($search_sale > 0) $sql.= " AND t.rowid = sc.fk_soc"; // Join for the needed table to filter by sale + $sql .= ' WHERE t.entity IN ('.getEntity('commande').')'; + if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= " AND t.fk_soc = sc.fk_soc"; + if ($socids) $sql .= " AND t.fk_soc IN (".$socids.")"; + if ($search_sale > 0) $sql .= " AND t.rowid = sc.fk_soc"; // Join for the needed table to filter by sale // Insert sale filter if ($search_sale > 0) { @@ -183,23 +183,23 @@ class Orders extends DolibarrApi // Add sql filters if ($sqlfilters) { - if (! DolibarrApi::_checkFilters($sqlfilters)) + if (!DolibarrApi::_checkFilters($sqlfilters)) { throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); } - $regexstring='\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql.=" AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; } - $sql.= $db->order($sortfield, $sortorder); - if ($limit) { + $sql .= $db->order($sortfield, $sortorder); + if ($limit) { if ($page < 0) { $page = 0; } $offset = $limit * $page; - $sql.= $db->plimit($limit + 1, $offset); + $sql .= $db->plimit($limit + 1, $offset); } dol_syslog("API Rest request"); @@ -209,12 +209,12 @@ class Orders extends DolibarrApi { $num = $db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); - $i=0; + $i = 0; while ($i < $min) { $obj = $db->fetch_object($result); $commande_static = new Commande($db); - if($commande_static->fetch($obj->rowid)) { + if ($commande_static->fetch($obj->rowid)) { // Add external contacts ids $commande_static->contacts_ids = $commande_static->liste_contact(-1, 'external', 1); $obj_ret[] = $this->_cleanObjectDatas($commande_static); @@ -225,7 +225,7 @@ class Orders extends DolibarrApi else { throw new RestException(503, 'Error when retrieve commande list : '.$db->lasterror()); } - if( ! count($obj_ret)) { + if (!count($obj_ret)) { throw new RestException(404, 'No order found'); } return $obj_ret; @@ -239,13 +239,13 @@ class Orders extends DolibarrApi */ public function post($request_data = null) { - if(! DolibarrApiAccess::$user->rights->commande->creer) { + if (!DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401, "Insuffisant rights"); } // Check mandatory fields $result = $this->_validate($request_data); - foreach($request_data as $field => $value) { + foreach ($request_data as $field => $value) { $this->commande->$field = $value; } /*if (isset($request_data["lines"])) { @@ -274,16 +274,16 @@ class Orders extends DolibarrApi */ public function getLines($id) { - if(! DolibarrApiAccess::$user->rights->commande->lire) { + if (!DolibarrApiAccess::$user->rights->commande->lire) { throw new RestException(401); } $result = $this->commande->fetch($id); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Order not found'); } - if( ! DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { + if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } $this->commande->getLinesArray(); @@ -306,16 +306,16 @@ class Orders extends DolibarrApi */ public function postLine($id, $request_data = null) { - if(! DolibarrApiAccess::$user->rights->commande->creer) { + if (!DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); } $result = $this->commande->fetch($id); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Order not found'); } - if( ! DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { + if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } $request_data = (object) $request_data; @@ -368,16 +368,16 @@ class Orders extends DolibarrApi */ public function putLine($id, $lineid, $request_data = null) { - if(! DolibarrApiAccess::$user->rights->commande->creer) { + if (!DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); } $result = $this->commande->fetch($id); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Order not found'); } - if( ! DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { + if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } $request_data = (object) $request_data; @@ -430,16 +430,16 @@ class Orders extends DolibarrApi */ public function deleteLine($id, $lineid) { - if(! DolibarrApiAccess::$user->rights->commande->creer) { + if (!DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); } $result = $this->commande->fetch($id); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Order not found'); } - if( ! DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { + if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -469,16 +469,16 @@ class Orders extends DolibarrApi */ public function postContact($id, $contactid, $type) { - if (! DolibarrApiAccess::$user->rights->commande->creer) { + if (!DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); } $result = $this->commande->fetch($id); - if (! $result) { + if (!$result) { throw new RestException(404, 'Order not found'); } - if (! DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { + if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -507,16 +507,16 @@ class Orders extends DolibarrApi */ public function deleteContact($id, $rowid) { - if (! DolibarrApiAccess::$user->rights->commande->creer) { + if (!DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); } $result = $this->commande->fetch($id); - if (! $result) { + if (!$result) { throw new RestException(404, 'Order not found'); } - if (! DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { + if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -539,19 +539,19 @@ class Orders extends DolibarrApi */ public function put($id, $request_data = null) { - if (! DolibarrApiAccess::$user->rights->commande->creer) { + if (!DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); } $result = $this->commande->fetch($id); - if (! $result) { + if (!$result) { throw new RestException(404, 'Order not found'); } - if (! DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { + if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - foreach($request_data as $field => $value) { + foreach ($request_data as $field => $value) { if ($field == 'id') continue; $this->commande->$field = $value; } @@ -580,19 +580,19 @@ class Orders extends DolibarrApi */ public function delete($id) { - if(! DolibarrApiAccess::$user->rights->commande->supprimer) { + if (!DolibarrApiAccess::$user->rights->commande->supprimer) { throw new RestException(401); } $result = $this->commande->fetch($id); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Order not found'); } - if( ! DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { + if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - if( ! $this->commande->delete(DolibarrApiAccess::$user)) { + if (!$this->commande->delete(DolibarrApiAccess::$user)) { throw new RestException(500, 'Error when deleting order : '.$this->commande->error); } @@ -628,15 +628,15 @@ class Orders extends DolibarrApi */ public function validate($id, $idwarehouse = 0, $notrigger = 0) { - if(! DolibarrApiAccess::$user->rights->commande->creer) { + if (!DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); } $result = $this->commande->fetch($id); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Order not found'); } - if( ! DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { + if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -648,11 +648,11 @@ class Orders extends DolibarrApi throw new RestException(500, 'Error when validating Order: '.$this->commande->error); } $result = $this->commande->fetch($id); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Order not found'); } - if( ! DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { + if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -681,21 +681,21 @@ class Orders extends DolibarrApi public function reopen($id) { - if(! DolibarrApiAccess::$user->rights->commande->creer) { + if (!DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); } - if(empty($id)) { + if (empty($id)) { throw new RestException(400, 'Order ID is mandatory'); } $result = $this->commande->fetch($id); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Order not found'); } $result = $this->commande->set_reopen(DolibarrApiAccess::$user); - if( $result < 0) { + if ($result < 0) { throw new RestException(405, $this->commande->error); - }elseif( $result == 0) { + }elseif ($result == 0) { throw new RestException(304); } @@ -719,28 +719,28 @@ class Orders extends DolibarrApi public function setinvoiced($id) { - if(! DolibarrApiAccess::$user->rights->commande->creer) { + if (!DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); } - if(empty($id)) { + if (empty($id)) { throw new RestException(400, 'Order ID is mandatory'); } $result = $this->commande->fetch($id); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Order not found'); } $result = $this->commande->classifyBilled(DolibarrApiAccess::$user); - if( $result < 0) { + if ($result < 0) { throw new RestException(400, $this->commande->error); } $result = $this->commande->fetch($id); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Order not found'); } - if( ! DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { + if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -761,15 +761,15 @@ class Orders extends DolibarrApi */ public function close($id, $notrigger = 0) { - if(! DolibarrApiAccess::$user->rights->commande->creer) { + if (!DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); } $result = $this->commande->fetch($id); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Order not found'); } - if( ! DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { + if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -782,11 +782,11 @@ class Orders extends DolibarrApi } $result = $this->commande->fetch($id); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Order not found'); } - if( ! DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { + if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -807,15 +807,15 @@ class Orders extends DolibarrApi */ public function settodraft($id, $idwarehouse = -1) { - if(! DolibarrApiAccess::$user->rights->commande->creer) { + if (!DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); } $result = $this->commande->fetch($id); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Order not found'); } - if( ! DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { + if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -828,11 +828,11 @@ class Orders extends DolibarrApi } $result = $this->commande->fetch($id); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Order not found'); } - if( ! DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { + if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -859,26 +859,26 @@ class Orders extends DolibarrApi public function createOrderFromProposal($proposalid) { - require_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php'; + require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; - if(! DolibarrApiAccess::$user->rights->propal->lire) { + if (!DolibarrApiAccess::$user->rights->propal->lire) { throw new RestException(401); } - if(! DolibarrApiAccess::$user->rights->commande->creer) { + if (!DolibarrApiAccess::$user->rights->commande->creer) { throw new RestException(401); } - if(empty($proposalid)) { + if (empty($proposalid)) { throw new RestException(400, 'Proposal ID is mandatory'); } $propal = new Propal($this->db); $result = $propal->fetch($proposalid); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Proposal not found'); } $result = $this->commande->createFromProposal($propal, DolibarrApiAccess::$user); - if( $result < 0) { + if ($result < 0) { throw new RestException(405, $this->commande->error); } $this->commande->fetchObjectLinked(); @@ -921,7 +921,7 @@ class Orders extends DolibarrApi $commande = array(); foreach (Orders::$FIELDS as $field) { if (!isset($data[$field])) - throw new RestException(400, $field ." field missing"); + throw new RestException(400, $field." field missing"); $commande[$field] = $data[$field]; } return $commande; diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index ddd6d7723d5..a34dcc76377 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -262,12 +262,12 @@ class Commande extends CommonOrder /** * @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. */ - public $fields=array( + public $fields = array( 'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10), 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>20, 'index'=>1), 'ref' =>array('type'=>'varchar(30)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'showoncombobox'=>1, 'position'=>25), 'ref_ext' =>array('type'=>'varchar(255)', 'label'=>'RefExt', 'enabled'=>1, 'visible'=>0, 'position'=>26), - 'ref_int' =>array('type'=>'varchar(255)', 'label'=>'RefInt', 'enabled'=>1, 'visible'=>0, 'position'=>27), // deprecated + 'ref_int' =>array('type'=>'varchar(255)', 'label'=>'RefInt', 'enabled'=>1, 'visible'=>0, 'position'=>27), // deprecated 'ref_client' =>array('type'=>'varchar(255)', 'label'=>'RefCustomer', 'enabled'=>1, 'visible'=>-1, 'position'=>28), 'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>20), 'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Project', 'enabled'=>1, 'visible'=>-1, 'position'=>25), diff --git a/htdocs/commande/class/commandestats.class.php b/htdocs/commande/class/commandestats.class.php index 522bd7b2e31..8b6dc4db6ec 100644 --- a/htdocs/commande/class/commandestats.class.php +++ b/htdocs/commande/class/commandestats.class.php @@ -23,10 +23,10 @@ * \ingroup commandes * \brief File of class to manage order statistics */ -include_once DOL_DOCUMENT_ROOT . '/core/class/stats.class.php'; -include_once DOL_DOCUMENT_ROOT . '/commande/class/commande.class.php'; -include_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.commande.class.php'; -include_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; +include_once DOL_DOCUMENT_ROOT.'/core/class/stats.class.php'; +include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; +include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; +include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; /** @@ -67,31 +67,31 @@ class CommandeStats extends Stats if ($mode == 'customer') { - $object=new Commande($this->db); + $object = new Commande($this->db); $this->from = MAIN_DB_PREFIX.$object->table_element." as c"; $this->from_line = MAIN_DB_PREFIX.$object->table_element_line." as tl"; - $this->field='total_ht'; - $this->field_line='total_ht'; - $this->where.= " c.fk_statut > 0"; // Not draft and not cancelled + $this->field = 'total_ht'; + $this->field_line = 'total_ht'; + $this->where .= " c.fk_statut > 0"; // Not draft and not cancelled } elseif ($mode == 'supplier') { - $object=new CommandeFournisseur($this->db); + $object = new CommandeFournisseur($this->db); $this->from = MAIN_DB_PREFIX.$object->table_element." as c"; $this->from_line = MAIN_DB_PREFIX.$object->table_element_line." as tl"; - $this->field='total_ht'; - $this->field_line='total_ht'; - $this->where.= " c.fk_statut > 2"; // Only approved & ordered + $this->field = 'total_ht'; + $this->field_line = 'total_ht'; + $this->where .= " c.fk_statut > 2"; // Only approved & ordered } //$this->where.= " AND c.fk_soc = s.rowid AND c.entity = ".$conf->entity; - $this->where.= ' AND c.entity IN ('.getEntity('commande').')'; + $this->where .= ' AND c.entity IN ('.getEntity('commande').')'; - if (!$user->rights->societe->client->voir && !$this->socid) $this->where .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = " .$user->id; + if (!$user->rights->societe->client->voir && !$this->socid) $this->where .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; if ($this->socid) { - $this->where.=" AND c.fk_soc = ".$this->socid; + $this->where .= " AND c.fk_soc = ".$this->socid; } - if ($this->userid > 0) $this->where.=' AND c.fk_user_author = '.$this->userid; + if ($this->userid > 0) $this->where .= ' AND c.fk_user_author = '.$this->userid; } /** @@ -106,14 +106,14 @@ class CommandeStats extends Stats global $user; $sql = "SELECT date_format(c.date_commande,'%m') as dm, COUNT(*) as nb"; - $sql.= " FROM ".$this->from; + $sql .= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; - $sql.= " AND ".$this->where; - $sql.= " GROUP BY dm"; - $sql.= $this->db->order('dm', 'DESC'); + $sql .= " WHERE c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; + $sql .= " AND ".$this->where; + $sql .= " GROUP BY dm"; + $sql .= $this->db->order('dm', 'DESC'); - $res=$this->_getNbByMonth($year, $sql, $format); + $res = $this->_getNbByMonth($year, $sql, $format); return $res; } @@ -128,11 +128,11 @@ class CommandeStats extends Stats global $user; $sql = "SELECT date_format(c.date_commande,'%Y') as dm, COUNT(*) as nb, SUM(c.".$this->field.")"; - $sql.= " FROM ".$this->from; + $sql .= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE ".$this->where; - $sql.= " GROUP BY dm"; - $sql.= $this->db->order('dm', 'DESC'); + $sql .= " WHERE ".$this->where; + $sql .= " GROUP BY dm"; + $sql .= $this->db->order('dm', 'DESC'); return $this->_getNbByYear($sql); } @@ -149,14 +149,14 @@ class CommandeStats extends Stats global $user; $sql = "SELECT date_format(c.date_commande,'%m') as dm, SUM(c.".$this->field.")"; - $sql.= " FROM ".$this->from; + $sql .= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; - $sql.= " AND ".$this->where; - $sql.= " GROUP BY dm"; - $sql.= $this->db->order('dm', 'DESC'); + $sql .= " WHERE c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; + $sql .= " AND ".$this->where; + $sql .= " GROUP BY dm"; + $sql .= $this->db->order('dm', 'DESC'); - $res=$this->_getAmountByMonth($year, $sql, $format); + $res = $this->_getAmountByMonth($year, $sql, $format); return $res; } @@ -171,12 +171,12 @@ class CommandeStats extends Stats global $user; $sql = "SELECT date_format(c.date_commande,'%m') as dm, AVG(c.".$this->field.")"; - $sql.= " FROM ".$this->from; + $sql .= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; - $sql.= " AND ".$this->where; - $sql.= " GROUP BY dm"; - $sql.= $this->db->order('dm', 'DESC'); + $sql .= " WHERE c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; + $sql .= " AND ".$this->where; + $sql .= " GROUP BY dm"; + $sql .= $this->db->order('dm', 'DESC'); return $this->_getAverageByMonth($year, $sql); } @@ -191,11 +191,11 @@ class CommandeStats extends Stats global $user; $sql = "SELECT date_format(c.date_commande,'%Y') as year, COUNT(*) as nb, SUM(c.".$this->field.") as total, AVG(".$this->field.") as avg"; - $sql.= " FROM ".$this->from; + $sql .= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE ".$this->where; - $sql.= " GROUP BY year"; - $sql.= $this->db->order('year', 'DESC'); + $sql .= " WHERE ".$this->where; + $sql .= " GROUP BY year"; + $sql .= $this->db->order('year', 'DESC'); return $this->_getAllByYear($sql); } @@ -212,13 +212,13 @@ class CommandeStats extends Stats global $user; $sql = "SELECT product.ref, COUNT(product.ref) as nb, SUM(tl.".$this->field_line.") as total, AVG(tl.".$this->field_line.") as avg"; - $sql.= " FROM ".$this->from.", ".$this->from_line.", ".MAIN_DB_PREFIX."product as product"; - if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE ".$this->where; - $sql.= " AND c.rowid = tl.fk_commande AND tl.fk_product = product.rowid"; - $sql.= " AND c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year, 1, false))."' AND '".$this->db->idate(dol_get_last_day($year, 12, false))."'"; - $sql.= " GROUP BY product.ref"; - $sql.= $this->db->order('nb', 'DESC'); + $sql .= " FROM ".$this->from.", ".$this->from_line.", ".MAIN_DB_PREFIX."product as product"; + if (!$user->rights->societe->client->voir && !$user->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE ".$this->where; + $sql .= " AND c.rowid = tl.fk_commande AND tl.fk_product = product.rowid"; + $sql .= " AND c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year, 1, false))."' AND '".$this->db->idate(dol_get_last_day($year, 12, false))."'"; + $sql .= " GROUP BY product.ref"; + $sql .= $this->db->order('nb', 'DESC'); //$sql.= $this->db->plimit(20); return $this->_getAllByProduct($sql, $limit); diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 5e2353110e7..429a42464d1 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -346,7 +346,7 @@ if ($search_user > 0) $sql .= " AND ec.fk_c_type_contact if ($search_total_ht != '') $sql .= natural_search('c.total_ht', $search_total_ht, 1); if ($search_total_vat != '') $sql .= natural_search('c.tva', $search_total_vat, 1); if ($search_total_ttc != '') $sql .= natural_search('c.total_ttc', $search_total_ttc, 1); -if ($search_multicurrency_code != '') $sql .= ' AND c.multicurrency_code = "' . $db->escape($search_multicurrency_code) . '"'; +if ($search_multicurrency_code != '') $sql .= ' AND c.multicurrency_code = "'.$db->escape($search_multicurrency_code).'"'; if ($search_multicurrency_tx != '') $sql .= natural_search('c.multicurrency_tx', $search_multicurrency_tx, 1); if ($search_multicurrency_montant_ht != '') $sql .= natural_search('c.multicurrency_total_ht', $search_multicurrency_montant_ht, 1); if ($search_multicurrency_montant_vat != '') $sql .= natural_search('c.multicurrency_total_tva', $search_multicurrency_montant_vat, 1); @@ -1168,7 +1168,7 @@ if ($resql) // Currency if (!empty($arrayfields['c.multicurrency_code']['checked'])) { - print ''.$obj->multicurrency_code . ' - ' . $langs->trans('Currency' . $obj->multicurrency_code)."\n"; + print ''.$obj->multicurrency_code.' - '.$langs->trans('Currency'.$obj->multicurrency_code)."\n"; if (!$i) $totalarray['nbfield']++; } @@ -1176,7 +1176,7 @@ if ($resql) if (!empty($arrayfields['c.multicurrency_tx']['checked'])) { print ''; - $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $obj->rowid, $obj->multicurrency_tx, 'none', $obj->multicurrency_code); + $form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$obj->rowid, $obj->multicurrency_tx, 'none', $obj->multicurrency_code); print "\n"; if (!$i) $totalarray['nbfield']++; } diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index 7a8832be2b5..d1e15c10553 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -133,7 +133,7 @@ if (($action == "searchfiles" || $action == "dl")) { // Customer invoices if (GETPOST('selectinvoices')) { - if (! empty($sql)) $sql .= " UNION ALL"; + if (!empty($sql)) $sql .= " UNION ALL"; $sql .= "SELECT t.rowid as id, t.entity, t.ref, t.paye as paid, t.total as total_ht, t.total_ttc, t.tva as total_vat, t.fk_soc, t.datef as date, t.date_lim_reglement as date_due, 'Invoice' as item, s.nom as thirdparty_name, s.code_client as thirdparty_code, c.code as country_code, s.tva_intra as vatnum"; $sql .= " FROM ".MAIN_DB_PREFIX."facture as t LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = t.fk_soc LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = s.fk_pays"; $sql .= " WHERE datef between ".$wheretail; @@ -142,7 +142,7 @@ if (($action == "searchfiles" || $action == "dl")) { } // Vendor invoices if (GETPOST('selectsupplierinvoices')) { - if (! empty($sql)) $sql .= " UNION ALL"; + if (!empty($sql)) $sql .= " UNION ALL"; $sql .= " SELECT t.rowid as id, t.entity, t.ref, t.paye as paid, t.total_ht, t.total_ttc, t.total_tva as total_vat, t.fk_soc, t.datef as date, t.date_lim_reglement as date_due, 'SupplierInvoice' as item, s.nom as thirdparty_name, s.code_fournisseur as thirdparty_code, c.code as country_code, s.tva_intra as vatnum"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as t LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = t.fk_soc LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = s.fk_pays"; $sql .= " WHERE datef between ".$wheretail; @@ -151,7 +151,7 @@ if (($action == "searchfiles" || $action == "dl")) { } // Expense reports if (GETPOST('selectexpensereports')) { - if (! empty($sql)) $sql .= " UNION ALL"; + if (!empty($sql)) $sql .= " UNION ALL"; $sql .= " SELECT t.rowid as id, t.entity, t.ref, t.paid, t.total_ht, t.total_ttc, t.total_tva as total_vat, t.fk_user_author as fk_soc, t.date_fin as date, t.date_fin as date_due, 'ExpenseReport' as item, CONCAT(CONCAT(u.lastname, ' '), u.firstname) as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum"; $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as t LEFT JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = t.fk_user_author LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = u.fk_country"; $sql .= " WHERE date_fin between ".$wheretail; @@ -160,7 +160,7 @@ if (($action == "searchfiles" || $action == "dl")) { } // Donations if (GETPOST('selectdonations')) { - if (! empty($sql)) $sql .= " UNION ALL"; + if (!empty($sql)) $sql .= " UNION ALL"; $sql .= " SELECT t.rowid as id, t.entity, t.ref, paid, amount as total_ht, amount as total_ttc, 0 as total_vat, 0 as fk_soc, t.datedon as date, t.datedon as date_due, 'Donation' as item, t.societe as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum"; $sql .= " FROM ".MAIN_DB_PREFIX."don as t LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = t.fk_country"; $sql .= " WHERE datedon between ".$wheretail; @@ -169,7 +169,7 @@ if (($action == "searchfiles" || $action == "dl")) { } // Paiements of salaries if (GETPOST('selectpaymentsofsalaries')) { - if (! empty($sql)) $sql .= " UNION ALL"; + if (!empty($sql)) $sql .= " UNION ALL"; $sql .= " SELECT t.rowid as id, t.entity, t.ref as ref, 1 as paid, amount as total_ht, amount as total_ttc, 0 as total_vat, t.fk_user as fk_soc, t.datep as date, t.dateep as date_due, 'SalaryPayment' as item, CONCAT(CONCAT(u.lastname, ' '), u.firstname) as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum"; $sql .= " FROM ".MAIN_DB_PREFIX."payment_salary as t LEFT JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = t.fk_user LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = u.fk_country"; $sql .= " WHERE datep between ".$wheretail; @@ -178,7 +178,7 @@ if (($action == "searchfiles" || $action == "dl")) { } // Social contributions if (GETPOST('selectsocialcontributions')) { - if (! empty($sql)) $sql .= " UNION ALL"; + if (!empty($sql)) $sql .= " UNION ALL"; $sql .= " SELECT t.rowid as id, t.entity, t.libelle as ref, t.paye as paid, t.amount as total_ht, t.amount as total_ttc, 0 as total_tva, 0 as fk_soc, t.date_creation as date, t.date_ech as date_due, 'SocialContributions' as item, '' as thirdparty_name, '' as thirdparty_code, '' as country_code, '' as vatnum"; $sql .= " FROM ".MAIN_DB_PREFIX."chargesociales as t"; $sql .= " WHERE date_creation between ".$wheretail; @@ -467,7 +467,7 @@ print ' - '.$form->selectDate($date_stop, 'date_stop', 0, 0, 0, "", 1, 1, 0)."\n if (!empty($conf->multicompany->enabled) && is_object($mc)) { $mc->getInfo($conf->entity); - print '('.$langs->trans("Entity").' : '; + print '('.$langs->trans("Entity").' : '; print ""; if (!empty($conf->global->MULTICOMPANY_ALLOW_EXPORT_ACCOUNTING_DOC_FOR_ALL_ENTITIES)) { print $mc->select_entities(GETPOSTISSET('search_entity') ? GETPOST('search_entity', 'int') : $mc->id, 'search_entity', '', false, false, false, false, true); @@ -488,8 +488,8 @@ $listofchoices = array( 'selectpaymentsofsalaries'=>array('label'=>'SalariesPayments', 'lang'=>'salaries'), 'selectsocialcontributions'=>array('label'=>'SocialContributions') ); -foreach($listofchoices as $choice => $val) { - $checked = (((! GETPOSTISSET('search') && $action != 'searchfiles') || GETPOST($choice))?' checked="checked"':''); +foreach ($listofchoices as $choice => $val) { + $checked = (((!GETPOSTISSET('search') && $action != 'searchfiles') || GETPOST($choice)) ? ' checked="checked"' : ''); print '
'.$langs->trans($val['label']).'
'; } @@ -508,8 +508,8 @@ if (!empty($date_start) && !empty($date_stop)) $param .= '&date_stopday='.GETPOST('date_stopday', 'int'); $param .= '&date_stopmonth='.GETPOST('date_stopmonth', 'int'); $param .= '&date_stopyear='.GETPOST('date_stopyear', 'int'); - foreach($listofchoices as $choice => $val) { - $param.='&'.$choice.'='.(GETPOST($choice, 'int')?1:0); + foreach ($listofchoices as $choice => $val) { + $param .= '&'.$choice.'='.(GETPOST($choice, 'int') ? 1 : 0); } print ''."\n"; print ''; @@ -518,7 +518,7 @@ if (!empty($date_start) && !empty($date_stop)) print ''; print ''; - foreach($listofchoices as $choice => $val) { + foreach ($listofchoices as $choice => $val) { print ''; } diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index 37193726b01..8c146a65470 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -39,17 +39,17 @@ if (!empty($conf->categorie->enabled)) require_once DOL_DOCUMENT_ROOT.'/categori // Load translation files required by the page $langs->loadLangs(array('banks', 'categories', 'accountancy', 'compta')); -$action=GETPOST('action', 'alpha'); -$massaction=GETPOST('massaction', 'alpha'); -$show_files=GETPOST('show_files', 'int'); -$confirm=GETPOST('confirm', 'alpha'); +$action = GETPOST('action', 'alpha'); +$massaction = GETPOST('massaction', 'alpha'); +$show_files = GETPOST('show_files', 'int'); +$confirm = GETPOST('confirm', 'alpha'); $toselect = GETPOST('toselect', 'array'); -$contextpage= GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'bankaccountlist'; // To manage different context of search +$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'bankaccountlist'; // To manage different context of search -$search_ref=GETPOST('search_ref', 'alpha'); -$search_label=GETPOST('search_label', 'alpha'); -$search_number=GETPOST('search_number', 'alpha'); -$search_status=GETPOST('search_status')?GETPOST('search_status', 'alpha'):'opened'; // 'all' or ''='opened' +$search_ref = GETPOST('search_ref', 'alpha'); +$search_label = GETPOST('search_label', 'alpha'); +$search_number = GETPOST('search_number', 'alpha'); +$search_status = GETPOST('search_status') ?GETPOST('search_status', 'alpha') : 'opened'; // 'all' or ''='opened' $optioncss = GETPOST('optioncss', 'alpha'); if (!empty($conf->categorie->enabled)) @@ -58,13 +58,13 @@ if (!empty($conf->categorie->enabled)) } // Security check -if ($user->socid) $socid=$user->socid; -if (! empty($user->rights->accounting->chartofaccount)) $allowed=1; // Dictionary with list of banks accounting account allowed to manager of chart account -if (! $allowed) $result=restrictedArea($user, 'banque'); +if ($user->socid) $socid = $user->socid; +if (!empty($user->rights->accounting->chartofaccount)) $allowed = 1; // Dictionary with list of banks accounting account allowed to manager of chart account +if (!$allowed) $result = restrictedArea($user, 'banque'); -$diroutputmassaction=$conf->bank->dir_output . '/temp/massgeneration/'.$user->id; +$diroutputmassaction = $conf->bank->dir_output.'/temp/massgeneration/'.$user->id; -$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; +$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); $page = GETPOST("page", 'int'); @@ -82,7 +82,7 @@ $extrafields = new ExtraFields($db); // fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); -$search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); +$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // List of fields to search into when doing a "search in all" $fieldstosearchall = array( @@ -108,10 +108,10 @@ $arrayfields = array( // Extra fields if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) { - foreach($extrafields->attributes[$object->table_element]['label'] as $key => $val) + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { - if (! empty($extrafields->attributes[$object->table_element]['list'][$key])) - $arrayfields["ef.".$key]=array('label'=>$extrafields->attributes[$object->table_element]['label'][$key], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key]<0)?0:1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key])!=3 && $extrafields->attributes[$object->table_element]['perms'][$key])); + if (!empty($extrafields->attributes[$object->table_element]['list'][$key])) + $arrayfields["ef.".$key] = array('label'=>$extrafields->attributes[$object->table_element]['label'][$key], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key] < 0) ? 0 : 1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$key])); } } $object->fields = dol_sort_array($object->fields, 'position'); @@ -155,41 +155,41 @@ $accounts = array(); $sql = "SELECT b.rowid, b.label, b.courant, b.rappro, b.account_number, b.fk_accountancy_journal, b.currency_code, b.datec as date_creation, b.tms as date_update"; // Add fields from extrafields -if (! empty($extrafields->attributes[$object->table_element]['label'])) { - foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); +if (!empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); } // Add fields from hooks $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook -$sql.= $hookmanager->resPrint; -$sql.= " FROM ".MAIN_DB_PREFIX."bank_account as b"; -if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (b.rowid = ef.fk_object)"; +$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook +$sql .= $hookmanager->resPrint; +$sql .= " FROM ".MAIN_DB_PREFIX."bank_account as b"; +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (b.rowid = ef.fk_object)"; if (!empty($conf->categorie->enabled)) { $sql .= Categorie::getFilterJoinQuery(Categorie::TYPE_ACCOUNT, "b.rowid"); } -$sql.= " WHERE b.entity IN (".getEntity('bank_account').")"; -if ($search_status == 'opened') $sql.= " AND clos = 0"; -if ($search_status == 'closed') $sql.= " AND clos = 1"; +$sql .= " WHERE b.entity IN (".getEntity('bank_account').")"; +if ($search_status == 'opened') $sql .= " AND clos = 0"; +if ($search_status == 'closed') $sql .= " AND clos = 1"; if (!empty($conf->categorie->enabled)) { $sql .= Categorie::getFilterSelectQuery(Categorie::TYPE_ACCOUNT, "b.rowid", $search_category_list); } -if ($search_ref != '') $sql.=natural_search('b.ref', $search_ref); -if ($search_label != '') $sql.=natural_search('b.label', $search_label); -if ($search_number != '') $sql.=natural_search('b.number', $search_number); +if ($search_ref != '') $sql .= natural_search('b.ref', $search_ref); +if ($search_label != '') $sql .= natural_search('b.label', $search_label); +if ($search_number != '') $sql .= natural_search('b.number', $search_number); // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; // Add where from hooks -$parameters=array(); -$reshook=$hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook -$sql.=$hookmanager->resPrint; +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook +$sql .= $hookmanager->resPrint; -$sql.= $db->order($sortfield, $sortorder); +$sql .= $db->order($sortfield, $sortorder); // Count total nb of records $nbtotalofrecords = ''; @@ -438,52 +438,52 @@ foreach ($accounts as $key=>$type) $solde = $objecttmp->solde(1); - if (! empty($lastcurrencycode) && $lastcurrencycode != $objecttmp->currency_code) + if (!empty($lastcurrencycode) && $lastcurrencycode != $objecttmp->currency_code) { - $lastcurrencycode='various'; // We found several different currencies + $lastcurrencycode = 'various'; // We found several different currencies } if ($lastcurrencycode != 'various') { - $lastcurrencycode=$objecttmp->currency_code; + $lastcurrencycode = $objecttmp->currency_code; } print ''; // Ref - if (! empty($arrayfields['b.ref']['checked'])) + if (!empty($arrayfields['b.ref']['checked'])) { print ''.$objecttmp->getNomUrl(1).''; - if (! $i) $totalarray['nbfield']++; + if (!$i) $totalarray['nbfield']++; } // Label - if (! empty($arrayfields['b.label']['checked'])) + if (!empty($arrayfields['b.label']['checked'])) { print ''.$objecttmp->label.''; - if (! $i) $totalarray['nbfield']++; + if (!$i) $totalarray['nbfield']++; } // Account type - if (! empty($arrayfields['accountype']['checked'])) + if (!empty($arrayfields['accountype']['checked'])) { print ''; print $objecttmp->type_lib[$objecttmp->type]; print ''; - if (! $i) $totalarray['nbfield']++; + if (!$i) $totalarray['nbfield']++; } // Number - if (! empty($arrayfields['b.number']['checked'])) + if (!empty($arrayfields['b.number']['checked'])) { print ''.$objecttmp->number.''; - if (! $i) $totalarray['nbfield']++; + if (!$i) $totalarray['nbfield']++; } // Account number - if (! empty($arrayfields['b.account_number']['checked'])) + if (!empty($arrayfields['b.account_number']['checked'])) { print ''; - if (! empty($conf->accounting->enabled) && ! empty($objecttmp->account_number)) + if (!empty($conf->accounting->enabled) && !empty($objecttmp->account_number)) { $accountingaccount = new AccountingAccount($db); $accountingaccount->fetch('', $objecttmp->account_number, 1); @@ -494,14 +494,14 @@ foreach ($accounts as $key=>$type) print $objecttmp->account_number; } print ''; - if (! $i) $totalarray['nbfield']++; + if (!$i) $totalarray['nbfield']++; } // Accountancy journal - if (! empty($arrayfields['b.fk_accountancy_journal']['checked'])) + if (!empty($arrayfields['b.fk_accountancy_journal']['checked'])) { print ''; - if (! empty($conf->accounting->enabled) && ! empty($objecttmp->fk_accountancy_journal)) + if (!empty($conf->accounting->enabled) && !empty($objecttmp->fk_accountancy_journal)) { $accountingjournal = new AccountingJournal($db); $accountingjournal->fetch($objecttmp->fk_accountancy_journal); @@ -547,47 +547,47 @@ foreach ($accounts as $key=>$type) print ''.$langs->trans("FeatureDisabled").''; } print ''; - if (! $i) $totalarray['nbfield']++; + if (!$i) $totalarray['nbfield']++; } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters=array('arrayfields'=>$arrayfields); - $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $objecttmp); // Note that $action and $objecttmpect may have been modified by hook + $parameters = array('arrayfields'=>$arrayfields); + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $objecttmp); // Note that $action and $objecttmpect may have been modified by hook print $hookmanager->resPrint; // Date creation - if (! empty($arrayfields['b.datec']['checked'])) + if (!empty($arrayfields['b.datec']['checked'])) { print ''; print dol_print_date($objecttmp->date_creation, 'dayhour'); print ''; - if (! $i) $totalarray['nbfield']++; + if (!$i) $totalarray['nbfield']++; } // Date modification - if (! empty($arrayfields['b.tms']['checked'])) + if (!empty($arrayfields['b.tms']['checked'])) { print ''; print dol_print_date($objecttmp->date_update, 'dayhour'); print ''; - if (! $i) $totalarray['nbfield']++; + if (!$i) $totalarray['nbfield']++; } // Status - if (! empty($arrayfields['b.clos']['checked'])) + if (!empty($arrayfields['b.clos']['checked'])) { print ''.$objecttmp->getLibStatut(5).''; - if (! $i) $totalarray['nbfield']++; + if (!$i) $totalarray['nbfield']++; } // Balance - if (! empty($arrayfields['balance']['checked'])) + if (!empty($arrayfields['balance']['checked'])) { print ''; print ''.price($solde, 0, $langs, 0, -1, -1, $objecttmp->currency_code).''; print ''; - if (! $i) $totalarray['nbfield']++; - if (! $i) $totalarray['pos'][$totalarray['nbfield']]='balance'; + if (!$i) $totalarray['nbfield']++; + if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'balance'; $totalarray['val']['balance'] += $solde; } diff --git a/htdocs/compta/deplacement/index.php b/htdocs/compta/deplacement/index.php index ea180a6b0ee..2229ea22609 100644 --- a/htdocs/compta/deplacement/index.php +++ b/htdocs/compta/deplacement/index.php @@ -32,7 +32,7 @@ $langs->loadLangs(array('companies', 'users', 'trips')); // Security check $socid = GETPOST('socid', 'int'); -if ($user->socid) $socid=$user->socid; +if ($user->socid) $socid = $user->socid; $result = restrictedArea($user, 'deplacement', '', ''); $sortfield = GETPOST("sortfield", 'alpha'); @@ -42,33 +42,33 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (! $sortorder) $sortorder="DESC"; -if (! $sortfield) $sortfield="d.dated"; -$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; +if (!$sortorder) $sortorder = "DESC"; +if (!$sortfield) $sortfield = "d.dated"; +$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; /* * View */ -$tripandexpense_static=new Deplacement($db); +$tripandexpense_static = new Deplacement($db); $childids = $user->getAllChildIds(); -$childids[]=$user->id; +$childids[] = $user->id; //$help_url='EN:Module_Donations|FR:Module_Dons|ES:Módulo_Donaciones'; -$help_url=''; +$help_url = ''; llxHeader('', $langs->trans("ListOfFees"), $help_url); -$totalnb=0; +$totalnb = 0; $sql = "SELECT count(d.rowid) as nb, sum(d.km) as km, d.type"; -$sql.= " FROM ".MAIN_DB_PREFIX."deplacement as d"; -$sql.= " WHERE d.entity = ".$conf->entity; -if (empty($user->rights->deplacement->readall) && empty($user->rights->deplacement->lire_tous)) $sql.=' AND d.fk_user IN ('.join(',', $childids).')'; -$sql.= " GROUP BY d.type"; -$sql.= " ORDER BY d.type"; +$sql .= " FROM ".MAIN_DB_PREFIX."deplacement as d"; +$sql .= " WHERE d.entity = ".$conf->entity; +if (empty($user->rights->deplacement->readall) && empty($user->rights->deplacement->lire_tous)) $sql .= ' AND d.fk_user IN ('.join(',', $childids).')'; +$sql .= " GROUP BY d.type"; +$sql .= " ORDER BY d.type"; $result = $db->query($sql); if ($result) @@ -102,10 +102,10 @@ print ''; print ''.$langs->trans("Statistics").''; print "\n"; -$listoftype=$tripandexpense_static->listOfTypes(); +$listoftype = $tripandexpense_static->listOfTypes(); foreach ($listoftype as $code => $label) { - $dataseries[]=array($label, (isset($nb[$code])?(int) $nb[$code]:0)); + $dataseries[] = array($label, (isset($nb[$code]) ? (int) $nb[$code] : 0)); } if ($conf->use_javascript_ajax) @@ -120,7 +120,7 @@ if ($conf->use_javascript_ajax) $dolgraph->SetType(array('pie')); $dolgraph->setHeight('200'); $dolgraph->draw('idgraphstatus'); - print $dolgraph->show($totalnb?0:1); + print $dolgraph->show($totalnb ? 0 : 1); print ''; } @@ -137,25 +137,25 @@ print ''; print '
'; -$max=10; +$max = 10; $langs->load("boxes"); $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, d.rowid, d.dated as date, d.tms as dm, d.km, d.fk_statut"; -$sql.= " FROM ".MAIN_DB_PREFIX."deplacement as d, ".MAIN_DB_PREFIX."user as u"; -if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc"; -$sql.= " WHERE u.rowid = d.fk_user"; -$sql.= " AND d.entity = ".$conf->entity; -if (empty($user->rights->deplacement->readall) && empty($user->rights->deplacement->lire_tous)) $sql.=' AND d.fk_user IN ('.join(',', $childids).')'; -if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND d.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; -if ($socid) $sql.= " AND d.fk_soc = ".$socid; -$sql.= $db->order("d.tms", "DESC"); -$sql.= $db->plimit($max, 0); +$sql .= " FROM ".MAIN_DB_PREFIX."deplacement as d, ".MAIN_DB_PREFIX."user as u"; +if (!$user->rights->societe->client->voir && !$user->socid) $sql .= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +$sql .= " WHERE u.rowid = d.fk_user"; +$sql .= " AND d.entity = ".$conf->entity; +if (empty($user->rights->deplacement->readall) && empty($user->rights->deplacement->lire_tous)) $sql .= ' AND d.fk_user IN ('.join(',', $childids).')'; +if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND d.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; +if ($socid) $sql .= " AND d.fk_soc = ".$socid; +$sql .= $db->order("d.tms", "DESC"); +$sql .= $db->plimit($max, 0); $result = $db->query($sql); if ($result) { - $var=false; + $var = false; $num = $db->num_rows($result); $i = 0; @@ -171,16 +171,16 @@ if ($result) { $total_ttc = $totalam = $total = 0; - $deplacementstatic=new Deplacement($db); - $userstatic=new User($db); + $deplacementstatic = new Deplacement($db); + $userstatic = new User($db); while ($i < $num && $i < $max) { $obj = $db->fetch_object($result); - $deplacementstatic->ref=$obj->rowid; - $deplacementstatic->id=$obj->rowid; - $userstatic->id=$obj->uid; - $userstatic->lastname=$obj->lastname; - $userstatic->firstname=$obj->firstname; + $deplacementstatic->ref = $obj->rowid; + $deplacementstatic->id = $obj->rowid; + $userstatic->id = $obj->uid; + $userstatic->lastname = $obj->lastname; + $userstatic->firstname = $obj->firstname; print ''; print ''.$deplacementstatic->getNomUrl(1).''; print ''.$userstatic->getNomUrl(1).''; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 8510f1caa16..43e62d4b3a9 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -302,7 +302,7 @@ if (empty($reshook)) // Note: Other solution if you want to add a negative line on invoice, is to create a discount for customer and consumme it (but this is possible on standard invoice only). $array_of_total_ht_per_vat_rate = array(); $array_of_total_ht_devise_per_vat_rate = array(); - foreach($object->lines as $line) { + foreach ($object->lines as $line) { if (empty($array_of_total_ht_per_vat_rate[$line->tva_tx.'_'.$line->vat_src_code])) $array_of_total_ht_per_vat_rate[$line->tva_tx.'_'.$line->vat_src_code] = 0; if (empty($array_of_total_ht_devise_per_vat_rate[$line->tva_tx.'_'.$line->vat_src_code])) $array_of_total_ht_devise_per_vat_rate[$line->tva_tx.'_'.$line->vat_src_code] = 0; $array_of_total_ht_per_vat_rate[$line->tva_tx.'_'.$line->vat_src_code] += $line->total_ht; @@ -310,7 +310,7 @@ if (empty($reshook)) } //var_dump($array_of_total_ht_per_vat_rate);exit; - foreach($array_of_total_ht_per_vat_rate as $vatrate => $tmpvalue) + foreach ($array_of_total_ht_per_vat_rate as $vatrate => $tmpvalue) { $tmp_total_ht = $array_of_total_ht_per_vat_rate[$vatrate]; $tmp_total_ht_devise = $array_of_total_ht_devise_per_vat_rate[$vatrate]; @@ -1524,7 +1524,7 @@ if (empty($reshook)) // If we create a deposit with all lines and a percent, we change amount if ($_POST['type'] == Facture::TYPE_DEPOSIT && $typeamount == 'variablealllines') { if (is_array($lines)) { - foreach($lines as $line) { + foreach ($lines as $line) { // We keep ->subprice and ->pa_ht, but we change the qty $line->qty = price2num($line->qty * $valuedeposit / 100, 'MS'); } @@ -5119,7 +5119,7 @@ elseif ($id > 0 || !empty($ref)) } // For credit note if ($object->type == Facture::TYPE_CREDIT_NOTE && $object->statut == Facture::STATUS_VALIDATED && $object->paye == 0 && $usercancreate - && (! empty($conf->global->INVOICE_ALLOW_REUSE_OF_CREDIT_WHEN_PARTIALLY_REFUNDED) || $object->getSommePaiement() == 0) + && (!empty($conf->global->INVOICE_ALLOW_REUSE_OF_CREDIT_WHEN_PARTIALLY_REFUNDED) || $object->getSommePaiement() == 0) ) { print ''.$langs->trans('ConvertToReduc').''; } diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index b9e80ca1cf8..312c34d0ecb 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -117,7 +117,7 @@ class Facture extends CommonInvoice * @var int Ref Int * @deprecated */ - public $ref_int; // deprecated + public $ref_int; // deprecated //Check constants for types public $type = self::TYPE_STANDARD; @@ -261,7 +261,7 @@ class Facture extends CommonInvoice 'ref' =>array('type'=>'varchar(30)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'showoncombobox'=>1, 'position'=>15), 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>20, 'index'=>1), 'ref_ext' =>array('type'=>'varchar(255)', 'label'=>'Ref ext', 'enabled'=>1, 'visible'=>0, 'position'=>25), - 'ref_int' =>array('type'=>'varchar(255)', 'label'=>'Ref int', 'enabled'=>1, 'visible'=>0, 'position'=>30), // deprecated + 'ref_int' =>array('type'=>'varchar(255)', 'label'=>'Ref int', 'enabled'=>1, 'visible'=>0, 'position'=>30), // deprecated 'type' =>array('type'=>'smallint(6)', 'label'=>'Type', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>35), 'ref_client' =>array('type'=>'varchar(255)', 'label'=>'Ref client', 'enabled'=>1, 'visible'=>-1, 'position'=>40), //'increment' =>array('type'=>'varchar(10)', 'label'=>'Increment', 'enabled'=>1, 'visible'=>-1, 'position'=>45), @@ -1499,7 +1499,7 @@ class Facture extends CommonInvoice $sql .= ' WHERE f.entity IN ('.getEntity('invoice').')'; // Dont't use entity if you use rowid if ($ref) $sql .= " AND f.ref='".$this->db->escape($ref)."'"; if ($ref_ext) $sql .= " AND f.ref_ext='".$this->db->escape($ref_ext)."'"; - if ($notused) $sql .= " AND f.ref_int='".$this->db->escape($notused)."'"; // deprecated + if ($notused) $sql .= " AND f.ref_int='".$this->db->escape($notused)."'"; // deprecated } dol_syslog(get_class($this)."::fetch", LOG_DEBUG); @@ -2439,9 +2439,9 @@ class Facture extends CommonInvoice $productStatic = null; $warehouseStatic = null; if ($batch_rule > 0) { - require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; - require_once DOL_DOCUMENT_ROOT . '/product/class/productbatch.class.php'; - require_once DOL_DOCUMENT_ROOT . '/product/stock/class/entrepot.class.php'; + require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; + require_once DOL_DOCUMENT_ROOT.'/product/class/productbatch.class.php'; + require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; $productStatic = new Product($this->db); $warehouseStatic = new Entrepot($this->db); } @@ -2621,7 +2621,7 @@ class Facture extends CommonInvoice $langs->load('errors'); $warehouseStatic->fetch($idwarehouse); $this->error = $langs->trans('ErrorBatchNoFoundForProductInWarehouse', $productStatic->label, $warehouseStatic->ref); - dol_syslog(__METHOD__ . ' Error: ' . $langs->transnoentitiesnoconv('ErrorBatchNoFoundForProductInWarehouse', $productStatic->label, $warehouseStatic->ref), LOG_ERR); + dol_syslog(__METHOD__.' Error: '.$langs->transnoentitiesnoconv('ErrorBatchNoFoundForProductInWarehouse', $productStatic->label, $warehouseStatic->ref), LOG_ERR); } foreach ($batchList as $batch) { @@ -2660,7 +2660,7 @@ class Facture extends CommonInvoice $langs->load('errors'); $warehouseStatic->fetch($idwarehouse); $this->error = $langs->trans('ErrorBatchNoFoundEnoughQuantityForProductInWarehouse', $productStatic->label, $warehouseStatic->ref); - dol_syslog(__METHOD__ . ' Error: ' . $langs->transnoentitiesnoconv('ErrorBatchNoFoundEnoughQuantityForProductInWarehouse', $productStatic->label, $warehouseStatic->ref), LOG_ERR); + dol_syslog(__METHOD__.' Error: '.$langs->transnoentitiesnoconv('ErrorBatchNoFoundEnoughQuantityForProductInWarehouse', $productStatic->label, $warehouseStatic->ref), LOG_ERR); } } } diff --git a/htdocs/compta/facture/class/facturestats.class.php b/htdocs/compta/facture/class/facturestats.class.php index 730df6ee6e4..ea0b17bc59a 100644 --- a/htdocs/compta/facture/class/facturestats.class.php +++ b/htdocs/compta/facture/class/facturestats.class.php @@ -22,10 +22,10 @@ * \ingroup factures * \brief Fichier de la classe de gestion des stats des factures */ -include_once DOL_DOCUMENT_ROOT . '/core/class/stats.class.php'; -include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; -include_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php'; -include_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; +include_once DOL_DOCUMENT_ROOT.'/core/class/stats.class.php'; +include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; +include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; /** * Class to manage stats for invoices (customer and supplier) @@ -64,32 +64,32 @@ class FactureStats extends Stats if ($mode == 'customer') { - $object=new Facture($this->db); + $object = new Facture($this->db); $this->from = MAIN_DB_PREFIX.$object->table_element." as f"; $this->from_line = MAIN_DB_PREFIX.$object->table_element_line." as tl"; - $this->field='total'; - $this->field_line='total_ht'; + $this->field = 'total'; + $this->field_line = 'total_ht'; } if ($mode == 'supplier') { - $object=new FactureFournisseur($this->db); + $object = new FactureFournisseur($this->db); $this->from = MAIN_DB_PREFIX.$object->table_element." as f"; $this->from_line = MAIN_DB_PREFIX.$object->table_element_line." as tl"; - $this->field='total_ht'; - $this->field_line='total_ht'; + $this->field = 'total_ht'; + $this->field_line = 'total_ht'; } $this->where = " f.fk_statut >= 0"; - $this->where.= " AND f.entity IN (".getEntity('invoice').")"; - if (!$user->rights->societe->client->voir && !$this->socid) $this->where .= " AND f.fk_soc = sc.fk_soc AND sc.fk_user = " .$user->id; - if ($mode == 'customer') $this->where.=" AND (f.fk_statut <> 3 OR f.close_code <> 'replaced')"; // Exclude replaced invoices as they are duplicated (we count closed invoices for other reasons) + $this->where .= " AND f.entity IN (".getEntity('invoice').")"; + if (!$user->rights->societe->client->voir && !$this->socid) $this->where .= " AND f.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; + if ($mode == 'customer') $this->where .= " AND (f.fk_statut <> 3 OR f.close_code <> 'replaced')"; // Exclude replaced invoices as they are duplicated (we count closed invoices for other reasons) if ($this->socid) { - $this->where.=" AND f.fk_soc = ".$this->socid; + $this->where .= " AND f.fk_soc = ".$this->socid; } - if ($this->userid > 0) $this->where.=' AND f.fk_user_author = '.$this->userid; - if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $this->where.= " AND f.type IN (0,1,2,5)"; - else $this->where.= " AND f.type IN (0,1,2,3,5)"; + if ($this->userid > 0) $this->where .= ' AND f.fk_user_author = '.$this->userid; + if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $this->where .= " AND f.type IN (0,1,2,5)"; + else $this->where .= " AND f.type IN (0,1,2,3,5)"; } @@ -105,14 +105,14 @@ class FactureStats extends Stats global $user; $sql = "SELECT date_format(f.datef,'%m') as dm, COUNT(*) as nb"; - $sql.= " FROM ".$this->from; + $sql .= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE f.datef BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; - $sql.= " AND ".$this->where; - $sql.= " GROUP BY dm"; - $sql.= $this->db->order('dm', 'DESC'); + $sql .= " WHERE f.datef BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; + $sql .= " AND ".$this->where; + $sql .= " GROUP BY dm"; + $sql .= $this->db->order('dm', 'DESC'); - $res=$this->_getNbByMonth($year, $sql, $format); + $res = $this->_getNbByMonth($year, $sql, $format); //var_dump($res);print '
'; return $res; } @@ -128,11 +128,11 @@ class FactureStats extends Stats global $user; $sql = "SELECT date_format(f.datef,'%Y') as dm, COUNT(*), SUM(c.".$this->field.")"; - $sql.= " FROM ".$this->from; + $sql .= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE ".$this->where; - $sql.= " GROUP BY dm"; - $sql.= $this->db->order('dm', 'DESC'); + $sql .= " WHERE ".$this->where; + $sql .= " GROUP BY dm"; + $sql .= $this->db->order('dm', 'DESC'); return $this->_getNbByYear($sql); } @@ -150,14 +150,14 @@ class FactureStats extends Stats global $user; $sql = "SELECT date_format(datef,'%m') as dm, SUM(f.".$this->field.")"; - $sql.= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE f.datef BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; - $sql.= " AND ".$this->where; - $sql.= " GROUP BY dm"; - $sql.= $this->db->order('dm', 'DESC'); + $sql .= " FROM ".$this->from; + if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE f.datef BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; + $sql .= " AND ".$this->where; + $sql .= " GROUP BY dm"; + $sql .= $this->db->order('dm', 'DESC'); - $res=$this->_getAmountByMonth($year, $sql, $format); + $res = $this->_getAmountByMonth($year, $sql, $format); //var_dump($res);print '
'; return $res; } @@ -173,12 +173,12 @@ class FactureStats extends Stats global $user; $sql = "SELECT date_format(datef,'%m') as dm, AVG(f.".$this->field.")"; - $sql.= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE f.datef BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; - $sql.= " AND ".$this->where; - $sql.= " GROUP BY dm"; - $sql.= $this->db->order('dm', 'DESC'); + $sql .= " FROM ".$this->from; + if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE f.datef BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; + $sql .= " AND ".$this->where; + $sql .= " GROUP BY dm"; + $sql .= $this->db->order('dm', 'DESC'); return $this->_getAverageByMonth($year, $sql); } @@ -193,11 +193,11 @@ class FactureStats extends Stats global $user; $sql = "SELECT date_format(datef,'%Y') as year, COUNT(*) as nb, SUM(f.".$this->field.") as total, AVG(f.".$this->field.") as avg"; - $sql.= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE ".$this->where; - $sql.= " GROUP BY year"; - $sql.= $this->db->order('year', 'DESC'); + $sql .= " FROM ".$this->from; + if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE ".$this->where; + $sql .= " GROUP BY year"; + $sql .= $this->db->order('year', 'DESC'); return $this->_getAllByYear($sql); } @@ -214,13 +214,13 @@ class FactureStats extends Stats global $user; $sql = "SELECT product.ref, COUNT(product.ref) as nb, SUM(tl.".$this->field_line.") as total, AVG(tl.".$this->field_line.") as avg"; - $sql.= " FROM ".$this->from.", ".$this->from_line.", ".MAIN_DB_PREFIX."product as product"; - if (!$user->rights->societe->client->voir && !$this->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE ".$this->where; - $sql.= " AND f.rowid = tl.fk_facture AND tl.fk_product = product.rowid"; - $sql.= " AND f.datef BETWEEN '".$this->db->idate(dol_get_first_day($year, 1, false))."' AND '".$this->db->idate(dol_get_last_day($year, 12, false))."'"; - $sql.= " GROUP BY product.ref"; - $sql.= $this->db->order('nb', 'DESC'); + $sql .= " FROM ".$this->from.", ".$this->from_line.", ".MAIN_DB_PREFIX."product as product"; + if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE ".$this->where; + $sql .= " AND f.rowid = tl.fk_facture AND tl.fk_product = product.rowid"; + $sql .= " AND f.datef BETWEEN '".$this->db->idate(dol_get_first_day($year, 1, false))."' AND '".$this->db->idate(dol_get_last_day($year, 12, false))."'"; + $sql .= " GROUP BY product.ref"; + $sql .= $this->db->order('nb', 'DESC'); //$sql.= $this->db->plimit(20); return $this->_getAllByProduct($sql, $limit); diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 82f92085abf..81607613947 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -477,7 +477,7 @@ if ($search_montant_vat != '') $sql .= natural_search('f.tva', $search_montant_v if ($search_montant_localtax1 != '') $sql .= natural_search('f.localtax1', $search_montant_localtax1, 1); if ($search_montant_localtax2 != '') $sql .= natural_search('f.localtax2', $search_montant_localtax2, 1); if ($search_montant_ttc != '') $sql .= natural_search('f.total_ttc', $search_montant_ttc, 1); -if ($search_multicurrency_code != '') $sql .= ' AND f.multicurrency_code = "' . $db->escape($search_multicurrency_code) . '"'; +if ($search_multicurrency_code != '') $sql .= ' AND f.multicurrency_code = "'.$db->escape($search_multicurrency_code).'"'; if ($search_multicurrency_tx != '') $sql .= natural_search('f.multicurrency_tx', $search_multicurrency_tx, 1); if ($search_multicurrency_montant_ht != '') $sql .= natural_search('f.multicurrency_total_ht', $search_multicurrency_montant_ht, 1); if ($search_multicurrency_montant_vat != '') $sql .= natural_search('f.multicurrency_total_tva', $search_multicurrency_montant_vat, 1); @@ -1402,7 +1402,7 @@ if ($resql) // Currency if (!empty($arrayfields['f.multicurrency_code']['checked'])) { - print ''.$obj->multicurrency_code . ' - ' . $langs->trans('Currency' . $obj->multicurrency_code)."\n"; + print ''.$obj->multicurrency_code.' - '.$langs->trans('Currency'.$obj->multicurrency_code)."\n"; if (!$i) $totalarray['nbfield']++; } @@ -1410,7 +1410,7 @@ if ($resql) if (!empty($arrayfields['f.multicurrency_tx']['checked'])) { print ''; - $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $obj->rowid, $obj->multicurrency_tx, 'none', $obj->multicurrency_code); + $form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$obj->rowid, $obj->multicurrency_tx, 'none', $obj->multicurrency_code); print "\n"; if (!$i) $totalarray['nbfield']++; } diff --git a/htdocs/core/actions_extrafields.inc.php b/htdocs/core/actions_extrafields.inc.php index 5c8fc84a843..bb5a7516fb2 100644 --- a/htdocs/core/actions_extrafields.inc.php +++ b/htdocs/core/actions_extrafields.inc.php @@ -23,18 +23,18 @@ * \brief Code for actions on extrafields admin pages */ -$maxsizestring=255; -$maxsizeint=10; -$mesg=array(); +$maxsizestring = 255; +$maxsizeint = 10; +$mesg = array(); -$extrasize=GETPOST('size', 'intcomma'); -$type=GETPOST('type', 'alpha'); -$param=GETPOST('param', 'alpha'); +$extrasize = GETPOST('size', 'intcomma'); +$type = GETPOST('type', 'alpha'); +$param = GETPOST('param', 'alpha'); -if ($type=='double' && strpos($extrasize, ',')===false) $extrasize='24,8'; -if ($type=='date') $extrasize=''; -if ($type=='datetime') $extrasize=''; -if ($type=='select') $extrasize=''; +if ($type == 'double' && strpos($extrasize, ',') === false) $extrasize = '24,8'; +if ($type == 'date') $extrasize = ''; +if ($type == 'datetime') $extrasize = ''; +if ($type == 'select') $extrasize = ''; // Add attribute @@ -43,83 +43,83 @@ if ($action == 'add') if ($_POST["button"] != $langs->trans("Cancel")) { // Check values - if (! $type) + if (!$type) { $error++; $langs->load("errors"); - $mesg[]=$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")); + $mesg[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")); $action = 'create'; } - if ($type=='varchar' && $extrasize <= 0) + if ($type == 'varchar' && $extrasize <= 0) { $error++; $langs->load("errors"); - $mesg[]=$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Size")); + $mesg[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Size")); $action = 'edit'; } - if ($type=='varchar' && $extrasize > $maxsizestring) + if ($type == 'varchar' && $extrasize > $maxsizestring) { $error++; $langs->load("errors"); - $mesg[]=$langs->trans("ErrorSizeTooLongForVarcharType", $maxsizestring); + $mesg[] = $langs->trans("ErrorSizeTooLongForVarcharType", $maxsizestring); $action = 'create'; } - if ($type=='int' && $extrasize > $maxsizeint) + if ($type == 'int' && $extrasize > $maxsizeint) { $error++; $langs->load("errors"); - $mesg[]=$langs->trans("ErrorSizeTooLongForIntType", $maxsizeint); + $mesg[] = $langs->trans("ErrorSizeTooLongForIntType", $maxsizeint); $action = 'create'; } - if ($type=='select' && !$param) + if ($type == 'select' && !$param) { $error++; $langs->load("errors"); - $mesg[]=$langs->trans("ErrorNoValueForSelectType"); + $mesg[] = $langs->trans("ErrorNoValueForSelectType"); $action = 'create'; } - if ($type=='sellist' && !$param) + if ($type == 'sellist' && !$param) { $error++; $langs->load("errors"); - $mesg[]=$langs->trans("ErrorNoValueForSelectListType"); + $mesg[] = $langs->trans("ErrorNoValueForSelectListType"); $action = 'create'; } - if ($type=='checkbox' && !$param) + if ($type == 'checkbox' && !$param) { $error++; $langs->load("errors"); - $mesg[]=$langs->trans("ErrorNoValueForCheckBoxType"); + $mesg[] = $langs->trans("ErrorNoValueForCheckBoxType"); $action = 'create'; } - if ($type=='link' && !$param) + if ($type == 'link' && !$param) { $error++; $langs->load("errors"); - $mesg[]=$langs->trans("ErrorNoValueForLinkType"); + $mesg[] = $langs->trans("ErrorNoValueForLinkType"); $action = 'create'; } - if ($type=='radio' && !$param) + if ($type == 'radio' && !$param) { $error++; $langs->load("errors"); - $mesg[]=$langs->trans("ErrorNoValueForRadioType"); + $mesg[] = $langs->trans("ErrorNoValueForRadioType"); $action = 'create'; } - if ((($type=='radio') || ($type=='checkbox')) && $param) + if ((($type == 'radio') || ($type == 'checkbox')) && $param) { // Construct array for parameter (value of select list) $parameters = $param; $parameters_array = explode("\r\n", $parameters); - foreach($parameters_array as $param_ligne) + foreach ($parameters_array as $param_ligne) { if (!empty($param_ligne)) { if (preg_match_all('/,/', $param_ligne, $matches)) { - if (count($matches[0])>1) { + if (count($matches[0]) > 1) { $error++; $langs->load("errors"); - $mesg[]=$langs->trans("ErrorBadFormatValueList", $param_ligne); + $mesg[] = $langs->trans("ErrorBadFormatValueList", $param_ligne); $action = 'create'; } } @@ -127,14 +127,14 @@ if ($action == 'add') { $error++; $langs->load("errors"); - $mesg[]=$langs->trans("ErrorBadFormatValueList", $param_ligne); + $mesg[] = $langs->trans("ErrorBadFormatValueList", $param_ligne); $action = 'create'; } } } } - if (! $error) + if (!$error) { // attrname must be alphabetical and lower case only if (isset($_POST["attrname"]) && preg_match("/^[a-z0-9-_]+$/", $_POST['attrname']) && !is_numeric($_POST["attrname"])) @@ -144,8 +144,8 @@ if ($action == 'add') $parameters = $param; $parameters_array = explode("\r\n", $parameters); //In sellist we have only one line and it can have come to do SQL expression - if ($type=='sellist') { - foreach($parameters_array as $param_ligne) + if ($type == 'sellist') { + foreach ($parameters_array as $param_ligne) { $params['options'] = array($parameters=>null); } @@ -153,37 +153,37 @@ if ($action == 'add') else { //Esle it's separated key/value and coma list - foreach($parameters_array as $param_ligne) + foreach ($parameters_array as $param_ligne) { - list($key,$value) = explode(',', $param_ligne); + list($key, $value) = explode(',', $param_ligne); $params['options'][$key] = $value; } } // Visibility: -1=not visible by default in list, 1=visible, 0=hidden $visibility = GETPOST('list', 'alpha'); - if ($type == 'separate') $visibility=3; + if ($type == 'separate') $visibility = 3; - $result=$extrafields->addExtraField( + $result = $extrafields->addExtraField( GETPOST('attrname', 'alpha'), GETPOST('label', 'alpha'), $type, GETPOST('pos', 'int'), $extrasize, $elementtype, - (GETPOST('unique', 'alpha')?1:0), - (GETPOST('required', 'alpha')?1:0), + (GETPOST('unique', 'alpha') ? 1 : 0), + (GETPOST('required', 'alpha') ? 1 : 0), $default_value, $params, - (GETPOST('alwayseditable', 'alpha')?1:0), - (GETPOST('perms', 'alpha')?GETPOST('perms', 'alpha'):''), + (GETPOST('alwayseditable', 'alpha') ? 1 : 0), + (GETPOST('perms', 'alpha') ?GETPOST('perms', 'alpha') : ''), $visibility, GETPOST('help', 'alpha'), GETPOST('computed_value', 'alpha'), - (GETPOST('entitycurrentorall', 'alpha')?0:''), + (GETPOST('entitycurrentorall', 'alpha') ? 0 : ''), GETPOST('langfile', 'alpha'), 1, - (GETPOST('totalizable', 'alpha')?1:0), + (GETPOST('totalizable', 'alpha') ? 1 : 0), GETPOST('printable', 'alpha') ); if ($result > 0) @@ -195,7 +195,7 @@ if ($action == 'add') else { $error++; - $mesg=$extrafields->error; + $mesg = $extrafields->error; setEventMessages($mesg, null, 'errors'); } } @@ -203,7 +203,7 @@ if ($action == 'add') { $error++; $langs->load("errors"); - $mesg=$langs->trans("ErrorFieldCanNotContainSpecialNorUpperCharacters", $langs->transnoentities("AttributeCode")); + $mesg = $langs->trans("ErrorFieldCanNotContainSpecialNorUpperCharacters", $langs->transnoentities("AttributeCode")); setEventMessages($mesg, null, 'errors'); $action = 'create'; } @@ -221,76 +221,76 @@ if ($action == 'update') if ($_POST["button"] != $langs->trans("Cancel")) { // Check values - if (! $type) + if (!$type) { $error++; $langs->load("errors"); - $mesg[]=$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")); + $mesg[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")); $action = 'edit'; } - if ($type=='varchar' && $extrasize <= 0) + if ($type == 'varchar' && $extrasize <= 0) { $error++; $langs->load("errors"); - $mesg[]=$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Size")); + $mesg[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Size")); $action = 'edit'; } - if ($type=='varchar' && $extrasize > $maxsizestring) + if ($type == 'varchar' && $extrasize > $maxsizestring) { $error++; $langs->load("errors"); - $mesg[]=$langs->trans("ErrorSizeTooLongForVarcharType", $maxsizestring); + $mesg[] = $langs->trans("ErrorSizeTooLongForVarcharType", $maxsizestring); $action = 'edit'; } - if ($type=='int' && $extrasize > $maxsizeint) + if ($type == 'int' && $extrasize > $maxsizeint) { $error++; $langs->load("errors"); - $mesg[]=$langs->trans("ErrorSizeTooLongForIntType", $maxsizeint); + $mesg[] = $langs->trans("ErrorSizeTooLongForIntType", $maxsizeint); $action = 'edit'; } - if ($type=='select' && !$param) + if ($type == 'select' && !$param) { $error++; $langs->load("errors"); - $mesg[]=$langs->trans("ErrorNoValueForSelectType"); + $mesg[] = $langs->trans("ErrorNoValueForSelectType"); $action = 'edit'; } - if ($type=='sellist' && !$param) + if ($type == 'sellist' && !$param) { $error++; $langs->load("errors"); - $mesg[]=$langs->trans("ErrorNoValueForSelectListType"); + $mesg[] = $langs->trans("ErrorNoValueForSelectListType"); $action = 'edit'; } - if ($type=='checkbox' && !$param) + if ($type == 'checkbox' && !$param) { $error++; $langs->load("errors"); - $mesg[]=$langs->trans("ErrorNoValueForCheckBoxType"); + $mesg[] = $langs->trans("ErrorNoValueForCheckBoxType"); $action = 'edit'; } - if ($type=='radio' && !$param) + if ($type == 'radio' && !$param) { $error++; $langs->load("errors"); - $mesg[]=$langs->trans("ErrorNoValueForRadioType"); + $mesg[] = $langs->trans("ErrorNoValueForRadioType"); $action = 'edit'; } - if ((($type=='radio') || ($type=='checkbox')) && $param) + if ((($type == 'radio') || ($type == 'checkbox')) && $param) { // Construct array for parameter (value of select list) $parameters = $param; $parameters_array = explode("\r\n", $parameters); - foreach($parameters_array as $param_ligne) + foreach ($parameters_array as $param_ligne) { if (!empty($param_ligne)) { if (preg_match_all('/,/', $param_ligne, $matches)) { - if (count($matches[0])>1) { + if (count($matches[0]) > 1) { $error++; $langs->load("errors"); - $mesg[]=$langs->trans("ErrorBadFormatValueList", $param_ligne); + $mesg[] = $langs->trans("ErrorBadFormatValueList", $param_ligne); $action = 'edit'; } } @@ -298,14 +298,14 @@ if ($action == 'update') { $error++; $langs->load("errors"); - $mesg[]=$langs->trans("ErrorBadFormatValueList", $param_ligne); + $mesg[] = $langs->trans("ErrorBadFormatValueList", $param_ligne); $action = 'edit'; } } } } - if (! $error) + if (!$error) { if (isset($_POST["attrname"]) && preg_match("/^\w[a-zA-Z0-9-_]*$/", $_POST['attrname'])) { @@ -314,8 +314,8 @@ if ($action == 'update') $parameters = $param; $parameters_array = explode("\r\n", $parameters); //In sellist we have only one line and it can have come to do SQL expression - if ($type=='sellist') { - foreach($parameters_array as $param_ligne) + if ($type == 'sellist') { + foreach ($parameters_array as $param_ligne) { $params['options'] = array($parameters=>null); } @@ -323,37 +323,37 @@ if ($action == 'update') else { //Esle it's separated key/value and coma list - foreach($parameters_array as $param_ligne) + foreach ($parameters_array as $param_ligne) { - list($key,$value) = explode(',', $param_ligne); + list($key, $value) = explode(',', $param_ligne); $params['options'][$key] = $value; } } // Visibility: -1=not visible by default in list, 1=visible, 0=hidden $visibility = GETPOST('list', 'alpha'); - if ($type == 'separate') $visibility=3; + if ($type == 'separate') $visibility = 3; - $result=$extrafields->update( + $result = $extrafields->update( GETPOST('attrname', 'alpha'), GETPOST('label', 'alpha'), $type, $extrasize, $elementtype, - (GETPOST('unique', 'alpha')?1:0), - (GETPOST('required', 'alpha')?1:0), + (GETPOST('unique', 'alpha') ? 1 : 0), + (GETPOST('required', 'alpha') ? 1 : 0), $pos, $params, - (GETPOST('alwayseditable', 'alpha')?1:0), - (GETPOST('perms', 'alpha')?GETPOST('perms', 'alpha'):''), + (GETPOST('alwayseditable', 'alpha') ? 1 : 0), + (GETPOST('perms', 'alpha') ?GETPOST('perms', 'alpha') : ''), $visibility, GETPOST('help', 'alpha'), GETPOST('default_value', 'alpha'), GETPOST('computed_value', 'alpha'), - (GETPOST('entitycurrentorall', 'alpha')?0:''), + (GETPOST('entitycurrentorall', 'alpha') ? 0 : ''), GETPOST('langfile'), 1, - (GETPOST('totalizable', 'alpha')?1:0), + (GETPOST('totalizable', 'alpha') ? 1 : 0), GETPOST('printable', 'alpha') ); if ($result > 0) @@ -365,7 +365,7 @@ if ($action == 'update') else { $error++; - $mesg=$extrafields->error; + $mesg = $extrafields->error; setEventMessages($mesg, null, 'errors'); } } @@ -373,7 +373,7 @@ if ($action == 'update') { $error++; $langs->load("errors"); - $mesg=$langs->trans("ErrorFieldCanNotContainSpecialCharacters", $langs->transnoentities("AttributeCode")); + $mesg = $langs->trans("ErrorFieldCanNotContainSpecialCharacters", $langs->transnoentities("AttributeCode")); setEventMessages($mesg, null, 'errors'); } } @@ -387,20 +387,20 @@ if ($action == 'update') // Delete attribute if ($action == 'delete') { - if(isset($_GET["attrname"]) && preg_match("/^\w[a-zA-Z0-9-_]*$/", $_GET["attrname"])) + if (isset($_GET["attrname"]) && preg_match("/^\w[a-zA-Z0-9-_]*$/", $_GET["attrname"])) { - $result=$extrafields->delete($_GET["attrname"], $elementtype); + $result = $extrafields->delete($_GET["attrname"], $elementtype); if ($result >= 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; } - else $mesg=$extrafields->error; + else $mesg = $extrafields->error; } else { $error++; $langs->load("errors"); - $mesg=$langs->trans("ErrorFieldCanNotContainSpecialCharacters", $langs->transnoentities("AttributeCode")); + $mesg = $langs->trans("ErrorFieldCanNotContainSpecialCharacters", $langs->transnoentities("AttributeCode")); } } diff --git a/htdocs/core/boxes/box_graph_product_distribution.php b/htdocs/core/boxes/box_graph_product_distribution.php index 3447b76a2b7..e8337d74303 100644 --- a/htdocs/core/boxes/box_graph_product_distribution.php +++ b/htdocs/core/boxes/box_graph_product_distribution.php @@ -163,7 +163,7 @@ class box_graph_product_distribution extends ModeleBoxes { $i = 0; $legend = array(); - foreach($data1 as $key => $val) + foreach ($data1 as $key => $val) { $data1[$key][0] = dol_trunc($data1[$key][0], 32); $legend[] = $data1[$key][0]; @@ -222,7 +222,7 @@ class box_graph_product_distribution extends ModeleBoxes { $i = 0; $legend = array(); - foreach($data2 as $key => $val) + foreach ($data2 as $key => $val) { $data2[$key][0] = dol_trunc($data2[$key][0], 32); $legend[] = $data2[$key][0]; @@ -282,7 +282,7 @@ class box_graph_product_distribution extends ModeleBoxes { $i = 0; $legend = array(); - foreach($data3 as $key => $val) + foreach ($data3 as $key => $val) { $data3[$key][0] = dol_trunc($data3[$key][0], 32); $legend[] = $data3[$key][0]; diff --git a/htdocs/core/class/canvas.class.php b/htdocs/core/class/canvas.class.php index 68f2e9b1ba8..80c6ff1b7a6 100644 --- a/htdocs/core/class/canvas.class.php +++ b/htdocs/core/class/canvas.class.php @@ -36,7 +36,7 @@ class Canvas /** * @var string Error code (or message) */ - public $error=''; + public $error = ''; /** * @var string[] Error codes (or messages) @@ -45,13 +45,13 @@ class Canvas public $actiontype; - public $dirmodule; // Module directory - public $targetmodule; // Module concerned by canvas (ex: thirdparty, contact, ...) - public $canvas; // Name of canvas (ex: company, individual, product, service, ...) - public $card; // Tab (sub-canvas) + public $dirmodule; // Module directory + public $targetmodule; // Module concerned by canvas (ex: thirdparty, contact, ...) + public $canvas; // Name of canvas (ex: company, individual, product, service, ...) + public $card; // Tab (sub-canvas) - public $template_dir; // Initialized by getCanvas with templates directory - public $control; // Initialized by getCanvas with controller instance + public $template_dir; // Initialized by getCanvas with templates directory + public $control; // Initialized by getCanvas with controller instance /** @@ -76,9 +76,9 @@ class Canvas private function _cleanaction($action) { $newaction = $action; - if ($newaction == 'add') $newaction='create'; - if ($newaction == 'update') $newaction='edit'; - if (empty($newaction) || $newaction == 'delete' || $newaction == 'create_user' || $newaction == 'presend' || $newaction == 'send') $newaction='view'; + if ($newaction == 'add') $newaction = 'create'; + if ($newaction == 'update') $newaction = 'edit'; + if (empty($newaction) || $newaction == 'delete' || $newaction == 'create_user' || $newaction == 'presend' || $newaction == 'send') $newaction = 'view'; return $newaction; } @@ -114,7 +114,7 @@ class Canvas if (file_exists($controlclassfile)) { // Include actions class (controller) - $this->control_file=$controlclassfile; + $this->control_file = $controlclassfile; require_once $controlclassfile; // Instantiate actions class (controller) @@ -124,9 +124,9 @@ class Canvas // Template dir $this->template_dir = dol_buildpath('/'.$this->dirmodule.'/canvas/'.$this->canvas.'/tpl/'); - if (! is_dir($this->template_dir)) + if (!is_dir($this->template_dir)) { - $this->template_dir=''; + $this->template_dir = ''; } //print 'dimodule='.$dirmodule.' canvas='.$this->canvas.'
'; @@ -158,7 +158,7 @@ class Canvas { if (empty($this->template_dir)) return 0; - if (file_exists($this->template_dir.(!empty($this->card)?$this->card.'_':'').$this->_cleanaction($action).'.tpl.php')) return 1; + if (file_exists($this->template_dir.(!empty($this->card) ? $this->card.'_' : '').$this->_cleanaction($action).'.tpl.php')) return 1; else return 0; } @@ -177,7 +177,7 @@ class Canvas global $form, $formfile; //var_dump($this->card.'-'.$action); - include $this->template_dir.(!empty($this->card)?$this->card.'_':'').$this->_cleanaction($action).'.tpl.php'; // Include native PHP template + include $this->template_dir.(!empty($this->card) ? $this->card.'_' : '').$this->_cleanaction($action).'.tpl.php'; // Include native PHP template } diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index b0001a695b8..6f151698cfc 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -221,24 +221,24 @@ abstract class CommonDocGenerator ); // Retrieve extrafields - if(is_array($object->array_options) && count($object->array_options)) + if (is_array($object->array_options) && count($object->array_options)) { require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; $extrafields = new ExtraFields($this->db); $extrafields->fetch_name_optionals_label($object->table_element, true); $object->fetch_optionals(); - foreach($extrafields->attributes[$object->table_element]['label'] as $key=>$label) + foreach ($extrafields->attributes[$object->table_element]['label'] as $key=>$label) { - if($extrafields->attributes[$object->table_element]['type'][$key] == 'price') + if ($extrafields->attributes[$object->table_element]['type'][$key] == 'price') { $object->array_options['options_'.$key] = price($object->array_options['options_'.$key], 0, $outputlangs, 0, 0, -1, $conf->currency); } - elseif($extrafields->attributes[$object->table_element]['type'][$key] == 'select' || $extrafields->attributes[$object->table_element]['type'][$key] == 'checkbox') + elseif ($extrafields->attributes[$object->table_element]['type'][$key] == 'select' || $extrafields->attributes[$object->table_element]['type'][$key] == 'checkbox') { $object->array_options['options_'.$key] = $extrafields->attributes[$object->table_element]['param'][$key]['options'][$object->array_options['options_'.$key]]; } - $array_thirdparty = array_merge($array_thirdparty, array ('company_options_'.$key => $object->array_options ['options_' . $key])); + $array_thirdparty = array_merge($array_thirdparty, array('company_options_'.$key => $object->array_options ['options_'.$key])); } } return $array_thirdparty; @@ -258,61 +258,61 @@ abstract class CommonDocGenerator // phpcs:enable global $conf; - if(empty($object->country) && ! empty($object->country_code)) + if (empty($object->country) && !empty($object->country_code)) { - $object->country = $outputlangs->transnoentitiesnoconv("Country" . $object->country_code); + $object->country = $outputlangs->transnoentitiesnoconv("Country".$object->country_code); } - if(empty($object->state) && ! empty($object->state_code)) + if (empty($object->state) && !empty($object->state_code)) { $object->state = getState($object->state_code, 0); } - $array_contact = array ( - $array_key . '_fullname' => $object->getFullName($outputlangs, 1), - $array_key . '_lastname' => $object->lastname, - $array_key . '_firstname' => $object->firstname, - $array_key . '_address' => $object->address, - $array_key . '_zip' => $object->zip, - $array_key . '_town' => $object->town, - $array_key . '_state_id' => $object->state_id, - $array_key . '_state_code' => $object->state_code, - $array_key . '_state' => $object->state, - $array_key . '_country_id' => $object->country_id, - $array_key . '_country_code' => $object->country_code, - $array_key . '_country' => $object->country, - $array_key . '_poste' => $object->poste, - $array_key . '_socid' => $object->socid, - $array_key . '_statut' => $object->statut, - $array_key . '_code' => $object->code, - $array_key . '_email' => $object->email, - $array_key . '_jabberid' => $object->jabberid, - $array_key . '_phone_pro' => $object->phone_pro, - $array_key . '_phone_perso' => $object->phone_perso, - $array_key . '_phone_mobile' => $object->phone_mobile, - $array_key . '_fax' => $object->fax, - $array_key . '_birthday' => $object->birthday, - $array_key . '_default_lang' => $object->default_lang, - $array_key . '_note_public' => $object->note_public, - $array_key . '_note_private' => $object->note_private + $array_contact = array( + $array_key.'_fullname' => $object->getFullName($outputlangs, 1), + $array_key.'_lastname' => $object->lastname, + $array_key.'_firstname' => $object->firstname, + $array_key.'_address' => $object->address, + $array_key.'_zip' => $object->zip, + $array_key.'_town' => $object->town, + $array_key.'_state_id' => $object->state_id, + $array_key.'_state_code' => $object->state_code, + $array_key.'_state' => $object->state, + $array_key.'_country_id' => $object->country_id, + $array_key.'_country_code' => $object->country_code, + $array_key.'_country' => $object->country, + $array_key.'_poste' => $object->poste, + $array_key.'_socid' => $object->socid, + $array_key.'_statut' => $object->statut, + $array_key.'_code' => $object->code, + $array_key.'_email' => $object->email, + $array_key.'_jabberid' => $object->jabberid, + $array_key.'_phone_pro' => $object->phone_pro, + $array_key.'_phone_perso' => $object->phone_perso, + $array_key.'_phone_mobile' => $object->phone_mobile, + $array_key.'_fax' => $object->fax, + $array_key.'_birthday' => $object->birthday, + $array_key.'_default_lang' => $object->default_lang, + $array_key.'_note_public' => $object->note_public, + $array_key.'_note_private' => $object->note_private ); // Retrieve extrafields - require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; $extrafields = new ExtraFields($this->db); $extrafields->fetch_name_optionals_label($object->table_element, true); $object->fetch_optionals(); - foreach($extrafields->attributes[$object->table_element]['label'] as $key => $label) + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $label) { if ($extrafields->attributes[$object->table_element]['type'][$key] == 'price') { - $object->array_options['options_' . $key] = price($object->array_options ['options_' . $key], 0, $outputlangs, 0, 0, - 1, $conf->currency); + $object->array_options['options_'.$key] = price($object->array_options ['options_'.$key], 0, $outputlangs, 0, 0, - 1, $conf->currency); } - elseif($extrafields->attributes[$object->table_element]['type'][$key] == 'select' || $extrafields->attributes[$object->table_element]['type'][$key] == 'checkbox') + elseif ($extrafields->attributes[$object->table_element]['type'][$key] == 'select' || $extrafields->attributes[$object->table_element]['type'][$key] == 'checkbox') { - $object->array_options['options_' . $key] = $extrafields->attributes[$object->table_element]['param'][$key]['options'][$object->array_options['options_' . $key]]; + $object->array_options['options_'.$key] = $extrafields->attributes[$object->table_element]['param'][$key]['options'][$object->array_options['options_'.$key]]; } - $array_contact = array_merge($array_contact, array($array_key.'_options_' . $key => $object->array_options['options_'. $key])); + $array_contact = array_merge($array_contact, array($array_key.'_options_'.$key => $object->array_options['options_'.$key])); } return $array_contact; } @@ -478,20 +478,20 @@ abstract class CommonDocGenerator } // Add vat by rates - if (is_array($object->lines) && count($object->lines)>0) + if (is_array($object->lines) && count($object->lines) > 0) { $totalUp = 0; foreach ($object->lines as $line) { // $line->tva_tx format depends on database field accuraty, no reliable. This is kept for backward compatibility - if (empty($resarray[$array_key.'_total_vat_'.$line->tva_tx])) $resarray[$array_key.'_total_vat_'.$line->tva_tx]=0; - $resarray[$array_key.'_total_vat_'.$line->tva_tx]+=$line->total_tva; - $resarray[$array_key.'_total_vat_locale_'.$line->tva_tx]=price($resarray[$array_key.'_total_vat_'.$line->tva_tx]); + if (empty($resarray[$array_key.'_total_vat_'.$line->tva_tx])) $resarray[$array_key.'_total_vat_'.$line->tva_tx] = 0; + $resarray[$array_key.'_total_vat_'.$line->tva_tx] += $line->total_tva; + $resarray[$array_key.'_total_vat_locale_'.$line->tva_tx] = price($resarray[$array_key.'_total_vat_'.$line->tva_tx]); // $vatformated is vat without not expected chars (so 20, or 8.5 or 5.99 for example) - $vatformated=vatrate($line->tva_tx); - if (empty($resarray[$array_key.'_total_vat_'.$vatformated])) $resarray[$array_key.'_total_vat_'.$vatformated]=0; - $resarray[$array_key.'_total_vat_'.$vatformated]+=$line->total_tva; - $resarray[$array_key.'_total_vat_locale_'.$vatformated]=price($resarray[$array_key.'_total_vat_'.$vatformated]); + $vatformated = vatrate($line->tva_tx); + if (empty($resarray[$array_key.'_total_vat_'.$vatformated])) $resarray[$array_key.'_total_vat_'.$vatformated] = 0; + $resarray[$array_key.'_total_vat_'.$vatformated] += $line->total_tva; + $resarray[$array_key.'_total_vat_locale_'.$vatformated] = price($resarray[$array_key.'_total_vat_'.$vatformated]); $totalUp += $line->subprice * $line->qty; } @@ -589,13 +589,13 @@ abstract class CommonDocGenerator // Units if ($conf->global->PRODUCT_USE_UNITS) { - $resarray['line_unit']=$outputlangs->trans($line->getLabelOfUnit('long')); - $resarray['line_unit_short']=$outputlangs->trans($line->getLabelOfUnit('short')); + $resarray['line_unit'] = $outputlangs->trans($line->getLabelOfUnit('long')); + $resarray['line_unit_short'] = $outputlangs->trans($line->getLabelOfUnit('short')); } // Retrieve extrafields - $extrafieldkey=$line->element; - $array_key="line"; + $extrafieldkey = $line->element; + $array_key = "line"; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; $extrafields = new ExtraFields($this->db); $extrafields->fetch_name_optionals_label($extrafieldkey, true); @@ -608,7 +608,7 @@ abstract class CommonDocGenerator { // Add the product supplier extrafields to the substitutions $extrafields->fetch_name_optionals_label("product_fournisseur_price"); - $extralabels=$extrafields->attributes["product_fournisseur_price"]['label']; + $extralabels = $extrafields->attributes["product_fournisseur_price"]['label']; if (!empty($extralabels) && is_array($extralabels)) { @@ -622,7 +622,7 @@ abstract class CommonDocGenerator if ($columns != "") { $columns = substr($columns, 0, strlen($columns) - 2); - $resql = $this->db->query("SELECT $columns FROM " . MAIN_DB_PREFIX . "product_fournisseur_price_extrafields AS ex INNER JOIN " . MAIN_DB_PREFIX . "product_fournisseur_price AS f ON ex.fk_object = f.rowid WHERE f.ref_fourn = '" . $line->ref_supplier . "'"); + $resql = $this->db->query("SELECT $columns FROM ".MAIN_DB_PREFIX."product_fournisseur_price_extrafields AS ex INNER JOIN ".MAIN_DB_PREFIX."product_fournisseur_price AS f ON ex.fk_object = f.rowid WHERE f.ref_fourn = '".$line->ref_supplier."'"); if ($this->db->num_rows($resql) > 0) { @@ -737,14 +737,14 @@ abstract class CommonDocGenerator 'line_qty'=>$line->qty, 'line_qty_shipped'=>$line->qty_shipped, 'line_qty_asked'=>$line->qty_asked, - 'line_discount_percent'=>($line->remise_percent?$line->remise_percent.'%':''), + 'line_discount_percent'=>($line->remise_percent ? $line->remise_percent.'%' : ''), 'line_price_ht'=>price($line->total_ht), 'line_price_ttc'=>price($line->total_ttc), 'line_price_vat'=>price($line->total_tva), - 'line_weight'=>empty($line->weight) ? '' : $line->weight*$line->qty_shipped.' '.measuringUnitString(0, 'weight', $line->weight_units), - 'line_length'=>empty($line->length) ? '' : $line->length*$line->qty_shipped.' '.measuringUnitString(0, 'size', $line->length_units), - 'line_surface'=>empty($line->surface) ? '' : $line->surface*$line->qty_shipped.' '.measuringUnitString(0, 'surface', $line->surface_units), - 'line_volume'=>empty($line->volume) ? '' : $line->volume*$line->qty_shipped.' '.measuringUnitString(0, 'volume', $line->volume_units), + 'line_weight'=>empty($line->weight) ? '' : $line->weight * $line->qty_shipped.' '.measuringUnitString(0, 'weight', $line->weight_units), + 'line_length'=>empty($line->length) ? '' : $line->length * $line->qty_shipped.' '.measuringUnitString(0, 'size', $line->length_units), + 'line_surface'=>empty($line->surface) ? '' : $line->surface * $line->qty_shipped.' '.measuringUnitString(0, 'surface', $line->surface_units), + 'line_volume'=>empty($line->volume) ? '' : $line->volume * $line->qty_shipped.' '.measuringUnitString(0, 'volume', $line->volume_units), ); // Retrieve extrafields @@ -807,37 +807,37 @@ abstract class CommonDocGenerator global $conf; if (is_array($extrafields->attributes[$object->table_element]['label'])) { - foreach($extrafields->attributes[$object->table_element]['label'] as $key=>$label) + foreach ($extrafields->attributes[$object->table_element]['label'] as $key=>$label) { - if($extrafields->attributes[$object->table_element]['type'][$key] == 'price') + if ($extrafields->attributes[$object->table_element]['type'][$key] == 'price') { $object->array_options['options_'.$key] = price2num($object->array_options['options_'.$key]); $object->array_options['options_'.$key.'_currency'] = price($object->array_options['options_'.$key], 0, $outputlangs, 0, 0, -1, $conf->currency); //Add value to store price with currency - $array_to_fill=array_merge($array_to_fill, array($array_key.'_options_'.$key.'_currency' => $object->array_options['options_'.$key.'_currency'])); + $array_to_fill = array_merge($array_to_fill, array($array_key.'_options_'.$key.'_currency' => $object->array_options['options_'.$key.'_currency'])); } - elseif($extrafields->attributes[$object->table_element]['type'][$key] == 'select') + elseif ($extrafields->attributes[$object->table_element]['type'][$key] == 'select') { $object->array_options['options_'.$key] = $extrafields->attributes[$object->table_element]['param'][$key]['options'][$object->array_options['options_'.$key]]; } - elseif($extrafields->attributes[$object->table_element]['type'][$key] == 'checkbox') { - $valArray=explode(',', $object->array_options['options_'.$key]); - $output=array(); - foreach($extrafields->attributes[$object->table_element]['param'][$key]['options'] as $keyopt=>$valopt) { - if (in_array($keyopt, $valArray)) { - $output[]=$valopt; + elseif ($extrafields->attributes[$object->table_element]['type'][$key] == 'checkbox') { + $valArray = explode(',', $object->array_options['options_'.$key]); + $output = array(); + foreach ($extrafields->attributes[$object->table_element]['param'][$key]['options'] as $keyopt=>$valopt) { + if (in_array($keyopt, $valArray)) { + $output[] = $valopt; } } $object->array_options['options_'.$key] = implode(', ', $output); } - elseif($extrafields->attributes[$object->table_element]['type'][$key] == 'date') + elseif ($extrafields->attributes[$object->table_element]['type'][$key] == 'date') { - if (strlen($object->array_options['options_'.$key])>0) + if (strlen($object->array_options['options_'.$key]) > 0) { $date = $object->array_options['options_'.$key]; - $object->array_options['options_'.$key] = dol_print_date($date, 'day'); // using company output language - $object->array_options['options_'.$key.'_locale'] = dol_print_date($date, 'day', 'tzserver', $outputlangs); // using output language format - $object->array_options['options_'.$key.'_rfc'] = dol_print_date($date, 'dayrfc'); // international format + $object->array_options['options_'.$key] = dol_print_date($date, 'day'); // using company output language + $object->array_options['options_'.$key.'_locale'] = dol_print_date($date, 'day', 'tzserver', $outputlangs); // using output language format + $object->array_options['options_'.$key.'_rfc'] = dol_print_date($date, 'dayrfc'); // international format } else { @@ -845,29 +845,29 @@ abstract class CommonDocGenerator $object->array_options['options_'.$key.'_locale'] = ''; $object->array_options['options_'.$key.'_rfc'] = ''; } - $array_to_fill=array_merge($array_to_fill, array($array_key.'_options_'.$key.'_locale' => $object->array_options['options_'.$key.'_locale'])); - $array_to_fill=array_merge($array_to_fill, array($array_key.'_options_'.$key.'_rfc' => $object->array_options['options_'.$key.'_rfc'])); + $array_to_fill = array_merge($array_to_fill, array($array_key.'_options_'.$key.'_locale' => $object->array_options['options_'.$key.'_locale'])); + $array_to_fill = array_merge($array_to_fill, array($array_key.'_options_'.$key.'_rfc' => $object->array_options['options_'.$key.'_rfc'])); } - elseif($extrafields->attributes[$object->table_element]['label'][$key] == 'datetime') + elseif ($extrafields->attributes[$object->table_element]['label'][$key] == 'datetime') { $datetime = $object->array_options['options_'.$key]; - $object->array_options['options_'.$key] = ($datetime!="0000-00-00 00:00:00"?dol_print_date($object->array_options['options_'.$key], 'dayhour'):''); // using company output language - $object->array_options['options_'.$key.'_locale'] = ($datetime!="0000-00-00 00:00:00"?dol_print_date($object->array_options['options_'.$key], 'dayhour', 'tzserver', $outputlangs):''); // using output language format - $object->array_options['options_'.$key.'_rfc'] = ($datetime!="0000-00-00 00:00:00"?dol_print_date($object->array_options['options_'.$key], 'dayhourrfc'):''); // international format - $array_to_fill=array_merge($array_to_fill, array($array_key.'_options_'.$key.'_locale' => $object->array_options['options_'.$key.'_locale'])); - $array_to_fill=array_merge($array_to_fill, array($array_key.'_options_'.$key.'_rfc' => $object->array_options['options_'.$key.'_rfc'])); + $object->array_options['options_'.$key] = ($datetime != "0000-00-00 00:00:00" ?dol_print_date($object->array_options['options_'.$key], 'dayhour') : ''); // using company output language + $object->array_options['options_'.$key.'_locale'] = ($datetime != "0000-00-00 00:00:00" ?dol_print_date($object->array_options['options_'.$key], 'dayhour', 'tzserver', $outputlangs) : ''); // using output language format + $object->array_options['options_'.$key.'_rfc'] = ($datetime != "0000-00-00 00:00:00" ?dol_print_date($object->array_options['options_'.$key], 'dayhourrfc') : ''); // international format + $array_to_fill = array_merge($array_to_fill, array($array_key.'_options_'.$key.'_locale' => $object->array_options['options_'.$key.'_locale'])); + $array_to_fill = array_merge($array_to_fill, array($array_key.'_options_'.$key.'_rfc' => $object->array_options['options_'.$key.'_rfc'])); } - elseif($extrafields->attributes[$object->table_element]['type'][$key] == 'link') + elseif ($extrafields->attributes[$object->table_element]['type'][$key] == 'link') { $id = $object->array_options['options_'.$key]; if ($id != "") { $param = $extrafields->attributes[$object->table_element]['param'][$key]; - $param_list=array_keys($param['options']); // $param_list='ObjectName:classPath' + $param_list = array_keys($param['options']); // $param_list='ObjectName:classPath' $InfoFieldList = explode(":", $param_list[0]); - $classname=$InfoFieldList[0]; - $classpath=$InfoFieldList[1]; - if (! empty($classpath)) + $classname = $InfoFieldList[0]; + $classpath = $InfoFieldList[1]; + if (!empty($classpath)) { dol_include_once($InfoFieldList[1]); if ($classname && class_exists($classname)) @@ -948,27 +948,27 @@ abstract class CommonDocGenerator uasort($this->cols, array($this, 'columnSort')); // Positionning - $curX = $this->page_largeur-$this->marge_droite; // start from right + $curX = $this->page_largeur - $this->marge_droite; // start from right // Array width - $arrayWidth = $this->page_largeur-$this->marge_droite-$this->marge_gauche; + $arrayWidth = $this->page_largeur - $this->marge_droite - $this->marge_gauche; // Count flexible column $totalDefinedColWidth = 0; $countFlexCol = 0; foreach ($this->cols as $colKey =>& $colDef) { - if(!$this->getColumnStatus($colKey)) continue; // continue if disabled + if (!$this->getColumnStatus($colKey)) continue; // continue if disabled - if(!empty($colDef['scale'])){ + if (!empty($colDef['scale'])) { // In case of column width is defined by percentage $colDef['width'] = abs($arrayWidth * $colDef['scale'] / 100); } - if(empty($colDef['width'])){ + if (empty($colDef['width'])) { $countFlexCol++; } - else{ + else { $totalDefinedColWidth += $colDef['width']; } } @@ -1161,7 +1161,7 @@ abstract class CommonDocGenerator 'printableEnableNotEmpty' => array(4) ); $extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params); - if(!empty($extrafieldDesc)){ + if (!empty($extrafieldDesc)) { $this->printStdColumnContent($pdf, $posYAfterDescription, $colKey, $extrafieldDesc); } } @@ -1178,13 +1178,13 @@ abstract class CommonDocGenerator { global $hookmanager; - if(empty($object->table_element)){ return; } + if (empty($object->table_element)) { return; } $extrafieldsKeyPrefix = "options_"; // Cleanup extrafield key to remove prefix if present $pos = strpos($extrafieldKey, $extrafieldsKeyPrefix); - if($pos===0){ + if ($pos === 0) { $extrafieldKey = substr($extrafieldKey, strlen($extrafieldsKeyPrefix)); } @@ -1192,14 +1192,14 @@ abstract class CommonDocGenerator // Load extrafiels if not allready does - if(empty($this->extrafieldsCache)){ $this->extrafieldsCache = new ExtraFields($this->db); } - if(empty($this->extrafieldsCache->attributes[$object->table_element])){ $this->extrafieldsCache->fetch_name_optionals_label($object->table_element); } + if (empty($this->extrafieldsCache)) { $this->extrafieldsCache = new ExtraFields($this->db); } + if (empty($this->extrafieldsCache->attributes[$object->table_element])) { $this->extrafieldsCache->fetch_name_optionals_label($object->table_element); } $extrafields = $this->extrafieldsCache; $extrafieldOutputContent = $extrafields->showOutputField($extrafieldKey, $object->array_options[$extrafieldOptionsKey], '', $object->table_element); // TODO : allow showOutputField to be pdf public friendly, ex: in a link to object, clean getNomUrl to remove link and images... like a getName methode ... - if($extrafields->attributes[$object->table_element]['type'][$extrafieldKey] == 'link'){ + if ($extrafields->attributes[$object->table_element]['type'][$extrafieldKey] == 'link') { // for lack of anything better we cleanup all html tags $extrafieldOutputContent = dol_string_nohtmltag($extrafieldOutputContent); } @@ -1233,13 +1233,13 @@ abstract class CommonDocGenerator { global $hookmanager; - if(empty($object->table_element)){ + if (empty($object->table_element)) { return; } // Load extrafiels if not allready does - if(empty($this->extrafieldsCache)){ $this->extrafieldsCache = new ExtraFields($this->db); } - if(empty($this->extrafieldsCache->attributes[$object->table_element])){ $this->extrafieldsCache->fetch_name_optionals_label($object->table_element); } + if (empty($this->extrafieldsCache)) { $this->extrafieldsCache = new ExtraFields($this->db); } + if (empty($this->extrafieldsCache->attributes[$object->table_element])) { $this->extrafieldsCache->fetch_name_optionals_label($object->table_element); } $extrafields = $this->extrafieldsCache; $defaultParams = array( @@ -1283,9 +1283,9 @@ abstract class CommonDocGenerator // Enable extrafield ? $enabled = 0; $disableOnEmpty = 0; - if(!empty($extrafields->attributes[$object->table_element]['printable'][$key])) { + if (!empty($extrafields->attributes[$object->table_element]['printable'][$key])) { $printable = intval($extrafields->attributes[$object->table_element]['printable'][$key]); - if(in_array($printable, $params['printableEnable']) || in_array($printable, $params['printableEnableNotEmpty']) ) { + if (in_array($printable, $params['printableEnable']) || in_array($printable, $params['printableEnableNotEmpty'])) { $enabled = 1; } @@ -1294,7 +1294,7 @@ abstract class CommonDocGenerator } } - if(empty($enabled)){ + if (empty($enabled)) { continue; } @@ -1305,7 +1305,7 @@ abstract class CommonDocGenerator $field->type = $extrafields->attributes[$object->table_element]['type'][$key]; // dont display if empty - if($disableOnEmpty && empty($field->content)) { + if ($disableOnEmpty && empty($field->content)) { continue; } @@ -1313,40 +1313,40 @@ abstract class CommonDocGenerator } } - if(!empty($fields)) + if (!empty($fields)) { // Sort extrafields by rank - uasort($fields, function ($a, $b) { + uasort($fields, function($a, $b) { return ($a->rank > $b->rank) ? -1 : 1; }); // define some HTML content with style - $html.= !empty($params['style'])?'':''; + $html .= !empty($params['style']) ? '' : ''; // auto select display format - if($params['display'] == 'auto') { + if ($params['display'] == 'auto') { $lastNnumbItems = 0; - foreach ($params['auto'] as $display => $numbItems){ - if($lastNnumbItems <= $numbItems && count($fields) > $numbItems){ + foreach ($params['auto'] as $display => $numbItems) { + if ($lastNnumbItems <= $numbItems && count($fields) > $numbItems) { $lastNnumbItems = $numbItems; $params['display'] = $display; } } } - if($params['display'] == 'list') { + if ($params['display'] == 'list') { // Display in list format - $i=0; + $i = 0; foreach ($fields as $field) { - $html .= !empty($i)?$params['list']['separator']:''; - $html .= '' . $field->label . ' : '; + $html .= !empty($i) ? $params['list']['separator'] : ''; + $html .= ''.$field->label.' : '; $html .= $field->content; $i++; } } - elseif($params['display'] == 'table') { + elseif ($params['display'] == 'table') { // Display in table format - $html .= ''; + $html .= '
'; $html .= ""; $itemsInRow = 0; @@ -1373,14 +1373,14 @@ abstract class CommonDocGenerator } $itemsInRow = $maxItemsInRow; - $html .= '"; } else { $itemsInRow++; $html .= '"; @@ -1460,7 +1460,7 @@ abstract class CommonDocGenerator // set cell padding with column title definition $pdf->setCellPaddings($colDef['title']['padding'][3], $colDef['title']['padding'][0], $colDef['title']['padding'][1], 0.5); } - else{ + else { // set cell padding with column title definition $pdf->setCellPaddings($colDef['title']['padding'][3], $colDef['title']['padding'][0], $colDef['title']['padding'][1], $colDef['title']['padding'][2]); } @@ -1501,17 +1501,17 @@ abstract class CommonDocGenerator { global $conf; - if(!empty($hidedetails)){ + if (!empty($hidedetails)) { return; } - if(empty($object->table_element)){ + if (empty($object->table_element)) { return; } // Load extrafiels if not allready does - if(empty($this->extrafieldsCache)){ $this->extrafieldsCache = new ExtraFields($this->db); } - if(empty($this->extrafieldsCache->attributes[$object->table_element])){ $this->extrafieldsCache->fetch_name_optionals_label($object->table_element); } + if (empty($this->extrafieldsCache)) { $this->extrafieldsCache = new ExtraFields($this->db); } + if (empty($this->extrafieldsCache->attributes[$object->table_element])) { $this->extrafieldsCache->fetch_name_optionals_label($object->table_element); } $extrafields = $this->extrafieldsCache; @@ -1526,15 +1526,15 @@ abstract class CommonDocGenerator // Enable extrafield ? $enabled = 0; - if(!empty($extrafields->attributes[$object->table_element]['printable'][$key])) { + if (!empty($extrafields->attributes[$object->table_element]['printable'][$key])) { $printable = intval($extrafields->attributes[$object->table_element]['printable'][$key]); - if($printable === 1 || $printable === 2) { + if ($printable === 1 || $printable === 2) { $enabled = 1; } // Note : if $printable === 3 or 4 so, it's displayed after line description not in cols } - if (!$enabled){ continue; } // don't wast resourses if we don't need them... + if (!$enabled) { continue; } // don't wast resourses if we don't need them... // Load language if required if (!empty($extrafields->attributes[$object->table_element]['langfile'][$key])) $outputlangs->load($extrafields->attributes[$object->table_element]['langfile'][$key]); @@ -1556,12 +1556,12 @@ abstract class CommonDocGenerator ); $alignTypeRight = array('double', 'int', 'price'); - if(in_array($extrafields->attributes[$object->table_element]['type'][$key], $alignTypeRight)){ + if (in_array($extrafields->attributes[$object->table_element]['type'][$key], $alignTypeRight)) { $def['content']['align'] = 'R'; } - $alignTypeLeft = array('text', 'html'); - if(in_array($extrafields->attributes[$object->table_element]['type'][$key], $alignTypeLeft)){ + $alignTypeLeft = array('text', 'html'); + if (in_array($extrafields->attributes[$object->table_element]['type'][$key], $alignTypeLeft)) { $def['content']['align'] = 'L'; } diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index c715f53194a..9a804256dac 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -683,7 +683,7 @@ class Conf if (!isset($this->global->MAIN_USE_OLD_TITLE_BUTTON)) $this->global->MAIN_USE_OLD_TITLE_BUTTON = 0; - if (!isset($this->global->MAIN_JS_GRAPH)) $this->global->MAIN_JS_GRAPH = 'chart'; // Use chart.js library + if (!isset($this->global->MAIN_JS_GRAPH)) $this->global->MAIN_JS_GRAPH = 'chart'; // Use chart.js library if (empty($this->global->MAIN_MODULE_DOLISTORE_API_SRV)) $this->global->MAIN_MODULE_DOLISTORE_API_SRV = 'https://www.dolistore.com'; if (empty($this->global->MAIN_MODULE_DOLISTORE_API_KEY)) $this->global->MAIN_MODULE_DOLISTORE_API_KEY = 'dolistorecatalogpublickey1234567'; diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 8edad43dce0..d59ab8ce6bc 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -115,7 +115,7 @@ class DolGraph $this->_library = $library; if ($this->_library == 'auto') { - $this->_library = (empty($conf->global->MAIN_JS_GRAPH) ? 'jflot': $conf->global->MAIN_JS_GRAPH); + $this->_library = (empty($conf->global->MAIN_JS_GRAPH) ? 'jflot' : $conf->global->MAIN_JS_GRAPH); } } @@ -535,7 +535,7 @@ class DolGraph public function GetMaxValueInData() { // phpcs:enable - if (! is_array($this->data)) return 0; + if (!is_array($this->data)) return 0; $k = 0; $vals = array(); @@ -564,7 +564,7 @@ class DolGraph public function GetMinValueInData() { // phpcs:enable - if (! is_array($this->data)) return 0; + if (!is_array($this->data)) return 0; $k = 0; $vals = array(); @@ -748,9 +748,9 @@ class DolGraph } // Start the div that will contains all the graph - $dolxaxisvertical=''; - if (count($this->data) > 20) $dolxaxisvertical='dol-xaxis-vertical'; - $this->stringtoshow .= '
'."\n"; + $dolxaxisvertical = ''; + if (count($this->data) > 20) $dolxaxisvertical = 'dol-xaxis-vertical'; + $this->stringtoshow .= '
'."\n"; $this->stringtoshow .= ''."\n"; @@ -607,8 +607,8 @@ function getStructuredData($type, $data = array()) elseif ($type == 'product') { $ret = ''."\n"; - $ret.= ''."\n"; + $ret .= ''."\n"; } return $ret; } @@ -656,55 +656,55 @@ function getStructuredData($type, $data = array()) */ function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25) { - global $conf, $db, $hookmanager, $langs, $mysoc, $user, $website, $websitepage, $weblangs; // Very important. Required to have var available when running inluded containers. + global $conf, $db, $hookmanager, $langs, $mysoc, $user, $website, $websitepage, $weblangs; // Very important. Required to have var available when running inluded containers. $error = 0; $arrayresult = array('code'=>'', 'list'=>array()); - if (! is_object($weblangs)) $weblangs = $langs; + if (!is_object($weblangs)) $weblangs = $langs; if (empty($searchstring)) { $error++; - $arrayresult['code']='KO'; - $arrayresult['message']=$weblangs->trans("EmptySearchString"); + $arrayresult['code'] = 'KO'; + $arrayresult['message'] = $weblangs->trans("EmptySearchString"); } elseif (dol_strlen($searchstring) < 2) { $weblangs->load("errors"); $error++; - $arrayresult['code']='KO'; - $arrayresult['message']=$weblangs->trans("ErrorSearchCriteriaTooSmall"); + $arrayresult['code'] = 'KO'; + $arrayresult['message'] = $weblangs->trans("ErrorSearchCriteriaTooSmall"); } - elseif (! in_array($type, array('', 'page'))) + elseif (!in_array($type, array('', 'page'))) { $error++; - $arrayresult['code']='KO'; - $arrayresult['message']='Bad value for parameter $type'; + $arrayresult['code'] = 'KO'; + $arrayresult['message'] = 'Bad value for parameter $type'; } $searchdone = 0; $found = 0; - if (! $error && (empty($max) || ($found < $max)) && (preg_match('/meta/', $algo) || preg_match('/content/', $algo))) + if (!$error && (empty($max) || ($found < $max)) && (preg_match('/meta/', $algo) || preg_match('/content/', $algo))) { $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'website_page'; - $sql.= " WHERE fk_website = ".$website->id; - if ($type) $sql.= " AND type_container = '".$db->escape($type)."'"; - $sql.= " AND ("; + $sql .= " WHERE fk_website = ".$website->id; + if ($type) $sql .= " AND type_container = '".$db->escape($type)."'"; + $sql .= " AND ("; $searchalgo = ''; if (preg_match('/meta/', $algo)) { - $searchalgo.= ($searchalgo?' OR ':'')."title LIKE '%".$db->escape($searchstring)."%' OR description LIKE '%".$db->escape($searchstring)."%'"; - $searchalgo.= ($searchalgo?' OR ':'')."keywords LIKE '".$db->escape($searchstring).",%' OR keywords LIKE '% ".$db->escape($searchstring)."%'"; // TODO Use a better way to scan keywords + $searchalgo .= ($searchalgo ? ' OR ' : '')."title LIKE '%".$db->escape($searchstring)."%' OR description LIKE '%".$db->escape($searchstring)."%'"; + $searchalgo .= ($searchalgo ? ' OR ' : '')."keywords LIKE '".$db->escape($searchstring).",%' OR keywords LIKE '% ".$db->escape($searchstring)."%'"; // TODO Use a better way to scan keywords } if (preg_match('/content/', $algo)) { - $searchalgo.= ($searchalgo?' OR ':'')."content LIKE '%".$db->escape($searchstring)."%'"; + $searchalgo .= ($searchalgo ? ' OR ' : '')."content LIKE '%".$db->escape($searchstring)."%'"; } - $sql.=$searchalgo; - $sql.= ")"; - $sql.= $db->plimit($max); + $sql .= $searchalgo; + $sql .= ")"; + $sql .= $db->plimit($max); $resql = $db->query($sql); if ($resql) @@ -716,7 +716,7 @@ function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25) { $tmpwebsitepage = new WebsitePage($db); $tmpwebsitepage->fetch($obj->rowid); - if ($tmpwebsitepage->id > 0) $arrayresult['list'][]=$tmpwebsitepage; + if ($tmpwebsitepage->id > 0) $arrayresult['list'][] = $tmpwebsitepage; $found++; } $i++; @@ -725,69 +725,69 @@ function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25) else { $error++; - $arrayresult['code']=$db->lasterrno(); - $arrayresult['message']=$db->lasterror(); + $arrayresult['code'] = $db->lasterrno(); + $arrayresult['message'] = $db->lasterror(); } $searchdone = 1; } - if (! $error && (empty($max) || ($found < $max)) && (preg_match('/sitefiles/', $algo))) + if (!$error && (empty($max) || ($found < $max)) && (preg_match('/sitefiles/', $algo))) { global $dolibarr_main_data_root; - $pathofwebsite=$dolibarr_main_data_root.'/website/'.$website->ref; - $filehtmlheader=$pathofwebsite.'/htmlheader.html'; - $filecss=$pathofwebsite.'/styles.css.php'; - $filejs=$pathofwebsite.'/javascript.js.php'; - $filerobot=$pathofwebsite.'/robots.txt'; - $filehtaccess=$pathofwebsite.'/.htaccess'; - $filemanifestjson=$pathofwebsite.'/manifest.json.php'; - $filereadme=$pathofwebsite.'/README.md'; + $pathofwebsite = $dolibarr_main_data_root.'/website/'.$website->ref; + $filehtmlheader = $pathofwebsite.'/htmlheader.html'; + $filecss = $pathofwebsite.'/styles.css.php'; + $filejs = $pathofwebsite.'/javascript.js.php'; + $filerobot = $pathofwebsite.'/robots.txt'; + $filehtaccess = $pathofwebsite.'/.htaccess'; + $filemanifestjson = $pathofwebsite.'/manifest.json.php'; + $filereadme = $pathofwebsite.'/README.md'; $filecontent = file_get_contents($filehtmlheader); if ((empty($max) || ($found < $max)) && preg_match('/'.preg_quote($searchstring, '/').'/', $filecontent)) { - $arrayresult['list'][]=array('type'=>'website_htmlheadercontent'); + $arrayresult['list'][] = array('type'=>'website_htmlheadercontent'); } $filecontent = file_get_contents($filecss); if ((empty($max) || ($found < $max)) && preg_match('/'.preg_quote($searchstring, '/').'/', $filecontent)) { - $arrayresult['list'][]=array('type'=>'website_csscontent'); + $arrayresult['list'][] = array('type'=>'website_csscontent'); } $filecontent = file_get_contents($filejs); if ((empty($max) || ($found < $max)) && preg_match('/'.preg_quote($searchstring, '/').'/', $filecontent)) { - $arrayresult['list'][]=array('type'=>'website_jscontent'); + $arrayresult['list'][] = array('type'=>'website_jscontent'); } $filerobot = file_get_contents($filerobot); if ((empty($max) || ($found < $max)) && preg_match('/'.preg_quote($searchstring, '/').'/', $filecontent)) { - $arrayresult['list'][]=array('type'=>'website_robotcontent'); + $arrayresult['list'][] = array('type'=>'website_robotcontent'); } $searchdone = 1; } - if (! $error) + if (!$error) { if ($searchdone) { - $arrayresult['code']='OK'; + $arrayresult['code'] = 'OK'; if (empty($arrayresult['list'])) { - $arrayresult['code']='KO'; - $arrayresult['message']=$weblangs->trans("NoRecordFound"); + $arrayresult['code'] = 'KO'; + $arrayresult['message'] = $weblangs->trans("NoRecordFound"); } } else { $error++; - $arrayresult['code']='KO'; - $arrayresult['message']='No supported algorithm found'; + $arrayresult['code'] = 'KO'; + $arrayresult['message'] = 'No supported algorithm found'; } } diff --git a/htdocs/core/lib/website2.lib.php b/htdocs/core/lib/website2.lib.php index 5e8711e09d1..de51783b7f1 100644 --- a/htdocs/core/lib/website2.lib.php +++ b/htdocs/core/lib/website2.lib.php @@ -184,7 +184,7 @@ function dolSavePageContent($filetpl, Website $object, WebsitePage $objectpage) else dol_print_error($db); } // Add canonical reference - $tplcontent .= ''."\n"; + $tplcontent .= ''."\n"; // Add manifest.json on homepage $tplcontent .= 'use_manifest) { print \'\'."\n"; } ?>'."\n"; $tplcontent .= ''."\n"; diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php index 4f9558de8ae..87f11decb5e 100644 --- a/htdocs/core/modules/modProduct.class.php +++ b/htdocs/core/modules/modProduct.class.php @@ -169,214 +169,214 @@ class modProduct extends DolibarrModules // Exports //-------- - $r=0; + $r = 0; $r++; - $this->export_code[$r]=$this->rights_class.'_'.$r; - $this->export_label[$r]="Products"; // Translation key (used only if key ExportDataset_xxx_z not found) - $this->export_permission[$r]=array(array("produit","export")); - $this->export_fields_array[$r]=array( - 'p.rowid'=>"Id",'p.ref'=>"Ref",'p.label'=>"Label", - 'p.fk_product_type'=>'Type','p.tosell'=>"OnSell",'p.tobuy'=>"OnBuy", - 'p.description'=>"Description",'p.url'=>"PublicUrl", - 'p.customcode'=>'CustomCode','p.fk_country'=>'IDCountry', + $this->export_code[$r] = $this->rights_class.'_'.$r; + $this->export_label[$r] = "Products"; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_permission[$r] = array(array("produit", "export")); + $this->export_fields_array[$r] = array( + 'p.rowid'=>"Id", 'p.ref'=>"Ref", 'p.label'=>"Label", + 'p.fk_product_type'=>'Type', 'p.tosell'=>"OnSell", 'p.tobuy'=>"OnBuy", + 'p.description'=>"Description", 'p.url'=>"PublicUrl", + 'p.customcode'=>'CustomCode', 'p.fk_country'=>'IDCountry', 'p.accountancy_code_sell'=>"ProductAccountancySellCode", 'p.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", 'p.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", 'p.accountancy_code_buy'=>"ProductAccountancyBuyCode", 'p.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", 'p.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode", - 'p.note'=>"NotePrivate",'p.note_public'=>'NotePublic', + 'p.note'=>"NotePrivate", 'p.note_public'=>'NotePublic', 'p.weight'=>"Weight", 'p.weight_units'=>"WeightUnits", 'p.length'=>"Length", 'p.length_units'=>"LengthUnits", 'p.width'=>"Width", 'p.width_units'=>"WidthUnits", 'p.height'=>"Height", 'p.height_units'=>"HeightUnits", 'p.surface'=>"Surface", 'p.surface_units'=>"SurfaceUnits", 'p.volume'=>"Volume", 'p.volume_units'=>"VolumeUnits", 'p.duration'=>"Duration", 'p.finished' => 'Nature', - 'p.price_base_type'=>"PriceBase",'p.price'=>"UnitPriceHT",'p.price_ttc'=>"UnitPriceTTC", + 'p.price_base_type'=>"PriceBase", 'p.price'=>"UnitPriceHT", 'p.price_ttc'=>"UnitPriceTTC", 'p.tva_tx'=>'VATRate', - 'p.datec'=>'DateCreation','p.tms'=>'DateModification' + 'p.datec'=>'DateCreation', 'p.tms'=>'DateModification' ); - if (is_object($mysoc) && $mysoc->useNPR()) $this->export_fields_array[$r]['p.recuperableonly']='NPR'; - if (! empty($conf->fournisseur->enabled) || !empty($conf->margin->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('p.cost_price'=>'CostPrice')); - if (! empty($conf->stock->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('p.stock'=>'Stock','p.seuil_stock_alerte'=>'StockLimit','p.desiredstock'=>'DesiredStock','p.pmp'=>'PMPValue')); - if (! empty($conf->barcode->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('p.barcode'=>'BarCode')); - $keyforselect='product'; $keyforelement='product'; $keyforaliasextra='extra'; + if (is_object($mysoc) && $mysoc->useNPR()) $this->export_fields_array[$r]['p.recuperableonly'] = 'NPR'; + if (!empty($conf->fournisseur->enabled) || !empty($conf->margin->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.cost_price'=>'CostPrice')); + if (!empty($conf->stock->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.stock'=>'Stock', 'p.seuil_stock_alerte'=>'StockLimit', 'p.desiredstock'=>'DesiredStock', 'p.pmp'=>'PMPValue')); + if (!empty($conf->barcode->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.barcode'=>'BarCode')); + $keyforselect = 'product'; $keyforelement = 'product'; $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - if (! empty($conf->fournisseur->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('s.nom'=>'Supplier','pf.ref_fourn'=>'SupplierRef','pf.quantity'=>'QtyMin','pf.remise_percent'=>'DiscountQtyMin','pf.unitprice'=>'BuyingPrice','pf.delivery_time_days'=>'NbDaysToDelivery')); - if (! empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('group_concat(cat.label)'=>'Categories')); - if (! empty($conf->global->MAIN_MULTILANGS)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('l.lang'=>'Language', 'l.label'=>'TranslatedLabel','l.description'=>'TranslatedDescription','l.note'=>'TranslatedNote')); - if (! empty($conf->global->PRODUCT_USE_UNITS)) $this->export_fields_array[$r]['p.fk_unit'] = 'Unit'; - $this->export_TypeFields_array[$r]=array( - 'p.ref'=>"Text",'p.label'=>"Text", - 'p.fk_product_type'=>'Numeric','p.tosell'=>"Boolean",'p.tobuy'=>"Boolean", - 'p.description'=>"Text",'p.url'=>"Text", - 'p.accountancy_code_sell'=>"Text", 'p.accountancy_code_sell_intra'=>"Text",'p.accountancy_code_sell_export'=>"Text", - 'p.accountancy_code_buy'=>"Text", 'p.accountancy_code_buy_intra'=>"Text",'p.accountancy_code_buy_export'=>"Text", - 'p.note'=>"Text",'p.note_public'=>"Text", - 'p.weight'=>"Numeric",'p.length'=>"Numeric",'p.width'=>"Numeric",'p.height'=>"Numeric",'p.surface'=>"Numeric",'p.volume'=>"Numeric", + if (!empty($conf->fournisseur->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('s.nom'=>'Supplier', 'pf.ref_fourn'=>'SupplierRef', 'pf.quantity'=>'QtyMin', 'pf.remise_percent'=>'DiscountQtyMin', 'pf.unitprice'=>'BuyingPrice', 'pf.delivery_time_days'=>'NbDaysToDelivery')); + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('group_concat(cat.label)'=>'Categories')); + if (!empty($conf->global->MAIN_MULTILANGS)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('l.lang'=>'Language', 'l.label'=>'TranslatedLabel', 'l.description'=>'TranslatedDescription', 'l.note'=>'TranslatedNote')); + if (!empty($conf->global->PRODUCT_USE_UNITS)) $this->export_fields_array[$r]['p.fk_unit'] = 'Unit'; + $this->export_TypeFields_array[$r] = array( + 'p.ref'=>"Text", 'p.label'=>"Text", + 'p.fk_product_type'=>'Numeric', 'p.tosell'=>"Boolean", 'p.tobuy'=>"Boolean", + 'p.description'=>"Text", 'p.url'=>"Text", + 'p.accountancy_code_sell'=>"Text", 'p.accountancy_code_sell_intra'=>"Text", 'p.accountancy_code_sell_export'=>"Text", + 'p.accountancy_code_buy'=>"Text", 'p.accountancy_code_buy_intra'=>"Text", 'p.accountancy_code_buy_export'=>"Text", + 'p.note'=>"Text", 'p.note_public'=>"Text", + 'p.weight'=>"Numeric", 'p.length'=>"Numeric", 'p.width'=>"Numeric", 'p.height'=>"Numeric", 'p.surface'=>"Numeric", 'p.volume'=>"Numeric", 'p.customcode'=>'Text', 'p.duration'=>"Text", 'p.finished' => 'Numeric', - 'p.price_base_type'=>"Text",'p.price'=>"Numeric",'p.price_ttc'=>"Numeric",'p.tva_tx'=>'Numeric', - 'p.datec'=>'Date','p.tms'=>'Date' + 'p.price_base_type'=>"Text", 'p.price'=>"Numeric", 'p.price_ttc'=>"Numeric", 'p.tva_tx'=>'Numeric', + 'p.datec'=>'Date', 'p.tms'=>'Date' ); - if (! empty($conf->stock->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r], array('p.stock'=>'Numeric','p.seuil_stock_alerte'=>'Numeric','p.desiredstock'=>'Numeric','p.pmp'=>'Numeric','p.cost_price'=>'Numeric')); - if (! empty($conf->barcode->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r], array('p.barcode'=>'Text')); - if (! empty($conf->fournisseur->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r], array('s.nom'=>'Text','pf.ref_fourn'=>'Text','pf.unitprice'=>'Numeric','pf.quantity'=>'Numeric','pf.remise_percent'=>'Numeric','pf.delivery_time_days'=>'Numeric')); - if (! empty($conf->global->MAIN_MULTILANGS)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r], array('l.lang'=>'Text', 'l.label'=>'Text','l.description'=>'Text','l.note'=>'Text')); - if (! empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r], array("group_concat(cat.label)"=>'Text')); - $this->export_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon - if (! empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array("group_concat(cat.label)"=>'category')); - if (! empty($conf->stock->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('p.stock'=>'product','p.pmp'=>'product')); - if (! empty($conf->barcode->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('p.barcode'=>'product')); - if (! empty($conf->fournisseur->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('s.nom'=>'product_supplier_ref','pf.ref_fourn'=>'product_supplier_ref','pf.unitprice'=>'product_supplier_ref','pf.quantity'=>'product_supplier_ref','pf.remise_percent'=>'product_supplier_ref','pf.delivery_time_days'=>'product_supplier_ref')); - if (! empty($conf->global->MAIN_MULTILANGS)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('l.lang'=>'translation', 'l.label'=>'translation','l.description'=>'translation','l.note'=>'translation')); - if (! empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_dependencies_array[$r]=array('category'=>'p.rowid'); - if (! empty($conf->stock->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('p.stock'=>'product','p.pmp'=>'product')); - if (! empty($conf->barcode->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('p.barcode'=>'product')); - if (! empty($conf->fournisseur->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('s.nom'=>'product_supplier_ref','pf.ref_fourn'=>'product_supplier_ref','pf.unitprice'=>'product_supplier_ref','pf.quantity'=>'product_supplier_ref','pf.remise_percent'=>'product_supplier_ref','pf.delivery_time_days'=>'product_supplier_ref')); - if (! empty($conf->global->MAIN_MULTILANGS)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('l.lang'=>'translation', 'l.label'=>'translation','l.description'=>'translation','l.note'=>'translation')); - if (! empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_dependencies_array[$r]=array('category'=>'p.rowid'); - $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'product as p'; - if (! empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'categorie as cat ON cp.fk_categorie = cat.rowid'; - if (! empty($conf->global->MAIN_MULTILANGS)) $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_lang as l ON l.fk_product = p.rowid'; - $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra ON p.rowid = extra.fk_object'; - if (! empty($conf->fournisseur->enabled)) $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_fournisseur_price as pf ON pf.fk_product = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'societe s ON s.rowid = pf.fk_soc'; - $this->export_sql_end[$r] .=' WHERE p.fk_product_type = 0 AND p.entity IN ('.getEntity('product').')'; - if (! empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_sql_order[$r] =' GROUP BY p.rowid'; // FIXME The group by used a generic value to say "all fields in select except function fields" + if (!empty($conf->stock->enabled)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.stock'=>'Numeric', 'p.seuil_stock_alerte'=>'Numeric', 'p.desiredstock'=>'Numeric', 'p.pmp'=>'Numeric', 'p.cost_price'=>'Numeric')); + if (!empty($conf->barcode->enabled)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.barcode'=>'Text')); + if (!empty($conf->fournisseur->enabled)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('s.nom'=>'Text', 'pf.ref_fourn'=>'Text', 'pf.unitprice'=>'Numeric', 'pf.quantity'=>'Numeric', 'pf.remise_percent'=>'Numeric', 'pf.delivery_time_days'=>'Numeric')); + if (!empty($conf->global->MAIN_MULTILANGS)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('l.lang'=>'Text', 'l.label'=>'Text', 'l.description'=>'Text', 'l.note'=>'Text')); + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array("group_concat(cat.label)"=>'Text')); + $this->export_entities_array[$r] = array(); // We define here only fields that use another icon that the one defined into import_icon + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array("group_concat(cat.label)"=>'category')); + if (!empty($conf->stock->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.stock'=>'product', 'p.pmp'=>'product')); + if (!empty($conf->barcode->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.barcode'=>'product')); + if (!empty($conf->fournisseur->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('s.nom'=>'product_supplier_ref', 'pf.ref_fourn'=>'product_supplier_ref', 'pf.unitprice'=>'product_supplier_ref', 'pf.quantity'=>'product_supplier_ref', 'pf.remise_percent'=>'product_supplier_ref', 'pf.delivery_time_days'=>'product_supplier_ref')); + if (!empty($conf->global->MAIN_MULTILANGS)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('l.lang'=>'translation', 'l.label'=>'translation', 'l.description'=>'translation', 'l.note'=>'translation')); + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_dependencies_array[$r] = array('category'=>'p.rowid'); + if (!empty($conf->stock->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.stock'=>'product', 'p.pmp'=>'product')); + if (!empty($conf->barcode->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.barcode'=>'product')); + if (!empty($conf->fournisseur->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('s.nom'=>'product_supplier_ref', 'pf.ref_fourn'=>'product_supplier_ref', 'pf.unitprice'=>'product_supplier_ref', 'pf.quantity'=>'product_supplier_ref', 'pf.remise_percent'=>'product_supplier_ref', 'pf.delivery_time_days'=>'product_supplier_ref')); + if (!empty($conf->global->MAIN_MULTILANGS)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('l.lang'=>'translation', 'l.label'=>'translation', 'l.description'=>'translation', 'l.note'=>'translation')); + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_dependencies_array[$r] = array('category'=>'p.rowid'); + $this->export_sql_start[$r] = 'SELECT DISTINCT '; + $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p'; + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'categorie as cat ON cp.fk_categorie = cat.rowid'; + if (!empty($conf->global->MAIN_MULTILANGS)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_lang as l ON l.fk_product = p.rowid'; + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra ON p.rowid = extra.fk_object'; + if (!empty($conf->fournisseur->enabled)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_fournisseur_price as pf ON pf.fk_product = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'societe s ON s.rowid = pf.fk_soc'; + $this->export_sql_end[$r] .= ' WHERE p.fk_product_type = 0 AND p.entity IN ('.getEntity('product').')'; + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_sql_order[$r] = ' GROUP BY p.rowid'; // FIXME The group by used a generic value to say "all fields in select except function fields" - if (! empty($conf->global->PRODUIT_MULTIPRICES)) + if (!empty($conf->global->PRODUIT_MULTIPRICES)) { // Exports product multiprice $r++; - $this->export_code[$r]=$this->rights_class.'_'.$r; - $this->export_label[$r]="ProductsMultiPrice"; // Translation key (used only if key ExportDataset_xxx_z not found) - $this->export_permission[$r]=array(array("produit","export")); - $this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref", - 'pr.price_base_type'=>"PriceBase",'pr.price_level'=>"PriceLevel", - 'pr.price'=>"PriceLevelUnitPriceHT",'pr.price_ttc'=>"PriceLevelUnitPriceTTC", - 'pr.price_min'=>"MinPriceLevelUnitPriceHT",'pr.price_min_ttc'=>"MinPriceLevelUnitPriceTTC", + $this->export_code[$r] = $this->rights_class.'_'.$r; + $this->export_label[$r] = "ProductsMultiPrice"; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_permission[$r] = array(array("produit", "export")); + $this->export_fields_array[$r] = array('p.rowid'=>"Id", 'p.ref'=>"Ref", + 'pr.price_base_type'=>"PriceBase", 'pr.price_level'=>"PriceLevel", + 'pr.price'=>"PriceLevelUnitPriceHT", 'pr.price_ttc'=>"PriceLevelUnitPriceTTC", + 'pr.price_min'=>"MinPriceLevelUnitPriceHT", 'pr.price_min_ttc'=>"MinPriceLevelUnitPriceTTC", 'pr.tva_tx'=>'PriceLevelVATRate', 'pr.date_price'=>'DateCreation'); - if (is_object($mysoc) && $mysoc->useNPR()) $this->export_fields_array[$r]['pr.recuperableonly']='NPR'; + if (is_object($mysoc) && $mysoc->useNPR()) $this->export_fields_array[$r]['pr.recuperableonly'] = 'NPR'; //$this->export_TypeFields_array[$r]=array( // 'p.ref'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.url'=>"Text",'p.accountancy_code_sell'=>"Text",'p.accountancy_code_buy'=>"Text", // 'p.note'=>"Text",'p.length'=>"Numeric",'p.surface'=>"Numeric",'p.volume'=>"Numeric",'p.weight'=>"Numeric",'p.customcode'=>'Text', // 'p.price_base_type'=>"Text",'p.price'=>"Numeric",'p.price_ttc'=>"Numeric",'p.tva_tx'=>'Numeric','p.tosell'=>"Boolean",'p.tobuy'=>"Boolean", // 'p.datec'=>'Date','p.tms'=>'Date' //); - $this->export_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product", - 'pr.price_base_type'=>"product",'pr.price_level'=>"product",'pr.price'=>"product", + $this->export_entities_array[$r] = array('p.rowid'=>"product", 'p.ref'=>"product", + 'pr.price_base_type'=>"product", 'pr.price_level'=>"product", 'pr.price'=>"product", 'pr.price_ttc'=>"product", - 'pr.price_min'=>"product",'pr.price_min_ttc'=>"product", + 'pr.price_min'=>"product", 'pr.price_min_ttc'=>"product", 'pr.tva_tx'=>'product', 'pr.recuperableonly'=>'product', 'pr.date_price'=>"product"); - $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'product as p'; - $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_price as pr ON p.rowid = pr.fk_product AND pr.entity = '.$conf->entity; // export prices only for the current entity - $this->export_sql_end[$r] .=' WHERE p.entity IN ('.getEntity('product').')'; // For product and service profile + $this->export_sql_start[$r] = 'SELECT DISTINCT '; + $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p'; + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_price as pr ON p.rowid = pr.fk_product AND pr.entity = '.$conf->entity; // export prices only for the current entity + $this->export_sql_end[$r] .= ' WHERE p.entity IN ('.getEntity('product').')'; // For product and service profile } - if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) + if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { // Exports product multiprice $r++; - $this->export_code[$r]=$this->rights_class.'_'.$r; - $this->export_label[$r]="ProductsPricePerCustomer"; // Translation key (used only if key ExportDataset_xxx_z not found) - $this->export_permission[$r]=array(array("produit","export")); - $this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref", + $this->export_code[$r] = $this->rights_class.'_'.$r; + $this->export_label[$r] = "ProductsPricePerCustomer"; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_permission[$r] = array(array("produit", "export")); + $this->export_fields_array[$r] = array('p.rowid'=>"Id", 'p.ref'=>"Ref", 's.nom'=>'ThirdParty', 'pr.price_base_type'=>"PriceBase", - 'pr.price'=>"PriceUnitPriceHT",'pr.price_ttc'=>"PriceUnitPriceTTC", - 'pr.price_min'=>"MinPriceUnitPriceHT",'pr.price_min_ttc'=>"MinPriceUnitPriceTTC", + 'pr.price'=>"PriceUnitPriceHT", 'pr.price_ttc'=>"PriceUnitPriceTTC", + 'pr.price_min'=>"MinPriceUnitPriceHT", 'pr.price_min_ttc'=>"MinPriceUnitPriceTTC", 'pr.tva_tx'=>'PriceVATRate', 'pr.default_vat_code'=>'PriceVATCode', 'pr.datec'=>'DateCreation'); - if (is_object($mysoc) && $mysoc->useNPR()) $this->export_fields_array[$r]['pr.recuperableonly']='NPR'; - $this->export_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product", + if (is_object($mysoc) && $mysoc->useNPR()) $this->export_fields_array[$r]['pr.recuperableonly'] = 'NPR'; + $this->export_entities_array[$r] = array('p.rowid'=>"product", 'p.ref'=>"product", 's.nom'=>'company', - 'pr.price_base_type'=>"product",'pr.price'=>"product", + 'pr.price_base_type'=>"product", 'pr.price'=>"product", 'pr.price_ttc'=>"product", - 'pr.price_min'=>"product",'pr.price_min_ttc'=>"product", + 'pr.price_min'=>"product", 'pr.price_min_ttc'=>"product", 'pr.tva_tx'=>'product', 'pr.default_vat_code'=>'product', 'pr.recuperableonly'=>'product', 'pr.datec'=>"product"); - $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'product as p'; - $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_customer_price as pr ON p.rowid = pr.fk_product AND pr.entity = '.$conf->entity; // export prices only for the current entity - $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON pr.fk_soc = s.rowid'; - $this->export_sql_end[$r] .=' WHERE p.entity IN ('.getEntity('product').')'; // For product and service profile + $this->export_sql_start[$r] = 'SELECT DISTINCT '; + $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p'; + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_customer_price as pr ON p.rowid = pr.fk_product AND pr.entity = '.$conf->entity; // export prices only for the current entity + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON pr.fk_soc = s.rowid'; + $this->export_sql_end[$r] .= ' WHERE p.entity IN ('.getEntity('product').')'; // For product and service profile } - if (! empty($conf->global->PRODUIT_SOUSPRODUITS)) + if (!empty($conf->global->PRODUIT_SOUSPRODUITS)) { // Exports virtual products $r++; - $this->export_code[$r]=$this->rights_class.'_'.$r; - $this->export_label[$r]="AssociatedProducts"; // Translation key (used only if key ExportDataset_xxx_z not found) - $this->export_permission[$r]=array(array("produit","export")); - $this->export_fields_array[$r]=array( - 'p.rowid'=>"Id",'p.ref'=>"Ref",'p.label'=>"Label",'p.description'=>"Description",'p.url'=>"PublicUrl", - 'p.accountancy_code_sell'=>"ProductAccountancySellCode",'p.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", - 'p.accountancy_code_sell_export'=>"ProductAccountancySellExportCode",'p.accountancy_code_buy'=>"ProductAccountancyBuyCode", - 'p.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode",'p.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode", - 'p.note'=>"NotePrivate",'p.note_public'=>'NotePublic', - 'p.weight'=>"Weight",'p.length'=>"Length",'p.surface'=>"Surface",'p.volume'=>"Volume",'p.customcode'=>'CustomCode', - 'p.price_base_type'=>"PriceBase",'p.price'=>"UnitPriceHT",'p.price_ttc'=>"UnitPriceTTC",'p.tva_tx'=>'VATRate','p.tosell'=>"OnSell", - 'p.tobuy'=>"OnBuy",'p.datec'=>'DateCreation','p.tms'=>'DateModification' + $this->export_code[$r] = $this->rights_class.'_'.$r; + $this->export_label[$r] = "AssociatedProducts"; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_permission[$r] = array(array("produit", "export")); + $this->export_fields_array[$r] = array( + 'p.rowid'=>"Id", 'p.ref'=>"Ref", 'p.label'=>"Label", 'p.description'=>"Description", 'p.url'=>"PublicUrl", + 'p.accountancy_code_sell'=>"ProductAccountancySellCode", 'p.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", + 'p.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", 'p.accountancy_code_buy'=>"ProductAccountancyBuyCode", + 'p.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", 'p.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode", + 'p.note'=>"NotePrivate", 'p.note_public'=>'NotePublic', + 'p.weight'=>"Weight", 'p.length'=>"Length", 'p.surface'=>"Surface", 'p.volume'=>"Volume", 'p.customcode'=>'CustomCode', + 'p.price_base_type'=>"PriceBase", 'p.price'=>"UnitPriceHT", 'p.price_ttc'=>"UnitPriceTTC", 'p.tva_tx'=>'VATRate', 'p.tosell'=>"OnSell", + 'p.tobuy'=>"OnBuy", 'p.datec'=>'DateCreation', 'p.tms'=>'DateModification' ); - if (! empty($conf->stock->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('p.stock'=>'Stock','p.seuil_stock_alerte'=>'StockLimit','p.desiredstock'=>'DesiredStock','p.pmp'=>'PMPValue')); - if (! empty($conf->barcode->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('p.barcode'=>'BarCode')); - $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('pa.qty'=>'Qty','pa.incdec'=>'ComposedProductIncDecStock')); - $this->export_TypeFields_array[$r]=array( - 'p.ref'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.url'=>"Text", - 'p.accountancy_code_sell'=>"Text",'p.accountancy_code_sell_intra'=>"Text",'p.accountancy_code_sell_export'=>"Text", - 'p.accountancy_code_buy'=>"Text",'p.accountancy_code_buy_intra'=>"Text",'p.accountancy_code_buy_export'=>"Text", - 'p.note'=>"Text",'p.note_public'=>"Text", - 'p.weight'=>"Numeric",'p.length'=>"Numeric",'p.surface'=>"Numeric",'p.volume'=>"Numeric",'p.customcode'=>'Text', - 'p.price_base_type'=>"Text",'p.price'=>"Numeric",'p.price_ttc'=>"Numeric",'p.tva_tx'=>'Numeric','p.tosell'=>"Boolean",'p.tobuy'=>"Boolean", - 'p.datec'=>'Date','p.tms'=>'Date' + if (!empty($conf->stock->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.stock'=>'Stock', 'p.seuil_stock_alerte'=>'StockLimit', 'p.desiredstock'=>'DesiredStock', 'p.pmp'=>'PMPValue')); + if (!empty($conf->barcode->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.barcode'=>'BarCode')); + $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('pa.qty'=>'Qty', 'pa.incdec'=>'ComposedProductIncDecStock')); + $this->export_TypeFields_array[$r] = array( + 'p.ref'=>"Text", 'p.label'=>"Text", 'p.description'=>"Text", 'p.url'=>"Text", + 'p.accountancy_code_sell'=>"Text", 'p.accountancy_code_sell_intra'=>"Text", 'p.accountancy_code_sell_export'=>"Text", + 'p.accountancy_code_buy'=>"Text", 'p.accountancy_code_buy_intra'=>"Text", 'p.accountancy_code_buy_export'=>"Text", + 'p.note'=>"Text", 'p.note_public'=>"Text", + 'p.weight'=>"Numeric", 'p.length'=>"Numeric", 'p.surface'=>"Numeric", 'p.volume'=>"Numeric", 'p.customcode'=>'Text', + 'p.price_base_type'=>"Text", 'p.price'=>"Numeric", 'p.price_ttc'=>"Numeric", 'p.tva_tx'=>'Numeric', 'p.tosell'=>"Boolean", 'p.tobuy'=>"Boolean", + 'p.datec'=>'Date', 'p.tms'=>'Date' ); - if (! empty($conf->stock->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r], array('p.stock'=>'Numeric','p.seuil_stock_alerte'=>'Numeric','p.desiredstock'=>'Numeric','p.pmp'=>'Numeric','p.cost_price'=>'Numeric')); - if (! empty($conf->barcode->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r], array('p.barcode'=>'Text')); - $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r], array('pa.qty'=>'Numeric')); - $this->export_entities_array[$r]=array( - 'p.rowid'=>"virtualproduct",'p.ref'=>"virtualproduct",'p.label'=>"virtualproduct",'p.description'=>"virtualproduct",'p.url'=>"virtualproduct", - 'p.accountancy_code_sell'=>'virtualproduct','p.accountancy_code_sell_intra'=>'virtualproduct','p.accountancy_code_sell_export'=>'virtualproduct', - 'p.accountancy_code_buy'=>'virtualproduct','p.accountancy_code_buy_intra'=>'virtualproduct','p.accountancy_code_buy_export'=>'virtualproduct', - 'p.note'=>"virtualproduct",'p.length'=>"virtualproduct", - 'p.surface'=>"virtualproduct",'p.volume'=>"virtualproduct",'p.weight'=>"virtualproduct",'p.customcode'=>'virtualproduct', - 'p.price_base_type'=>"virtualproduct",'p.price'=>"virtualproduct",'p.price_ttc'=>"virtualproduct",'p.tva_tx'=>"virtualproduct", - 'p.tosell'=>"virtualproduct",'p.tobuy'=>"virtualproduct",'p.datec'=>"virtualproduct",'p.tms'=>"virtualproduct" + if (!empty($conf->stock->enabled)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.stock'=>'Numeric', 'p.seuil_stock_alerte'=>'Numeric', 'p.desiredstock'=>'Numeric', 'p.pmp'=>'Numeric', 'p.cost_price'=>'Numeric')); + if (!empty($conf->barcode->enabled)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.barcode'=>'Text')); + $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('pa.qty'=>'Numeric')); + $this->export_entities_array[$r] = array( + 'p.rowid'=>"virtualproduct", 'p.ref'=>"virtualproduct", 'p.label'=>"virtualproduct", 'p.description'=>"virtualproduct", 'p.url'=>"virtualproduct", + 'p.accountancy_code_sell'=>'virtualproduct', 'p.accountancy_code_sell_intra'=>'virtualproduct', 'p.accountancy_code_sell_export'=>'virtualproduct', + 'p.accountancy_code_buy'=>'virtualproduct', 'p.accountancy_code_buy_intra'=>'virtualproduct', 'p.accountancy_code_buy_export'=>'virtualproduct', + 'p.note'=>"virtualproduct", 'p.length'=>"virtualproduct", + 'p.surface'=>"virtualproduct", 'p.volume'=>"virtualproduct", 'p.weight'=>"virtualproduct", 'p.customcode'=>'virtualproduct', + 'p.price_base_type'=>"virtualproduct", 'p.price'=>"virtualproduct", 'p.price_ttc'=>"virtualproduct", 'p.tva_tx'=>"virtualproduct", + 'p.tosell'=>"virtualproduct", 'p.tobuy'=>"virtualproduct", 'p.datec'=>"virtualproduct", 'p.tms'=>"virtualproduct" ); - if (! empty($conf->stock->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('p.stock'=>'virtualproduct','p.seuil_stock_alerte'=>'virtualproduct','p.desiredstock'=>'virtualproduct','p.pmp'=>'virtualproduct')); - if (! empty($conf->barcode->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('p.barcode'=>'virtualproduct')); - $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('pa.qty'=>"subproduct",'pa.incdec'=>'subproduct')); - $keyforselect='product'; $keyforelement='product'; $keyforaliasextra='extra'; + if (!empty($conf->stock->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.stock'=>'virtualproduct', 'p.seuil_stock_alerte'=>'virtualproduct', 'p.desiredstock'=>'virtualproduct', 'p.pmp'=>'virtualproduct')); + if (!empty($conf->barcode->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.barcode'=>'virtualproduct')); + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('pa.qty'=>"subproduct", 'pa.incdec'=>'subproduct')); + $keyforselect = 'product'; $keyforelement = 'product'; $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('p2.rowid'=>"Id",'p2.ref'=>"Ref",'p2.label'=>"Label",'p2.description'=>"Description")); - $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('p2.rowid'=>"subproduct",'p2.ref'=>"subproduct",'p2.label'=>"subproduct",'p2.description'=>"subproduct")); - $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'product as p'; - $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra ON p.rowid = extra.fk_object,'; - $this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'product_association as pa, '.MAIN_DB_PREFIX.'product as p2'; - $this->export_sql_end[$r] .=' WHERE p.entity IN ('.getEntity('product').')'; // For product and service profile - $this->export_sql_end[$r] .=' AND p.rowid = pa.fk_product_pere AND p2.rowid = pa.fk_product_fils'; + $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p2.rowid'=>"Id", 'p2.ref'=>"Ref", 'p2.label'=>"Label", 'p2.description'=>"Description")); + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p2.rowid'=>"subproduct", 'p2.ref'=>"subproduct", 'p2.label'=>"subproduct", 'p2.description'=>"subproduct")); + $this->export_sql_start[$r] = 'SELECT DISTINCT '; + $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p'; + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra ON p.rowid = extra.fk_object,'; + $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'product_association as pa, '.MAIN_DB_PREFIX.'product as p2'; + $this->export_sql_end[$r] .= ' WHERE p.entity IN ('.getEntity('product').')'; // For product and service profile + $this->export_sql_end[$r] .= ' AND p.rowid = pa.fk_product_pere AND p2.rowid = pa.fk_product_fils'; } // Imports //-------- - $r=0; + $r = 0; // Import list of products $r++; - $this->import_code[$r]=$this->rights_class.'_'.$r; - $this->import_label[$r]="Products"; // Translation key - $this->import_icon[$r]=$this->picto; - $this->import_entities_array[$r]=array(); // We define here only fields that use a different icon from the one defined in import_icon - $this->import_tables_array[$r]=array('p'=>MAIN_DB_PREFIX.'product','extra'=>MAIN_DB_PREFIX.'product_extrafields'); - $this->import_tables_creator_array[$r]=array('p'=>'fk_user_author'); // Fields to store import user id - $this->import_fields_array[$r]=array( + $this->import_code[$r] = $this->rights_class.'_'.$r; + $this->import_label[$r] = "Products"; // Translation key + $this->import_icon[$r] = $this->picto; + $this->import_entities_array[$r] = array(); // We define here only fields that use a different icon from the one defined in import_icon + $this->import_tables_array[$r] = array('p'=>MAIN_DB_PREFIX.'product', 'extra'=>MAIN_DB_PREFIX.'product_extrafields'); + $this->import_tables_creator_array[$r] = array('p'=>'fk_user_author'); // Fields to store import user id + $this->import_fields_array[$r] = array( 'p.ref' => "Ref*", 'p.label' => "Label*", 'p.fk_product_type' => "Type*", @@ -576,7 +576,7 @@ class modProduct extends DolibarrModules ) ); - if (! is_array($this->import_convertvalue_array[$r])) $this->import_convertvalue_array[$r] = array(); + if (!is_array($this->import_convertvalue_array[$r])) $this->import_convertvalue_array[$r] = array(); $this->import_convertvalue_array[$r] = array_merge($this->import_convertvalue_array[$r], array( 'p.fk_unit' => array( 'rule' => 'fetchidfromcodeorlabel', diff --git a/htdocs/core/modules/modService.class.php b/htdocs/core/modules/modService.class.php index 822c6bf699f..e99f94aa154 100644 --- a/htdocs/core/modules/modService.class.php +++ b/htdocs/core/modules/modService.class.php @@ -136,216 +136,216 @@ class modService extends DolibarrModules // Exports //-------- - $r=0; + $r = 0; $r++; - $this->export_code[$r]=$this->rights_class.'_'.$r; - $this->export_label[$r]="Services"; // Translation key (used only if key ExportDataset_xxx_z not found) - $this->export_permission[$r]=array(array("service","export")); - $this->export_fields_array[$r]=array( - 'p.rowid'=>"Id",'p.ref'=>"Ref",'p.label'=>"Label", - 'p.fk_product_type'=>'Type','p.tosell'=>"OnSell",'p.tobuy'=>"OnBuy", - 'p.description'=>"Description",'p.url'=>"PublicUrl", - 'p.customcode'=>'CustomCode','p.fk_country'=>'IDCountry', + $this->export_code[$r] = $this->rights_class.'_'.$r; + $this->export_label[$r] = "Services"; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_permission[$r] = array(array("service", "export")); + $this->export_fields_array[$r] = array( + 'p.rowid'=>"Id", 'p.ref'=>"Ref", 'p.label'=>"Label", + 'p.fk_product_type'=>'Type', 'p.tosell'=>"OnSell", 'p.tobuy'=>"OnBuy", + 'p.description'=>"Description", 'p.url'=>"PublicUrl", + 'p.customcode'=>'CustomCode', 'p.fk_country'=>'IDCountry', 'p.accountancy_code_sell'=>"ProductAccountancySellCode", 'p.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", 'p.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", 'p.accountancy_code_buy'=>"ProductAccountancyBuyCode", 'p.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", 'p.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode", - 'p.note'=>"NotePrivate",'p.note_public'=>'NotePublic', - 'p.weight'=>"Weight",'p.length'=>"Length",'p.width'=>"Width",'p.height'=>"Height",'p.surface'=>"Surface",'p.volume'=>"Volume", + 'p.note'=>"NotePrivate", 'p.note_public'=>'NotePublic', + 'p.weight'=>"Weight", 'p.length'=>"Length", 'p.width'=>"Width", 'p.height'=>"Height", 'p.surface'=>"Surface", 'p.volume'=>"Volume", 'p.duration'=>"Duration", 'p.finished' => 'Nature', - 'p.price_base_type'=>"PriceBase",'p.price'=>"UnitPriceHT",'p.price_ttc'=>"UnitPriceTTC", + 'p.price_base_type'=>"PriceBase", 'p.price'=>"UnitPriceHT", 'p.price_ttc'=>"UnitPriceTTC", 'p.tva_tx'=>'VATRate', - 'p.datec'=>'DateCreation','p.tms'=>'DateModification' + 'p.datec'=>'DateCreation', 'p.tms'=>'DateModification' ); - if (is_object($mysoc) && $mysoc->useNPR()) $this->export_fields_array[$r]['p.recuperableonly']='NPR'; - if (! empty($conf->fournisseur->enabled) || !empty($conf->margin->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('p.cost_price'=>'CostPrice')); - if (! empty($conf->stock->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('p.stock'=>'Stock','p.seuil_stock_alerte'=>'StockLimit','p.desiredstock'=>'DesiredStock','p.pmp'=>'PMPValue')); - if (! empty($conf->barcode->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('p.barcode'=>'BarCode')); - $keyforselect='product'; $keyforelement='product'; $keyforaliasextra='extra'; + if (is_object($mysoc) && $mysoc->useNPR()) $this->export_fields_array[$r]['p.recuperableonly'] = 'NPR'; + if (!empty($conf->fournisseur->enabled) || !empty($conf->margin->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.cost_price'=>'CostPrice')); + if (!empty($conf->stock->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.stock'=>'Stock', 'p.seuil_stock_alerte'=>'StockLimit', 'p.desiredstock'=>'DesiredStock', 'p.pmp'=>'PMPValue')); + if (!empty($conf->barcode->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.barcode'=>'BarCode')); + $keyforselect = 'product'; $keyforelement = 'product'; $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - if (! empty($conf->fournisseur->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('s.nom'=>'Supplier','pf.ref_fourn'=>'SupplierRef','pf.quantity'=>'QtyMin','pf.remise_percent'=>'DiscountQtyMin','pf.unitprice'=>'BuyingPrice','pf.delivery_time_days'=>'NbDaysToDelivery')); - if (! empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('group_concat(cat.label)'=>'Categories')); - if (! empty($conf->global->MAIN_MULTILANGS)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('l.lang'=>'Language', 'l.label'=>'TranslatedLabel','l.description'=>'TranslatedDescription','l.note'=>'TranslatedNote')); - if (! empty($conf->global->PRODUCT_USE_UNITS)) $this->export_fields_array[$r]['p.fk_unit'] = 'Unit'; - $this->export_TypeFields_array[$r]=array( - 'p.ref'=>"Text",'p.label'=>"Text", - 'p.fk_product_type'=>'Numeric','p.tosell'=>"Boolean",'p.tobuy'=>"Boolean", - 'p.description'=>"Text",'p.url'=>"Text",'p.accountancy_code_sell'=>"Text", - 'p.accountancy_code_sell_intra'=>"Text",'p.accountancy_code_sell_export'=>"Text",'p.accountancy_code_buy'=>"Text", + if (!empty($conf->fournisseur->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('s.nom'=>'Supplier', 'pf.ref_fourn'=>'SupplierRef', 'pf.quantity'=>'QtyMin', 'pf.remise_percent'=>'DiscountQtyMin', 'pf.unitprice'=>'BuyingPrice', 'pf.delivery_time_days'=>'NbDaysToDelivery')); + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('group_concat(cat.label)'=>'Categories')); + if (!empty($conf->global->MAIN_MULTILANGS)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('l.lang'=>'Language', 'l.label'=>'TranslatedLabel', 'l.description'=>'TranslatedDescription', 'l.note'=>'TranslatedNote')); + if (!empty($conf->global->PRODUCT_USE_UNITS)) $this->export_fields_array[$r]['p.fk_unit'] = 'Unit'; + $this->export_TypeFields_array[$r] = array( + 'p.ref'=>"Text", 'p.label'=>"Text", + 'p.fk_product_type'=>'Numeric', 'p.tosell'=>"Boolean", 'p.tobuy'=>"Boolean", + 'p.description'=>"Text", 'p.url'=>"Text", 'p.accountancy_code_sell'=>"Text", + 'p.accountancy_code_sell_intra'=>"Text", 'p.accountancy_code_sell_export'=>"Text", 'p.accountancy_code_buy'=>"Text", 'p.accountancy_code_buy_intra'=>"Text", 'p.accountancy_code_buy_export'=>"Text", - 'p.note'=>"Text",'p.note_public'=>"Text", - 'p.weight'=>"Numeric",'p.length'=>"Numeric",'p.width'=>"Numeric",'p.height'=>"Numeric",'p.surface'=>"Numeric",'p.volume'=>"Numeric", + 'p.note'=>"Text", 'p.note_public'=>"Text", + 'p.weight'=>"Numeric", 'p.length'=>"Numeric", 'p.width'=>"Numeric", 'p.height'=>"Numeric", 'p.surface'=>"Numeric", 'p.volume'=>"Numeric", 'p.customcode'=>'Text', 'p.duration'=>"Text", 'p.finished' => 'Numeric', - 'p.price_base_type'=>"Text",'p.price'=>"Numeric",'p.price_ttc'=>"Numeric",'p.tva_tx'=>'Numeric', - 'p.datec'=>'Date','p.tms'=>'Date' + 'p.price_base_type'=>"Text", 'p.price'=>"Numeric", 'p.price_ttc'=>"Numeric", 'p.tva_tx'=>'Numeric', + 'p.datec'=>'Date', 'p.tms'=>'Date' ); - if (! empty($conf->stock->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r], array('p.stock'=>'Numeric','p.seuil_stock_alerte'=>'Numeric','p.desiredstock'=>'Numeric','p.pmp'=>'Numeric','p.cost_price'=>'Numeric')); - if (! empty($conf->barcode->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r], array('p.barcode'=>'Text')); - if (! empty($conf->fournisseur->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r], array('s.nom'=>'Text','pf.ref_fourn'=>'Text','pf.unitprice'=>'Numeric','pf.quantity'=>'Numeric','pf.remise_percent'=>'Numeric','pf.delivery_time_days'=>'Numeric')); - if (! empty($conf->global->MAIN_MULTILANGS)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r], array('l.lang'=>'Text', 'l.label'=>'Text','l.description'=>'Text','l.note'=>'Text')); - if (! empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r], array("group_concat(cat.label)"=>'Text')); - $this->export_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon - if (! empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array("group_concat(cat.label)"=>'category')); - if (! empty($conf->stock->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('p.stock'=>'product','p.pmp'=>'product')); - if (! empty($conf->barcode->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('p.barcode'=>'product')); - if (! empty($conf->fournisseur->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('s.nom'=>'product_supplier_ref','pf.ref_fourn'=>'product_supplier_ref','pf.unitprice'=>'product_supplier_ref','pf.quantity'=>'product_supplier_ref','pf.remise_percent'=>'product_supplier_ref','pf.delivery_time_days'=>'product_supplier_ref')); - if (! empty($conf->global->MAIN_MULTILANGS)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('l.lang'=>'translation', 'l.label'=>'translation','l.description'=>'translation','l.note'=>'translation')); - if (! empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_dependencies_array[$r]=array('category'=>'p.rowid'); - if (! empty($conf->stock->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('p.stock'=>'product','p.pmp'=>'product')); - if (! empty($conf->barcode->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('p.barcode'=>'product')); - if (! empty($conf->fournisseur->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('s.nom'=>'product_supplier_ref','pf.ref_fourn'=>'product_supplier_ref','pf.unitprice'=>'product_supplier_ref','pf.quantity'=>'product_supplier_ref','pf.remise_percent'=>'product_supplier_ref','pf.delivery_time_days'=>'product_supplier_ref')); - if (! empty($conf->global->MAIN_MULTILANGS)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('l.lang'=>'translation', 'l.label'=>'translation','l.description'=>'translation','l.note'=>'translation')); - if (! empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_dependencies_array[$r]=array('category'=>'p.rowid'); - $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'product as p'; - if (! empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'categorie as cat ON cp.fk_categorie = cat.rowid'; - if (! empty($conf->global->MAIN_MULTILANGS)) $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_lang as l ON l.fk_product = p.rowid'; - $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra ON p.rowid = extra.fk_object'; - if (! empty($conf->fournisseur->enabled)) $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_fournisseur_price as pf ON pf.fk_product = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'societe s ON s.rowid = pf.fk_soc'; - $this->export_sql_end[$r] .=' WHERE p.fk_product_type = 1 AND p.entity IN ('.getEntity('product').')'; - if (! empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_sql_order[$r] =' GROUP BY p.rowid'; // FIXME The group by used a generic value to say "all fields in select except function fields" + if (!empty($conf->stock->enabled)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.stock'=>'Numeric', 'p.seuil_stock_alerte'=>'Numeric', 'p.desiredstock'=>'Numeric', 'p.pmp'=>'Numeric', 'p.cost_price'=>'Numeric')); + if (!empty($conf->barcode->enabled)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.barcode'=>'Text')); + if (!empty($conf->fournisseur->enabled)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('s.nom'=>'Text', 'pf.ref_fourn'=>'Text', 'pf.unitprice'=>'Numeric', 'pf.quantity'=>'Numeric', 'pf.remise_percent'=>'Numeric', 'pf.delivery_time_days'=>'Numeric')); + if (!empty($conf->global->MAIN_MULTILANGS)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('l.lang'=>'Text', 'l.label'=>'Text', 'l.description'=>'Text', 'l.note'=>'Text')); + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array("group_concat(cat.label)"=>'Text')); + $this->export_entities_array[$r] = array(); // We define here only fields that use another icon that the one defined into import_icon + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array("group_concat(cat.label)"=>'category')); + if (!empty($conf->stock->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.stock'=>'product', 'p.pmp'=>'product')); + if (!empty($conf->barcode->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.barcode'=>'product')); + if (!empty($conf->fournisseur->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('s.nom'=>'product_supplier_ref', 'pf.ref_fourn'=>'product_supplier_ref', 'pf.unitprice'=>'product_supplier_ref', 'pf.quantity'=>'product_supplier_ref', 'pf.remise_percent'=>'product_supplier_ref', 'pf.delivery_time_days'=>'product_supplier_ref')); + if (!empty($conf->global->MAIN_MULTILANGS)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('l.lang'=>'translation', 'l.label'=>'translation', 'l.description'=>'translation', 'l.note'=>'translation')); + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_dependencies_array[$r] = array('category'=>'p.rowid'); + if (!empty($conf->stock->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.stock'=>'product', 'p.pmp'=>'product')); + if (!empty($conf->barcode->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.barcode'=>'product')); + if (!empty($conf->fournisseur->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('s.nom'=>'product_supplier_ref', 'pf.ref_fourn'=>'product_supplier_ref', 'pf.unitprice'=>'product_supplier_ref', 'pf.quantity'=>'product_supplier_ref', 'pf.remise_percent'=>'product_supplier_ref', 'pf.delivery_time_days'=>'product_supplier_ref')); + if (!empty($conf->global->MAIN_MULTILANGS)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('l.lang'=>'translation', 'l.label'=>'translation', 'l.description'=>'translation', 'l.note'=>'translation')); + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_dependencies_array[$r] = array('category'=>'p.rowid'); + $this->export_sql_start[$r] = 'SELECT DISTINCT '; + $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p'; + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'categorie as cat ON cp.fk_categorie = cat.rowid'; + if (!empty($conf->global->MAIN_MULTILANGS)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_lang as l ON l.fk_product = p.rowid'; + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra ON p.rowid = extra.fk_object'; + if (!empty($conf->fournisseur->enabled)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_fournisseur_price as pf ON pf.fk_product = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'societe s ON s.rowid = pf.fk_soc'; + $this->export_sql_end[$r] .= ' WHERE p.fk_product_type = 1 AND p.entity IN ('.getEntity('product').')'; + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_sql_order[$r] = ' GROUP BY p.rowid'; // FIXME The group by used a generic value to say "all fields in select except function fields" if (empty($conf->product->enabled)) // We enable next import templates only if module product not already enabled (to avoid duplicate entries) { - if (! empty($conf->global->PRODUIT_MULTIPRICES)) + if (!empty($conf->global->PRODUIT_MULTIPRICES)) { // Exports product multiprice $r++; - $this->export_code[$r]=$this->rights_class.'_'.$r; - $this->export_label[$r]="ProductsMultiPrice"; // Translation key (used only if key ExportDataset_xxx_z not found) - $this->export_permission[$r]=array(array("produit","export")); - $this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref", - 'pr.price_base_type'=>"PriceBase",'pr.price_level'=>"PriceLevel", - 'pr.price'=>"PriceLevelUnitPriceHT",'pr.price_ttc'=>"PriceLevelUnitPriceTTC", - 'pr.price_min'=>"MinPriceLevelUnitPriceHT",'pr.price_min_ttc'=>"MinPriceLevelUnitPriceTTC", + $this->export_code[$r] = $this->rights_class.'_'.$r; + $this->export_label[$r] = "ProductsMultiPrice"; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_permission[$r] = array(array("produit", "export")); + $this->export_fields_array[$r] = array('p.rowid'=>"Id", 'p.ref'=>"Ref", + 'pr.price_base_type'=>"PriceBase", 'pr.price_level'=>"PriceLevel", + 'pr.price'=>"PriceLevelUnitPriceHT", 'pr.price_ttc'=>"PriceLevelUnitPriceTTC", + 'pr.price_min'=>"MinPriceLevelUnitPriceHT", 'pr.price_min_ttc'=>"MinPriceLevelUnitPriceTTC", 'pr.tva_tx'=>'PriceLevelVATRate', 'pr.date_price'=>'DateCreation'); - if (is_object($mysoc) && $mysoc->useNPR()) $this->export_fields_array[$r]['pr.recuperableonly']='NPR'; + if (is_object($mysoc) && $mysoc->useNPR()) $this->export_fields_array[$r]['pr.recuperableonly'] = 'NPR'; //$this->export_TypeFields_array[$r]=array( // 'p.ref'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.url'=>"Text",'p.accountancy_code_sell'=>"Text",'p.accountancy_code_buy'=>"Text", // 'p.note'=>"Text",'p.length'=>"Numeric",'p.surface'=>"Numeric",'p.volume'=>"Numeric",'p.weight'=>"Numeric",'p.customcode'=>'Text', // 'p.price_base_type'=>"Text",'p.price'=>"Numeric",'p.price_ttc'=>"Numeric",'p.tva_tx'=>'Numeric','p.tosell'=>"Boolean",'p.tobuy'=>"Boolean", // 'p.datec'=>'Date','p.tms'=>'Date' //); - $this->export_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product", - 'pr.price_base_type'=>"product",'pr.price_level'=>"product",'pr.price'=>"product", + $this->export_entities_array[$r] = array('p.rowid'=>"product", 'p.ref'=>"product", + 'pr.price_base_type'=>"product", 'pr.price_level'=>"product", 'pr.price'=>"product", 'pr.price_ttc'=>"product", - 'pr.price_min'=>"product",'pr.price_min_ttc'=>"product", + 'pr.price_min'=>"product", 'pr.price_min_ttc'=>"product", 'pr.tva_tx'=>'product', 'pr.recuperableonly'=>'product', 'pr.date_price'=>"product"); - $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'product as p'; - $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_price as pr ON p.rowid = pr.fk_product AND pr.entity = '.$conf->entity; // export prices only for the current entity - $this->export_sql_end[$r] .=' WHERE p.entity IN ('.getEntity('product').')'; // For product and service profile + $this->export_sql_start[$r] = 'SELECT DISTINCT '; + $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p'; + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_price as pr ON p.rowid = pr.fk_product AND pr.entity = '.$conf->entity; // export prices only for the current entity + $this->export_sql_end[$r] .= ' WHERE p.entity IN ('.getEntity('product').')'; // For product and service profile } - if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) + if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { // Exports product multiprice $r++; - $this->export_code[$r]=$this->rights_class.'_'.$r; - $this->export_label[$r]="ProductsPricePerCustomer"; // Translation key (used only if key ExportDataset_xxx_z not found) - $this->export_permission[$r]=array(array("produit","export")); - $this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref", + $this->export_code[$r] = $this->rights_class.'_'.$r; + $this->export_label[$r] = "ProductsPricePerCustomer"; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_permission[$r] = array(array("produit", "export")); + $this->export_fields_array[$r] = array('p.rowid'=>"Id", 'p.ref'=>"Ref", 's.nom'=>'ThirdParty', 'pr.price_base_type'=>"PriceBase", - 'pr.price'=>"PriceUnitPriceHT",'pr.price_ttc'=>"PriceUnitPriceTTC", - 'pr.price_min'=>"MinPriceUnitPriceHT",'pr.price_min_ttc'=>"MinPriceUnitPriceTTC", + 'pr.price'=>"PriceUnitPriceHT", 'pr.price_ttc'=>"PriceUnitPriceTTC", + 'pr.price_min'=>"MinPriceUnitPriceHT", 'pr.price_min_ttc'=>"MinPriceUnitPriceTTC", 'pr.tva_tx'=>'PriceVATRate', 'pr.default_vat_code'=>'PriceVATCode', 'pr.datec'=>'DateCreation'); - if (is_object($mysoc) && $mysoc->useNPR()) $this->export_fields_array[$r]['pr.recuperableonly']='NPR'; - $this->export_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product", + if (is_object($mysoc) && $mysoc->useNPR()) $this->export_fields_array[$r]['pr.recuperableonly'] = 'NPR'; + $this->export_entities_array[$r] = array('p.rowid'=>"product", 'p.ref'=>"product", 's.nom'=>'company', - 'pr.price_base_type'=>"product",'pr.price'=>"product", + 'pr.price_base_type'=>"product", 'pr.price'=>"product", 'pr.price_ttc'=>"product", - 'pr.price_min'=>"product",'pr.price_min_ttc'=>"product", + 'pr.price_min'=>"product", 'pr.price_min_ttc'=>"product", 'pr.tva_tx'=>'product', 'pr.default_vat_code'=>'product', 'pr.recuperableonly'=>'product', 'pr.datec'=>"product"); - $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'product as p'; - $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_customer_price as pr ON p.rowid = pr.fk_product AND pr.entity = '.$conf->entity; // export prices only for the current entity - $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON pr.fk_soc = s.rowid'; - $this->export_sql_end[$r] .=' WHERE p.entity IN ('.getEntity('product').')'; // For product and service profile + $this->export_sql_start[$r] = 'SELECT DISTINCT '; + $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p'; + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_customer_price as pr ON p.rowid = pr.fk_product AND pr.entity = '.$conf->entity; // export prices only for the current entity + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON pr.fk_soc = s.rowid'; + $this->export_sql_end[$r] .= ' WHERE p.entity IN ('.getEntity('product').')'; // For product and service profile } - if (! empty($conf->global->PRODUIT_SOUSPRODUITS)) + if (!empty($conf->global->PRODUIT_SOUSPRODUITS)) { // Exports virtual products $r++; - $this->export_code[$r]=$this->rights_class.'_'.$r; - $this->export_label[$r]="AssociatedProducts"; // Translation key (used only if key ExportDataset_xxx_z not found) - $this->export_permission[$r]=array(array("produit","export")); - $this->export_fields_array[$r]=array( - 'p.rowid'=>"Id",'p.ref'=>"Ref",'p.label'=>"Label",'p.description'=>"Description",'p.url'=>"PublicUrl", - 'p.accountancy_code_sell'=>"ProductAccountancySellCode",'p.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", - 'p.accountancy_code_sell_export'=>"ProductAccountancySellExportCode",'p.accountancy_code_buy'=>"ProductAccountancyBuyCode", - 'p.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode",'p.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode", - 'p.note'=>"NotePrivate",'p.note_public'=>'NotePublic', - 'p.weight'=>"Weight",'p.length'=>"Length",'p.surface'=>"Surface",'p.volume'=>"Volume",'p.customcode'=>'CustomCode', - 'p.price_base_type'=>"PriceBase",'p.price'=>"UnitPriceHT",'p.price_ttc'=>"UnitPriceTTC",'p.tva_tx'=>'VATRate','p.tosell'=>"OnSell", - 'p.tobuy'=>"OnBuy",'p.datec'=>'DateCreation','p.tms'=>'DateModification' + $this->export_code[$r] = $this->rights_class.'_'.$r; + $this->export_label[$r] = "AssociatedProducts"; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_permission[$r] = array(array("produit", "export")); + $this->export_fields_array[$r] = array( + 'p.rowid'=>"Id", 'p.ref'=>"Ref", 'p.label'=>"Label", 'p.description'=>"Description", 'p.url'=>"PublicUrl", + 'p.accountancy_code_sell'=>"ProductAccountancySellCode", 'p.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", + 'p.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", 'p.accountancy_code_buy'=>"ProductAccountancyBuyCode", + 'p.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", 'p.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode", + 'p.note'=>"NotePrivate", 'p.note_public'=>'NotePublic', + 'p.weight'=>"Weight", 'p.length'=>"Length", 'p.surface'=>"Surface", 'p.volume'=>"Volume", 'p.customcode'=>'CustomCode', + 'p.price_base_type'=>"PriceBase", 'p.price'=>"UnitPriceHT", 'p.price_ttc'=>"UnitPriceTTC", 'p.tva_tx'=>'VATRate', 'p.tosell'=>"OnSell", + 'p.tobuy'=>"OnBuy", 'p.datec'=>'DateCreation', 'p.tms'=>'DateModification' ); - if (! empty($conf->stock->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('p.stock'=>'Stock','p.seuil_stock_alerte'=>'StockLimit','p.desiredstock'=>'DesiredStock','p.pmp'=>'PMPValue')); - if (! empty($conf->barcode->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('p.barcode'=>'BarCode')); - $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('pa.qty'=>'Qty','pa.incdec'=>'ComposedProductIncDecStock')); - $this->export_TypeFields_array[$r]=array( - 'p.ref'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.url'=>"Text", - 'p.accountancy_code_sell'=>"Text",'p.accountancy_code_sell_intra'=>"Text",'p.accountancy_code_sell_export'=>"Text", - 'p.accountancy_code_buy'=>"Text",'p.accountancy_code_buy_intra'=>"Text",'p.accountancy_code_buy_export'=>"Text", - 'p.note'=>"Text",'p.note_public'=>"Text", - 'p.weight'=>"Numeric",'p.length'=>"Numeric",'p.surface'=>"Numeric",'p.volume'=>"Numeric",'p.customcode'=>'Text', - 'p.price_base_type'=>"Text",'p.price'=>"Numeric",'p.price_ttc'=>"Numeric",'p.tva_tx'=>'Numeric','p.tosell'=>"Boolean",'p.tobuy'=>"Boolean", - 'p.datec'=>'Date','p.tms'=>'Date' + if (!empty($conf->stock->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.stock'=>'Stock', 'p.seuil_stock_alerte'=>'StockLimit', 'p.desiredstock'=>'DesiredStock', 'p.pmp'=>'PMPValue')); + if (!empty($conf->barcode->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.barcode'=>'BarCode')); + $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('pa.qty'=>'Qty', 'pa.incdec'=>'ComposedProductIncDecStock')); + $this->export_TypeFields_array[$r] = array( + 'p.ref'=>"Text", 'p.label'=>"Text", 'p.description'=>"Text", 'p.url'=>"Text", + 'p.accountancy_code_sell'=>"Text", 'p.accountancy_code_sell_intra'=>"Text", 'p.accountancy_code_sell_export'=>"Text", + 'p.accountancy_code_buy'=>"Text", 'p.accountancy_code_buy_intra'=>"Text", 'p.accountancy_code_buy_export'=>"Text", + 'p.note'=>"Text", 'p.note_public'=>"Text", + 'p.weight'=>"Numeric", 'p.length'=>"Numeric", 'p.surface'=>"Numeric", 'p.volume'=>"Numeric", 'p.customcode'=>'Text', + 'p.price_base_type'=>"Text", 'p.price'=>"Numeric", 'p.price_ttc'=>"Numeric", 'p.tva_tx'=>'Numeric', 'p.tosell'=>"Boolean", 'p.tobuy'=>"Boolean", + 'p.datec'=>'Date', 'p.tms'=>'Date' ); - if (! empty($conf->stock->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r], array('p.stock'=>'Numeric','p.seuil_stock_alerte'=>'Numeric','p.desiredstock'=>'Numeric','p.pmp'=>'Numeric','p.cost_price'=>'Numeric')); - if (! empty($conf->barcode->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r], array('p.barcode'=>'Text')); - $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r], array('pa.qty'=>'Numeric')); - $this->export_entities_array[$r]=array( - 'p.rowid'=>"virtualproduct",'p.ref'=>"virtualproduct",'p.label'=>"virtualproduct",'p.description'=>"virtualproduct",'p.url'=>"virtualproduct", - 'p.accountancy_code_sell'=>'virtualproduct','p.accountancy_code_sell_intra'=>'virtualproduct','p.accountancy_code_sell_export'=>'virtualproduct', - 'p.accountancy_code_buy'=>'virtualproduct','p.accountancy_code_buy_intra'=>'virtualproduct','p.accountancy_code_buy_export'=>'virtualproduct', - 'p.note'=>"virtualproduct",'p.length'=>"virtualproduct", - 'p.surface'=>"virtualproduct",'p.volume'=>"virtualproduct",'p.weight'=>"virtualproduct",'p.customcode'=>'virtualproduct', - 'p.price_base_type'=>"virtualproduct",'p.price'=>"virtualproduct",'p.price_ttc'=>"virtualproduct",'p.tva_tx'=>"virtualproduct", - 'p.tosell'=>"virtualproduct",'p.tobuy'=>"virtualproduct",'p.datec'=>"virtualproduct",'p.tms'=>"virtualproduct" + if (!empty($conf->stock->enabled)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.stock'=>'Numeric', 'p.seuil_stock_alerte'=>'Numeric', 'p.desiredstock'=>'Numeric', 'p.pmp'=>'Numeric', 'p.cost_price'=>'Numeric')); + if (!empty($conf->barcode->enabled)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.barcode'=>'Text')); + $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('pa.qty'=>'Numeric')); + $this->export_entities_array[$r] = array( + 'p.rowid'=>"virtualproduct", 'p.ref'=>"virtualproduct", 'p.label'=>"virtualproduct", 'p.description'=>"virtualproduct", 'p.url'=>"virtualproduct", + 'p.accountancy_code_sell'=>'virtualproduct', 'p.accountancy_code_sell_intra'=>'virtualproduct', 'p.accountancy_code_sell_export'=>'virtualproduct', + 'p.accountancy_code_buy'=>'virtualproduct', 'p.accountancy_code_buy_intra'=>'virtualproduct', 'p.accountancy_code_buy_export'=>'virtualproduct', + 'p.note'=>"virtualproduct", 'p.length'=>"virtualproduct", + 'p.surface'=>"virtualproduct", 'p.volume'=>"virtualproduct", 'p.weight'=>"virtualproduct", 'p.customcode'=>'virtualproduct', + 'p.price_base_type'=>"virtualproduct", 'p.price'=>"virtualproduct", 'p.price_ttc'=>"virtualproduct", 'p.tva_tx'=>"virtualproduct", + 'p.tosell'=>"virtualproduct", 'p.tobuy'=>"virtualproduct", 'p.datec'=>"virtualproduct", 'p.tms'=>"virtualproduct" ); - if (! empty($conf->stock->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('p.stock'=>'virtualproduct','p.seuil_stock_alerte'=>'virtualproduct','p.desiredstock'=>'virtualproduct','p.pmp'=>'virtualproduct')); - if (! empty($conf->barcode->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('p.barcode'=>'virtualproduct')); - $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('pa.qty'=>"subproduct",'pa.incdec'=>'subproduct')); - $keyforselect='product'; $keyforelement='product'; $keyforaliasextra='extra'; + if (!empty($conf->stock->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.stock'=>'virtualproduct', 'p.seuil_stock_alerte'=>'virtualproduct', 'p.desiredstock'=>'virtualproduct', 'p.pmp'=>'virtualproduct')); + if (!empty($conf->barcode->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.barcode'=>'virtualproduct')); + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('pa.qty'=>"subproduct", 'pa.incdec'=>'subproduct')); + $keyforselect = 'product'; $keyforelement = 'product'; $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('p2.rowid'=>"Id",'p2.ref'=>"Ref",'p2.label'=>"Label",'p2.description'=>"Description")); - $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('p2.rowid'=>"subproduct",'p2.ref'=>"subproduct",'p2.label'=>"subproduct",'p2.description'=>"subproduct")); - $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'product as p'; - $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra ON p.rowid = extra.fk_object,'; - $this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'product_association as pa, '.MAIN_DB_PREFIX.'product as p2'; - $this->export_sql_end[$r] .=' WHERE p.entity IN ('.getEntity('product').')'; // For product and service profile - $this->export_sql_end[$r] .=' AND p.rowid = pa.fk_product_pere AND p2.rowid = pa.fk_product_fils'; + $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p2.rowid'=>"Id", 'p2.ref'=>"Ref", 'p2.label'=>"Label", 'p2.description'=>"Description")); + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p2.rowid'=>"subproduct", 'p2.ref'=>"subproduct", 'p2.label'=>"subproduct", 'p2.description'=>"subproduct")); + $this->export_sql_start[$r] = 'SELECT DISTINCT '; + $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p'; + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra ON p.rowid = extra.fk_object,'; + $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'product_association as pa, '.MAIN_DB_PREFIX.'product as p2'; + $this->export_sql_end[$r] .= ' WHERE p.entity IN ('.getEntity('product').')'; // For product and service profile + $this->export_sql_end[$r] .= ' AND p.rowid = pa.fk_product_pere AND p2.rowid = pa.fk_product_fils'; } } // Imports //-------- - $r=0; + $r = 0; // Import list of services $r++; - $this->import_code[$r]=$this->rights_class.'_'.$r; - $this->import_label[$r]="Products"; // Translation key - $this->import_icon[$r]=$this->picto; - $this->import_entities_array[$r]=array(); // We define here only fields that use a different icon from the one defined in import_icon - $this->import_tables_array[$r]=array('p'=>MAIN_DB_PREFIX.'product','extra'=>MAIN_DB_PREFIX.'product_extrafields'); - $this->import_tables_creator_array[$r]=array('p'=>'fk_user_author'); // Fields to store import user id - $this->import_fields_array[$r]=array( + $this->import_code[$r] = $this->rights_class.'_'.$r; + $this->import_label[$r] = "Products"; // Translation key + $this->import_icon[$r] = $this->picto; + $this->import_entities_array[$r] = array(); // We define here only fields that use a different icon from the one defined in import_icon + $this->import_tables_array[$r] = array('p'=>MAIN_DB_PREFIX.'product', 'extra'=>MAIN_DB_PREFIX.'product_extrafields'); + $this->import_tables_creator_array[$r] = array('p'=>'fk_user_author'); // Fields to store import user id + $this->import_fields_array[$r] = array( 'p.ref' => "Ref*", 'p.label' => "Label*", 'p.fk_product_type' => "Type*", @@ -543,7 +543,7 @@ class modService extends DolibarrModules ) ); - if (! is_array($this->import_convertvalue_array[$r])) $this->import_convertvalue_array[$r] = array(); + if (!is_array($this->import_convertvalue_array[$r])) $this->import_convertvalue_array[$r] = array(); $this->import_convertvalue_array[$r] = array_merge($this->import_convertvalue_array[$r], array( 'p.fk_unit' => array( 'rule' => 'fetchidfromcodeorlabel', diff --git a/htdocs/core/tpl/admin_extrafields_add.tpl.php b/htdocs/core/tpl/admin_extrafields_add.tpl.php index 8859ce4ba9d..6c25b5c07b5 100644 --- a/htdocs/core/tpl/admin_extrafields_add.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_add.tpl.php @@ -28,7 +28,7 @@ */ // Protection to avoid direct call of template -if (empty($conf) || ! is_object($conf)) +if (empty($conf) || !is_object($conf)) { print "Error, template page can't be called as URL"; exit; @@ -154,7 +154,7 @@ $langs->load("modulebuilder"); selectarray('type', $type2label, GETPOST('type', 'alpha')); ?> - + - +global->MAIN_STORE_COMPUTED_EXTRAFIELDS)) { ?> - + - + - + - + - + + - +multicompany->enabled) { ?> - +
'; - $html .= '' . $field->label . ' : '; + $html .= ''; + $html .= ''.$field->label.' : '; $html .= $field->content; $html .= "'; - $html .= '' . $field->label . ' :'; + $html .= ''.$field->label.' :'; $html .= "
trans("Size"); ?>
trans("Size"); ?>
@@ -176,36 +176,36 @@ $langs->load("modulebuilder");
trans("Position"); ?>
trans("Position"); ?>
trans("LanguageFile"); ?>
textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc"), 1, 'help', '', 0, 2, 'tooltipcompute'); ?>
textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc"), 1, 'help', '', 0, 2, 'tooltipcompute'); ?>
textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc")).$form->textwithpicto($langs->trans("Computedpersistent"), $langs->trans("ComputedpersistentDesc"), 1, 'warning'); ?>
trans("DefaultValue").' ('.$langs->trans("Database").')'; ?>
trans("DefaultValue").' ('.$langs->trans("Database").')'; ?>
trans("Unique"); ?>>
trans("Unique"); ?>>
trans("Required"); ?>>
trans("Required"); ?>>
trans("AlwaysEditable"); ?>>
trans("AlwaysEditable"); ?>>
textwithpicto($langs->trans("Visibility"), $langs->trans("VisibleDesc")); ?> -
textwithpicto($langs->trans("DisplayOnPdf"), $langs->trans("DisplayOnPdfDesc")); ?>
trans("Totalizable"); ?>>
trans("Totalizable"); ?>>
textwithpicto($langs->trans("HelpOnTooltip"), $langs->trans("HelpOnTooltipDesc")); ?>
trans("AllEntities"); ?>>
trans("AllEntities"); ?>>
diff --git a/htdocs/core/tpl/admin_extrafields_edit.tpl.php b/htdocs/core/tpl/admin_extrafields_edit.tpl.php index 4dc47bbf031..d0eaaec25f2 100644 --- a/htdocs/core/tpl/admin_extrafields_edit.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_edit.tpl.php @@ -27,7 +27,7 @@ */ // Protection to avoid direct call of template -if (empty($conf) || ! is_object($conf)) +if (empty($conf) || !is_object($conf)) { print "Error, template page can't be called as URL"; exit; @@ -54,7 +54,7 @@ $langs->load("modulebuilder"); var list = jQuery("#list"); var totalizable = jQuery("#totalizable"); load("modulebuilder"); attributes[$elementtype]['label'][$attrname]; -$type=$extrafields->attributes[$elementtype]['type'][$attrname]; -$size=$extrafields->attributes[$elementtype]['size'][$attrname]; -$computed=$extrafields->attributes[$elementtype]['computed'][$attrname]; -$default=$extrafields->attributes[$elementtype]['default'][$attrname]; -$unique=$extrafields->attributes[$elementtype]['unique'][$attrname]; -$required=$extrafields->attributes[$elementtype]['required'][$attrname]; -$pos=$extrafields->attributes[$elementtype]['pos'][$attrname]; -$alwayseditable=$extrafields->attributes[$elementtype]['alwayseditable'][$attrname]; -$param=$extrafields->attributes[$elementtype]['param'][$attrname]; -$perms=$extrafields->attributes[$elementtype]['perms'][$attrname]; -$langfile=$extrafields->attributes[$elementtype]['langfile'][$attrname]; -$list=$extrafields->attributes[$elementtype]['list'][$attrname]; +$label = $extrafields->attributes[$elementtype]['label'][$attrname]; +$type = $extrafields->attributes[$elementtype]['type'][$attrname]; +$size = $extrafields->attributes[$elementtype]['size'][$attrname]; +$computed = $extrafields->attributes[$elementtype]['computed'][$attrname]; +$default = $extrafields->attributes[$elementtype]['default'][$attrname]; +$unique = $extrafields->attributes[$elementtype]['unique'][$attrname]; +$required = $extrafields->attributes[$elementtype]['required'][$attrname]; +$pos = $extrafields->attributes[$elementtype]['pos'][$attrname]; +$alwayseditable = $extrafields->attributes[$elementtype]['alwayseditable'][$attrname]; +$param = $extrafields->attributes[$elementtype]['param'][$attrname]; +$perms = $extrafields->attributes[$elementtype]['perms'][$attrname]; +$langfile = $extrafields->attributes[$elementtype]['langfile'][$attrname]; +$list = $extrafields->attributes[$elementtype]['list'][$attrname]; $totalizable = $extrafields->attributes[$elementtype]['totalizable'][$attrname]; -$help=$extrafields->attributes[$elementtype]['help'][$attrname]; -$entitycurrentorall=$extrafields->attributes[$elementtype]['entityid'][$attrname]; -$printable=$extrafields->attributes[$elementtype]['printable'][$attrname]; +$help = $extrafields->attributes[$elementtype]['help'][$attrname]; +$entitycurrentorall = $extrafields->attributes[$elementtype]['entityid'][$attrname]; +$printable = $extrafields->attributes[$elementtype]['printable'][$attrname]; -if((($type == 'select') || ($type == 'checkbox') || ($type == 'radio')) && is_array($param)) +if ((($type == 'select') || ($type == 'checkbox') || ($type == 'radio')) && is_array($param)) { $param_chain = ''; foreach ($param['options'] as $key => $value) { - if(strlen($key)) + if (strlen($key)) { $param_chain .= $key.','.$value."\n"; } } } -elseif (($type== 'sellist') || ($type == 'chkbxlst') || ($type == 'link') || ($type == 'password') || ($type == 'separate')) +elseif (($type == 'sellist') || ($type == 'chkbxlst') || ($type == 'link') || ($type == 'password') || ($type == 'separate')) { - $paramlist=array_keys($param['options']); + $paramlist = array_keys($param['options']); $param_chain = $paramlist[0]; } ?> @@ -192,10 +192,10 @@ elseif (($type== 'sellist') || ($type == 'chkbxlst') || ($type == 'link') || ($t - + - +global->MAIN_STORE_COMPUTED_EXTRAFIELDS)) { ?> @@ -257,23 +257,23 @@ else - + - + - + + - +multicompany->enabled) { ?> - +
trans("Type"); ?> array('varchar', 'phone', 'mail', 'url', 'select', 'password', 'text', 'html'), - 'text'=>array('text','html'), - 'html'=>array('text','html'), + 'text'=>array('text', 'html'), + 'html'=>array('text', 'html'), 'password'=>array('password', 'varchar'), 'mail'=>array('varchar', 'phone', 'mail', 'url', 'select'), 'url'=>array('varchar', 'phone', 'mail', 'url', 'select'), @@ -204,12 +204,12 @@ $typewecanchangeinto=array( ); if (in_array($type, array_keys($typewecanchangeinto))) { - $newarray=array(); + $newarray = array(); print '
trans("Position"); ?>
trans("Position"); ?>
trans("LanguageFile"); ?>
trans("LanguageFile"); ?>
textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc"), 1, 'help', '', 0, 2, 'tooltipcompute'); ?>
trans("DefaultValue").' ('.$langs->trans("Database").')'; ?>
trans("Unique"); ?>>
trans("Unique"); ?>>
trans("Required"); ?>>
trans("Required"); ?>>
trans("AlwaysEditable"); ?>>
trans("AlwaysEditable"); ?>>
textwithpicto($langs->trans("Visibility"), $langs->trans("VisibleDesc")); ?> -
textwithpicto($langs->trans("DisplayOnPdf"), $langs->trans("DisplayOnPdfDesc")); ?>
textwithpicto($langs->trans("Totalizable"), $langs->trans("TotalizableDesc")); ?>>
textwithpicto($langs->trans("Totalizable"), $langs->trans("TotalizableDesc")); ?>>
textwithpicto($langs->trans("HelpOnTooltip"), $langs->trans("HelpOnTooltipDesc")); ?>
trans("AllEntities"); ?>>
trans("AllEntities"); ?>>
diff --git a/htdocs/core/tpl/admin_extrafields_view.tpl.php b/htdocs/core/tpl/admin_extrafields_view.tpl.php index a59350d8678..b2bb69aa0bf 100644 --- a/htdocs/core/tpl/admin_extrafields_view.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_view.tpl.php @@ -25,7 +25,7 @@ */ // Protection to avoid direct call of template -if (empty($langs) || ! is_object($langs)) +if (empty($langs) || !is_object($langs)) { print "Error, template page can't be called as URL"; exit; @@ -66,7 +66,7 @@ print ''.$langs->trans("AlwaysEditable").''; print ''.$form->textwithpicto($langs->trans("Visible"), $langs->trans("VisibleDesc")).''; print ''.$form->textwithpicto($langs->trans("DisplayOnPdf"), $langs->trans("DisplayOnPdfDesc")).''; print ''.$form->textwithpicto($langs->trans("Totalizable"), $langs->trans("TotalizableDesc")).''; -if ($conf->multicompany->enabled){ +if ($conf->multicompany->enabled) { print ''.$langs->trans("Entities").''; } print ' '; @@ -74,16 +74,16 @@ print "\n"; if (is_array($extrafields->attributes[$elementtype]['type']) && count($extrafields->attributes[$elementtype]['type'])) { - foreach($extrafields->attributes[$elementtype]['type'] as $key => $value) + foreach ($extrafields->attributes[$elementtype]['type'] as $key => $value) { // Load language if required - if (! empty($extrafields->attributes[$elementtype]['langfile'][$key])) { + if (!empty($extrafields->attributes[$elementtype]['langfile'][$key])) { $langs->load($extrafields->attributes[$elementtype]['langfile'][$key]); } print ''; print "".$extrafields->attributes[$elementtype]['pos'][$key]."\n"; - print "".$extrafields->attributes[$elementtype]['label'][$key]."\n"; // We don't translate here, we want admin to know what is the key not translated value + print "".$extrafields->attributes[$elementtype]['label'][$key]."\n"; // We don't translate here, we want admin to know what is the key not translated value print "".$langs->trans($extrafields->attributes[$elementtype]['label'][$key])."\n"; print "".$key."\n"; print "".$type2label[$extrafields->attributes[$elementtype]['type'][$key]]."\n"; @@ -95,7 +95,7 @@ if (is_array($extrafields->attributes[$elementtype]['type']) && count($extrafiel print ''.$extrafields->attributes[$elementtype]['list'][$key]."\n"; print ''.$extrafields->attributes[$elementtype]['printable'][$key]."\n"; print ''.yn($extrafields->attributes[$elementtype]['totalizable'][$key])."\n"; - if (! empty($conf->multicompany->enabled)) { + if (!empty($conf->multicompany->enabled)) { print ''; if (empty($extrafields->attributes[$elementtype]['entityid'][$key])) { @@ -103,7 +103,7 @@ if (is_array($extrafields->attributes[$elementtype]['type']) && count($extrafiel } else { global $multicompanylabel_cache; - if (! is_array($multicompanylabel_cache)) $multicompanylabel_cache = array(); + if (!is_array($multicompanylabel_cache)) $multicompanylabel_cache = array(); if (empty($multicompanylabel_cache[$extrafields->attributes[$elementtype]['entityid'][$key]])) { global $mc; $mc->getInfo($extrafields->attributes[$elementtype]['entityid'][$key]); @@ -120,8 +120,8 @@ if (is_array($extrafields->attributes[$elementtype]['type']) && count($extrafiel } else { - $colspan=13; - if (! empty($conf->multicompany->enabled)) $colspan++; + $colspan = 13; + if (!empty($conf->multicompany->enabled)) $colspan++; print ''; print ''; diff --git a/htdocs/core/tpl/contacts.tpl.php b/htdocs/core/tpl/contacts.tpl.php index e6de4520ba4..eca100731ac 100644 --- a/htdocs/core/tpl/contacts.tpl.php +++ b/htdocs/core/tpl/contacts.tpl.php @@ -128,10 +128,10 @@ if ($permission)
select_contacts(($selectedCompany > 0 ? $selectedCompany : -1), '', 'contactid', 3, '', '', 1, 'minwidth100imp'); + $nbofcontacts = $form->select_contacts(($selectedCompany > 0 ? $selectedCompany : -1), '', 'contactid', 3, '', '', 1, 'minwidth100imp'); $newcardbutton = ''; - if (! empty($object->socid) && $object->socid > 1 && $user->rights->societe->creer) + if (!empty($object->socid) && $object->socid > 1 && $user->rights->societe->creer) { $newcardbutton .= ''; } @@ -140,13 +140,13 @@ if ($permission)
element == 'shipping'|| $object->element == 'reception') && is_object($objectsrc)) $tmpobject=$objectsrc; + $tmpobject = $object; + if (($object->element == 'shipping' || $object->element == 'reception') && is_object($objectsrc)) $tmpobject = $objectsrc; $formcompany->selectTypeContact($tmpobject, '', 'type', 'external', 'position', 0, 'minwidth100imp'); ?>
 
- "> + ">
@@ -162,11 +162,11 @@ print "
"; // TODO: replace this with direct SQL string to use $db->sort($sortfield, $sortorder) $list = array(); -foreach(array('internal', 'external') as $source) +foreach (array('internal', 'external') as $source) { $tmpobject = $object; - if (($object->element == 'shipping'|| $object->element == 'reception') && is_object($objectsrc)) + if (($object->element == 'shipping' || $object->element == 'reception') && is_object($objectsrc)) { $tmpobject = $objectsrc; } @@ -200,27 +200,27 @@ foreach(array('internal', 'external') as $source) { $entry->thirdparty = $conf->global->MAIN_INFO_SOCIETE_NOM; } - elseif (! $tab[$i]['socid']) + elseif (!$tab[$i]['socid']) { $entry->thirdparty = ""; } - if ($tab[$i]['source']=='internal') + if ($tab[$i]['source'] == 'internal') { $userstatic->fetch($tab[$i]['id']); $entry->contact = $userstatic->getNomUrl(-1, '', 0, 0, 0, 0, '', 'valignmiddle'); } - elseif ($tab[$i]['source']=='external') + elseif ($tab[$i]['source'] == 'external') { $contactstatic->fetch($tab[$i]['id']); - $entry->contact =$contactstatic->getNomUrl(1, '', 0, '', 0, 0); + $entry->contact = $contactstatic->getNomUrl(1, '', 0, '', 0, 0); } - if ($tab[$i]['source']=='internal') + if ($tab[$i]['source'] == 'internal') { $entry->status = $userstatic->LibStatut($tab[$i]['statuscontact'], 3); } - elseif ($tab[$i]['source']=='external') + elseif ($tab[$i]['source'] == 'external') { $entry->status = $contactstatic->LibStatut($tab[$i]['statuscontact'], 3); } @@ -279,7 +279,7 @@ print_liste_field_titre($arrayfields['status']['label'], $_SERVER["PHP_SELF"], " print_liste_field_titre($arrayfields['link']['label'], $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder, 'center maxwidthsearch '); print ""; -foreach($list as $entry) +foreach ($list as $entry) { print ''; @@ -314,8 +314,8 @@ print "
"; print "\n"; if (is_object($hookmanager)) { $hookmanager->initHooks(array('contacttpl')); - $parameters=array(); - $reshook=$hookmanager->executeHooks('formContactTpl', $parameters, $object, $action); + $parameters = array(); + $reshook = $hookmanager->executeHooks('formContactTpl', $parameters, $object, $action); } print "\n"; diff --git a/htdocs/core/tpl/extrafields_add.tpl.php b/htdocs/core/tpl/extrafields_add.tpl.php index 2ef606afa0b..45ca9a29197 100644 --- a/htdocs/core/tpl/extrafields_add.tpl.php +++ b/htdocs/core/tpl/extrafields_add.tpl.php @@ -37,14 +37,14 @@ if (empty($conf) || !is_object($conf)) executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook)) { $params = array(); if (isset($tpl_context)) $params['tpl_context'] = $tpl_context; - $params['cols']=$parameters['colspanvalue']; + $params['cols'] = $parameters['colspanvalue']; print $object->showOptionals($extrafields, 'edit', $params); // BUG #11554 : Add context in params } diff --git a/htdocs/core/tpl/extrafields_edit.tpl.php b/htdocs/core/tpl/extrafields_edit.tpl.php index 8a04aa32dea..dbc2b9745cd 100644 --- a/htdocs/core/tpl/extrafields_edit.tpl.php +++ b/htdocs/core/tpl/extrafields_edit.tpl.php @@ -26,7 +26,7 @@ */ // Protection to avoid direct call of template -if (empty($conf) || ! is_object($conf)) +if (empty($conf) || !is_object($conf)) { print "Error, template page can't be called as URL"; exit; @@ -37,12 +37,12 @@ if (empty($conf) || ! is_object($conf)) executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook)) { - $params=array(); - $params['cols']=$parameters['colspanvalue']; + $params = array(); + $params['cols'] = $parameters['colspanvalue']; print $object->showOptionals($extrafields, 'edit', $params); } diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index 510bb888813..5fc268013c6 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -378,7 +378,7 @@ if ($nolinesbefore) { "> global->PRODUCT_USE_UNITS)) { + if (!empty($conf->global->PRODUCT_USE_UNITS)) { $coldisplay++; print ''; print $form->selectUnits($line->fk_unit, "units"); @@ -636,7 +636,7 @@ if (!empty($usemargins) && $user->rights->margins->creer) { console.log("We are in a price per qty context, we do not call ajax/product"); } else { - global->PRODUIT_CUSTOMER_PRICES_BY_QTY) || ! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { ?> + global->PRODUIT_CUSTOMER_PRICES_BY_QTY) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { ?> if (isNaN(pbq)) { console.log("We use experimental option PRODUIT_CUSTOMER_PRICES_BY_QTY or PRODUIT_CUSTOMER_PRICES_BY_QTY but we are not yet able to get the id of pbq from product combo list, so load of price may be 0 if product has differet prices"); } // Get the HT price for the product and display it diff --git a/htdocs/core/triggers/interface_20_all_Logevents.class.php b/htdocs/core/triggers/interface_20_all_Logevents.class.php index 66e1b6fa4cd..7acd977e714 100644 --- a/htdocs/core/triggers/interface_20_all_Logevents.class.php +++ b/htdocs/core/triggers/interface_20_all_Logevents.class.php @@ -59,13 +59,13 @@ class InterfaceLogevents extends DolibarrTriggers */ public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf) { - if (! empty($conf->global->MAIN_LOGEVENTS_DISABLE_ALL)) return 0; // Log events is disabled (hidden features) + if (!empty($conf->global->MAIN_LOGEVENTS_DISABLE_ALL)) return 0; // Log events is disabled (hidden features) - $key='MAIN_LOGEVENTS_'.$action; + $key = 'MAIN_LOGEVENTS_'.$action; //dol_syslog("xxxxxxxxxxx".$key); - if (empty($conf->global->$key)) return 0; // Log events not enabled for this action + if (empty($conf->global->$key)) return 0; // Log events not enabled for this action - if (empty($conf->entity)) $conf->entity = $entity; // forcing of the entity if it's not defined (ex: in login form) + if (empty($conf->entity)) $conf->entity = $entity; // forcing of the entity if it's not defined (ex: in login form) $date = dol_now(); @@ -76,18 +76,18 @@ class InterfaceLogevents extends DolibarrTriggers $langs->load("users"); // Initialisation donnees (date,duree,texte,desc) - $text="(UserLogged,".$object->login.")"; - $text.=(empty($object->trigger_mesg)?'':' - '.$object->trigger_mesg); - $desc="(UserLogged,".$object->login.")"; - $desc.=(empty($object->trigger_mesg)?'':' - '.$object->trigger_mesg); + $text = "(UserLogged,".$object->login.")"; + $text .= (empty($object->trigger_mesg) ? '' : ' - '.$object->trigger_mesg); + $desc = "(UserLogged,".$object->login.")"; + $desc .= (empty($object->trigger_mesg) ? '' : ' - '.$object->trigger_mesg); } if ($action == 'USER_LOGIN_FAILED') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); // Initialisation donnees (date,duree,texte,desc) - $text=$object->trigger_mesg; // Message direct - $desc=$object->trigger_mesg; // Message direct + $text = $object->trigger_mesg; // Message direct + $desc = $object->trigger_mesg; // Message direct } if ($action == 'USER_LOGOUT') { @@ -95,8 +95,8 @@ class InterfaceLogevents extends DolibarrTriggers $langs->load("users"); // Initialisation donnees (date,duree,texte,desc) - $text="(UserLogoff,".$object->login.")"; - $desc="(UserLogoff,".$object->login.")"; + $text = "(UserLogoff,".$object->login.")"; + $desc = "(UserLogoff,".$object->login.")"; } if ($action == 'USER_CREATE') { @@ -104,8 +104,8 @@ class InterfaceLogevents extends DolibarrTriggers $langs->load("users"); // Initialisation donnees (date,duree,texte,desc) - $text=$langs->transnoentities("NewUserCreated", $object->login); - $desc=$langs->transnoentities("NewUserCreated", $object->login); + $text = $langs->transnoentities("NewUserCreated", $object->login); + $desc = $langs->transnoentities("NewUserCreated", $object->login); } elseif ($action == 'USER_MODIFY') { @@ -113,8 +113,8 @@ class InterfaceLogevents extends DolibarrTriggers $langs->load("users"); // Initialisation donnees (date,duree,texte,desc) - $text=$langs->transnoentities("EventUserModified", $object->login); - $desc=$langs->transnoentities("EventUserModified", $object->login); + $text = $langs->transnoentities("EventUserModified", $object->login); + $desc = $langs->transnoentities("EventUserModified", $object->login); } elseif ($action == 'USER_NEW_PASSWORD') { @@ -122,8 +122,8 @@ class InterfaceLogevents extends DolibarrTriggers $langs->load("users"); // Initialisation donnees (date,duree,texte,desc) - $text=$langs->transnoentities("NewUserPassword", $object->login); - $desc=$langs->transnoentities("NewUserPassword", $object->login); + $text = $langs->transnoentities("NewUserPassword", $object->login); + $desc = $langs->transnoentities("NewUserPassword", $object->login); } elseif ($action == 'USER_ENABLEDISABLE') { @@ -132,13 +132,13 @@ class InterfaceLogevents extends DolibarrTriggers // Initialisation donnees (date,duree,texte,desc) if ($object->statut == 0) { - $text=$langs->transnoentities("UserEnabled", $object->login); - $desc=$langs->transnoentities("UserEnabled", $object->login); + $text = $langs->transnoentities("UserEnabled", $object->login); + $desc = $langs->transnoentities("UserEnabled", $object->login); } if ($object->statut == 1) { - $text=$langs->transnoentities("UserDisabled", $object->login); - $desc=$langs->transnoentities("UserDisabled", $object->login); + $text = $langs->transnoentities("UserDisabled", $object->login); + $desc = $langs->transnoentities("UserDisabled", $object->login); } } elseif ($action == 'USER_DELETE') @@ -146,8 +146,8 @@ class InterfaceLogevents extends DolibarrTriggers dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("users"); // Initialisation donnees (date,duree,texte,desc) - $text=$langs->transnoentities("UserDeleted", $object->login); - $desc=$langs->transnoentities("UserDeleted", $object->login); + $text = $langs->transnoentities("UserDeleted", $object->login); + $desc = $langs->transnoentities("UserDeleted", $object->login); } // Groupes @@ -156,24 +156,24 @@ class InterfaceLogevents extends DolibarrTriggers dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("users"); // Initialisation donnees (date,duree,texte,desc) - $text=$langs->transnoentities("NewGroupCreated", $object->name); - $desc=$langs->transnoentities("NewGroupCreated", $object->name); + $text = $langs->transnoentities("NewGroupCreated", $object->name); + $desc = $langs->transnoentities("NewGroupCreated", $object->name); } elseif ($action == 'GROUP_MODIFY') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("users"); // Initialisation donnees (date,duree,texte,desc) - $text=$langs->transnoentities("GroupModified", $object->name); - $desc=$langs->transnoentities("GroupModified", $object->name); + $text = $langs->transnoentities("GroupModified", $object->name); + $desc = $langs->transnoentities("GroupModified", $object->name); } elseif ($action == 'GROUP_DELETE') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("users"); // Initialisation donnees (date,duree,texte,desc) - $text=$langs->transnoentities("GroupDeleted", $object->name); - $desc=$langs->transnoentities("GroupDeleted", $object->name); + $text = $langs->transnoentities("GroupDeleted", $object->name); + $desc = $langs->transnoentities("GroupDeleted", $object->name); } // If not found @@ -186,28 +186,28 @@ class InterfaceLogevents extends DolibarrTriggers */ // Add more information into desc from the context property - if (! empty($desc) && ! empty($object->context['audit'])) $desc.=' - '.$object->context['audit']; + if (!empty($desc) && !empty($object->context['audit'])) $desc .= ' - '.$object->context['audit']; // Add entry in event table include_once DOL_DOCUMENT_ROOT.'/core/class/events.class.php'; - $event=new Events($this->db); - $event->type=$action; - $event->dateevent=$date; - $event->label=$text; - $event->description=$desc; - $event->user_agent=$_SERVER["HTTP_USER_AGENT"]; + $event = new Events($this->db); + $event->type = $action; + $event->dateevent = $date; + $event->label = $text; + $event->description = $desc; + $event->user_agent = $_SERVER["HTTP_USER_AGENT"]; - $result=$event->create($user); + $result = $event->create($user); if ($result > 0) { return 1; } else { - $error ="Failed to insert security event: ".$event->error; + $error = "Failed to insert security event: ".$event->error; $this->errors[] = $error; - $this->error=$error; + $this->error = $error; dol_syslog(get_class($this).": ".$error, LOG_ERR); return -1; diff --git a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php index 161ebe6cd73..3fe9d63c380 100644 --- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php +++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php @@ -71,7 +71,7 @@ class InterfaceActionsAuto extends DolibarrTriggers */ public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf) { - if (empty($conf->agenda->enabled)) return 0; // Module not active, we do nothing + if (empty($conf->agenda->enabled)) return 0; // Module not active, we do nothing $key = 'MAIN_AGENDA_ACTIONAUTO_'.$action; @@ -82,25 +82,25 @@ class InterfaceActionsAuto extends DolibarrTriggers $langs->load("agenda"); - if (empty($object->actiontypecode)) $object->actiontypecode='AC_OTH_AUTO'; + if (empty($object->actiontypecode)) $object->actiontypecode = 'AC_OTH_AUTO'; // Actions if ($action == 'COMPANY_CREATE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","companies")); + $langs->loadLangs(array("agenda", "other", "companies")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("NewCompanyToDolibarr", $object->name); - $object->actionmsg=$langs->transnoentities("NewCompanyToDolibarr", $object->name); - if (! empty($object->prefix)) $object->actionmsg.=" (".$object->prefix.")"; + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("NewCompanyToDolibarr", $object->name); + $object->actionmsg = $langs->transnoentities("NewCompanyToDolibarr", $object->name); + if (!empty($object->prefix)) $object->actionmsg .= " (".$object->prefix.")"; - $object->sendtoid=0; - $object->socid=$object->id; + $object->sendtoid = 0; + $object->socid = $object->id; } elseif ($action == 'COMPANY_SENTBYMAIL') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","orders")); + $langs->loadLangs(array("agenda", "other", "orders")); if (empty($object->actionmsg2)) dol_syslog('Trigger called with property actionmsg2 on object not defined', LOG_ERR); @@ -110,22 +110,22 @@ class InterfaceActionsAuto extends DolibarrTriggers elseif ($action == 'CONTRACT_VALIDATE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","contracts")); + $langs->loadLangs(array("agenda", "other", "contracts")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("ContractValidatedInDolibarr", ($object->newref?$object->newref:$object->ref)); - $object->actionmsg=$langs->transnoentities("ContractValidatedInDolibarr", ($object->newref?$object->newref:$object->ref)); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("ContractValidatedInDolibarr", ($object->newref ? $object->newref : $object->ref)); + $object->actionmsg = $langs->transnoentities("ContractValidatedInDolibarr", ($object->newref ? $object->newref : $object->ref)); - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'CONTRACT_SENTBYMAIL') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","contracts")); + $langs->loadLangs(array("agenda", "other", "contracts")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("ContractSentByEMail", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("ContractSentByEMail", $object->ref); if (empty($object->actionmsg)) { - $object->actionmsg=$langs->transnoentities("ContractSentByEMail", $object->ref); + $object->actionmsg = $langs->transnoentities("ContractSentByEMail", $object->ref); } // Parameters $object->sendtoid defined by caller @@ -134,22 +134,22 @@ class InterfaceActionsAuto extends DolibarrTriggers elseif ($action == 'PROPAL_VALIDATE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","propal")); + $langs->loadLangs(array("agenda", "other", "propal")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("PropalValidatedInDolibarr", ($object->newref?$object->newref:$object->ref)); - $object->actionmsg=$langs->transnoentities("PropalValidatedInDolibarr", ($object->newref?$object->newref:$object->ref)); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("PropalValidatedInDolibarr", ($object->newref ? $object->newref : $object->ref)); + $object->actionmsg = $langs->transnoentities("PropalValidatedInDolibarr", ($object->newref ? $object->newref : $object->ref)); - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'PROPAL_SENTBYMAIL') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","propal")); + $langs->loadLangs(array("agenda", "other", "propal")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("ProposalSentByEMail", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("ProposalSentByEMail", $object->ref); if (empty($object->actionmsg)) { - $object->actionmsg=$langs->transnoentities("ProposalSentByEMail", $object->ref); + $object->actionmsg = $langs->transnoentities("ProposalSentByEMail", $object->ref); } // Parameters $object->sendtoid defined by caller @@ -158,82 +158,82 @@ class InterfaceActionsAuto extends DolibarrTriggers elseif ($action == 'PROPAL_CLOSE_SIGNED') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","propal")); + $langs->loadLangs(array("agenda", "other", "propal")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("PropalClosedSignedInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("PropalClosedSignedInDolibarr", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("PropalClosedSignedInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("PropalClosedSignedInDolibarr", $object->ref); - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'PROPAL_CLASSIFY_BILLED') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","propal")); + $langs->loadLangs(array("agenda", "other", "propal")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("PropalClassifiedBilledInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("PropalClassifiedBilledInDolibarr", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("PropalClassifiedBilledInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("PropalClassifiedBilledInDolibarr", $object->ref); - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'PROPAL_CLOSE_REFUSED') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","propal")); + $langs->loadLangs(array("agenda", "other", "propal")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("PropalClosedRefusedInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("PropalClosedRefusedInDolibarr", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("PropalClosedRefusedInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("PropalClosedRefusedInDolibarr", $object->ref); - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'ORDER_VALIDATE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","orders")); + $langs->loadLangs(array("agenda", "orders")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("OrderValidatedInDolibarr", ($object->newref?$object->newref:$object->ref)); - $object->actionmsg=$langs->transnoentities("OrderValidatedInDolibarr", ($object->newref?$object->newref:$object->ref)); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("OrderValidatedInDolibarr", ($object->newref ? $object->newref : $object->ref)); + $object->actionmsg = $langs->transnoentities("OrderValidatedInDolibarr", ($object->newref ? $object->newref : $object->ref)); - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'ORDER_CLOSE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","orders")); + $langs->loadLangs(array("agenda", "other", "orders")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("OrderDeliveredInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("OrderDeliveredInDolibarr", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("OrderDeliveredInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("OrderDeliveredInDolibarr", $object->ref); - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'ORDER_CLASSIFY_BILLED') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","orders")); + $langs->loadLangs(array("agenda", "other", "orders")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("OrderBilledInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("OrderBilledInDolibarr", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("OrderBilledInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("OrderBilledInDolibarr", $object->ref); - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'ORDER_CANCEL') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","orders")); + $langs->loadLangs(array("agenda", "other", "orders")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("OrderCanceledInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("OrderCanceledInDolibarr", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("OrderCanceledInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("OrderCanceledInDolibarr", $object->ref); - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'ORDER_SENTBYMAIL') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","orders")); + $langs->loadLangs(array("agenda", "other", "orders")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("OrderSentByEMail", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("OrderSentByEMail", $object->ref); if (empty($object->actionmsg)) { - $object->actionmsg=$langs->transnoentities("OrderSentByEMail", $object->ref); + $object->actionmsg = $langs->transnoentities("OrderSentByEMail", $object->ref); } // Parameters $object->sendtoid defined by caller @@ -242,32 +242,32 @@ class InterfaceActionsAuto extends DolibarrTriggers elseif ($action == 'BILL_VALIDATE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","bills")); + $langs->loadLangs(array("agenda", "other", "bills")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("InvoiceValidatedInDolibarr", ($object->newref?$object->newref:$object->ref)); - $object->actionmsg=$langs->transnoentities("InvoiceValidatedInDolibarr", ($object->newref?$object->newref:$object->ref)); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("InvoiceValidatedInDolibarr", ($object->newref ? $object->newref : $object->ref)); + $object->actionmsg = $langs->transnoentities("InvoiceValidatedInDolibarr", ($object->newref ? $object->newref : $object->ref)); - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'BILL_UNVALIDATE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","bills")); + $langs->loadLangs(array("agenda", "other", "bills")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("InvoiceBackToDraftInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("InvoiceBackToDraftInDolibarr", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("InvoiceBackToDraftInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("InvoiceBackToDraftInDolibarr", $object->ref); - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'BILL_SENTBYMAIL') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","bills")); + $langs->loadLangs(array("agenda", "other", "bills")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("InvoiceSentByEMail", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("InvoiceSentByEMail", $object->ref); if (empty($object->actionmsg)) { - $object->actionmsg=$langs->transnoentities("InvoiceSentByEMail", $object->ref); + $object->actionmsg = $langs->transnoentities("InvoiceSentByEMail", $object->ref); } // Parameters $object->sendtoid defined by caller @@ -276,69 +276,69 @@ class InterfaceActionsAuto extends DolibarrTriggers elseif ($action == 'BILL_PAYED') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","bills")); + $langs->loadLangs(array("agenda", "other", "bills")); // Values for this action can't be defined by caller. - $object->actionmsg2=$langs->transnoentities("InvoicePaidInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("InvoicePaidInDolibarr", $object->ref); + $object->actionmsg2 = $langs->transnoentities("InvoicePaidInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("InvoicePaidInDolibarr", $object->ref); - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'BILL_CANCEL') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","bills")); + $langs->loadLangs(array("agenda", "other", "bills")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("InvoiceCanceledInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("InvoiceCanceledInDolibarr", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("InvoiceCanceledInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("InvoiceCanceledInDolibarr", $object->ref); - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'FICHINTER_CREATE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","interventions")); + $langs->loadLangs(array("agenda", "other", "interventions")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("InterventionCreatedInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("InterventionCreatedInDolibarr", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("InterventionCreatedInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("InterventionCreatedInDolibarr", $object->ref); - $object->sendtoid=0; - $object->fk_element=0; - $object->elementtype=''; + $object->sendtoid = 0; + $object->fk_element = 0; + $object->elementtype = ''; } elseif ($action == 'FICHINTER_VALIDATE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","interventions")); + $langs->loadLangs(array("agenda", "other", "interventions")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("InterventionValidatedInDolibarr", ($object->newref?$object->newref:$object->ref)); - $object->actionmsg=$langs->transnoentities("InterventionValidatedInDolibarr", ($object->newref?$object->newref:$object->ref)); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("InterventionValidatedInDolibarr", ($object->newref ? $object->newref : $object->ref)); + $object->actionmsg = $langs->transnoentities("InterventionValidatedInDolibarr", ($object->newref ? $object->newref : $object->ref)); - $object->sendtoid=0; - $object->fk_element=0; - $object->elementtype=''; + $object->sendtoid = 0; + $object->fk_element = 0; + $object->elementtype = ''; } elseif ($action == 'FICHINTER_MODIFY') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","interventions")); + $langs->loadLangs(array("agenda", "other", "interventions")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("InterventionModifiedInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("InterventionModifiedInDolibarr", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("InterventionModifiedInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("InterventionModifiedInDolibarr", $object->ref); - $object->sendtoid=0; - $object->fk_element=0; - $object->elementtype=''; + $object->sendtoid = 0; + $object->fk_element = 0; + $object->elementtype = ''; } elseif ($action == 'FICHINTER_SENTBYMAIL') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","interventions")); + $langs->loadLangs(array("agenda", "other", "interventions")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("InterventionSentByEMail", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("InterventionSentByEMail", $object->ref); if (empty($object->actionmsg)) { - $object->actionmsg=$langs->transnoentities("InterventionSentByEMail", $object->ref); + $object->actionmsg = $langs->transnoentities("InterventionSentByEMail", $object->ref); } // Parameters $object->sendtoid defined by caller @@ -347,44 +347,44 @@ class InterfaceActionsAuto extends DolibarrTriggers elseif ($action == 'FICHINTER_CLASSIFY_BILLED') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","interventions")); + $langs->loadLangs(array("agenda", "other", "interventions")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("InterventionClassifiedBilledInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("InterventionClassifiedBilledInDolibarr", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("InterventionClassifiedBilledInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("InterventionClassifiedBilledInDolibarr", $object->ref); - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'FICHINTER_CLASSIFY_UNBILLED') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","interventions")); + $langs->loadLangs(array("agenda", "other", "interventions")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("InterventionClassifiedUnbilledInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("InterventionClassifiedUnbilledInDolibarr", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("InterventionClassifiedUnbilledInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("InterventionClassifiedUnbilledInDolibarr", $object->ref); - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'FICHINTER_DELETE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","interventions")); + $langs->loadLangs(array("agenda", "other", "interventions")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("InterventionDeletedInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("InterventionDeletedInDolibarr", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("InterventionDeletedInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("InterventionDeletedInDolibarr", $object->ref); - $object->sendtoid=0; - $object->fk_element=0; - $object->elementtype=''; + $object->sendtoid = 0; + $object->fk_element = 0; + $object->elementtype = ''; } elseif ($action == 'SHIPPING_VALIDATE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","sendings")); + $langs->loadLangs(array("agenda", "other", "sendings")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("ShippingValidated", ($object->newref?$object->newref:$object->ref)); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("ShippingValidated", ($object->newref ? $object->newref : $object->ref)); if (empty($object->actionmsg)) { - $object->actionmsg=$langs->transnoentities("ShippingValidated", ($object->newref?$object->newref:$object->ref)); + $object->actionmsg = $langs->transnoentities("ShippingValidated", ($object->newref ? $object->newref : $object->ref)); } // Parameters $object->sendtoid defined by caller @@ -393,12 +393,12 @@ class InterfaceActionsAuto extends DolibarrTriggers elseif ($action == 'SHIPPING_SENTBYMAIL') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","sendings")); + $langs->loadLangs(array("agenda", "other", "sendings")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("ShippingSentByEMail", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("ShippingSentByEMail", $object->ref); if (empty($object->actionmsg)) { - $object->actionmsg=$langs->transnoentities("ShippingSentByEMail", $object->ref); + $object->actionmsg = $langs->transnoentities("ShippingSentByEMail", $object->ref); } // Parameters $object->sendtoid defined by caller @@ -409,10 +409,10 @@ class InterfaceActionsAuto extends DolibarrTriggers $langs->load("other"); $langs->load("receptions"); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("ReceptionValidated", ($object->newref?$object->newref:$object->ref)); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("ReceptionValidated", ($object->newref ? $object->newref : $object->ref)); if (empty($object->actionmsg)) { - $object->actionmsg=$langs->transnoentities("ReceptionValidated", ($object->newref?$object->newref:$object->ref)); + $object->actionmsg = $langs->transnoentities("ReceptionValidated", ($object->newref ? $object->newref : $object->ref)); } // Parameters $object->sendtoid defined by caller @@ -424,10 +424,10 @@ class InterfaceActionsAuto extends DolibarrTriggers $langs->load("other"); $langs->load("receptions"); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("ReceptionSentByEMail", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("ReceptionSentByEMail", $object->ref); if (empty($object->actionmsg)) { - $object->actionmsg=$langs->transnoentities("ReceptionSentByEMail", $object->ref); + $object->actionmsg = $langs->transnoentities("ReceptionSentByEMail", $object->ref); } // Parameters $object->sendtoid defined by caller @@ -436,22 +436,22 @@ class InterfaceActionsAuto extends DolibarrTriggers elseif ($action == 'PROPOSAL_SUPPLIER_VALIDATE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","propal")); + $langs->loadLangs(array("agenda", "other", "propal")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("PropalValidatedInDolibarr", ($object->newref?$object->newref:$object->ref)); - $object->actionmsg=$langs->transnoentities("PropalValidatedInDolibarr", ($object->newref?$object->newref:$object->ref)); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("PropalValidatedInDolibarr", ($object->newref ? $object->newref : $object->ref)); + $object->actionmsg = $langs->transnoentities("PropalValidatedInDolibarr", ($object->newref ? $object->newref : $object->ref)); - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'PROPOSAL_SUPPLIER_SENTBYMAIL') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","propal")); + $langs->loadLangs(array("agenda", "other", "propal")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("ProposalSentByEMail", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("ProposalSentByEMail", $object->ref); if (empty($object->actionmsg)) { - $object->actionmsg=$langs->transnoentities("ProposalSentByEMail", $object->ref); + $object->actionmsg = $langs->transnoentities("ProposalSentByEMail", $object->ref); } // Parameters $object->sendtoid defined by caller @@ -460,92 +460,92 @@ class InterfaceActionsAuto extends DolibarrTriggers elseif ($action == 'PROPOSAL_SUPPLIER_CLOSE_SIGNED') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","propal")); + $langs->loadLangs(array("agenda", "other", "propal")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("PropalClosedSignedInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("PropalClosedSignedInDolibarr", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("PropalClosedSignedInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("PropalClosedSignedInDolibarr", $object->ref); - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'PROPOSAL_SUPPLIER_CLOSE_REFUSED') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","propal")); + $langs->loadLangs(array("agenda", "other", "propal")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("PropalClosedRefusedInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("PropalClosedRefusedInDolibarr", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("PropalClosedRefusedInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("PropalClosedRefusedInDolibarr", $object->ref); - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'ORDER_SUPPLIER_CREATE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","orders")); + $langs->loadLangs(array("agenda", "other", "orders")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("OrderCreatedInDolibarr", ($object->newref?$object->newref:$object->ref)); - $object->actionmsg=$langs->transnoentities("OrderCreatedInDolibarr", ($object->newref?$object->newref:$object->ref)); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("OrderCreatedInDolibarr", ($object->newref ? $object->newref : $object->ref)); + $object->actionmsg = $langs->transnoentities("OrderCreatedInDolibarr", ($object->newref ? $object->newref : $object->ref)); - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'ORDER_SUPPLIER_VALIDATE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","orders")); + $langs->loadLangs(array("agenda", "other", "orders")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("OrderValidatedInDolibarr", ($object->newref?$object->newref:$object->ref)); - $object->actionmsg=$langs->transnoentities("OrderValidatedInDolibarr", ($object->newref?$object->newref:$object->ref)); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("OrderValidatedInDolibarr", ($object->newref ? $object->newref : $object->ref)); + $object->actionmsg = $langs->transnoentities("OrderValidatedInDolibarr", ($object->newref ? $object->newref : $object->ref)); - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'ORDER_SUPPLIER_APPROVE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","orders")); + $langs->loadLangs(array("agenda", "other", "orders")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("OrderApprovedInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("OrderApprovedInDolibarr", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("OrderApprovedInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("OrderApprovedInDolibarr", $object->ref); - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'ORDER_SUPPLIER_REFUSE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","orders")); + $langs->loadLangs(array("agenda", "other", "orders")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("OrderRefusedInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("OrderRefusedInDolibarr", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("OrderRefusedInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("OrderRefusedInDolibarr", $object->ref); - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'ORDER_SUPPLIER_SUBMIT') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","orders")); + $langs->loadLangs(array("agenda", "other", "orders")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("SupplierOrderSubmitedInDolibarr", ($object->newref?$object->newref:$object->ref)); - $object->actionmsg=$langs->transnoentities("SupplierOrderSubmitedInDolibarr", ($object->newref?$object->newref:$object->ref)); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("SupplierOrderSubmitedInDolibarr", ($object->newref ? $object->newref : $object->ref)); + $object->actionmsg = $langs->transnoentities("SupplierOrderSubmitedInDolibarr", ($object->newref ? $object->newref : $object->ref)); - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'ORDER_SUPPLIER_RECEIVE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","orders")); + $langs->loadLangs(array("agenda", "other", "orders")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("SupplierOrderReceivedInDolibarr", ($object->newref?$object->newref:$object->ref)); - $object->actionmsg=$langs->transnoentities("SupplierOrderReceivedInDolibarr", ($object->newref?$object->newref:$object->ref)); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("SupplierOrderReceivedInDolibarr", ($object->newref ? $object->newref : $object->ref)); + $object->actionmsg = $langs->transnoentities("SupplierOrderReceivedInDolibarr", ($object->newref ? $object->newref : $object->ref)); - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'ORDER_SUPPLIER_SENTBYMAIL') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","bills","orders")); + $langs->loadLangs(array("agenda", "other", "bills", "orders")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("SupplierOrderSentByEMail", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("SupplierOrderSentByEMail", $object->ref); if (empty($object->actionmsg)) { - $object->actionmsg=$langs->transnoentities("SupplierOrderSentByEMail", $object->ref); + $object->actionmsg = $langs->transnoentities("SupplierOrderSentByEMail", $object->ref); } // Parameters $object->sendtoid defined by caller @@ -554,45 +554,45 @@ class InterfaceActionsAuto extends DolibarrTriggers elseif ($action == 'ORDER_SUPPLIER_CLASSIFY_BILLED') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","bills","orders")); + $langs->loadLangs(array("agenda", "other", "bills", "orders")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("SupplierOrderClassifiedBilled", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("SupplierOrderClassifiedBilled", $object->ref); if (empty($object->actionmsg)) { - $object->actionmsg=$langs->transnoentities("SupplierOrderClassifiedBilled", $object->ref); + $object->actionmsg = $langs->transnoentities("SupplierOrderClassifiedBilled", $object->ref); } - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'BILL_SUPPLIER_VALIDATE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","bills")); + $langs->loadLangs(array("agenda", "other", "bills")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("InvoiceValidatedInDolibarr", ($object->newref?$object->newref:$object->ref)); - $object->actionmsg=$langs->transnoentities("InvoiceValidatedInDolibarr", ($object->newref?$object->newref:$object->ref)); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("InvoiceValidatedInDolibarr", ($object->newref ? $object->newref : $object->ref)); + $object->actionmsg = $langs->transnoentities("InvoiceValidatedInDolibarr", ($object->newref ? $object->newref : $object->ref)); - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'BILL_SUPPLIER_UNVALIDATE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","bills")); + $langs->loadLangs(array("agenda", "other", "bills")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("InvoiceBackToDraftInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("InvoiceBackToDraftInDolibarr", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("InvoiceBackToDraftInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("InvoiceBackToDraftInDolibarr", $object->ref); - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'BILL_SUPPLIER_SENTBYMAIL') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","bills","orders")); + $langs->loadLangs(array("agenda", "other", "bills", "orders")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("SupplierInvoiceSentByEMail", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("SupplierInvoiceSentByEMail", $object->ref); if (empty($object->actionmsg)) { - $object->actionmsg=$langs->transnoentities("SupplierInvoiceSentByEMail", $object->ref); + $object->actionmsg = $langs->transnoentities("SupplierInvoiceSentByEMail", $object->ref); } // Parameters $object->sendtoid defined by caller @@ -601,244 +601,244 @@ class InterfaceActionsAuto extends DolibarrTriggers elseif ($action == 'BILL_SUPPLIER_PAYED') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","bills")); + $langs->loadLangs(array("agenda", "other", "bills")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("InvoicePaidInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("InvoicePaidInDolibarr", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("InvoicePaidInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("InvoicePaidInDolibarr", $object->ref); - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'BILL_SUPPLIER_CANCELED') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","bills")); + $langs->loadLangs(array("agenda", "other", "bills")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("InvoiceCanceledInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("InvoiceCanceledInDolibarr", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("InvoiceCanceledInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("InvoiceCanceledInDolibarr", $object->ref); - $object->sendtoid=0; + $object->sendtoid = 0; } // Members elseif ($action == 'MEMBER_VALIDATE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","members")); + $langs->loadLangs(array("agenda", "other", "members")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("MemberValidatedInDolibarr", $object->getFullName($langs)); - $object->actionmsg=$langs->transnoentities("MemberValidatedInDolibarr", $object->getFullName($langs)); - $object->actionmsg.="\n".$langs->transnoentities("Member").': '.$object->getFullName($langs); - $object->actionmsg.="\n".$langs->transnoentities("Type").': '.$object->type; + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("MemberValidatedInDolibarr", $object->getFullName($langs)); + $object->actionmsg = $langs->transnoentities("MemberValidatedInDolibarr", $object->getFullName($langs)); + $object->actionmsg .= "\n".$langs->transnoentities("Member").': '.$object->getFullName($langs); + $object->actionmsg .= "\n".$langs->transnoentities("Type").': '.$object->type; - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'MEMBER_MODIFY') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","members")); + $langs->loadLangs(array("agenda", "other", "members")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("MemberModifiedInDolibarr", $object->getFullName($langs)); - $object->actionmsg=$langs->transnoentities("MemberModifiedInDolibarr", $object->getFullName($langs)); - $object->actionmsg.="\n".$langs->transnoentities("Member").': '.$object->getFullName($langs); - $object->actionmsg.="\n".$langs->transnoentities("Type").': '.$object->type; + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("MemberModifiedInDolibarr", $object->getFullName($langs)); + $object->actionmsg = $langs->transnoentities("MemberModifiedInDolibarr", $object->getFullName($langs)); + $object->actionmsg .= "\n".$langs->transnoentities("Member").': '.$object->getFullName($langs); + $object->actionmsg .= "\n".$langs->transnoentities("Type").': '.$object->type; - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'MEMBER_SUBSCRIPTION_CREATE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","members")); + $langs->loadLangs(array("agenda", "other", "members")); $member = $this->context['member']; - if (! is_object($member)) // This should not happen + if (!is_object($member)) // This should not happen { include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; $member = new Adherent($this->db); $member->fetch($this->fk_adherent); } - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("MemberSubscriptionAddedInDolibarr", $object->id, $member->getFullName($langs)); - $object->actionmsg=$langs->transnoentities("MemberSubscriptionAddedInDolibarr", $object->id, $member->getFullName($langs)); - $object->actionmsg.="\n".$langs->transnoentities("Member").': '.$member->getFullName($langs); - $object->actionmsg.="\n".$langs->transnoentities("Type").': '.$object->fk_type; - $object->actionmsg.="\n".$langs->transnoentities("Amount").': '.$object->amount; - $object->actionmsg.="\n".$langs->transnoentities("Period").': '.dol_print_date($object->dateh, 'day').' - '.dol_print_date($object->datef, 'day'); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("MemberSubscriptionAddedInDolibarr", $object->id, $member->getFullName($langs)); + $object->actionmsg = $langs->transnoentities("MemberSubscriptionAddedInDolibarr", $object->id, $member->getFullName($langs)); + $object->actionmsg .= "\n".$langs->transnoentities("Member").': '.$member->getFullName($langs); + $object->actionmsg .= "\n".$langs->transnoentities("Type").': '.$object->fk_type; + $object->actionmsg .= "\n".$langs->transnoentities("Amount").': '.$object->amount; + $object->actionmsg .= "\n".$langs->transnoentities("Period").': '.dol_print_date($object->dateh, 'day').' - '.dol_print_date($object->datef, 'day'); - $object->sendtoid=0; - if ($object->fk_soc > 0) $object->socid=$object->fk_soc; + $object->sendtoid = 0; + if ($object->fk_soc > 0) $object->socid = $object->fk_soc; } elseif ($action == 'MEMBER_SUBSCRIPTION_MODIFY') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","members")); + $langs->loadLangs(array("agenda", "other", "members")); $member = $this->context['member']; - if (! is_object($member)) // This should not happen + if (!is_object($member)) // This should not happen { include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; $member = new Adherent($this->db); $member->fetch($this->fk_adherent); } - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("MemberSubscriptionModifiedInDolibarr", $object->id, $member->getFullName($langs)); - $object->actionmsg=$langs->transnoentities("MemberSubscriptionModifiedInDolibarr", $object->id, $member->getFullName($langs)); - $object->actionmsg.="\n".$langs->transnoentities("Member").': '.$member->getFullName($langs); - $object->actionmsg.="\n".$langs->transnoentities("Type").': '.$object->fk_type; - $object->actionmsg.="\n".$langs->transnoentities("Amount").': '.$object->amount; - $object->actionmsg.="\n".$langs->transnoentities("Period").': '.dol_print_date($object->dateh, 'day').' - '.dol_print_date($object->datef, 'day'); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("MemberSubscriptionModifiedInDolibarr", $object->id, $member->getFullName($langs)); + $object->actionmsg = $langs->transnoentities("MemberSubscriptionModifiedInDolibarr", $object->id, $member->getFullName($langs)); + $object->actionmsg .= "\n".$langs->transnoentities("Member").': '.$member->getFullName($langs); + $object->actionmsg .= "\n".$langs->transnoentities("Type").': '.$object->fk_type; + $object->actionmsg .= "\n".$langs->transnoentities("Amount").': '.$object->amount; + $object->actionmsg .= "\n".$langs->transnoentities("Period").': '.dol_print_date($object->dateh, 'day').' - '.dol_print_date($object->datef, 'day'); - $object->sendtoid=0; - if ($object->fk_soc > 0) $object->socid=$object->fk_soc; + $object->sendtoid = 0; + if ($object->fk_soc > 0) $object->socid = $object->fk_soc; } elseif ($action == 'MEMBER_SUBSCRIPTION_DELETE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","members")); + $langs->loadLangs(array("agenda", "other", "members")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("MemberSubscriptionDeletedInDolibarr", $object->ref, $object->getFullName($langs)); - $object->actionmsg=$langs->transnoentities("MemberSubscriptionDeletedInDolibarr", $object->ref, $object->getFullName($langs)); - $object->actionmsg.="\n".$langs->transnoentities("Member").': '.$object->getFullName($langs); - $object->actionmsg.="\n".$langs->transnoentities("Type").': '.$object->type; - $object->actionmsg.="\n".$langs->transnoentities("Amount").': '.$object->last_subscription_amount; - $object->actionmsg.="\n".$langs->transnoentities("Period").': '.dol_print_date($object->last_subscription_date_start, 'day').' - '.dol_print_date($object->last_subscription_date_end, 'day'); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("MemberSubscriptionDeletedInDolibarr", $object->ref, $object->getFullName($langs)); + $object->actionmsg = $langs->transnoentities("MemberSubscriptionDeletedInDolibarr", $object->ref, $object->getFullName($langs)); + $object->actionmsg .= "\n".$langs->transnoentities("Member").': '.$object->getFullName($langs); + $object->actionmsg .= "\n".$langs->transnoentities("Type").': '.$object->type; + $object->actionmsg .= "\n".$langs->transnoentities("Amount").': '.$object->last_subscription_amount; + $object->actionmsg .= "\n".$langs->transnoentities("Period").': '.dol_print_date($object->last_subscription_date_start, 'day').' - '.dol_print_date($object->last_subscription_date_end, 'day'); - $object->sendtoid=0; - if ($object->fk_soc > 0) $object->socid=$object->fk_soc; + $object->sendtoid = 0; + if ($object->fk_soc > 0) $object->socid = $object->fk_soc; } elseif ($action == 'MEMBER_RESILIATE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","members")); + $langs->loadLangs(array("agenda", "other", "members")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("MemberResiliatedInDolibarr", $object->getFullName($langs)); - $object->actionmsg=$langs->transnoentities("MemberResiliatedInDolibarr", $object->getFullName($langs)); - $object->actionmsg.="\n".$langs->transnoentities("Member").': '.$object->getFullName($langs); - $object->actionmsg.="\n".$langs->transnoentities("Type").': '.$object->type; + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("MemberResiliatedInDolibarr", $object->getFullName($langs)); + $object->actionmsg = $langs->transnoentities("MemberResiliatedInDolibarr", $object->getFullName($langs)); + $object->actionmsg .= "\n".$langs->transnoentities("Member").': '.$object->getFullName($langs); + $object->actionmsg .= "\n".$langs->transnoentities("Type").': '.$object->type; - $object->sendtoid=0; + $object->sendtoid = 0; } elseif ($action == 'MEMBER_DELETE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","members")); + $langs->loadLangs(array("agenda", "other", "members")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("MemberDeletedInDolibarr", $object->getFullName($langs)); - $object->actionmsg=$langs->transnoentities("MemberDeletedInDolibarr", $object->getFullName($langs)); - $object->actionmsg.="\n".$langs->transnoentities("Member").': '.$object->getFullName($langs); - $object->actionmsg.="\n".$langs->transnoentities("Type").': '.$object->type; + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("MemberDeletedInDolibarr", $object->getFullName($langs)); + $object->actionmsg = $langs->transnoentities("MemberDeletedInDolibarr", $object->getFullName($langs)); + $object->actionmsg .= "\n".$langs->transnoentities("Member").': '.$object->getFullName($langs); + $object->actionmsg .= "\n".$langs->transnoentities("Type").': '.$object->type; - $object->sendtoid=0; + $object->sendtoid = 0; } // Projects elseif ($action == 'PROJECT_CREATE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","projects")); + $langs->loadLangs(array("agenda", "other", "projects")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("ProjectCreatedInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("ProjectCreatedInDolibarr", $object->ref); - $object->actionmsg.="\n".$langs->transnoentities("Project").': '.$object->ref; + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("ProjectCreatedInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("ProjectCreatedInDolibarr", $object->ref); + $object->actionmsg .= "\n".$langs->transnoentities("Project").': '.$object->ref; - $object->sendtoid=0; + $object->sendtoid = 0; } - elseif($action == 'PROJECT_VALIDATE') + elseif ($action == 'PROJECT_VALIDATE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","projects")); + $langs->loadLangs(array("agenda", "other", "projects")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("ProjectValidatedInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("ProjectValidatedInDolibarr", $object->ref); - $object->actionmsg.="\n".$langs->transnoentities("Project").': '.$object->ref; + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("ProjectValidatedInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("ProjectValidatedInDolibarr", $object->ref); + $object->actionmsg .= "\n".$langs->transnoentities("Project").': '.$object->ref; - $object->sendtoid=0; + $object->sendtoid = 0; } - elseif($action == 'PROJECT_MODIFY') + elseif ($action == 'PROJECT_MODIFY') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","projects")); + $langs->loadLangs(array("agenda", "other", "projects")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("ProjectModifiedInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("ProjectModifiedInDolibarr", $object->ref); - $object->actionmsg.="\n".$langs->transnoentities("Task").': '.$object->ref; + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("ProjectModifiedInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("ProjectModifiedInDolibarr", $object->ref); + $object->actionmsg .= "\n".$langs->transnoentities("Task").': '.$object->ref; - $object->sendtoid=0; + $object->sendtoid = 0; } // Project tasks - elseif($action == 'TASK_CREATE') + elseif ($action == 'TASK_CREATE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","projects")); + $langs->loadLangs(array("agenda", "other", "projects")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("TaskCreatedInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("TaskCreatedInDolibarr", $object->ref); - $object->actionmsg.="\n".$langs->transnoentities("Task").': '.$object->ref; + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("TaskCreatedInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("TaskCreatedInDolibarr", $object->ref); + $object->actionmsg .= "\n".$langs->transnoentities("Task").': '.$object->ref; - $object->sendtoid=0; + $object->sendtoid = 0; } - elseif($action == 'TASK_MODIFY') + elseif ($action == 'TASK_MODIFY') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","projects")); + $langs->loadLangs(array("agenda", "other", "projects")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("TaskModifiedInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("TaskModifieddInDolibarr", $object->ref); - $object->actionmsg.="\n".$langs->transnoentities("Task").': '.$object->ref; + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("TaskModifiedInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("TaskModifieddInDolibarr", $object->ref); + $object->actionmsg .= "\n".$langs->transnoentities("Task").': '.$object->ref; - $object->sendtoid=0; + $object->sendtoid = 0; } - elseif($action == 'TASK_DELETE') + elseif ($action == 'TASK_DELETE') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","projects")); + $langs->loadLangs(array("agenda", "other", "projects")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("TaskDeletedInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("TaskDeletedInDolibarr", $object->ref); - $object->actionmsg.="\n".$langs->transnoentities("Task").': '.$object->ref; + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("TaskDeletedInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("TaskDeletedInDolibarr", $object->ref); + $object->actionmsg .= "\n".$langs->transnoentities("Task").': '.$object->ref; - $object->sendtoid=0; + $object->sendtoid = 0; } - elseif($action == 'TICKET_ASSIGNED') + elseif ($action == 'TICKET_ASSIGNED') { // Load translation files required by the page - $langs->loadLangs(array("agenda","other","projects")); + $langs->loadLangs(array("agenda", "other", "projects")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("TICKET_ASSIGNEDInDolibarr", $object->ref); - $object->actionmsg=$langs->transnoentities("TICKET_ASSIGNEDInDolibarr", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities("TICKET_ASSIGNEDInDolibarr", $object->ref); + $object->actionmsg = $langs->transnoentities("TICKET_ASSIGNEDInDolibarr", $object->ref); if ($object->oldcopy->fk_user_assign > 0) { - $tmpuser=new User($this->db); + $tmpuser = new User($this->db); $tmpuser->fetch($object->oldcopy->fk_user_assign); - $object->actionmsg.="\n".$langs->transnoentities("OldUser").': '.$tmpuser->getFullName($langs); + $object->actionmsg .= "\n".$langs->transnoentities("OldUser").': '.$tmpuser->getFullName($langs); } else { - $object->actionmsg.="\n".$langs->transnoentities("OldUser").': '.$langs->trans("None"); + $object->actionmsg .= "\n".$langs->transnoentities("OldUser").': '.$langs->trans("None"); } if ($object->fk_user_assign > 0) { - $tmpuser=new User($this->db); + $tmpuser = new User($this->db); $tmpuser->fetch($object->fk_user_assign); - $object->actionmsg.="\n".$langs->transnoentities("NewUser").': '.$tmpuser->getFullName($langs); + $object->actionmsg .= "\n".$langs->transnoentities("NewUser").': '.$tmpuser->getFullName($langs); } else { - $object->actionmsg.="\n".$langs->transnoentities("NewUser").': '.$langs->trans("None"); + $object->actionmsg .= "\n".$langs->transnoentities("NewUser").': '.$langs->trans("None"); } - $object->sendtoid=0; + $object->sendtoid = 0; } // TODO Merge all previous cases into this generic one else // $action = BILL_DELETE, TICKET_CREATE, TICKET_MODIFY, TICKET_DELETE, ... { // Note: We are here only if $conf->global->MAIN_AGENDA_ACTIONAUTO_action is on (tested at begining of this function). Key can be set in agenda setup if defined into c_action_trigger // Load translation files required by the page - $langs->loadLangs(array("agenda","other")); + $langs->loadLangs(array("agenda", "other")); - if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities($action."InDolibarr", $object->ref); - if (empty($object->actionmsg)) $object->actionmsg=$langs->transnoentities($action."InDolibarr", $object->ref); + if (empty($object->actionmsg2)) $object->actionmsg2 = $langs->transnoentities($action."InDolibarr", $object->ref); + if (empty($object->actionmsg)) $object->actionmsg = $langs->transnoentities($action."InDolibarr", $object->ref); - $object->sendtoid=0; + $object->sendtoid = 0; } $object->actionmsg = $langs->transnoentities("Author").': '.$user->login."\n".$object->actionmsg; @@ -846,21 +846,21 @@ class InterfaceActionsAuto extends DolibarrTriggers dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); // Add entry in event table - $now=dol_now(); + $now = dol_now(); if (isset($_SESSION['listofnames-'.$object->trackid])) { - $attachs=$_SESSION['listofnames-'.$object->trackid]; + $attachs = $_SESSION['listofnames-'.$object->trackid]; if ($attachs && strpos($action, 'SENTBYMAIL')) { - $object->actionmsg=dol_concatdesc($object->actionmsg, "\n".$langs->transnoentities("AttachedFiles").': '.$attachs); + $object->actionmsg = dol_concatdesc($object->actionmsg, "\n".$langs->transnoentities("AttachedFiles").': '.$attachs); } } require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; - $contactforaction=new Contact($this->db); - $societeforaction=new Societe($this->db); + $contactforaction = new Contact($this->db); + $societeforaction = new Societe($this->db); // Set contactforaction if there is only 1 contact. if (is_array($object->sendtoid)) { @@ -874,7 +874,7 @@ class InterfaceActionsAuto extends DolibarrTriggers if ($object->socid > 0) $societeforaction->fetch($object->socid); elseif ($object->fk_soc > 0) $societeforaction->fetch($object->fk_soc); - $projectid = isset($object->fk_project)?$object->fk_project:0; + $projectid = isset($object->fk_project) ? $object->fk_project : 0; if ($object->element == 'project') $projectid = $object->id; $elementid = $object->id; @@ -889,20 +889,20 @@ class InterfaceActionsAuto extends DolibarrTriggers // Insertion action require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; $actioncomm = new ActionComm($this->db); - $actioncomm->type_code = $object->actiontypecode; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...) + $actioncomm->type_code = $object->actiontypecode; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...) $actioncomm->code = 'AC_'.$action; $actioncomm->label = $object->actionmsg2; - $actioncomm->note_private= $object->actionmsg; // TODO Replace with ($actioncomm->email_msgid ? $object->email_content : $object->actionmsg) + $actioncomm->note_private = $object->actionmsg; // TODO Replace with ($actioncomm->email_msgid ? $object->email_content : $object->actionmsg) $actioncomm->fk_project = $projectid; $actioncomm->datep = $now; $actioncomm->datef = $now; $actioncomm->durationp = 0; $actioncomm->punctual = 1; - $actioncomm->percentage = -1; // Not applicable + $actioncomm->percentage = -1; // Not applicable $actioncomm->socid = $societeforaction->id; $actioncomm->contactid = $contactforaction->id; - $actioncomm->authorid = $user->id; // User saving action - $actioncomm->userownerid = $user->id; // Owner of action + $actioncomm->authorid = $user->id; // User saving action + $actioncomm->userownerid = $user->id; // Owner of action // Fields defined when action is an email (content should be into object->actionmsg to be added into note, subject into object->actionms2 to be added into label) $actioncomm->email_msgid = $object->email_msgid; $actioncomm->email_from = $object->email_from; @@ -915,28 +915,28 @@ class InterfaceActionsAuto extends DolibarrTriggers // Object linked (if link is for thirdparty, contact, project it is a recording error. We should not have links in link table // for such objects because there is already a dedicated field into table llx_actioncomm. - if (! in_array($elementtype, array('societe','contact','project'))) + if (!in_array($elementtype, array('societe', 'contact', 'project'))) { $actioncomm->fk_element = $elementid; $actioncomm->elementtype = $elementtype; } - if (property_exists($object, 'attachedfiles') && is_array($object->attachedfiles) && count($object->attachedfiles)>0) { - $actioncomm->attachedfiles=$object->attachedfiles; + if (property_exists($object, 'attachedfiles') && is_array($object->attachedfiles) && count($object->attachedfiles) > 0) { + $actioncomm->attachedfiles = $object->attachedfiles; } - if (property_exists($object, 'sendtouserid') && is_array($object->sendtouserid) && count($object->sendtouserid)>0) { - $actioncomm->userassigned=$object->sendtouserid; + if (property_exists($object, 'sendtouserid') && is_array($object->sendtouserid) && count($object->sendtouserid) > 0) { + $actioncomm->userassigned = $object->sendtouserid; } - $ret=$actioncomm->create($user); // User creating action + $ret = $actioncomm->create($user); // User creating action if ($ret > 0 && $conf->global->MAIN_COPY_FILE_IN_EVENT_AUTO) { - if (is_array($object->attachedfiles) && array_key_exists('paths', $object->attachedfiles) && count($object->attachedfiles['paths'])>0) { - foreach($object->attachedfiles['paths'] as $key=>$filespath) { + if (is_array($object->attachedfiles) && array_key_exists('paths', $object->attachedfiles) && count($object->attachedfiles['paths']) > 0) { + foreach ($object->attachedfiles['paths'] as $key=>$filespath) { $srcfile = $filespath; - $destdir = $conf->agenda->dir_output . '/' . $ret; - $destfile = $destdir . '/' . $object->attachedfiles['names'][$key]; + $destdir = $conf->agenda->dir_output.'/'.$ret; + $destfile = $destdir.'/'.$object->attachedfiles['names'][$key]; if (dol_mkdir($destdir) >= 0) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; dol_copy($srcfile, $destfile); @@ -945,7 +945,7 @@ class InterfaceActionsAuto extends DolibarrTriggers } } - unset($object->actionmsg); unset($object->actionmsg2); unset($object->actiontypecode); // When several action are called on same object, we must be sure to not reuse value of first action. + unset($object->actionmsg); unset($object->actionmsg2); unset($object->actiontypecode); // When several action are called on same object, we must be sure to not reuse value of first action. if ($ret > 0) { @@ -954,8 +954,8 @@ class InterfaceActionsAuto extends DolibarrTriggers } else { - $this->error="Failed to insert event : ".$actioncomm->error." ".join(',', $actioncomm->errors); - $this->errors=$actioncomm->errors; + $this->error = "Failed to insert event : ".$actioncomm->error." ".join(',', $actioncomm->errors); + $this->errors = $actioncomm->errors; dol_syslog("interface_modAgenda_ActionsAuto.class.php: ".$this->error, LOG_ERR); return -1; diff --git a/htdocs/don/list.php b/htdocs/don/list.php index 3cd49a20649..fd01809bc3b 100644 --- a/htdocs/don/list.php +++ b/htdocs/don/list.php @@ -27,27 +27,27 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; -if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; +if (!empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; // Load translation files required by the page -$langs->loadLangs(array("companies","donations")); +$langs->loadLangs(array("companies", "donations")); $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); $page = GETPOST("page", 'int'); -$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; +$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (! $sortorder) $sortorder="DESC"; -if (! $sortfield) $sortfield="d.datedon"; +if (!$sortorder) $sortorder = "DESC"; +if (!$sortfield) $sortfield = "d.datedon"; -$search_status=(GETPOST("search_status", 'intcomma') != '') ? GETPOST("search_status", 'intcomma') : "-4"; -$search_all=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); -$search_ref=GETPOST('search_ref', 'alpha'); -$search_company=GETPOST('search_company', 'alpha'); -$search_name=GETPOST('search_name', 'alpha'); +$search_status = (GETPOST("search_status", 'intcomma') != '') ? GETPOST("search_status", 'intcomma') : "-4"; +$search_all = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); +$search_ref = GETPOST('search_ref', 'alpha'); +$search_company = GETPOST('search_company', 'alpha'); +$search_name = GETPOST('search_name', 'alpha'); $search_amount = GETPOST('search_amount', 'alpha'); $optioncss = GETPOST('optioncss', 'alpha'); @@ -79,26 +79,26 @@ $fieldstosearchall = array( * View */ -$form=new Form($db); -if (! empty($conf->projet->enabled)) $projectstatic=new Project($db); +$form = new Form($db); +if (!empty($conf->projet->enabled)) $projectstatic = new Project($db); llxHeader('', $langs->trans("Donations"), 'EN:Module_Donations|FR:Module_Dons|ES:Módulo_Donaciones'); -$donationstatic=new Don($db); +$donationstatic = new Don($db); // Genere requete de liste des dons $sql = "SELECT d.rowid, d.datedon, d.fk_soc as socid, d.firstname, d.lastname, d.societe,"; -$sql.= " d.amount, d.fk_statut as status,"; -$sql.= " p.rowid as pid, p.ref, p.title, p.public"; -$sql.= " FROM ".MAIN_DB_PREFIX."don as d LEFT JOIN ".MAIN_DB_PREFIX."projet AS p"; -$sql.= " ON p.rowid = d.fk_projet WHERE d.entity IN (".getEntity('donation').")"; +$sql .= " d.amount, d.fk_statut as status,"; +$sql .= " p.rowid as pid, p.ref, p.title, p.public"; +$sql .= " FROM ".MAIN_DB_PREFIX."don as d LEFT JOIN ".MAIN_DB_PREFIX."projet AS p"; +$sql .= " ON p.rowid = d.fk_projet WHERE d.entity IN (".getEntity('donation').")"; if ($search_status != '' && $search_status != '-4') { $sql .= " AND d.fk_statut IN (".$db->escape($search_status).")"; } if (trim($search_ref) != '') { - $sql.= natural_search('d.ref', $search_ref); + $sql .= natural_search('d.ref', $search_ref); } if (trim($search_all) != '') { @@ -137,17 +137,17 @@ if ($resql) $i = 0; $param = ''; - if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); + if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); if ($search_status && $search_status != -1) $param .= '&search_status='.urlencode($search_status); if ($search_ref) $param .= '&search_ref='.urlencode($search_ref); if ($search_company) $param .= '&search_company='.urlencode($search_company); if ($search_name) $param .= '&search_name='.urlencode($search_name); if ($search_amount) $param .= '&search_amount='.urlencode($search_amount); - $newcardbutton=''; + $newcardbutton = ''; if ($user->rights->don->creer) { - $newcardbutton.= dolGetButtonTitle($langs->trans('NewDonation'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/don/card.php?action=create'); + $newcardbutton .= dolGetButtonTitle($langs->trans('NewDonation'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/don/card.php?action=create'); } print '
'."\n"; @@ -163,19 +163,19 @@ if ($resql) if ($search_all) { - foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val); - print '
'.$langs->trans("FilterOnInto", $search_all) . join(', ', $fieldstosearchall).'
'; + foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); + print '
'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'
'; } print '
'; - print ''."\n"; + print '
'."\n"; // Filters lines print ''; print ''; - if (! empty($conf->global->DONATION_USE_THIRDPARTIES)) { + if (!empty($conf->global->DONATION_USE_THIRDPARTIES)) { print ''; @@ -207,21 +207,21 @@ if ($resql) print $form->selectarray('search_status', $liststatus, $search_status, -4, 0, 0, '', 0, 0, 0, '', 'maxwidth100'); print ''; print ''; print "\n"; print ''; print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "d.rowid", "", $param, "", $sortfield, $sortorder); - if (! empty($conf->global->DONATION_USE_THIRDPARTIES)) { + if (!empty($conf->global->DONATION_USE_THIRDPARTIES)) { print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "d.fk_soc", "", $param, "", $sortfield, $sortorder); } else { print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "d.societe", "", $param, "", $sortfield, $sortorder); } print_liste_field_titre("Name", $_SERVER["PHP_SELF"], "d.lastname", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "d.datedon", "", $param, '', $sortfield, $sortorder, 'center '); - if (! empty($conf->projet->enabled)) + if (!empty($conf->projet->enabled)) { $langs->load("projects"); print_liste_field_titre("Project", $_SERVER["PHP_SELF"], "d.fk_projet", "", $param, "", $sortfield, $sortorder); @@ -236,15 +236,15 @@ if ($resql) $objp = $db->fetch_object($resql); print ''; - $donationstatic->id=$objp->rowid; - $donationstatic->ref=$objp->rowid; - $donationstatic->lastname=$objp->lastname; - $donationstatic->firstname=$objp->firstname; + $donationstatic->id = $objp->rowid; + $donationstatic->ref = $objp->rowid; + $donationstatic->lastname = $objp->lastname; + $donationstatic->firstname = $objp->firstname; print ""; - if (! empty($conf->global->DONATION_USE_THIRDPARTIES)) { - $company=new Societe($db); - $result=$company->fetch($objp->socid); - if (!empty($objp->socid) && $company->id > 0) { + if (!empty($conf->global->DONATION_USE_THIRDPARTIES)) { + $company = new Societe($db); + $result = $company->fetch($objp->socid); + if (!empty($objp->socid) && $company->id > 0) { print ""; } else { print ""; diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 57311c2e437..11cf2477720 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -814,7 +814,7 @@ class EmailCollector extends CommonObject { //var_dump($regforval[count($regforval)-1]);exit; // Overwrite param $tmpproperty - $object->$tmpproperty = isset($regforval[count($regforval)-1]) ?trim($regforval[count($regforval)-1]) : null; + $object->$tmpproperty = isset($regforval[count($regforval) - 1]) ?trim($regforval[count($regforval) - 1]) : null; } else { @@ -1135,7 +1135,7 @@ class EmailCollector extends CommonObject if (function_exists('imap_mime_header_decode')) { $elements = imap_mime_header_decode($overview[0]->subject); $newstring = ''; - if (! empty($elements)) { + if (!empty($elements)) { $num = count($elements); for ($i = 0; $i < $num; $i++) { $newstring .= ($newstring ? ' ' : '').$elements[$i]->text; @@ -1426,7 +1426,7 @@ class EmailCollector extends CommonObject { //var_dump($regforval[count($regforval)-1]);exit; // Overwrite param $tmpproperty - $nametouseforthirdparty = isset($regforval[count($regforval)-1]) ?trim($regforval[count($regforval)-1]) : null; + $nametouseforthirdparty = isset($regforval[count($regforval) - 1]) ?trim($regforval[count($regforval) - 1]) : null; } else { @@ -1796,10 +1796,10 @@ class EmailCollector extends CommonObject } // Create event specific on hook // this code action is hook..... for support this call - elseif (substr($operation['type'], 0, 4) == 'hook'){ + elseif (substr($operation['type'], 0, 4) == 'hook') { global $hookmanager; - if(!is_object($hookmanager)) + if (!is_object($hookmanager)) $hookmanager->initHooks(array('emailcollectorcard')); $parameters = array( @@ -1807,24 +1807,24 @@ class EmailCollector extends CommonObject 'imapemail'=>$imapemail, 'overview'=>$overview, - 'from' => $from , + 'from' => $from, 'fromtext' => $fromtext, 'actionparam'=> $operation['actionparam'], - 'thirdpartyid' => $thirdpartyid , + 'thirdpartyid' => $thirdpartyid, 'objectid'=> $objectid, 'objectemail'=> $objectemail, 'messagetext'=>$messagetext, 'subject'=>$subject, 'header'=>$header, - ) ; + ); $res = $hookmanager->executeHooks('doCollectOneCollector', $parameters, $this, $operation['type']); - if($res < 0 ) + if ($res < 0) $this->error = $hookmanager->resPrint; } @@ -2047,7 +2047,7 @@ class EmailCollector extends CommonObject // TEXT if ($p->type == 0 && $data) { - if(!empty($params['charset'])) { + if (!empty($params['charset'])) { $data = $this->convertStringEncoding($data, $params['charset']); } // Messages may be split in different parts because of inline attachments, @@ -2065,7 +2065,7 @@ class EmailCollector extends CommonObject // There are no PHP functions to parse embedded messages, // so this just appends the raw source to the main message. elseif ($p->type == 2 && $data) { - if(!empty($params['charset'])) { + if (!empty($params['charset'])) { $data = $this->convertStringEncoding($data, $params['charset']); } $plainmsg .= $data."\n\n"; @@ -2091,14 +2091,14 @@ class EmailCollector extends CommonObject */ protected function convertStringEncoding($string, $fromEncoding, $toEncoding = 'UTF-8') { - if(!$string || $fromEncoding == $toEncoding) { + if (!$string || $fromEncoding == $toEncoding) { return $string; } - $convertedString = function_exists('iconv') ? @iconv($fromEncoding, $toEncoding . '//IGNORE', $string) : null; - if(!$convertedString && extension_loaded('mbstring')) { + $convertedString = function_exists('iconv') ? @iconv($fromEncoding, $toEncoding.'//IGNORE', $string) : null; + if (!$convertedString && extension_loaded('mbstring')) { $convertedString = @mb_convert_encoding($string, $toEncoding, $fromEncoding); } - if(!$convertedString) { + if (!$convertedString) { throw new Exception('Mime string encoding conversion failed'); } return $convertedString; diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 4c6b7f46e47..52540901c33 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -287,90 +287,90 @@ class Expedition extends CommonObject $this->db->begin(); $sql = "INSERT INTO ".MAIN_DB_PREFIX."expedition ("; - $sql.= "ref"; - $sql.= ", entity"; - $sql.= ", ref_customer"; - $sql.= ", ref_int"; - $sql.= ", date_creation"; - $sql.= ", fk_user_author"; - $sql.= ", date_expedition"; - $sql.= ", date_delivery"; - $sql.= ", fk_soc"; - $sql.= ", fk_projet"; - $sql.= ", fk_address"; - $sql.= ", fk_shipping_method"; - $sql.= ", tracking_number"; - $sql.= ", weight"; - $sql.= ", size"; - $sql.= ", width"; - $sql.= ", height"; - $sql.= ", weight_units"; - $sql.= ", size_units"; - $sql.= ", note_private"; - $sql.= ", note_public"; - $sql.= ", model_pdf"; - $sql.= ", fk_incoterms, location_incoterms"; - $sql.= ") VALUES ("; - $sql.= "'(PROV)'"; - $sql.= ", ".$conf->entity; - $sql.= ", ".($this->ref_customer?"'".$this->db->escape($this->ref_customer)."'":"null"); - $sql.= ", ".($this->ref_int?"'".$this->db->escape($this->ref_int)."'":"null"); - $sql.= ", '".$this->db->idate($now)."'"; - $sql.= ", ".$user->id; - $sql.= ", ".($this->date_expedition>0?"'".$this->db->idate($this->date_expedition)."'":"null"); - $sql.= ", ".($this->date_delivery>0?"'".$this->db->idate($this->date_delivery)."'":"null"); - $sql.= ", ".$this->socid; - $sql.= ", ".$this->fk_project; - $sql.= ", ".($this->fk_delivery_address>0?$this->fk_delivery_address:"null"); - $sql.= ", ".($this->shipping_method_id>0?$this->shipping_method_id:"null"); - $sql.= ", '".$this->db->escape($this->tracking_number)."'"; - $sql.= ", ".$this->weight; - $sql.= ", ".$this->sizeS; // TODO Should use this->trueDepth - $sql.= ", ".$this->sizeW; // TODO Should use this->trueWidth - $sql.= ", ".$this->sizeH; // TODO Should use this->trueHeight - $sql.= ", ".($this->weight_units != '' ? (int) $this->weight_units : 'NULL'); - $sql.= ", ".($this->size_units != '' ? (int) $this->size_units : 'NULL'); - $sql.= ", ".(!empty($this->note_private)?"'".$this->db->escape($this->note_private)."'":"null"); - $sql.= ", ".(!empty($this->note_public)?"'".$this->db->escape($this->note_public)."'":"null"); - $sql.= ", ".(!empty($this->model_pdf)?"'".$this->db->escape($this->model_pdf)."'":"null"); - $sql.= ", ".(int) $this->fk_incoterms; - $sql.= ", '".$this->db->escape($this->location_incoterms)."'"; - $sql.= ")"; + $sql .= "ref"; + $sql .= ", entity"; + $sql .= ", ref_customer"; + $sql .= ", ref_int"; + $sql .= ", date_creation"; + $sql .= ", fk_user_author"; + $sql .= ", date_expedition"; + $sql .= ", date_delivery"; + $sql .= ", fk_soc"; + $sql .= ", fk_projet"; + $sql .= ", fk_address"; + $sql .= ", fk_shipping_method"; + $sql .= ", tracking_number"; + $sql .= ", weight"; + $sql .= ", size"; + $sql .= ", width"; + $sql .= ", height"; + $sql .= ", weight_units"; + $sql .= ", size_units"; + $sql .= ", note_private"; + $sql .= ", note_public"; + $sql .= ", model_pdf"; + $sql .= ", fk_incoterms, location_incoterms"; + $sql .= ") VALUES ("; + $sql .= "'(PROV)'"; + $sql .= ", ".$conf->entity; + $sql .= ", ".($this->ref_customer ? "'".$this->db->escape($this->ref_customer)."'" : "null"); + $sql .= ", ".($this->ref_int ? "'".$this->db->escape($this->ref_int)."'" : "null"); + $sql .= ", '".$this->db->idate($now)."'"; + $sql .= ", ".$user->id; + $sql .= ", ".($this->date_expedition > 0 ? "'".$this->db->idate($this->date_expedition)."'" : "null"); + $sql .= ", ".($this->date_delivery > 0 ? "'".$this->db->idate($this->date_delivery)."'" : "null"); + $sql .= ", ".$this->socid; + $sql .= ", ".$this->fk_project; + $sql .= ", ".($this->fk_delivery_address > 0 ? $this->fk_delivery_address : "null"); + $sql .= ", ".($this->shipping_method_id > 0 ? $this->shipping_method_id : "null"); + $sql .= ", '".$this->db->escape($this->tracking_number)."'"; + $sql .= ", ".$this->weight; + $sql .= ", ".$this->sizeS; // TODO Should use this->trueDepth + $sql .= ", ".$this->sizeW; // TODO Should use this->trueWidth + $sql .= ", ".$this->sizeH; // TODO Should use this->trueHeight + $sql .= ", ".($this->weight_units != '' ? (int) $this->weight_units : 'NULL'); + $sql .= ", ".($this->size_units != '' ? (int) $this->size_units : 'NULL'); + $sql .= ", ".(!empty($this->note_private) ? "'".$this->db->escape($this->note_private)."'" : "null"); + $sql .= ", ".(!empty($this->note_public) ? "'".$this->db->escape($this->note_public)."'" : "null"); + $sql .= ", ".(!empty($this->model_pdf) ? "'".$this->db->escape($this->model_pdf)."'" : "null"); + $sql .= ", ".(int) $this->fk_incoterms; + $sql .= ", '".$this->db->escape($this->location_incoterms)."'"; + $sql .= ")"; dol_syslog(get_class($this)."::create", LOG_DEBUG); - $resql=$this->db->query($sql); + $resql = $this->db->query($sql); if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."expedition"); $sql = "UPDATE ".MAIN_DB_PREFIX."expedition"; - $sql.= " SET ref = '(PROV".$this->id.")'"; - $sql.= " WHERE rowid = ".$this->id; + $sql .= " SET ref = '(PROV".$this->id.")'"; + $sql .= " WHERE rowid = ".$this->id; dol_syslog(get_class($this)."::create", LOG_DEBUG); if ($this->db->query($sql)) { // Insert of lines - $num=count($this->lines); + $num = count($this->lines); for ($i = 0; $i < $num; $i++) { - if (! isset($this->lines[$i]->detail_batch)) + if (!isset($this->lines[$i]->detail_batch)) { // no batch management - if (! $this->create_line($this->lines[$i]->entrepot_id, $this->lines[$i]->origin_line_id, $this->lines[$i]->qty, $this->lines[$i]->rang, $this->lines[$i]->array_options) > 0) + if (!$this->create_line($this->lines[$i]->entrepot_id, $this->lines[$i]->origin_line_id, $this->lines[$i]->qty, $this->lines[$i]->rang, $this->lines[$i]->array_options) > 0) { $error++; } } else { // with batch management - if (! $this->create_line_batch($this->lines[$i], $this->lines[$i]->array_options) > 0) + if (!$this->create_line_batch($this->lines[$i], $this->lines[$i]->array_options) > 0) { $error++; } } } - if (! $error && $this->id && $this->origin_id) + if (!$error && $this->id && $this->origin_id) { $ret = $this->add_object_linked(); if (!$ret) @@ -535,24 +535,24 @@ class Expedition extends CommonObject if (empty($id) && empty($ref) && empty($ref_ext)) return -1; $sql = "SELECT e.rowid, e.ref, e.fk_soc as socid, e.date_creation, e.ref_customer, e.ref_ext, e.ref_int, e.fk_user_author, e.fk_statut, e.fk_projet as fk_project, e.billed"; - $sql.= ", e.date_valid"; - $sql.= ", e.weight, e.weight_units, e.size, e.size_units, e.width, e.height"; - $sql.= ", e.date_expedition as date_expedition, e.model_pdf, e.fk_address, e.date_delivery"; - $sql.= ", e.fk_shipping_method, e.tracking_number"; - $sql.= ", e.note_private, e.note_public"; - $sql.= ', e.fk_incoterms, e.location_incoterms'; - $sql.= ', i.libelle as label_incoterms'; - $sql.= ', s.libelle as shipping_method'; - $sql.= ", el.fk_source as origin_id, el.sourcetype as origin"; - $sql.= " FROM ".MAIN_DB_PREFIX."expedition as e"; - $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON el.fk_target = e.rowid AND el.targettype = '".$this->db->escape($this->element)."'"; - $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON e.fk_incoterms = i.rowid'; - $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_shipment_mode as s ON e.fk_shipping_method = s.rowid'; - $sql.= " WHERE e.entity IN (".getEntity('expedition').")"; - if ($id) $sql.= " AND e.rowid=".$id; - if ($ref) $sql.= " AND e.ref='".$this->db->escape($ref)."'"; - if ($ref_ext) $sql.= " AND e.ref_ext='".$this->db->escape($ref_ext)."'"; - if ($notused) $sql.= " AND e.ref_int='".$this->db->escape($notused)."'"; + $sql .= ", e.date_valid"; + $sql .= ", e.weight, e.weight_units, e.size, e.size_units, e.width, e.height"; + $sql .= ", e.date_expedition as date_expedition, e.model_pdf, e.fk_address, e.date_delivery"; + $sql .= ", e.fk_shipping_method, e.tracking_number"; + $sql .= ", e.note_private, e.note_public"; + $sql .= ', e.fk_incoterms, e.location_incoterms'; + $sql .= ', i.libelle as label_incoterms'; + $sql .= ', s.libelle as shipping_method'; + $sql .= ", el.fk_source as origin_id, el.sourcetype as origin"; + $sql .= " FROM ".MAIN_DB_PREFIX."expedition as e"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON el.fk_target = e.rowid AND el.targettype = '".$this->db->escape($this->element)."'"; + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON e.fk_incoterms = i.rowid'; + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_shipment_mode as s ON e.fk_shipping_method = s.rowid'; + $sql .= " WHERE e.entity IN (".getEntity('expedition').")"; + if ($id) $sql .= " AND e.rowid=".$id; + if ($ref) $sql .= " AND e.ref='".$this->db->escape($ref)."'"; + if ($ref_ext) $sql .= " AND e.ref_ext='".$this->db->escape($ref_ext)."'"; + if ($notused) $sql .= " AND e.ref_int='".$this->db->escape($notused)."'"; dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result = $this->db->query($sql); @@ -565,26 +565,26 @@ class Expedition extends CommonObject $this->id = $obj->rowid; $this->ref = $obj->ref; $this->socid = $obj->socid; - $this->ref_customer = $obj->ref_customer; + $this->ref_customer = $obj->ref_customer; $this->ref_ext = $obj->ref_ext; $this->ref_int = $obj->ref_int; $this->statut = $obj->fk_statut; $this->user_author_id = $obj->fk_user_author; $this->date_creation = $this->db->jdate($obj->date_creation); - $this->date_valid = $this->db->jdate($obj->date_valid); - $this->date = $this->db->jdate($obj->date_expedition); // TODO deprecated - $this->date_expedition = $this->db->jdate($obj->date_expedition); // TODO deprecated - $this->date_shipping = $this->db->jdate($obj->date_expedition); // Date real - $this->date_delivery = $this->db->jdate($obj->date_delivery); // Date planed + $this->date_valid = $this->db->jdate($obj->date_valid); + $this->date = $this->db->jdate($obj->date_expedition); // TODO deprecated + $this->date_expedition = $this->db->jdate($obj->date_expedition); // TODO deprecated + $this->date_shipping = $this->db->jdate($obj->date_expedition); // Date real + $this->date_delivery = $this->db->jdate($obj->date_delivery); // Date planed $this->fk_delivery_address = $obj->fk_address; $this->modelpdf = $obj->model_pdf; $this->shipping_method_id = $obj->fk_shipping_method; - $this->shipping_method = $obj->shipping_method; + $this->shipping_method = $obj->shipping_method; $this->tracking_number = $obj->tracking_number; - $this->origin = ($obj->origin?$obj->origin:'commande'); // For compatibility + $this->origin = ($obj->origin ? $obj->origin : 'commande'); // For compatibility $this->origin_id = $obj->origin_id; $this->billed = $obj->billed; - $this->fk_project = $obj->fk_project; + $this->fk_project = $obj->fk_project; $this->trueWeight = $obj->weight; $this->weight_units = $obj->weight_units; @@ -763,7 +763,7 @@ class Expedition extends CommonObject // line without batch detail // We decrement stock of product (and sub-products) -> update table llx_product_stock (key of this table is fk_product+fk_entrepot) and add a movement record. - $result=$mouvS->livraison($user, $obj->fk_product, $obj->fk_entrepot, $qty, $obj->subprice, $langs->trans("ShipmentValidatedInDolibarr", $numref)); + $result = $mouvS->livraison($user, $obj->fk_product, $obj->fk_entrepot, $qty, $obj->subprice, $langs->trans("ShipmentValidatedInDolibarr", $numref)); if ($result < 0) { $error++; $this->error = $mouvS->error; @@ -777,7 +777,7 @@ class Expedition extends CommonObject // We decrement stock of product (and sub-products) -> update table llx_product_stock (key of this table is fk_product+fk_entrepot) and add a movement record. // Note: ->fk_origin_stock = id into table llx_product_batch (may be rename into llx_product_stock_batch in another version) - $result=$mouvS->livraison($user, $obj->fk_product, $obj->fk_entrepot, $qty, $obj->subprice, $langs->trans("ShipmentValidatedInDolibarr", $numref), '', $this->db->jdate($obj->eatby), $this->db->jdate($obj->sellby), $obj->batch, $obj->fk_origin_stock); + $result = $mouvS->livraison($user, $obj->fk_product, $obj->fk_entrepot, $qty, $obj->subprice, $langs->trans("ShipmentValidatedInDolibarr", $numref), '', $this->db->jdate($obj->eatby), $this->db->jdate($obj->sellby), $obj->batch, $obj->fk_origin_stock); if ($result < 0) { $error++; $this->error = $mouvS->error; @@ -819,17 +819,17 @@ class Expedition extends CommonObject if (preg_match('/^[\(]?PROV/i', $this->ref)) { // Now we rename also files into index - $sql = 'UPDATE '.MAIN_DB_PREFIX."ecm_files set filename = CONCAT('".$this->db->escape($this->newref)."', SUBSTR(filename, ".(strlen($this->ref)+1).")), filepath = 'expedition/sending/".$this->db->escape($this->newref)."'"; - $sql.= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'expedition/sending/".$this->db->escape($this->ref)."' and entity = ".$conf->entity; + $sql = 'UPDATE '.MAIN_DB_PREFIX."ecm_files set filename = CONCAT('".$this->db->escape($this->newref)."', SUBSTR(filename, ".(strlen($this->ref) + 1).")), filepath = 'expedition/sending/".$this->db->escape($this->newref)."'"; + $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'expedition/sending/".$this->db->escape($this->ref)."' and entity = ".$conf->entity; $resql = $this->db->query($sql); - if (! $resql) { $error++; $this->error = $this->db->lasterror(); } + if (!$resql) { $error++; $this->error = $this->db->lasterror(); } // We rename directory ($this->ref = old ref, $num = new ref) in order not to lose the attachments $oldref = dol_sanitizeFileName($this->ref); $newref = dol_sanitizeFileName($numref); $dirsource = $conf->expedition->dir_output.'/sending/'.$oldref; $dirdest = $conf->expedition->dir_output.'/sending/'.$newref; - if (! $error && file_exists($dirsource)) + if (!$error && file_exists($dirsource)) { dol_syslog(get_class($this)."::valid rename dir ".$dirsource." into ".$dirdest); @@ -852,13 +852,13 @@ class Expedition extends CommonObject } // Set new ref and current status - if (! $error) + if (!$error) { $this->ref = $numref; $this->statut = self::STATUS_VALIDATED; } - if (! $error) + if (!$error) { $this->db->commit(); return 1; @@ -866,7 +866,7 @@ class Expedition extends CommonObject else { $this->db->rollback(); - return -1*$error; + return -1 * $error; } } @@ -1173,32 +1173,32 @@ class Expedition extends CommonObject require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/expedition/class/expeditionbatch.class.php'; - $error=0; - $this->error=''; + $error = 0; + $this->error = ''; $this->db->begin(); // Add a protection to refuse deleting if shipment has at least one delivery - $this->fetchObjectLinked($this->id, 'shipping', 0, 'delivery'); // Get deliveries linked to this shipment + $this->fetchObjectLinked($this->id, 'shipping', 0, 'delivery'); // Get deliveries linked to this shipment if (count($this->linkedObjectsIds) > 0) { - $this->error='ErrorThereIsSomeDeliveries'; + $this->error = 'ErrorThereIsSomeDeliveries'; $error++; } - if (! $error) + if (!$error) { - if (! $notrigger) + if (!$notrigger) { // Call trigger - $result=$this->call_trigger('SHIPPING_DELETE', $user); + $result = $this->call_trigger('SHIPPING_DELETE', $user); if ($result < 0) { $error++; } // End call triggers } } // Stock control - if (! $error && $conf->stock->enabled && + if (!$error && $conf->stock->enabled && (($conf->global->STOCK_CALCULATE_ON_SHIPMENT && $this->statut > self::STATUS_DRAFT) || ($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE && $this->statut == self::STATUS_CLOSED && $also_update_stock))) { @@ -1387,20 +1387,20 @@ class Expedition extends CommonObject // phpcs:enable global $conf, $mysoc; // TODO: recuperer les champs du document associe a part - $this->lines=array(); + $this->lines = array(); $sql = "SELECT cd.rowid, cd.fk_product, cd.label as custom_label, cd.description, cd.qty as qty_asked, cd.product_type"; - $sql.= ", cd.total_ht, cd.total_localtax1, cd.total_localtax2, cd.total_ttc, cd.total_tva"; - $sql.= ", cd.vat_src_code, cd.tva_tx, cd.localtax1_tx, cd.localtax2_tx, cd.localtax1_type, cd.localtax2_type, cd.info_bits, cd.price, cd.subprice, cd.remise_percent,cd.buy_price_ht as pa_ht"; - $sql.= ", cd.fk_multicurrency, cd.multicurrency_code, cd.multicurrency_subprice, cd.multicurrency_total_ht, cd.multicurrency_total_tva, cd.multicurrency_total_ttc, cd.rang"; - $sql.= ", ed.rowid as line_id, ed.qty as qty_shipped, ed.fk_origin_line, ed.fk_entrepot"; - $sql.= ", p.ref as product_ref, p.label as product_label, p.fk_product_type"; - $sql.= ", p.weight, p.weight_units, p.length, p.length_units, p.surface, p.surface_units, p.volume, p.volume_units, p.tobatch as product_tobatch"; - $sql.= " FROM ".MAIN_DB_PREFIX."expeditiondet as ed, ".MAIN_DB_PREFIX."commandedet as cd"; - $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = cd.fk_product"; - $sql.= " WHERE ed.fk_expedition = ".$this->id; - $sql.= " AND ed.fk_origin_line = cd.rowid"; - $sql.= " ORDER BY cd.rang, ed.fk_origin_line"; + $sql .= ", cd.total_ht, cd.total_localtax1, cd.total_localtax2, cd.total_ttc, cd.total_tva"; + $sql .= ", cd.vat_src_code, cd.tva_tx, cd.localtax1_tx, cd.localtax2_tx, cd.localtax1_type, cd.localtax2_type, cd.info_bits, cd.price, cd.subprice, cd.remise_percent,cd.buy_price_ht as pa_ht"; + $sql .= ", cd.fk_multicurrency, cd.multicurrency_code, cd.multicurrency_subprice, cd.multicurrency_total_ht, cd.multicurrency_total_tva, cd.multicurrency_total_ttc, cd.rang"; + $sql .= ", ed.rowid as line_id, ed.qty as qty_shipped, ed.fk_origin_line, ed.fk_entrepot"; + $sql .= ", p.ref as product_ref, p.label as product_label, p.fk_product_type"; + $sql .= ", p.weight, p.weight_units, p.length, p.length_units, p.surface, p.surface_units, p.volume, p.volume_units, p.tobatch as product_tobatch"; + $sql .= " FROM ".MAIN_DB_PREFIX."expeditiondet as ed, ".MAIN_DB_PREFIX."commandedet as cd"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = cd.fk_product"; + $sql .= " WHERE ed.fk_expedition = ".$this->id; + $sql .= " AND ed.fk_origin_line = cd.rowid"; + $sql .= " ORDER BY cd.rang, ed.fk_origin_line"; dol_syslog(get_class($this)."::fetch_lines", LOG_DEBUG); $resql = $this->db->query($sql); @@ -1461,7 +1461,7 @@ class Expedition extends CommonObject $line->label = $obj->custom_label; $line->description = $obj->description; $line->qty_asked = $obj->qty_asked; - $line->rang = $obj->rang; + $line->rang = $obj->rang; $line->weight = $obj->weight; $line->weight_units = $obj->weight_units; $line->length = $obj->length; @@ -1750,23 +1750,23 @@ class Expedition extends CommonObject $this->origin_id = 1; $this->origin = 'commande'; - $this->note_private = 'Private note'; - $this->note_public = 'Public note'; + $this->note_private = 'Private note'; + $this->note_public = 'Public note'; $nbp = 5; $xnbp = 0; while ($xnbp < $nbp) { - $line=new ExpeditionLigne($this->db); - $line->desc=$langs->trans("Description")." ".$xnbp; - $line->libelle=$langs->trans("Description")." ".$xnbp; // deprecated - $line->label=$langs->trans("Description")." ".$xnbp; - $line->qty=10; - $line->qty_asked=5; - $line->qty_shipped=4; - $line->fk_product=$this->commande->lines[$xnbp]->fk_product; + $line = new ExpeditionLigne($this->db); + $line->desc = $langs->trans("Description")." ".$xnbp; + $line->libelle = $langs->trans("Description")." ".$xnbp; // deprecated + $line->label = $langs->trans("Description")." ".$xnbp; + $line->qty = 10; + $line->qty_asked = 5; + $line->qty_shipped = 4; + $line->fk_product = $this->commande->lines[$xnbp]->fk_product; - $this->lines[]=$line; + $this->lines[] = $line; $xnbp++; } } @@ -1820,17 +1820,17 @@ class Expedition extends CommonObject $this->meths = array(); $sql = "SELECT em.rowid, em.code, em.libelle as label"; - $sql.= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as em"; - $sql.= " WHERE em.active = 1"; - $sql.= " ORDER BY em.libelle ASC"; + $sql .= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as em"; + $sql .= " WHERE em.active = 1"; + $sql .= " ORDER BY em.libelle ASC"; $resql = $this->db->query($sql); if ($resql) { while ($obj = $this->db->fetch_object($resql)) { - $label=$langs->trans('SendingMethod'.$obj->code); - $this->meths[$obj->rowid] = ($label != 'SendingMethod'.$obj->code?$label:$obj->label); + $label = $langs->trans('SendingMethod'.$obj->code); + $this->meths[$obj->rowid] = ($label != 'SendingMethod'.$obj->code ? $label : $obj->label); } } } @@ -1848,11 +1848,11 @@ class Expedition extends CommonObject global $langs; $this->listmeths = array(); - $i=0; + $i = 0; $sql = "SELECT em.rowid, em.code, em.libelle as label, em.description, em.tracking, em.active"; - $sql.= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as em"; - if ($id!='') $sql.= " WHERE em.rowid=".$id; + $sql .= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as em"; + if ($id != '') $sql .= " WHERE em.rowid=".$id; $resql = $this->db->query($sql); if ($resql) @@ -1861,8 +1861,8 @@ class Expedition extends CommonObject { $this->listmeths[$i]['rowid'] = $obj->rowid; $this->listmeths[$i]['code'] = $obj->code; - $label=$langs->trans('SendingMethod'.$obj->code); - $this->listmeths[$i]['libelle'] = ($label != 'SendingMethod'.$obj->code?$label:$obj->label); + $label = $langs->trans('SendingMethod'.$obj->code); + $this->listmeths[$i]['libelle'] = ($label != 'SendingMethod'.$obj->code ? $label : $obj->label); $this->listmeths[$i]['description'] = $obj->description; $this->listmeths[$i]['tracking'] = $obj->tracking; $this->listmeths[$i]['active'] = $obj->active; @@ -2316,16 +2316,16 @@ class Expedition extends CommonObject */ public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { - global $conf,$langs; + global $conf, $langs; $langs->load("sendings"); - if (! dol_strlen($modele)) { + if (!dol_strlen($modele)) { $modele = 'rouget'; if ($this->modelpdf) { $modele = $this->modelpdf; - } elseif (! empty($conf->global->EXPEDITION_ADDON_PDF)) { + } elseif (!empty($conf->global->EXPEDITION_ADDON_PDF)) { $modele = $conf->global->EXPEDITION_ADDON_PDF; } } @@ -2567,10 +2567,10 @@ class ExpeditionLigne extends CommonObjectLine { global $langs, $conf; - $error=0; + $error = 0; // Check parameters - if (empty($this->fk_expedition) || empty($this->fk_origin_line) || ! is_numeric($this->qty)) + if (empty($this->fk_expedition) || empty($this->fk_origin_line) || !is_numeric($this->qty)) { $this->error = 'ErrorMandatoryParametersNotProvided'; return -1; @@ -2589,18 +2589,18 @@ class ExpeditionLigne extends CommonObjectLine } $sql = "INSERT INTO ".MAIN_DB_PREFIX."expeditiondet ("; - $sql.= "fk_expedition"; - $sql.= ", fk_entrepot"; - $sql.= ", fk_origin_line"; - $sql.= ", qty"; - $sql.= ", rang"; - $sql.= ") VALUES ("; - $sql.= $this->fk_expedition; - $sql.= ", ".(empty($this->entrepot_id) ? 'NULL' : $this->entrepot_id); - $sql.= ", ".$this->fk_origin_line; - $sql.= ", ".$this->qty; - $sql.= ", ".$ranktouse; - $sql.= ")"; + $sql .= "fk_expedition"; + $sql .= ", fk_entrepot"; + $sql .= ", fk_origin_line"; + $sql .= ", qty"; + $sql .= ", rang"; + $sql .= ") VALUES ("; + $sql .= $this->fk_expedition; + $sql .= ", ".(empty($this->entrepot_id) ? 'NULL' : $this->entrepot_id); + $sql .= ", ".$this->fk_origin_line; + $sql .= ", ".$this->qty; + $sql .= ", ".$ranktouse; + $sql .= ")"; dol_syslog(get_class($this)."::insert", LOG_DEBUG); $resql = $this->db->query($sql); diff --git a/htdocs/expensereport/payment/payment.php b/htdocs/expensereport/payment/payment.php index 15073c50620..872bd5a0792 100644 --- a/htdocs/expensereport/payment/payment.php +++ b/htdocs/expensereport/payment/payment.php @@ -31,14 +31,14 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // Load translation files required by the page $langs->loadLangs(array('bills', 'banks', 'trips')); -$id=GETPOST("id", 'int'); -$ref=GETPOST('ref', 'alpha'); -$action=GETPOST('action', 'aZ09'); +$id = GETPOST("id", 'int'); +$ref = GETPOST('ref', 'alpha'); +$action = GETPOST('action', 'aZ09'); $amounts = array(); -$accountid=GETPOST('accountid', 'int'); +$accountid = GETPOST('accountid', 'int'); // Security check -$socid=0; +$socid = 0; if ($user->socid > 0) { $socid = $user->socid; @@ -51,7 +51,7 @@ if ($user->socid > 0) if ($action == 'add_payment') { - $error=0; + $error = 0; if ($_POST["cancel"]) { @@ -62,7 +62,7 @@ if ($action == 'add_payment') $expensereport = new ExpenseReport($db); $result = $expensereport->fetch($id, $ref); - if (! $result) + if (!$result) { $error++; setEventMessages($expensereport->error, $expensereport->errors, 'errors'); @@ -70,7 +70,7 @@ if ($action == 'add_payment') $datepaid = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); - if (! ($_POST["fk_typepayment"] > 0)) + if (!($_POST["fk_typepayment"] > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("PaymentMode")), null, 'errors'); $error++; @@ -80,13 +80,13 @@ if ($action == 'add_payment') setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Date")), null, 'errors'); $error++; } - if (! empty($conf->banque->enabled) && ! ($accountid > 0)) + if (!empty($conf->banque->enabled) && !($accountid > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("AccountToDebit")), null, 'errors'); $error++; } - if (! $error) + if (!$error) { $paymentid = 0; $total = 0; @@ -104,10 +104,10 @@ if ($action == 'add_payment') if (count($amounts) <= 0) { $error++; - $errmsg='ErrorNoPaymentDefined'; + $errmsg = 'ErrorNoPaymentDefined'; } - if (! $error) + if (!$error) { $db->begin(); @@ -115,13 +115,13 @@ if ($action == 'add_payment') $payment = new PaymentExpenseReport($db); $payment->fk_expensereport = $expensereport->id; $payment->datepaid = $datepaid; - $payment->amounts = $amounts; // Tableau de montant + $payment->amounts = $amounts; // Tableau de montant $payment->total = $total; $payment->fk_typepayment = GETPOST("fk_typepayment", 'int'); $payment->num_payment = GETPOST("num_payment", 'alphanothtml'); $payment->note_public = GETPOST("note_public", 'none'); - if (! $error) + if (!$error) { $paymentid = $payment->create($user); if ($paymentid < 0) @@ -131,10 +131,10 @@ if ($action == 'add_payment') } } - if (! $error) + if (!$error) { - $result=$payment->addPaymentToBank($user, 'payment_expensereport', '(ExpenseReportPayment)', $accountid, '', ''); - if (! $result > 0) + $result = $payment->addPaymentToBank($user, 'payment_expensereport', '(ExpenseReportPayment)', $accountid, '', ''); + if (!$result > 0) { setEventMessages($payment->error, $payment->errors, 'errors'); $error++; @@ -152,7 +152,7 @@ if ($action == 'add_payment') } } - if (! $error) + if (!$error) { $db->commit(); $loc = DOL_URL_ROOT.'/expensereport/card.php?id='.$id; @@ -166,7 +166,7 @@ if ($action == 'add_payment') } } - $action='create'; + $action = 'create'; } @@ -176,7 +176,7 @@ if ($action == 'add_payment') llxHeader(); -$form=new Form($db); +$form = new Form($db); // Form to create expense report payment @@ -188,7 +188,7 @@ if ($action == 'create' || empty($action)) $total = $expensereport->total_ttc; // autofill remainder amount - if (! empty($conf->use_javascript_ajax)) { + if (!empty($conf->use_javascript_ajax)) { print "\n".''."\n"; + print ''."\n"; } // jQuery jeditable From f07d228537262c421e47a715d2539c7381eabf2f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 13 Mar 2020 02:28:01 +0100 Subject: [PATCH 257/313] Upgrade mobiledetect from 2.8.33 to 2.8.34 --- COPYRIGHT | 2 +- composer.json | 6 +- composer.lock | 12 ++-- .../mobiledetectlib/Mobile_Detect.json | 2 +- .../mobiledetectlib/Mobile_Detect.php | 32 +++++---- .../mobiledetect/mobiledetectlib/README.md | 6 +- .../mobiledetectlib/composer.json | 71 +++++++++++-------- .../mobiledetectlib/docker-compose.yml | 16 +++++ .../mobiledetectlib/docs/KNOWN_LIMITATIONS.md | 3 +- 9 files changed, 91 insertions(+), 59 deletions(-) create mode 100644 htdocs/includes/mobiledetect/mobiledetectlib/docker-compose.yml diff --git a/COPYRIGHT b/COPYRIGHT index 09557f6520e..1df1167fd5d 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -17,7 +17,7 @@ CKEditor 4.12.1 LGPL-2.1+ Yes EvalMath 1.0 BSD Yes Safe math expressions evaluation Escpos-php 2.2 MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers GeoIP 1.4 LGPL-2.1+ Yes Sample code to make geoip convert (not into deb package) -Mobiledetect 2.8.33 MIT License Yes Detect mobile devices browsers +Mobiledetect 2.8.34 MIT License Yes Detect mobile devices browsers NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package) PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency ParseDown 1.6 MIT License Yes Markdown parser diff --git a/composer.json b/composer.json index 358b7b05880..c61f985c5bf 100644 --- a/composer.json +++ b/composer.json @@ -28,11 +28,11 @@ "ext-curl" : "*", "ckeditor/ckeditor" : "4.12.1", "mike42/escpos-php" : "2.2", - "mobiledetect/mobiledetectlib" : "2.8.33", + "mobiledetect/mobiledetectlib" : "2.8.34", "phpoffice/phpexcel" : "1.8.1", "restler/framework" : "3.0.0-RC6", "tecnickcom/tcpdf" : "6.3.2", - "nnnick/chartjs": "2.9.3" + "nnnick/chartjs" : "2.9.3" }, "require-dev" : { "jakub-onderka/php-parallel-lint" : "^0", @@ -56,4 +56,4 @@ "ext-zip" : "ODT, Excel and file compression support", "ext-xml" : "Excel support" } -} +} \ No newline at end of file diff --git a/composer.lock b/composer.lock index edf324994a1..93a6a621e56 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "9f3a6e33d25fad5f44426d0dc8fc3c3d", + "content-hash": "3c03efa3fe59b85d3d389e01cc65812b", "packages": [ { "name": "ckeditor/ckeditor", @@ -104,16 +104,16 @@ }, { "name": "mobiledetect/mobiledetectlib", - "version": "2.8.33", + "version": "2.8.34", "source": { "type": "git", "url": "https://github.com/serbanghita/Mobile-Detect.git", - "reference": "cd385290f9a0d609d2eddd165a1e44ec1bf12102" + "reference": "6f8113f57a508494ca36acbcfa2dc2d923c7ed5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/cd385290f9a0d609d2eddd165a1e44ec1bf12102", - "reference": "cd385290f9a0d609d2eddd165a1e44ec1bf12102", + "url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/6f8113f57a508494ca36acbcfa2dc2d923c7ed5b", + "reference": "6f8113f57a508494ca36acbcfa2dc2d923c7ed5b", "shasum": "" }, "require": { @@ -152,7 +152,7 @@ "mobile detector", "php mobile detect" ], - "time": "2018-09-01T15:05:15+00:00" + "time": "2019-09-18T18:44:20+00:00" }, { "name": "nnnick/chartjs", diff --git a/htdocs/includes/mobiledetect/mobiledetectlib/Mobile_Detect.json b/htdocs/includes/mobiledetect/mobiledetectlib/Mobile_Detect.json index a4361a9f5e1..2b807e11557 100644 --- a/htdocs/includes/mobiledetect/mobiledetectlib/Mobile_Detect.json +++ b/htdocs/includes/mobiledetect/mobiledetectlib/Mobile_Detect.json @@ -1 +1 @@ -{"version":"2.8.33","headerMatch":{"HTTP_ACCEPT":{"matches":["application\/x-obml2d","application\/vnd.rim.html","text\/vnd.wap.wml","application\/vnd.wap.xhtml+xml"]},"HTTP_X_WAP_PROFILE":null,"HTTP_X_WAP_CLIENTID":null,"HTTP_WAP_CONNECTION":null,"HTTP_PROFILE":null,"HTTP_X_OPERAMINI_PHONE_UA":null,"HTTP_X_NOKIA_GATEWAY_ID":null,"HTTP_X_ORANGE_ID":null,"HTTP_X_VODAFONE_3GPDPCONTEXT":null,"HTTP_X_HUAWEI_USERID":null,"HTTP_UA_OS":null,"HTTP_X_MOBILE_GATEWAY":null,"HTTP_X_ATT_DEVICEID":null,"HTTP_UA_CPU":{"matches":["ARM"]}},"uaHttpHeaders":["HTTP_USER_AGENT","HTTP_X_OPERAMINI_PHONE_UA","HTTP_X_DEVICE_USER_AGENT","HTTP_X_ORIGINAL_USER_AGENT","HTTP_X_SKYFIRE_PHONE","HTTP_X_BOLT_PHONE_UA","HTTP_DEVICE_STOCK_UA","HTTP_X_UCBROWSER_DEVICE_UA"],"uaMatch":{"phones":{"iPhone":"\\biPhone\\b|\\biPod\\b","BlackBerry":"BlackBerry|\\bBB10\\b|rim[0-9]+","HTC":"HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\\bEVO\\b|T-Mobile G1|Z520m|Android [0-9.]+; Pixel","Nexus":"Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6","Dell":"Dell[;]? (Streak|Aero|Venue|Venue Pro|Flash|Smoke|Mini 3iX)|XCD28|XCD35|\\b001DL\\b|\\b101DL\\b|\\bGS01\\b","Motorola":"Motorola|DROIDX|DROID BIONIC|\\bDroid\\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\\bMoto E\\b|XT1068|XT1092|XT1052","Samsung":"\\bSamsung\\b|SM-G950F|SM-G955F|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350|SM-J120F|SM-G920F|SM-G920V|SM-G930F|SM-N910C|SM-A310F|GT-I9190|SM-J500FN|SM-G903F|SM-J330F","LG":"\\bLG\\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|MS323|M257)","Sony":"SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533","Asus":"Asus.*Galaxy|PadFone.*Mobile","NokiaLumia":"Lumia [0-9]{3,4}","Micromax":"Micromax.*\\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\\b","Palm":"PalmSource|Palm","Vertu":"Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature","Pantech":"PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|P2000|P7040|P7000|C790","Fly":"IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250","Wiko":"KITE 4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX 4G|RAINBOW|BLOOM|SUNSET|GOA(?!nna)|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK PEAX|CINK PEAX 2|CINK SLIM|CINK SLIM 2|CINK +|CINK KING|CINK PEAX|CINK SLIM|SUBLIM","iMobile":"i-mobile (IQ|i-STYLE|idea|ZAA|Hitz)","SimValley":"\\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\\b","Wolfgang":"AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q","Alcatel":"Alcatel","Nintendo":"Nintendo (3DS|Switch)","Amoi":"Amoi","INQ":"INQ","GenericPhone":"Tapatalk|PDA;|SAGEM|\\bmmp\\b|pocket|\\bpsp\\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\\bwap\\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser"},"tablets":{"iPad":"iPad|iPad.*Mobile","NexusTablet":"Android.*Nexus[\\s]+(7|9|10)","GoogleTablet":"Android.*Pixel C","SamsungTablet":"SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-T116BU|SM-P550|SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561|SM-T713|SM-T719|SM-T813|SM-T819|SM-T580|SM-T355Y?|SM-T280|SM-T817A|SM-T820|SM-W700|SM-P580|SM-T587|SM-P350|SM-P555M|SM-P355M|SM-T113NU|SM-T815Y|SM-T585|SM-T285|SM-T825|SM-W708|SM-T835","Kindle":"Kindle|Silk.*Accelerated|Android.*\\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI|KFARWI|KFFOWI|KFGIWI|KFMEWI)\\b|Android.*Silk\/[0-9.]+ like Chrome\/[0-9.]+ (?!Mobile)","SurfaceTablet":"Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)","HPTablet":"HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10","AsusTablet":"^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider SL101|\\bK00F\\b|\\bK00C\\b|\\bK00E\\b|\\bK00L\\b|TX201LA|ME176C|ME102A|\\bM80TA\\b|ME372CL|ME560CG|ME372CG|ME302KL| K010 | K011 | K017 | K01E |ME572C|ME103K|ME170C|ME171C|\\bME70C\\b|ME581C|ME581CL|ME8510C|ME181C|P01Y|PO1MA|P01Z|\\bP027\\b|\\bP024\\b|\\bP00C\\b","BlackBerryTablet":"PlayBook|RIM Tablet","HTCtablet":"HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410","MotorolaTablet":"xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617","NookTablet":"Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2","AcerTablet":"Android.*; \\b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\\b|W3-810|\\bA3-A10\\b|\\bA3-A11\\b|\\bA3-A20\\b|\\bA3-A30","ToshibaTablet":"Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)|TOSHIBA.*FOLIO","LGTablet":"\\bL-06C|LG-V909|LG-V900|LG-V700|LG-V510|LG-V500|LG-V410|LG-V400|LG-VK810\\b","FujitsuTablet":"Android.*\\b(F-01D|F-02F|F-05E|F-10D|M532|Q572)\\b","PrestigioTablet":"PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD|PMP812E|PMP812E3G|PMP812F|PMP810E|PMP880TD|PMT3017|PMT3037|PMT3047|PMT3057|PMT7008|PMT5887|PMT5001|PMT5002","LenovoTablet":"Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|YT3-850M|YT3-X90L|YT3-X90F|YT3-X90X|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)|TB-X103F|TB-X304F|TB-X304L|TB-8703F|Tab2A7-10F|TB2-X30L","DellTablet":"Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7","YarvikTablet":"Android.*\\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\\b","MedionTablet":"Android.*\\bOYO\\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB","ArnovaTablet":"97G4|AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT|AN9G2","IntensoTablet":"INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004","IRUTablet":"M702pro","MegafonTablet":"MegaFon V9|\\bZTE V9\\b|Android.*\\bMT7A\\b","EbodaTablet":"E-Boda (Supreme|Impresspeed|Izzycomm|Essential)","AllViewTablet":"Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)","ArchosTablet":"\\b(101G9|80G9|A101IT)\\b|Qilive 97R|Archos5|\\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|c|)(G10| Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\\b","AinolTablet":"NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark","NokiaLumiaTablet":"Lumia 2520","SonyTablet":"Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP641|SGP612|SOT31|SGP771|SGP611|SGP612|SGP712","PhilipsTablet":"\\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\\b","CubeTablet":"Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT","CobyTablet":"MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010","MIDTablet":"M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733|MID4X10","MSITablet":"MSI \\b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\\b","SMiTTablet":"Android.*(\\bMID\\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)","RockChipTablet":"Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A","FlyTablet":"IQ310|Fly Vision","bqTablet":"Android.*(bq)?.*(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|Livingstone|Cervantes|Avant|Aquaris ([E|M]10|M8))|Maxwell.*Lite|Maxwell.*Plus","HuaweiTablet":"MediaPad|MediaPad 7 Youth|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim|M2-A01L|BAH-L09|BAH-W09","NecTablet":"\\bN-06D|\\bN-08D","PantechTablet":"Pantech.*P4100","BronchoTablet":"Broncho.*(N701|N708|N802|a710)","VersusTablet":"TOUCHPAD.*[78910]|\\bTOUCHTAB\\b","ZyncTablet":"z1000|Z99 2G|z99|z930|z999|z990|z909|Z919|z900","PositivoTablet":"TB07STA|TB10STA|TB07FTA|TB10FTA","NabiTablet":"Android.*\\bNabi","KoboTablet":"Kobo Touch|\\bK080\\b|\\bVox\\b Build|\\bArc\\b Build","DanewTablet":"DSlide.*\\b(700|701R|702|703R|704|802|970|971|972|973|974|1010|1012)\\b","TexetTablet":"NaviPad|TB-772A|TM-7045|TM-7055|TM-9750|TM-7016|TM-7024|TM-7026|TM-7041|TM-7043|TM-7047|TM-8041|TM-9741|TM-9747|TM-9748|TM-9751|TM-7022|TM-7021|TM-7020|TM-7011|TM-7010|TM-7023|TM-7025|TM-7037W|TM-7038W|TM-7027W|TM-9720|TM-9725|TM-9737W|TM-1020|TM-9738W|TM-9740|TM-9743W|TB-807A|TB-771A|TB-727A|TB-725A|TB-719A|TB-823A|TB-805A|TB-723A|TB-715A|TB-707A|TB-705A|TB-709A|TB-711A|TB-890HD|TB-880HD|TB-790HD|TB-780HD|TB-770HD|TB-721HD|TB-710HD|TB-434HD|TB-860HD|TB-840HD|TB-760HD|TB-750HD|TB-740HD|TB-730HD|TB-722HD|TB-720HD|TB-700HD|TB-500HD|TB-470HD|TB-431HD|TB-430HD|TB-506|TB-504|TB-446|TB-436|TB-416|TB-146SE|TB-126SE","PlaystationTablet":"Playstation.*(Portable|Vita)","TrekstorTablet":"ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab","PyleAudioTablet":"\\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\\b","AdvanTablet":"Android.* \\b(E3A|T3X|T5C|T5B|T3E|T3C|T3B|T1J|T1F|T2A|T1H|T1i|E1C|T1-E|T5-A|T4|E1-B|T2Ci|T1-B|T1-D|O1-A|E1-A|T1-A|T3A|T4i)\\b ","DanyTechTablet":"Genius Tab G3|Genius Tab S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II|Genius TAB GII|Genius TAB GIII|Genius Tab S1","GalapadTablet":"Android.*\\bG1\\b(?!\\))","MicromaxTablet":"Funbook|Micromax.*\\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\\b","KarbonnTablet":"Android.*\\b(A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2)\\b","AllFineTablet":"Fine7 Genius|Fine7 Shine|Fine7 Air|Fine8 Style|Fine9 More|Fine10 Joy|Fine11 Wide","PROSCANTablet":"\\b(PEM63|PLT1023G|PLT1041|PLT1044|PLT1044G|PLT1091|PLT4311|PLT4311PL|PLT4315|PLT7030|PLT7033|PLT7033D|PLT7035|PLT7035D|PLT7044K|PLT7045K|PLT7045KB|PLT7071KG|PLT7072|PLT7223G|PLT7225G|PLT7777G|PLT7810K|PLT7849G|PLT7851G|PLT7852G|PLT8015|PLT8031|PLT8034|PLT8036|PLT8080K|PLT8082|PLT8088|PLT8223G|PLT8234G|PLT8235G|PLT8816K|PLT9011|PLT9045K|PLT9233G|PLT9735|PLT9760G|PLT9770G)\\b","YONESTablet":"BQ1078|BC1003|BC1077|RK9702|BC9730|BC9001|IT9001|BC7008|BC7010|BC708|BC728|BC7012|BC7030|BC7027|BC7026","ChangJiaTablet":"TPC7102|TPC7103|TPC7105|TPC7106|TPC7107|TPC7201|TPC7203|TPC7205|TPC7210|TPC7708|TPC7709|TPC7712|TPC7110|TPC8101|TPC8103|TPC8105|TPC8106|TPC8203|TPC8205|TPC8503|TPC9106|TPC9701|TPC97101|TPC97103|TPC97105|TPC97106|TPC97111|TPC97113|TPC97203|TPC97603|TPC97809|TPC97205|TPC10101|TPC10103|TPC10106|TPC10111|TPC10203|TPC10205|TPC10503","GUTablet":"TX-A1301|TX-M9002|Q702|kf026","PointOfViewTablet":"TAB-P506|TAB-navi-7-3G-M|TAB-P517|TAB-P-527|TAB-P701|TAB-P703|TAB-P721|TAB-P731N|TAB-P741|TAB-P825|TAB-P905|TAB-P925|TAB-PR945|TAB-PL1015|TAB-P1025|TAB-PI1045|TAB-P1325|TAB-PROTAB[0-9]+|TAB-PROTAB25|TAB-PROTAB26|TAB-PROTAB27|TAB-PROTAB26XL|TAB-PROTAB2-IPS9|TAB-PROTAB30-IPS9|TAB-PROTAB25XXL|TAB-PROTAB26-IPS10|TAB-PROTAB30-IPS10","OvermaxTablet":"OV-(SteelCore|NewBase|Basecore|Baseone|Exellen|Quattor|EduTab|Solution|ACTION|BasicTab|TeddyTab|MagicTab|Stream|TB-08|TB-09)|Qualcore 1027","HCLTablet":"HCL.*Tablet|Connect-3G-2.0|Connect-2G-2.0|ME Tablet U1|ME Tablet U2|ME Tablet G1|ME Tablet X1|ME Tablet Y2|ME Tablet Sync","DPSTablet":"DPS Dream 9|DPS Dual 7","VistureTablet":"V97 HD|i75 3G|Visture V4( HD)?|Visture V5( HD)?|Visture V10","CrestaTablet":"CTP(-)?810|CTP(-)?818|CTP(-)?828|CTP(-)?838|CTP(-)?888|CTP(-)?978|CTP(-)?980|CTP(-)?987|CTP(-)?988|CTP(-)?989","MediatekTablet":"\\bMT8125|MT8389|MT8135|MT8377\\b","ConcordeTablet":"Concorde([ ]+)?Tab|ConCorde ReadMan","GoCleverTablet":"GOCLEVER TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB A741|TAB A741L|TAB M723G|TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|GCTA722|TAB I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB A93|TAB A93.2|TAB T72|TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|TAB R104|TAB R83.3|TAB A1042","ModecomTablet":"FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003","VoninoTablet":"\\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|Primus[ _]?QS|Android.*\\bQ8\\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\\b","ECSTablet":"V07OT2|TM105A|S10OT1|TR10CS1","StorexTablet":"eZee[_']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab","VodafoneTablet":"SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7|VF-1497","EssentielBTablet":"Smart[ ']?TAB[ ]+?[0-9]+|Family[ ']?TAB2","RossMoorTablet":"RM-790|RM-997|RMD-878G|RMD-974R|RMT-705A|RMT-701|RME-601|RMT-501|RMT-711","iMobileTablet":"i-mobile i-note","TolinoTablet":"tolino tab [0-9.]+|tolino shine","AudioSonicTablet":"\\bC-22Q|T7-QC|T-17B|T-17P\\b","AMPETablet":"Android.* A78 ","SkkTablet":"Android.* (SKYPAD|PHOENIX|CYCLOPS)","TecnoTablet":"TECNO P9|TECNO DP8D","JXDTablet":"Android.* \\b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|P1000|P300|S18|S6600|S9100)\\b","iJoyTablet":"Tablet (Spirit 7|Essentia|Galatea|Fusion|Onix 7|Landa|Titan|Scooby|Deox|Stella|Themis|Argon|Unique 7|Sygnus|Hexen|Finity 7|Cream|Cream X2|Jade|Neon 7|Neron 7|Kandy|Scape|Saphyr 7|Rebel|Biox|Rebel|Rebel 8GB|Myst|Draco 7|Myst|Tab7-004|Myst|Tadeo Jones|Tablet Boing|Arrow|Draco Dual Cam|Aurix|Mint|Amity|Revolution|Finity 9|Neon 9|T9w|Amity 4GB Dual Cam|Stone 4GB|Stone 8GB|Andromeda|Silken|X2|Andromeda II|Halley|Flame|Saphyr 9,7|Touch 8|Planet|Triton|Unique 10|Hexen 10|Memphis 4GB|Memphis 8GB|Onix 10)","FX2Tablet":"FX2 PAD7|FX2 PAD10","XoroTablet":"KidsPAD 701|PAD[ ]?712|PAD[ ]?714|PAD[ ]?716|PAD[ ]?717|PAD[ ]?718|PAD[ ]?720|PAD[ ]?721|PAD[ ]?722|PAD[ ]?790|PAD[ ]?792|PAD[ ]?900|PAD[ ]?9715D|PAD[ ]?9716DR|PAD[ ]?9718DR|PAD[ ]?9719QR|PAD[ ]?9720QR|TelePAD1030|Telepad1032|TelePAD730|TelePAD731|TelePAD732|TelePAD735Q|TelePAD830|TelePAD9730|TelePAD795|MegaPAD 1331|MegaPAD 1851|MegaPAD 2151","ViewsonicTablet":"ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a","VerizonTablet":"QTAQZ3|QTAIR7|QTAQTZ3|QTASUN1|QTASUN2|QTAXIA1","OdysTablet":"LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\\bXELIO\\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10","CaptivaTablet":"CAPTIVA PAD","IconbitTablet":"NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S","TeclastTablet":"T98 4G|\\bP80\\b|\\bX90HD\\b|X98 Air|X98 Air 3G|\\bX89\\b|P80 3G|\\bX80h\\b|P98 Air|\\bX89HD\\b|P98 3G|\\bP90HD\\b|P89 3G|X98 3G|\\bP70h\\b|P79HD 3G|G18d 3G|\\bP79HD\\b|\\bP89s\\b|\\bA88\\b|\\bP10HD\\b|\\bP19HD\\b|G18 3G|\\bP78HD\\b|\\bA78\\b|\\bP75\\b|G17s 3G|G17h 3G|\\bP85t\\b|\\bP90\\b|\\bP11\\b|\\bP98t\\b|\\bP98HD\\b|\\bG18d\\b|\\bP85s\\b|\\bP11HD\\b|\\bP88s\\b|\\bA80HD\\b|\\bA80se\\b|\\bA10h\\b|\\bP89\\b|\\bP78s\\b|\\bG18\\b|\\bP85\\b|\\bA70h\\b|\\bA70\\b|\\bG17\\b|\\bP18\\b|\\bA80s\\b|\\bA11s\\b|\\bP88HD\\b|\\bA80h\\b|\\bP76s\\b|\\bP76h\\b|\\bP98\\b|\\bA10HD\\b|\\bP78\\b|\\bP88\\b|\\bA11\\b|\\bA10t\\b|\\bP76a\\b|\\bP76t\\b|\\bP76e\\b|\\bP85HD\\b|\\bP85a\\b|\\bP86\\b|\\bP75HD\\b|\\bP76v\\b|\\bA12\\b|\\bP75a\\b|\\bA15\\b|\\bP76Ti\\b|\\bP81HD\\b|\\bA10\\b|\\bT760VE\\b|\\bT720HD\\b|\\bP76\\b|\\bP73\\b|\\bP71\\b|\\bP72\\b|\\bT720SE\\b|\\bC520Ti\\b|\\bT760\\b|\\bT720VE\\b|T720-3GE|T720-WiFi","OndaTablet":"\\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|Vi40)\\b[\\s]+|V10 \\b4G\\b","JaytechTablet":"TPC-PA762","BlaupunktTablet":"Endeavour 800NG|Endeavour 1010","DigmaTablet":"\\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\\b","EvolioTablet":"ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\\bEvotab\\b|\\bNeura\\b","LavaTablet":"QPAD E704|\\bIvoryS\\b|E-TAB IVORY|\\bE-TAB\\b","AocTablet":"MW0811|MW0812|MW0922|MTK8382|MW1031|MW0831|MW0821|MW0931|MW0712","MpmanTablet":"MP11 OCTA|MP10 OCTA|MPQC1114|MPQC1004|MPQC994|MPQC974|MPQC973|MPQC804|MPQC784|MPQC780|\\bMPG7\\b|MPDCG75|MPDCG71|MPDC1006|MP101DC|MPDC9000|MPDC905|MPDC706HD|MPDC706|MPDC705|MPDC110|MPDC100|MPDC99|MPDC97|MPDC88|MPDC8|MPDC77|MP709|MID701|MID711|MID170|MPDC703|MPQC1010","CelkonTablet":"CT695|CT888|CT[\\s]?910|CT7 Tab|CT9 Tab|CT3 Tab|CT2 Tab|CT1 Tab|C820|C720|\\bCT-1\\b","WolderTablet":"miTab \\b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN 101|MasterChef)\\b","MediacomTablet":"M-MPI10C3G|M-SP10EG|M-SP10EGP|M-SP10HXAH|M-SP7HXAH|M-SP10HXBH|M-SP8HXAH|M-SP8MXA","MiTablet":"\\bMI PAD\\b|\\bHM NOTE 1W\\b","NibiruTablet":"Nibiru M1|Nibiru Jupiter One","NexoTablet":"NEXO NOVA|NEXO 10|NEXO AVIO|NEXO FREE|NEXO GO|NEXO EVO|NEXO 3G|NEXO SMART|NEXO KIDDO|NEXO MOBI","LeaderTablet":"TBLT10Q|TBLT10I|TBL-10WDKB|TBL-10WDKBO2013|TBL-W230V2|TBL-W450|TBL-W500|SV572|TBLT7I|TBA-AC7-8G|TBLT79|TBL-8W16|TBL-10W32|TBL-10WKB|TBL-W100","UbislateTablet":"UbiSlate[\\s]?7C","PocketBookTablet":"Pocketbook","KocasoTablet":"\\b(TB-1207)\\b","HisenseTablet":"\\b(F5281|E2371)\\b","Hudl":"Hudl HT7S3|Hudl 2","TelstraTablet":"T-Hub2","GenericTablet":"Android.*\\b97D\\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\\bA7EB\\b|CatNova8|A1_07|CT704|CT1002|\\bM721\\b|rk30sdk|\\bEVOTAB\\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|Tablet-PC-4|Tagi Tab|\\bM6pro\\b|CT1020W|arc 10HD|\\bTP750\\b|\\bQTAQZ3\\b|WVT101|TM1088|KT107"},"browsers":{"Chrome":"\\bCrMo\\b|CriOS|Android.*Chrome\/[.0-9]* (Mobile)?","Dolfin":"\\bDolfin\\b","Opera":"Opera.*Mini|Opera.*Mobi|Android.*Opera|Mobile.*OPR\/[0-9.]+$|Coast\/[0-9.]+","Skyfire":"Skyfire","Edge":"Mobile Safari\/[.0-9]* Edge","IE":"IEMobile|MSIEMobile","Firefox":"fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile|FxiOS","Bolt":"bolt","TeaShark":"teashark","Blazer":"Blazer","Safari":"Version.*Mobile.*Safari|Safari.*Mobile|MobileSafari","WeChat":"\\bMicroMessenger\\b","UCBrowser":"UC.*Browser|UCWEB","baiduboxapp":"baiduboxapp","baidubrowser":"baidubrowser","DiigoBrowser":"DiigoBrowser","Puffin":"Puffin","Mercury":"\\bMercury\\b","ObigoBrowser":"Obigo","NetFront":"NF-Browser","GenericBrowser":"NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger","PaleMoon":"Android.*PaleMoon|Mobile.*PaleMoon"},"os":{"AndroidOS":"Android","BlackBerryOS":"blackberry|\\bBB10\\b|rim tablet os","PalmOS":"PalmOS|avantgo|blazer|elaine|hiptop|palm|plucker|xiino","SymbianOS":"Symbian|SymbOS|Series60|Series40|SYB-[0-9]+|\\bS60\\b","WindowsMobileOS":"Windows CE.*(PPC|Smartphone|Mobile|[0-9]{3}x[0-9]{3})|Window Mobile|Windows Phone [0-9.]+|WCE;","WindowsPhoneOS":"Windows Phone 10.0|Windows Phone 8.1|Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7|Windows NT 6.[23]; ARM;","iOS":"\\biPhone.*Mobile|\\biPod|\\biPad|AppleCoreMedia","MeeGoOS":"MeeGo","MaemoOS":"Maemo","JavaOS":"J2ME\/|\\bMIDP\\b|\\bCLDC\\b","webOS":"webOS|hpwOS","badaOS":"\\bBada\\b","BREWOS":"BREW"},"utilities":{"Bot":"Googlebot|facebookexternalhit|AdsBot-Google|Google Keyword Suggestion|Facebot|YandexBot|YandexMobileBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|Exabot|MJ12bot|YandexImages|TurnitinBot|Pingdom","MobileBot":"Googlebot-Mobile|AdsBot-Google-Mobile|YahooSeeker\/M1A1-R2D2","DesktopMode":"WPDesktop","TV":"SonyDTV|HbbTV","WebKit":"(webkit)[ \/]([\\w.]+)","Console":"\\b(Nintendo|Nintendo WiiU|Nintendo 3DS|Nintendo Switch|PLAYSTATION|Xbox)\\b","Watch":"SM-V700"}}} \ No newline at end of file +{"version":"2.8.34","headerMatch":{"HTTP_ACCEPT":{"matches":["application\/x-obml2d","application\/vnd.rim.html","text\/vnd.wap.wml","application\/vnd.wap.xhtml+xml"]},"HTTP_X_WAP_PROFILE":null,"HTTP_X_WAP_CLIENTID":null,"HTTP_WAP_CONNECTION":null,"HTTP_PROFILE":null,"HTTP_X_OPERAMINI_PHONE_UA":null,"HTTP_X_NOKIA_GATEWAY_ID":null,"HTTP_X_ORANGE_ID":null,"HTTP_X_VODAFONE_3GPDPCONTEXT":null,"HTTP_X_HUAWEI_USERID":null,"HTTP_UA_OS":null,"HTTP_X_MOBILE_GATEWAY":null,"HTTP_X_ATT_DEVICEID":null,"HTTP_UA_CPU":{"matches":["ARM"]}},"uaHttpHeaders":["HTTP_USER_AGENT","HTTP_X_OPERAMINI_PHONE_UA","HTTP_X_DEVICE_USER_AGENT","HTTP_X_ORIGINAL_USER_AGENT","HTTP_X_SKYFIRE_PHONE","HTTP_X_BOLT_PHONE_UA","HTTP_DEVICE_STOCK_UA","HTTP_X_UCBROWSER_DEVICE_UA"],"uaMatch":{"phones":{"iPhone":"\\biPhone\\b|\\biPod\\b","BlackBerry":"BlackBerry|\\bBB10\\b|rim[0-9]+|\\b(BBA100|BBB100|BBD100|BBE100|BBF100|STH100)\\b-[0-9]+","HTC":"HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\\bEVO\\b|T-Mobile G1|Z520m|Android [0-9.]+; Pixel","Nexus":"Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6","Dell":"Dell[;]? (Streak|Aero|Venue|Venue Pro|Flash|Smoke|Mini 3iX)|XCD28|XCD35|\\b001DL\\b|\\b101DL\\b|\\bGS01\\b","Motorola":"Motorola|DROIDX|DROID BIONIC|\\bDroid\\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\\bMoto E\\b|XT1068|XT1092|XT1052","Samsung":"\\bSamsung\\b|SM-G950F|SM-G955F|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350|SM-J120F|SM-G920F|SM-G920V|SM-G930F|SM-N910C|SM-A310F|GT-I9190|SM-J500FN|SM-G903F|SM-J330F","LG":"\\bLG\\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|MS323|M257)|LM-G710","Sony":"SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533","Asus":"Asus.*Galaxy|PadFone.*Mobile","NokiaLumia":"Lumia [0-9]{3,4}","Micromax":"Micromax.*\\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\\b","Palm":"PalmSource|Palm","Vertu":"Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature","Pantech":"PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|P2000|P7040|P7000|C790","Fly":"IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250","Wiko":"KITE 4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX 4G|RAINBOW|BLOOM|SUNSET|GOA(?!nna)|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK PEAX|CINK PEAX 2|CINK SLIM|CINK SLIM 2|CINK +|CINK KING|CINK PEAX|CINK SLIM|SUBLIM","iMobile":"i-mobile (IQ|i-STYLE|idea|ZAA|Hitz)","SimValley":"\\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\\b","Wolfgang":"AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q","Alcatel":"Alcatel","Nintendo":"Nintendo (3DS|Switch)","Amoi":"Amoi","INQ":"INQ","OnePlus":"ONEPLUS","GenericPhone":"Tapatalk|PDA;|SAGEM|\\bmmp\\b|pocket|\\bpsp\\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\\bwap\\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser"},"tablets":{"iPad":"iPad|iPad.*Mobile","NexusTablet":"Android.*Nexus[\\s]+(7|9|10)","GoogleTablet":"Android.*Pixel C","SamsungTablet":"SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-T116BU|SM-P550|SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561|SM-T713|SM-T719|SM-T813|SM-T819|SM-T580|SM-T355Y?|SM-T280|SM-T817A|SM-T820|SM-W700|SM-P580|SM-T587|SM-P350|SM-P555M|SM-P355M|SM-T113NU|SM-T815Y|SM-T585|SM-T285|SM-T825|SM-W708|SM-T835|SM-T830|SM-T837V|SM-T720|SM-T510|SM-T387V","Kindle":"Kindle|Silk.*Accelerated|Android.*\\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI|KFARWI|KFFOWI|KFGIWI|KFMEWI)\\b|Android.*Silk\/[0-9.]+ like Chrome\/[0-9.]+ (?!Mobile)","SurfaceTablet":"Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)","HPTablet":"HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10","AsusTablet":"^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider SL101|\\bK00F\\b|\\bK00C\\b|\\bK00E\\b|\\bK00L\\b|TX201LA|ME176C|ME102A|\\bM80TA\\b|ME372CL|ME560CG|ME372CG|ME302KL| K010 | K011 | K017 | K01E |ME572C|ME103K|ME170C|ME171C|\\bME70C\\b|ME581C|ME581CL|ME8510C|ME181C|P01Y|PO1MA|P01Z|\\bP027\\b|\\bP024\\b|\\bP00C\\b","BlackBerryTablet":"PlayBook|RIM Tablet","HTCtablet":"HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410","MotorolaTablet":"xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617","NookTablet":"Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2","AcerTablet":"Android.*; \\b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\\b|W3-810|\\bA3-A10\\b|\\bA3-A11\\b|\\bA3-A20\\b|\\bA3-A30","ToshibaTablet":"Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)|TOSHIBA.*FOLIO","LGTablet":"\\bL-06C|LG-V909|LG-V900|LG-V700|LG-V510|LG-V500|LG-V410|LG-V400|LG-VK810\\b","FujitsuTablet":"Android.*\\b(F-01D|F-02F|F-05E|F-10D|M532|Q572)\\b","PrestigioTablet":"PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD|PMP812E|PMP812E3G|PMP812F|PMP810E|PMP880TD|PMT3017|PMT3037|PMT3047|PMT3057|PMT7008|PMT5887|PMT5001|PMT5002","LenovoTablet":"Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|YT3-850M|YT3-X90L|YT3-X90F|YT3-X90X|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)|TB-X103F|TB-X304X|TB-X304F|TB-X304L|TB-X505F|TB-X505L|TB-X505X|TB-X605F|TB-X605L|TB-8703F|TB-8703X|TB-8703N|TB-8704N|TB-8704F|TB-8704X|TB-8704V|TB-7304F|TB-7304I|TB-7304X|Tab2A7-10F|Tab2A7-20F|TB2-X30L|YT3-X50L|YT3-X50F|YT3-X50M|YT-X705F|YT-X703F|YT-X703L|YT-X705L|YT-X705X|TB2-X30F|TB2-X30L|TB2-X30M|A2107A-F|A2107A-H|TB3-730F|TB3-730M|TB3-730X|TB-7504F|TB-7504X","DellTablet":"Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7","YarvikTablet":"Android.*\\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\\b","MedionTablet":"Android.*\\bOYO\\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB","ArnovaTablet":"97G4|AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT|AN9G2","IntensoTablet":"INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004","IRUTablet":"M702pro","MegafonTablet":"MegaFon V9|\\bZTE V9\\b|Android.*\\bMT7A\\b","EbodaTablet":"E-Boda (Supreme|Impresspeed|Izzycomm|Essential)","AllViewTablet":"Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)","ArchosTablet":"\\b(101G9|80G9|A101IT)\\b|Qilive 97R|Archos5|\\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|c|)(G10| Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\\b","AinolTablet":"NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark","NokiaLumiaTablet":"Lumia 2520","SonyTablet":"Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP641|SGP612|SOT31|SGP771|SGP611|SGP612|SGP712","PhilipsTablet":"\\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\\b","CubeTablet":"Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT","CobyTablet":"MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010","MIDTablet":"M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733|MID4X10","MSITablet":"MSI \\b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\\b","SMiTTablet":"Android.*(\\bMID\\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)","RockChipTablet":"Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A","FlyTablet":"IQ310|Fly Vision","bqTablet":"Android.*(bq)?.*\\b(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|Livingstone|Cervantes|Avant|Aquaris ([E|M]10|M8))\\b|Maxwell.*Lite|Maxwell.*Plus","HuaweiTablet":"MediaPad|MediaPad 7 Youth|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim|M2-A01L|BAH-L09|BAH-W09|AGS-L09|CMR-AL19","NecTablet":"\\bN-06D|\\bN-08D","PantechTablet":"Pantech.*P4100","BronchoTablet":"Broncho.*(N701|N708|N802|a710)","VersusTablet":"TOUCHPAD.*[78910]|\\bTOUCHTAB\\b","ZyncTablet":"z1000|Z99 2G|z930|z990|z909|Z919|z900","PositivoTablet":"TB07STA|TB10STA|TB07FTA|TB10FTA","NabiTablet":"Android.*\\bNabi","KoboTablet":"Kobo Touch|\\bK080\\b|\\bVox\\b Build|\\bArc\\b Build","DanewTablet":"DSlide.*\\b(700|701R|702|703R|704|802|970|971|972|973|974|1010|1012)\\b","TexetTablet":"NaviPad|TB-772A|TM-7045|TM-7055|TM-9750|TM-7016|TM-7024|TM-7026|TM-7041|TM-7043|TM-7047|TM-8041|TM-9741|TM-9747|TM-9748|TM-9751|TM-7022|TM-7021|TM-7020|TM-7011|TM-7010|TM-7023|TM-7025|TM-7037W|TM-7038W|TM-7027W|TM-9720|TM-9725|TM-9737W|TM-1020|TM-9738W|TM-9740|TM-9743W|TB-807A|TB-771A|TB-727A|TB-725A|TB-719A|TB-823A|TB-805A|TB-723A|TB-715A|TB-707A|TB-705A|TB-709A|TB-711A|TB-890HD|TB-880HD|TB-790HD|TB-780HD|TB-770HD|TB-721HD|TB-710HD|TB-434HD|TB-860HD|TB-840HD|TB-760HD|TB-750HD|TB-740HD|TB-730HD|TB-722HD|TB-720HD|TB-700HD|TB-500HD|TB-470HD|TB-431HD|TB-430HD|TB-506|TB-504|TB-446|TB-436|TB-416|TB-146SE|TB-126SE","PlaystationTablet":"Playstation.*(Portable|Vita)","TrekstorTablet":"ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab","PyleAudioTablet":"\\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\\b","AdvanTablet":"Android.* \\b(E3A|T3X|T5C|T5B|T3E|T3C|T3B|T1J|T1F|T2A|T1H|T1i|E1C|T1-E|T5-A|T4|E1-B|T2Ci|T1-B|T1-D|O1-A|E1-A|T1-A|T3A|T4i)\\b ","DanyTechTablet":"Genius Tab G3|Genius Tab S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II|Genius TAB GII|Genius TAB GIII|Genius Tab S1","GalapadTablet":"Android.*\\bG1\\b(?!\\))","MicromaxTablet":"Funbook|Micromax.*\\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\\b","KarbonnTablet":"Android.*\\b(A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2)\\b","AllFineTablet":"Fine7 Genius|Fine7 Shine|Fine7 Air|Fine8 Style|Fine9 More|Fine10 Joy|Fine11 Wide","PROSCANTablet":"\\b(PEM63|PLT1023G|PLT1041|PLT1044|PLT1044G|PLT1091|PLT4311|PLT4311PL|PLT4315|PLT7030|PLT7033|PLT7033D|PLT7035|PLT7035D|PLT7044K|PLT7045K|PLT7045KB|PLT7071KG|PLT7072|PLT7223G|PLT7225G|PLT7777G|PLT7810K|PLT7849G|PLT7851G|PLT7852G|PLT8015|PLT8031|PLT8034|PLT8036|PLT8080K|PLT8082|PLT8088|PLT8223G|PLT8234G|PLT8235G|PLT8816K|PLT9011|PLT9045K|PLT9233G|PLT9735|PLT9760G|PLT9770G)\\b","YONESTablet":"BQ1078|BC1003|BC1077|RK9702|BC9730|BC9001|IT9001|BC7008|BC7010|BC708|BC728|BC7012|BC7030|BC7027|BC7026","ChangJiaTablet":"TPC7102|TPC7103|TPC7105|TPC7106|TPC7107|TPC7201|TPC7203|TPC7205|TPC7210|TPC7708|TPC7709|TPC7712|TPC7110|TPC8101|TPC8103|TPC8105|TPC8106|TPC8203|TPC8205|TPC8503|TPC9106|TPC9701|TPC97101|TPC97103|TPC97105|TPC97106|TPC97111|TPC97113|TPC97203|TPC97603|TPC97809|TPC97205|TPC10101|TPC10103|TPC10106|TPC10111|TPC10203|TPC10205|TPC10503","GUTablet":"TX-A1301|TX-M9002|Q702|kf026","PointOfViewTablet":"TAB-P506|TAB-navi-7-3G-M|TAB-P517|TAB-P-527|TAB-P701|TAB-P703|TAB-P721|TAB-P731N|TAB-P741|TAB-P825|TAB-P905|TAB-P925|TAB-PR945|TAB-PL1015|TAB-P1025|TAB-PI1045|TAB-P1325|TAB-PROTAB[0-9]+|TAB-PROTAB25|TAB-PROTAB26|TAB-PROTAB27|TAB-PROTAB26XL|TAB-PROTAB2-IPS9|TAB-PROTAB30-IPS9|TAB-PROTAB25XXL|TAB-PROTAB26-IPS10|TAB-PROTAB30-IPS10","OvermaxTablet":"OV-(SteelCore|NewBase|Basecore|Baseone|Exellen|Quattor|EduTab|Solution|ACTION|BasicTab|TeddyTab|MagicTab|Stream|TB-08|TB-09)|Qualcore 1027","HCLTablet":"HCL.*Tablet|Connect-3G-2.0|Connect-2G-2.0|ME Tablet U1|ME Tablet U2|ME Tablet G1|ME Tablet X1|ME Tablet Y2|ME Tablet Sync","DPSTablet":"DPS Dream 9|DPS Dual 7","VistureTablet":"V97 HD|i75 3G|Visture V4( HD)?|Visture V5( HD)?|Visture V10","CrestaTablet":"CTP(-)?810|CTP(-)?818|CTP(-)?828|CTP(-)?838|CTP(-)?888|CTP(-)?978|CTP(-)?980|CTP(-)?987|CTP(-)?988|CTP(-)?989","MediatekTablet":"\\bMT8125|MT8389|MT8135|MT8377\\b","ConcordeTablet":"Concorde([ ]+)?Tab|ConCorde ReadMan","GoCleverTablet":"GOCLEVER TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB A741|TAB A741L|TAB M723G|TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|GCTA722|TAB I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB A93|TAB A93.2|TAB T72|TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|TAB R104|TAB R83.3|TAB A1042","ModecomTablet":"FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003","VoninoTablet":"\\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|Primus[ _]?QS|Android.*\\bQ8\\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\\b","ECSTablet":"V07OT2|TM105A|S10OT1|TR10CS1","StorexTablet":"eZee[_']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab","VodafoneTablet":"SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7|VF-1497|VFD 1400","EssentielBTablet":"Smart[ ']?TAB[ ]+?[0-9]+|Family[ ']?TAB2","RossMoorTablet":"RM-790|RM-997|RMD-878G|RMD-974R|RMT-705A|RMT-701|RME-601|RMT-501|RMT-711","iMobileTablet":"i-mobile i-note","TolinoTablet":"tolino tab [0-9.]+|tolino shine","AudioSonicTablet":"\\bC-22Q|T7-QC|T-17B|T-17P\\b","AMPETablet":"Android.* A78 ","SkkTablet":"Android.* (SKYPAD|PHOENIX|CYCLOPS)","TecnoTablet":"TECNO P9|TECNO DP8D","JXDTablet":"Android.* \\b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|P1000|P300|S18|S6600|S9100)\\b","iJoyTablet":"Tablet (Spirit 7|Essentia|Galatea|Fusion|Onix 7|Landa|Titan|Scooby|Deox|Stella|Themis|Argon|Unique 7|Sygnus|Hexen|Finity 7|Cream|Cream X2|Jade|Neon 7|Neron 7|Kandy|Scape|Saphyr 7|Rebel|Biox|Rebel|Rebel 8GB|Myst|Draco 7|Myst|Tab7-004|Myst|Tadeo Jones|Tablet Boing|Arrow|Draco Dual Cam|Aurix|Mint|Amity|Revolution|Finity 9|Neon 9|T9w|Amity 4GB Dual Cam|Stone 4GB|Stone 8GB|Andromeda|Silken|X2|Andromeda II|Halley|Flame|Saphyr 9,7|Touch 8|Planet|Triton|Unique 10|Hexen 10|Memphis 4GB|Memphis 8GB|Onix 10)","FX2Tablet":"FX2 PAD7|FX2 PAD10","XoroTablet":"KidsPAD 701|PAD[ ]?712|PAD[ ]?714|PAD[ ]?716|PAD[ ]?717|PAD[ ]?718|PAD[ ]?720|PAD[ ]?721|PAD[ ]?722|PAD[ ]?790|PAD[ ]?792|PAD[ ]?900|PAD[ ]?9715D|PAD[ ]?9716DR|PAD[ ]?9718DR|PAD[ ]?9719QR|PAD[ ]?9720QR|TelePAD1030|Telepad1032|TelePAD730|TelePAD731|TelePAD732|TelePAD735Q|TelePAD830|TelePAD9730|TelePAD795|MegaPAD 1331|MegaPAD 1851|MegaPAD 2151","ViewsonicTablet":"ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a","VerizonTablet":"QTAQZ3|QTAIR7|QTAQTZ3|QTASUN1|QTASUN2|QTAXIA1","OdysTablet":"LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\\bXELIO\\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10","CaptivaTablet":"CAPTIVA PAD","IconbitTablet":"NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S","TeclastTablet":"T98 4G|\\bP80\\b|\\bX90HD\\b|X98 Air|X98 Air 3G|\\bX89\\b|P80 3G|\\bX80h\\b|P98 Air|\\bX89HD\\b|P98 3G|\\bP90HD\\b|P89 3G|X98 3G|\\bP70h\\b|P79HD 3G|G18d 3G|\\bP79HD\\b|\\bP89s\\b|\\bA88\\b|\\bP10HD\\b|\\bP19HD\\b|G18 3G|\\bP78HD\\b|\\bA78\\b|\\bP75\\b|G17s 3G|G17h 3G|\\bP85t\\b|\\bP90\\b|\\bP11\\b|\\bP98t\\b|\\bP98HD\\b|\\bG18d\\b|\\bP85s\\b|\\bP11HD\\b|\\bP88s\\b|\\bA80HD\\b|\\bA80se\\b|\\bA10h\\b|\\bP89\\b|\\bP78s\\b|\\bG18\\b|\\bP85\\b|\\bA70h\\b|\\bA70\\b|\\bG17\\b|\\bP18\\b|\\bA80s\\b|\\bA11s\\b|\\bP88HD\\b|\\bA80h\\b|\\bP76s\\b|\\bP76h\\b|\\bP98\\b|\\bA10HD\\b|\\bP78\\b|\\bP88\\b|\\bA11\\b|\\bA10t\\b|\\bP76a\\b|\\bP76t\\b|\\bP76e\\b|\\bP85HD\\b|\\bP85a\\b|\\bP86\\b|\\bP75HD\\b|\\bP76v\\b|\\bA12\\b|\\bP75a\\b|\\bA15\\b|\\bP76Ti\\b|\\bP81HD\\b|\\bA10\\b|\\bT760VE\\b|\\bT720HD\\b|\\bP76\\b|\\bP73\\b|\\bP71\\b|\\bP72\\b|\\bT720SE\\b|\\bC520Ti\\b|\\bT760\\b|\\bT720VE\\b|T720-3GE|T720-WiFi","OndaTablet":"\\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|Vi40)\\b[\\s]+|V10 \\b4G\\b","JaytechTablet":"TPC-PA762","BlaupunktTablet":"Endeavour 800NG|Endeavour 1010","DigmaTablet":"\\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\\b","EvolioTablet":"ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\\bEvotab\\b|\\bNeura\\b","LavaTablet":"QPAD E704|\\bIvoryS\\b|E-TAB IVORY|\\bE-TAB\\b","AocTablet":"MW0811|MW0812|MW0922|MTK8382|MW1031|MW0831|MW0821|MW0931|MW0712","MpmanTablet":"MP11 OCTA|MP10 OCTA|MPQC1114|MPQC1004|MPQC994|MPQC974|MPQC973|MPQC804|MPQC784|MPQC780|\\bMPG7\\b|MPDCG75|MPDCG71|MPDC1006|MP101DC|MPDC9000|MPDC905|MPDC706HD|MPDC706|MPDC705|MPDC110|MPDC100|MPDC99|MPDC97|MPDC88|MPDC8|MPDC77|MP709|MID701|MID711|MID170|MPDC703|MPQC1010","CelkonTablet":"CT695|CT888|CT[\\s]?910|CT7 Tab|CT9 Tab|CT3 Tab|CT2 Tab|CT1 Tab|C820|C720|\\bCT-1\\b","WolderTablet":"miTab \\b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN 101|MasterChef)\\b","MediacomTablet":"M-MPI10C3G|M-SP10EG|M-SP10EGP|M-SP10HXAH|M-SP7HXAH|M-SP10HXBH|M-SP8HXAH|M-SP8MXA","MiTablet":"\\bMI PAD\\b|\\bHM NOTE 1W\\b","NibiruTablet":"Nibiru M1|Nibiru Jupiter One","NexoTablet":"NEXO NOVA|NEXO 10|NEXO AVIO|NEXO FREE|NEXO GO|NEXO EVO|NEXO 3G|NEXO SMART|NEXO KIDDO|NEXO MOBI","LeaderTablet":"TBLT10Q|TBLT10I|TBL-10WDKB|TBL-10WDKBO2013|TBL-W230V2|TBL-W450|TBL-W500|SV572|TBLT7I|TBA-AC7-8G|TBLT79|TBL-8W16|TBL-10W32|TBL-10WKB|TBL-W100","UbislateTablet":"UbiSlate[\\s]?7C","PocketBookTablet":"Pocketbook","KocasoTablet":"\\b(TB-1207)\\b","HisenseTablet":"\\b(F5281|E2371)\\b","Hudl":"Hudl HT7S3|Hudl 2","TelstraTablet":"T-Hub2","GenericTablet":"Android.*\\b97D\\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\\bA7EB\\b|CatNova8|A1_07|CT704|CT1002|\\bM721\\b|rk30sdk|\\bEVOTAB\\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|Tablet-PC-4|Tagi Tab|\\bM6pro\\b|CT1020W|arc 10HD|\\bTP750\\b|\\bQTAQZ3\\b|WVT101|TM1088|KT107"},"browsers":{"Chrome":"\\bCrMo\\b|CriOS|Android.*Chrome\/[.0-9]* (Mobile)?","Dolfin":"\\bDolfin\\b","Opera":"Opera.*Mini|Opera.*Mobi|Android.*Opera|Mobile.*OPR\/[0-9.]+$|Coast\/[0-9.]+","Skyfire":"Skyfire","Edge":"Mobile Safari\/[.0-9]* Edge","IE":"IEMobile|MSIEMobile","Firefox":"fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile|FxiOS","Bolt":"bolt","TeaShark":"teashark","Blazer":"Blazer","Safari":"Version.*Mobile.*Safari|Safari.*Mobile|MobileSafari","WeChat":"\\bMicroMessenger\\b","UCBrowser":"UC.*Browser|UCWEB","baiduboxapp":"baiduboxapp","baidubrowser":"baidubrowser","DiigoBrowser":"DiigoBrowser","Mercury":"\\bMercury\\b","ObigoBrowser":"Obigo","NetFront":"NF-Browser","GenericBrowser":"NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger","PaleMoon":"Android.*PaleMoon|Mobile.*PaleMoon"},"os":{"AndroidOS":"Android","BlackBerryOS":"blackberry|\\bBB10\\b|rim tablet os","PalmOS":"PalmOS|avantgo|blazer|elaine|hiptop|palm|plucker|xiino","SymbianOS":"Symbian|SymbOS|Series60|Series40|SYB-[0-9]+|\\bS60\\b","WindowsMobileOS":"Windows CE.*(PPC|Smartphone|Mobile|[0-9]{3}x[0-9]{3})|Windows Mobile|Windows Phone [0-9.]+|WCE;","WindowsPhoneOS":"Windows Phone 10.0|Windows Phone 8.1|Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7|Windows NT 6.[23]; ARM;","iOS":"\\biPhone.*Mobile|\\biPod|\\biPad|AppleCoreMedia","iPadOS":"CPU OS 13","MeeGoOS":"MeeGo","MaemoOS":"Maemo","JavaOS":"J2ME\/|\\bMIDP\\b|\\bCLDC\\b","webOS":"webOS|hpwOS","badaOS":"\\bBada\\b","BREWOS":"BREW"},"utilities":{"Bot":"Googlebot|facebookexternalhit|Google-AMPHTML|s~amp-validator|AdsBot-Google|Google Keyword Suggestion|Facebot|YandexBot|YandexMobileBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|Exabot|MJ12bot|YandexImages|TurnitinBot|Pingdom|contentkingapp","MobileBot":"Googlebot-Mobile|AdsBot-Google-Mobile|YahooSeeker\/M1A1-R2D2","DesktopMode":"WPDesktop","TV":"SonyDTV|HbbTV","WebKit":"(webkit)[ \/]([\\w.]+)","Console":"\\b(Nintendo|Nintendo WiiU|Nintendo 3DS|Nintendo Switch|PLAYSTATION|Xbox)\\b","Watch":"SM-V700"}}} \ No newline at end of file diff --git a/htdocs/includes/mobiledetect/mobiledetectlib/Mobile_Detect.php b/htdocs/includes/mobiledetect/mobiledetectlib/Mobile_Detect.php index c65b3812f56..b105eb71771 100644 --- a/htdocs/includes/mobiledetect/mobiledetectlib/Mobile_Detect.php +++ b/htdocs/includes/mobiledetect/mobiledetectlib/Mobile_Detect.php @@ -18,7 +18,7 @@ * @author Nick Ilyin * Original author: Victor Stanciu * - * @version 2.8.33 + * @version 2.8.34 */ class Mobile_Detect { @@ -61,7 +61,7 @@ class Mobile_Detect /** * Stores the version number of the current release. */ - const VERSION = '2.8.33'; + const VERSION = '2.8.34'; /** * A type for the version() method indicating a string return value. @@ -164,14 +164,14 @@ class Mobile_Detect */ protected static $phoneDevices = array( 'iPhone' => '\biPhone\b|\biPod\b', // |\biTunes - 'BlackBerry' => 'BlackBerry|\bBB10\b|rim[0-9]+', + 'BlackBerry' => 'BlackBerry|\bBB10\b|rim[0-9]+|\b(BBA100|BBB100|BBD100|BBE100|BBF100|STH100)\b-[0-9]+', 'HTC' => 'HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\bEVO\b|T-Mobile G1|Z520m|Android [0-9.]+; Pixel', 'Nexus' => 'Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6', // @todo: Is 'Dell Streak' a tablet or a phone? ;) 'Dell' => 'Dell[;]? (Streak|Aero|Venue|Venue Pro|Flash|Smoke|Mini 3iX)|XCD28|XCD35|\b001DL\b|\b101DL\b|\bGS01\b', 'Motorola' => 'Motorola|DROIDX|DROID BIONIC|\bDroid\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\bMoto E\b|XT1068|XT1092|XT1052', 'Samsung' => '\bSamsung\b|SM-G950F|SM-G955F|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350|SM-J120F|SM-G920F|SM-G920V|SM-G930F|SM-N910C|SM-A310F|GT-I9190|SM-J500FN|SM-G903F|SM-J330F', - 'LG' => '\bLG\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|MS323|M257)', + 'LG' => '\bLG\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|MS323|M257)|LM-G710', 'Sony' => 'SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533', 'Asus' => 'Asus.*Galaxy|PadFone.*Mobile', 'NokiaLumia' => 'Lumia [0-9]{3,4}', @@ -201,6 +201,7 @@ class Mobile_Detect 'Amoi' => 'Amoi', // http://en.wikipedia.org/wiki/INQ 'INQ' => 'INQ', + 'OnePlus' => 'ONEPLUS', // @Tapatalk is a mobile app; http://support.tapatalk.com/threads/smf-2-0-2-os-and-browser-detection-plugin-and-tapatalk.15565/#post-79039 'GenericPhone' => 'Tapatalk|PDA;|SAGEM|\bmmp\b|pocket|\bpsp\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\bwap\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser', ); @@ -219,7 +220,7 @@ class Mobile_Detect 'NexusTablet' => 'Android.*Nexus[\s]+(7|9|10)', // https://en.wikipedia.org/wiki/Pixel_C 'GoogleTablet' => 'Android.*Pixel C', - 'SamsungTablet' => 'SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-T116BU|SM-P550|SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561|SM-T713|SM-T719|SM-T813|SM-T819|SM-T580|SM-T355Y?|SM-T280|SM-T817A|SM-T820|SM-W700|SM-P580|SM-T587|SM-P350|SM-P555M|SM-P355M|SM-T113NU|SM-T815Y|SM-T585|SM-T285|SM-T825|SM-W708|SM-T835', // SCH-P709|SCH-P729|SM-T2558|GT-I9205 - Samsung Mega - treat them like a regular phone. + 'SamsungTablet' => 'SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-T116BU|SM-P550|SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561|SM-T713|SM-T719|SM-T813|SM-T819|SM-T580|SM-T355Y?|SM-T280|SM-T817A|SM-T820|SM-W700|SM-P580|SM-T587|SM-P350|SM-P555M|SM-P355M|SM-T113NU|SM-T815Y|SM-T585|SM-T285|SM-T825|SM-W708|SM-T835|SM-T830|SM-T837V|SM-T720|SM-T510|SM-T387V', // SCH-P709|SCH-P729|SM-T2558|GT-I9205 - Samsung Mega - treat them like a regular phone. // http://docs.aws.amazon.com/silk/latest/developerguide/user-agent.html 'Kindle' => 'Kindle|Silk.*Accelerated|Android.*\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI|KFARWI|KFFOWI|KFGIWI|KFMEWI)\b|Android.*Silk/[0-9.]+ like Chrome/[0-9.]+ (?!Mobile)', // Only the Surface tablets with Windows RT are considered mobile. @@ -251,7 +252,7 @@ class Mobile_Detect // Prestigio Tablets http://www.prestigio.com/support 'PrestigioTablet' => 'PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD|PMP812E|PMP812E3G|PMP812F|PMP810E|PMP880TD|PMT3017|PMT3037|PMT3047|PMT3057|PMT7008|PMT5887|PMT5001|PMT5002', // http://support.lenovo.com/en_GB/downloads/default.page?# - 'LenovoTablet' => 'Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|YT3-850M|YT3-X90L|YT3-X90F|YT3-X90X|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)|TB-X103F|TB-X304F|TB-X304L|TB-8703F|Tab2A7-10F|TB2-X30L', + 'LenovoTablet' => 'Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|YT3-850M|YT3-X90L|YT3-X90F|YT3-X90X|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)|TB-X103F|TB-X304X|TB-X304F|TB-X304L|TB-X505F|TB-X505L|TB-X505X|TB-X605F|TB-X605L|TB-8703F|TB-8703X|TB-8703N|TB-8704N|TB-8704F|TB-8704X|TB-8704V|TB-7304F|TB-7304I|TB-7304X|Tab2A7-10F|Tab2A7-20F|TB2-X30L|YT3-X50L|YT3-X50F|YT3-X50M|YT-X705F|YT-X703F|YT-X703L|YT-X705L|YT-X705X|TB2-X30F|TB2-X30L|TB2-X30M|A2107A-F|A2107A-H|TB3-730F|TB3-730M|TB3-730X|TB-7504F|TB-7504X', // http://www.dell.com/support/home/us/en/04/Products/tab_mob/tablets 'DellTablet' => 'Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7', // http://www.yarvik.com/en/matrix/tablets/ @@ -301,10 +302,10 @@ class Mobile_Detect // http://www.fly-phone.com/devices/tablets/ ; http://www.fly-phone.com/service/ 'FlyTablet' => 'IQ310|Fly Vision', // http://www.bqreaders.com/gb/tablets-prices-sale.html - 'bqTablet' => 'Android.*(bq)?.*(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|Livingstone|Cervantes|Avant|Aquaris ([E|M]10|M8))|Maxwell.*Lite|Maxwell.*Plus', + 'bqTablet' => 'Android.*(bq)?.*\b(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|Livingstone|Cervantes|Avant|Aquaris ([E|M]10|M8))\b|Maxwell.*Lite|Maxwell.*Plus', // http://www.huaweidevice.com/worldwide/productFamily.do?method=index&directoryId=5011&treeId=3290 // http://www.huaweidevice.com/worldwide/downloadCenter.do?method=index&directoryId=3372&treeId=0&tb=1&type=software (including legacy tablets) - 'HuaweiTablet' => 'MediaPad|MediaPad 7 Youth|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim|M2-A01L|BAH-L09|BAH-W09', + 'HuaweiTablet' => 'MediaPad|MediaPad 7 Youth|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim|M2-A01L|BAH-L09|BAH-W09|AGS-L09|CMR-AL19', // Nec or Medias Tab 'NecTablet' => '\bN-06D|\bN-08D', // Pantech Tablets: http://www.pantechusa.com/phones/ @@ -314,7 +315,7 @@ class Mobile_Detect // http://versusuk.com/support.html 'VersusTablet' => 'TOUCHPAD.*[78910]|\bTOUCHTAB\b', // http://www.zync.in/index.php/our-products/tablet-phablets - 'ZyncTablet' => 'z1000|Z99 2G|z99|z930|z999|z990|z909|Z919|z900', + 'ZyncTablet' => 'z1000|Z99 2G|z930|z990|z909|Z919|z900', // Removed "z999" because of https://github.com/serbanghita/Mobile-Detect/issues/717 // http://www.positivoinformatica.com.br/www/pessoal/tablet-ypy/ 'PositivoTablet' => 'TB07STA|TB10STA|TB07FTA|TB10FTA', // https://www.nabitablet.com/ @@ -377,7 +378,7 @@ class Mobile_Detect 'GoCleverTablet' => 'GOCLEVER TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB A741|TAB A741L|TAB M723G|TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|GCTA722|TAB I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB A93|TAB A93.2|TAB T72|TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|TAB R104|TAB R83.3|TAB A1042', // Modecom Tablets - http://www.modecom.eu/tablets/portal/ 'ModecomTablet' => 'FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003', - // Vonino Tablets - http://www.vonino.eu/tablets + // Vonino Tablets 'VoninoTablet' => '\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|Primus[ _]?QS|Android.*\bQ8\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\b', // ECS Tablets - http://www.ecs.com.tw/ECSWebSite/Product/Product_Tablet_List.aspx?CategoryID=14&MenuID=107&childid=M_107&LanID=0 'ECSTablet' => 'V07OT2|TM105A|S10OT1|TR10CS1', @@ -385,7 +386,7 @@ class Mobile_Detect // @note: no need to add all the tablet codes since they are guided by the first regex. 'StorexTablet' => 'eZee[_\']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab', // Generic Vodafone tablets. - 'VodafoneTablet' => 'SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7|VF-1497', + 'VodafoneTablet' => 'SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7|VF-1497|VFD 1400', // French tablets - Essentiel B http://www.boulanger.fr/tablette_tactile_e-book/tablette_tactile_essentiel_b/cl_68908.htm?multiChoiceToDelete=brand&mc_brand=essentielb // Aka: http://www.essentielb.fr/ 'EssentielBTablet' => 'Smart[ \']?TAB[ ]+?[0-9]+|Family[ \']?TAB2', @@ -484,7 +485,7 @@ class Mobile_Detect 'PalmOS' => 'PalmOS|avantgo|blazer|elaine|hiptop|palm|plucker|xiino', 'SymbianOS' => 'Symbian|SymbOS|Series60|Series40|SYB-[0-9]+|\bS60\b', // @reference: http://en.wikipedia.org/wiki/Windows_Mobile - 'WindowsMobileOS' => 'Windows CE.*(PPC|Smartphone|Mobile|[0-9]{3}x[0-9]{3})|Window Mobile|Windows Phone [0-9.]+|WCE;', + 'WindowsMobileOS' => 'Windows CE.*(PPC|Smartphone|Mobile|[0-9]{3}x[0-9]{3})|Windows Mobile|Windows Phone [0-9.]+|WCE;', // @reference: http://en.wikipedia.org/wiki/Windows_Phone // http://wifeng.cn/?r=blog&a=view&id=106 // http://nicksnettravels.builttoroam.com/post/2011/01/10/Bogus-Windows-Phone-7-User-Agent-String.aspx @@ -492,6 +493,8 @@ class Mobile_Detect // https://msdn.microsoft.com/en-us/library/hh869301(v=vs.85).aspx 'WindowsPhoneOS' => 'Windows Phone 10.0|Windows Phone 8.1|Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7|Windows NT 6.[23]; ARM;', 'iOS' => '\biPhone.*Mobile|\biPod|\biPad|AppleCoreMedia', + // https://en.wikipedia.org/wiki/IPadOS + 'iPadOS' => 'CPU OS 13', // http://en.wikipedia.org/wiki/MeeGo // @todo: research MeeGo in UAs 'MeeGoOS' => 'MeeGo', @@ -539,7 +542,8 @@ class Mobile_Detect // https://github.com/serbanghita/Mobile-Detect/issues/7 'DiigoBrowser' => 'DiigoBrowser', // http://www.puffinbrowser.com/index.php - 'Puffin' => 'Puffin', + // https://github.com/serbanghita/Mobile-Detect/issues/752 + // 'Puffin' => 'Puffin', // http://mercury-browser.com/index.html 'Mercury' => '\bMercury\b', // http://en.wikipedia.org/wiki/Obigo_Browser @@ -563,7 +567,7 @@ class Mobile_Detect // http://scottcate.com/technology/windows-phone-8-ie10-desktop-or-mobile/ // https://github.com/serbanghita/Mobile-Detect/issues/57#issuecomment-15024011 // https://developers.facebook.com/docs/sharing/best-practices - 'Bot' => 'Googlebot|facebookexternalhit|AdsBot-Google|Google Keyword Suggestion|Facebot|YandexBot|YandexMobileBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|Exabot|MJ12bot|YandexImages|TurnitinBot|Pingdom', + 'Bot' => 'Googlebot|facebookexternalhit|Google-AMPHTML|s~amp-validator|AdsBot-Google|Google Keyword Suggestion|Facebot|YandexBot|YandexMobileBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|Exabot|MJ12bot|YandexImages|TurnitinBot|Pingdom|contentkingapp', 'MobileBot' => 'Googlebot-Mobile|AdsBot-Google-Mobile|YahooSeeker/M1A1-R2D2', 'DesktopMode' => 'WPDesktop', 'TV' => 'SonyDTV|HbbTV', // experimental diff --git a/htdocs/includes/mobiledetect/mobiledetectlib/README.md b/htdocs/includes/mobiledetect/mobiledetectlib/README.md index 310d9f3661d..d73757b728f 100644 --- a/htdocs/includes/mobiledetect/mobiledetectlib/README.md +++ b/htdocs/includes/mobiledetect/mobiledetectlib/README.md @@ -68,13 +68,13 @@ or include the dependency in the `composer.json` file: #### Demo -* [:iphone: Live demo!](http://is.gd/mobiletest) +* [:iphone: Live demo!](http://demo.mobiledetect.net) * [Code examples](../../wiki/Code-examples) #### Contribute *Submit a PR* -> Submit a pull request but before make sure you read [how to contribute](../../docs/CONTRIBUTING.md) guide. +> Submit a pull request but before make sure you read [how to contribute](docs/CONTRIBUTING.md) guide. *Donate* @@ -92,7 +92,7 @@ Special thanks to the community :+1: for donations, JetBrains team for the conti > [Submit new module, plugin, port](../../issues/new?title=New%203rd%20party%20module&body=Name,%20Link%20and%20Description%20of%20the%20module.) :point_right: Keep `Mobile_Detect.php` class in a separate `module` and do NOT include it in your script core because of the high frequency of updates. -:point_right: When including the class into you `web application` or `module` always use `include_once '../path/to/Mobile_Detect.php` to prevent conflicts. +:point_right: When including the class into your `web application` or `module` always use `include_once '../path/to/Mobile_Detect.php` to prevent conflicts. **JavaScript** diff --git a/htdocs/includes/mobiledetect/mobiledetectlib/composer.json b/htdocs/includes/mobiledetect/mobiledetectlib/composer.json index 25cd99a375f..738f8f8831f 100644 --- a/htdocs/includes/mobiledetect/mobiledetectlib/composer.json +++ b/htdocs/includes/mobiledetect/mobiledetectlib/composer.json @@ -1,31 +1,42 @@ { - "name": "mobiledetect/mobiledetectlib", - "type": "library", - "description": "Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.", - "keywords": ["mobile", "mobile detect", "mobile detector", "php mobile detect", "detect mobile devices"], - "homepage": "https://github.com/serbanghita/Mobile-Detect", - "license": "MIT", - "authors": [ - { - "name": "Serban Ghita", - "email": "serbanghita@gmail.com", - "homepage": "http://mobiledetect.net", - "role": "Developer" - } - ], - "require": { - "php": ">=5.0.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.8.35||~5.7" - }, - "autoload": { - "classmap": ["Mobile_Detect.php"], - "psr-0": { - "Detection": "namespaced/" - } - }, - "archive": { - "exclude": ["docs", "examples", "export"] - } -} + "name" : "mobiledetect/mobiledetectlib", + "type" : "library", + "description" : "Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.", + "keywords" : [ + "mobile", + "mobile detect", + "mobile detector", + "php mobile detect", + "detect mobile devices" + ], + "homepage" : "https://github.com/serbanghita/Mobile-Detect", + "license" : "MIT", + "authors" : [{ + "name" : "Serban Ghita", + "email" : "serbanghita@gmail.com", + "homepage" : "http://mobiledetect.net", + "role" : "Developer" + } + ], + "require" : { + "php" : ">=5.0.0" + }, + "require-dev" : { + "phpunit/phpunit" : "~4.8.35||~5.7" + }, + "autoload" : { + "classmap" : [ + "Mobile_Detect.php" + ], + "psr-0" : { + "Detection" : "namespaced/" + } + }, + "archive" : { + "exclude" : [ + "docs", + "examples", + "export" + ] + } +} \ No newline at end of file diff --git a/htdocs/includes/mobiledetect/mobiledetectlib/docker-compose.yml b/htdocs/includes/mobiledetect/mobiledetectlib/docker-compose.yml new file mode 100644 index 00000000000..58ce75e879c --- /dev/null +++ b/htdocs/includes/mobiledetect/mobiledetectlib/docker-compose.yml @@ -0,0 +1,16 @@ +app: + restart: 'on-failure' + image: php:7 + working_dir: /app + command: vendor/bin/phpunit -v -c tests/phpunit.xml --coverage-text --strict-coverage --stop-on-risky + ports: + - "8000:8000" + volumes: + - .:/app + +composer: + restart: 'no' + image: composer/composer:php7 + command: install + volumes: + - .:/app \ No newline at end of file diff --git a/htdocs/includes/mobiledetect/mobiledetectlib/docs/KNOWN_LIMITATIONS.md b/htdocs/includes/mobiledetect/mobiledetectlib/docs/KNOWN_LIMITATIONS.md index 8b5d461fe38..5887092f1f8 100644 --- a/htdocs/includes/mobiledetect/mobiledetectlib/docs/KNOWN_LIMITATIONS.md +++ b/htdocs/includes/mobiledetect/mobiledetectlib/docs/KNOWN_LIMITATIONS.md @@ -3,7 +3,8 @@ * Mobile Detect script was designed to detect `mobile` devices. Implicitly other devices are considered to be `desktop`. * User-Agent and HTTP headers sniffing is a non reliable method of detecting a mobile device. * If the mobile browser is set on `Desktop mode`, the Mobile Detect script has no way of knowing that the device is `mobile`. -* Some touchscreen devices (eg. Microsoft Surface) are tough to detect as mobile since they can be used in a laptop mode. +* Some touchscreen devices (eg. Microsoft Surface) are tough to detect as mobile since they can be used in a laptop mode. See: [#32](https://github.com/serbanghita/Mobile-Detect/issues/32), [#461](https://github.com/serbanghita/Mobile-Detect/issues/461), [#667](https://github.com/serbanghita/Mobile-Detect/issues/667) +* Some mobile devices (eg. IPadOS, Google Pixel Slate). See: [#795](https://github.com/serbanghita/Mobile-Detect/issues/795), [#788](https://github.com/serbanghita/Mobile-Detect/issues/788) * Detecting the device brand (eg. Apple, Samsung, HTC) is not 100% reliable. * We don't monitor the quality of the 3rd party tools based on Mobile Detect script. We cannot guarantee that they are using the class properly or if they provide the latest version. From 94589158c0e109ec6923a8d80d5ea3d60d95524e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 13 Mar 2020 02:32:33 +0100 Subject: [PATCH 258/313] Move class from external project as internal class (project is dead) --- .../evalmath => core/class}/evalmath.class.php | 0 htdocs/includes/evalmath/README.md | 11 ----------- .../dynamic_price/class/price_parser.class.php | 2 +- 3 files changed, 1 insertion(+), 12 deletions(-) rename htdocs/{includes/evalmath => core/class}/evalmath.class.php (100%) delete mode 100755 htdocs/includes/evalmath/README.md diff --git a/htdocs/includes/evalmath/evalmath.class.php b/htdocs/core/class/evalmath.class.php similarity index 100% rename from htdocs/includes/evalmath/evalmath.class.php rename to htdocs/core/class/evalmath.class.php diff --git a/htdocs/includes/evalmath/README.md b/htdocs/includes/evalmath/README.md deleted file mode 100755 index 6011e3fb676..00000000000 --- a/htdocs/includes/evalmath/README.md +++ /dev/null @@ -1,11 +0,0 @@ -evalmath.class.php -================== - -Version 1.0 - -Taken from http://www.phpclasses.org/browse/file/11680.html, cred to Miles Kaufmann - -This repository is cloned for two reasons: - -1. To allow downloading the code without signing in to phpclasses.org. -2. To add very small improvements to the code. diff --git a/htdocs/product/dynamic_price/class/price_parser.class.php b/htdocs/product/dynamic_price/class/price_parser.class.php index d0eae2f3b17..6659dc56054 100644 --- a/htdocs/product/dynamic_price/class/price_parser.class.php +++ b/htdocs/product/dynamic_price/class/price_parser.class.php @@ -20,7 +20,7 @@ * \ingroup product * \brief File of class to calculate prices using expression */ -require_once DOL_DOCUMENT_ROOT.'/includes/evalmath/evalmath.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/evalmath.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_expression.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_global_variable.class.php'; From f3996c00383f9ad501bb2fb3b96a9b8693645e5c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 13 Mar 2020 02:35:28 +0100 Subject: [PATCH 259/313] Code comment --- htdocs/main.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index c92e7d4f7ac..1cea53ae2a7 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1417,7 +1417,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr print ''."\n"; } - // jQuery jeditable + // jQuery jeditable for Edit In Place features if (!empty($conf->global->MAIN_USE_JQUERY_JEDITABLE) && !defined('DISABLE_JQUERY_JEDITABLE')) { print ''."\n"; From 35fae3ec5d73c781557073561438954063e774ea Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 13 Mar 2020 03:07:28 +0100 Subject: [PATCH 260/313] NEW Upgrade Stripe library to 6.43.1 --- COPYRIGHT | 2 +- composer.json | 5 +- composer.lock | 58 +++++++++++++- htdocs/includes/stripe/VERSION | 1 - .../lib/SubscriptionScheduleRevision.php | 77 ------------------- .../includes/stripe/stripe-php/.editorconfig | 14 ++++ .../stripe/{ => stripe-php}/.gitignore | 0 .../stripe/{ => stripe-php}/CHANGELOG.md | 20 ++++- .../includes/stripe/{ => stripe-php}/LICENSE | 0 .../stripe/{ => stripe-php}/README.md | 0 htdocs/includes/stripe/stripe-php/VERSION | 1 + .../stripe/{ => stripe-php}/build.php | 0 .../stripe/{ => stripe-php}/composer.json | 0 .../{ => stripe-php}/data/ca-certificates.crt | 0 .../includes/stripe/{ => stripe-php}/init.php | 1 - .../stripe/{ => stripe-php}/lib/Account.php | 1 - .../{ => stripe-php}/lib/AccountLink.php | 1 - .../{ => stripe-php}/lib/AlipayAccount.php | 1 - .../lib/ApiOperations/All.php | 0 .../lib/ApiOperations/Create.php | 0 .../lib/ApiOperations/Delete.php | 0 .../lib/ApiOperations/NestedResource.php | 0 .../lib/ApiOperations/Request.php | 0 .../lib/ApiOperations/Retrieve.php | 0 .../lib/ApiOperations/Update.php | 0 .../{ => stripe-php}/lib/ApiRequestor.php | 2 +- .../{ => stripe-php}/lib/ApiResource.php | 0 .../{ => stripe-php}/lib/ApiResponse.php | 4 +- .../{ => stripe-php}/lib/ApplePayDomain.php | 1 - .../{ => stripe-php}/lib/ApplicationFee.php | 1 - .../lib/ApplicationFeeRefund.php | 1 - .../stripe/{ => stripe-php}/lib/Balance.php | 1 - .../lib/BalanceTransaction.php | 1 - .../{ => stripe-php}/lib/BankAccount.php | 13 ++-- .../{ => stripe-php}/lib/BitcoinReceiver.php | 1 - .../lib/BitcoinTransaction.php | 1 - .../{ => stripe-php}/lib/Capability.php | 1 - .../stripe/{ => stripe-php}/lib/Card.php | 1 - .../stripe/{ => stripe-php}/lib/Charge.php | 1 - .../{ => stripe-php}/lib/Checkout/Session.php | 1 - .../{ => stripe-php}/lib/Collection.php | 1 - .../{ => stripe-php}/lib/CountrySpec.php | 1 - .../stripe/{ => stripe-php}/lib/Coupon.php | 1 - .../{ => stripe-php}/lib/CreditNote.php | 1 - .../stripe/{ => stripe-php}/lib/Customer.php | 1 - .../lib/CustomerBalanceTransaction.php | 0 .../stripe/{ => stripe-php}/lib/Discount.php | 1 - .../stripe/{ => stripe-php}/lib/Dispute.php | 1 - .../{ => stripe-php}/lib/EphemeralKey.php | 1 - .../stripe/{ => stripe-php}/lib/Error/Api.php | 0 .../lib/Error/ApiConnection.php | 0 .../lib/Error/Authentication.php | 0 .../{ => stripe-php}/lib/Error/Base.php | 0 .../{ => stripe-php}/lib/Error/Card.php | 0 .../lib/Error/Idempotency.php | 0 .../lib/Error/InvalidRequest.php | 0 .../lib/Error/OAuth/InvalidClient.php | 0 .../lib/Error/OAuth/InvalidGrant.php | 0 .../lib/Error/OAuth/InvalidRequest.php | 0 .../lib/Error/OAuth/InvalidScope.php | 0 .../lib/Error/OAuth/OAuthBase.php | 0 .../lib/Error/OAuth/UnsupportedGrantType.php | 0 .../Error/OAuth/UnsupportedResponseType.php | 0 .../{ => stripe-php}/lib/Error/Permission.php | 0 .../{ => stripe-php}/lib/Error/RateLimit.php | 0 .../lib/Error/SignatureVerification.php | 0 .../stripe/{ => stripe-php}/lib/Event.php | 1 - .../{ => stripe-php}/lib/ExchangeRate.php | 1 - .../stripe/{ => stripe-php}/lib/File.php | 0 .../stripe/{ => stripe-php}/lib/FileLink.php | 1 - .../{ => stripe-php}/lib/FileUpload.php | 0 .../lib/HttpClient/ClientInterface.php | 0 .../lib/HttpClient/CurlClient.php | 0 .../stripe/{ => stripe-php}/lib/Invoice.php | 1 - .../{ => stripe-php}/lib/InvoiceItem.php | 1 - .../{ => stripe-php}/lib/InvoiceLineItem.php | 0 .../lib/IssuerFraudRecord.php | 1 - .../lib/Issuing/Authorization.php | 0 .../{ => stripe-php}/lib/Issuing/Card.php | 0 .../lib/Issuing/CardDetails.php | 0 .../lib/Issuing/Cardholder.php | 0 .../{ => stripe-php}/lib/Issuing/Dispute.php | 0 .../lib/Issuing/Transaction.php | 0 .../stripe/{ => stripe-php}/lib/LoginLink.php | 1 - .../stripe/{ => stripe-php}/lib/OAuth.php | 0 .../stripe/{ => stripe-php}/lib/Order.php | 1 - .../stripe/{ => stripe-php}/lib/OrderItem.php | 1 - .../{ => stripe-php}/lib/OrderReturn.php | 1 - .../{ => stripe-php}/lib/PaymentIntent.php | 1 - .../{ => stripe-php}/lib/PaymentMethod.php | 1 - .../stripe/{ => stripe-php}/lib/Payout.php | 1 - .../stripe/{ => stripe-php}/lib/Person.php | 1 - .../stripe/{ => stripe-php}/lib/Plan.php | 1 - .../stripe/{ => stripe-php}/lib/Product.php | 1 - .../lib/Radar/EarlyFraudWarning.php | 0 .../{ => stripe-php}/lib/Radar/ValueList.php | 0 .../lib/Radar/ValueListItem.php | 0 .../stripe/{ => stripe-php}/lib/Recipient.php | 1 - .../lib/RecipientTransfer.php | 1 - .../stripe/{ => stripe-php}/lib/Refund.php | 1 - .../lib/Reporting/ReportRun.php | 0 .../lib/Reporting/ReportType.php | 0 .../{ => stripe-php}/lib/RequestTelemetry.php | 0 .../stripe/{ => stripe-php}/lib/Review.php | 0 .../stripe/{ => stripe-php}/lib/SKU.php | 1 - .../{ => stripe-php}/lib/SetupIntent.php | 1 - .../lib/Sigma/ScheduledQueryRun.php | 0 .../lib/SingletonApiResource.php | 0 .../stripe/{ => stripe-php}/lib/Source.php | 1 - .../lib/SourceTransaction.php | 1 - .../stripe/{ => stripe-php}/lib/Stripe.php | 4 +- .../{ => stripe-php}/lib/StripeObject.php | 2 +- .../{ => stripe-php}/lib/Subscription.php | 2 +- .../{ => stripe-php}/lib/SubscriptionItem.php | 18 ++++- .../lib/SubscriptionSchedule.php | 43 ----------- .../stripe/{ => stripe-php}/lib/TaxId.php | 1 - .../stripe/{ => stripe-php}/lib/TaxRate.php | 1 - .../lib/Terminal/ConnectionToken.php | 0 .../lib/Terminal/Location.php | 0 .../{ => stripe-php}/lib/Terminal/Reader.php | 0 .../{ => stripe-php}/lib/ThreeDSecure.php | 1 - .../stripe/{ => stripe-php}/lib/Token.php | 1 - .../stripe/{ => stripe-php}/lib/Topup.php | 1 - .../stripe/{ => stripe-php}/lib/Transfer.php | 1 - .../{ => stripe-php}/lib/TransferReversal.php | 1 - .../{ => stripe-php}/lib/UsageRecord.php | 1 - .../lib/UsageRecordSummary.php | 1 - .../lib/Util/AutoPagingIterator.php | 0 .../lib/Util/CaseInsensitiveArray.php | 0 .../lib/Util/DefaultLogger.php | 0 .../lib/Util/LoggerInterface.php | 2 +- .../lib/Util/RandomGenerator.php | 0 .../lib/Util/RequestOptions.php | 0 .../stripe/{ => stripe-php}/lib/Util/Set.php | 0 .../stripe/{ => stripe-php}/lib/Util/Util.php | 1 - .../stripe/{ => stripe-php}/lib/Webhook.php | 0 .../{ => stripe-php}/lib/WebhookEndpoint.php | 1 - .../{ => stripe-php}/lib/WebhookSignature.php | 0 .../stripe/{ => stripe-php}/update_certs.php | 0 htdocs/public/payment/newpayment.php | 2 +- htdocs/public/stripe/confirm_payment.php | 2 +- htdocs/public/stripe/ipn.php | 2 +- htdocs/stripe/config.php | 4 +- 143 files changed, 129 insertions(+), 206 deletions(-) delete mode 100644 htdocs/includes/stripe/VERSION delete mode 100644 htdocs/includes/stripe/lib/SubscriptionScheduleRevision.php create mode 100644 htdocs/includes/stripe/stripe-php/.editorconfig rename htdocs/includes/stripe/{ => stripe-php}/.gitignore (100%) rename htdocs/includes/stripe/{ => stripe-php}/CHANGELOG.md (96%) rename htdocs/includes/stripe/{ => stripe-php}/LICENSE (100%) rename htdocs/includes/stripe/{ => stripe-php}/README.md (100%) create mode 100644 htdocs/includes/stripe/stripe-php/VERSION rename htdocs/includes/stripe/{ => stripe-php}/build.php (100%) mode change 100644 => 100755 rename htdocs/includes/stripe/{ => stripe-php}/composer.json (100%) rename htdocs/includes/stripe/{ => stripe-php}/data/ca-certificates.crt (100%) rename htdocs/includes/stripe/{ => stripe-php}/init.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Account.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/AccountLink.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/AlipayAccount.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/ApiOperations/All.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/ApiOperations/Create.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/ApiOperations/Delete.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/ApiOperations/NestedResource.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/ApiOperations/Request.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/ApiOperations/Retrieve.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/ApiOperations/Update.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/ApiRequestor.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/ApiResource.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/ApiResponse.php (84%) rename htdocs/includes/stripe/{ => stripe-php}/lib/ApplePayDomain.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/ApplicationFee.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/ApplicationFeeRefund.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Balance.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/BalanceTransaction.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/BankAccount.php (95%) rename htdocs/includes/stripe/{ => stripe-php}/lib/BitcoinReceiver.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/BitcoinTransaction.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Capability.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Card.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Charge.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Checkout/Session.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Collection.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/CountrySpec.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Coupon.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/CreditNote.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Customer.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/CustomerBalanceTransaction.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Discount.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Dispute.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/EphemeralKey.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Error/Api.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Error/ApiConnection.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Error/Authentication.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Error/Base.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Error/Card.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Error/Idempotency.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Error/InvalidRequest.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Error/OAuth/InvalidClient.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Error/OAuth/InvalidGrant.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Error/OAuth/InvalidRequest.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Error/OAuth/InvalidScope.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Error/OAuth/OAuthBase.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Error/OAuth/UnsupportedGrantType.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Error/OAuth/UnsupportedResponseType.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Error/Permission.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Error/RateLimit.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Error/SignatureVerification.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Event.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/ExchangeRate.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/File.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/FileLink.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/FileUpload.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/HttpClient/ClientInterface.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/HttpClient/CurlClient.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Invoice.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/InvoiceItem.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/InvoiceLineItem.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/IssuerFraudRecord.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Issuing/Authorization.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Issuing/Card.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Issuing/CardDetails.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Issuing/Cardholder.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Issuing/Dispute.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Issuing/Transaction.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/LoginLink.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/OAuth.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Order.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/OrderItem.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/OrderReturn.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/PaymentIntent.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/PaymentMethod.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Payout.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Person.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Plan.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Product.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Radar/EarlyFraudWarning.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Radar/ValueList.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Radar/ValueListItem.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Recipient.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/RecipientTransfer.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Refund.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Reporting/ReportRun.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Reporting/ReportType.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/RequestTelemetry.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Review.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/SKU.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/SetupIntent.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Sigma/ScheduledQueryRun.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/SingletonApiResource.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Source.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/SourceTransaction.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Stripe.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/StripeObject.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Subscription.php (98%) rename htdocs/includes/stripe/{ => stripe-php}/lib/SubscriptionItem.php (65%) rename htdocs/includes/stripe/{ => stripe-php}/lib/SubscriptionSchedule.php (56%) rename htdocs/includes/stripe/{ => stripe-php}/lib/TaxId.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/TaxRate.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Terminal/ConnectionToken.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Terminal/Location.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Terminal/Reader.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/ThreeDSecure.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Token.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Topup.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Transfer.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/TransferReversal.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/UsageRecord.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/UsageRecordSummary.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Util/AutoPagingIterator.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Util/CaseInsensitiveArray.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Util/DefaultLogger.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Util/LoggerInterface.php (98%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Util/RandomGenerator.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Util/RequestOptions.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Util/Set.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Util/Util.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/Webhook.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/lib/WebhookEndpoint.php (99%) rename htdocs/includes/stripe/{ => stripe-php}/lib/WebhookSignature.php (100%) rename htdocs/includes/stripe/{ => stripe-php}/update_certs.php (100%) mode change 100644 => 100755 diff --git a/COPYRIGHT b/COPYRIGHT index 1df1167fd5d..c1f400aff4e 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -32,7 +32,7 @@ PSR/simple-cache ? Library for cache (used by PHPSp Restler 3.0.0RC6 LGPL-3+ Yes Library to develop REST Web services (+ swagger-ui js lib into dir explorer) Sabre 3.2.2 BSD Yes DAV support Swift Mailer 5.4.2-DEV MIT license Yes Comprehensive mailing tools for PHP -Stripe 6.41 MIT licence Yes Library for Stripe module +Stripe 6.43.1 MIT licence Yes Library for Stripe module TCPDF 6.3.2 LGPL-3+ Yes PDF generation TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement diff --git a/composer.json b/composer.json index c61f985c5bf..69d6a249d32 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,8 @@ "phpoffice/phpexcel" : "1.8.1", "restler/framework" : "3.0.0-RC6", "tecnickcom/tcpdf" : "6.3.2", - "nnnick/chartjs" : "2.9.3" + "nnnick/chartjs" : "2.9.3", + "stripe/stripe-php" : "6.43.1" }, "require-dev" : { "jakub-onderka/php-parallel-lint" : "^0", @@ -56,4 +57,4 @@ "ext-zip" : "ODT, Excel and file compression support", "ext-xml" : "Excel support" } -} \ No newline at end of file +} diff --git a/composer.lock b/composer.lock index 93a6a621e56..b9db7f70d11 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "3c03efa3fe59b85d3d389e01cc65812b", + "content-hash": "870cfae419450a7944a169612d204989", "packages": [ { "name": "ckeditor/ckeditor", @@ -314,6 +314,62 @@ ], "time": "2019-05-12T15:15:11+00:00" }, + { + "name": "stripe/stripe-php", + "version": "v6.43.1", + "source": { + "type": "git", + "url": "https://github.com/stripe/stripe-php.git", + "reference": "42fcdaf99c44bb26937223f8eae1f263491d5ab8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/stripe/stripe-php/zipball/42fcdaf99c44bb26937223f8eae1f263491d5ab8", + "reference": "42fcdaf99c44bb26937223f8eae1f263491d5ab8", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "php-coveralls/php-coveralls": "1.*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0", + "symfony/process": "~2.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "Stripe\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Stripe and contributors", + "homepage": "https://github.com/stripe/stripe-php/contributors" + } + ], + "description": "Stripe PHP Library", + "homepage": "https://stripe.com/", + "keywords": [ + "api", + "payment processing", + "stripe" + ], + "time": "2019-08-29T16:56:12+00:00" + }, { "name": "tecnickcom/tcpdf", "version": "6.3.2", diff --git a/htdocs/includes/stripe/VERSION b/htdocs/includes/stripe/VERSION deleted file mode 100644 index 08c99ad1b68..00000000000 --- a/htdocs/includes/stripe/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.41.0 diff --git a/htdocs/includes/stripe/lib/SubscriptionScheduleRevision.php b/htdocs/includes/stripe/lib/SubscriptionScheduleRevision.php deleted file mode 100644 index 12177236530..00000000000 --- a/htdocs/includes/stripe/lib/SubscriptionScheduleRevision.php +++ /dev/null @@ -1,77 +0,0 @@ -retrieveRevision('revision_id') instead."; - throw new Error\InvalidRequest($msg, null); - } - - /** - * @param array|string $_id - * @param array|string|null $_opts - * - * @throws \Stripe\Error\InvalidRequest - */ - public static function all($params = null, $opts = null) - { - $msg = "Subscription Schedule Revisions cannot be listed without a Subscription Schedule ID. " . - "List those using \$schedule->allRevisions('revision_id') instead."; - throw new Error\InvalidRequest($msg, null); - } -} diff --git a/htdocs/includes/stripe/stripe-php/.editorconfig b/htdocs/includes/stripe/stripe-php/.editorconfig new file mode 100644 index 00000000000..9e93e0c4c3e --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/.editorconfig @@ -0,0 +1,14 @@ +; https://editorconfig.org/ + +root = true + +[*] +indent_style = space +indent_size = 4 +insert_final_newline = true +trim_trailing_whitespace = true +end_of_line = lf +charset = utf-8 + +[*.{json,yml}] +indent_size = 2 diff --git a/htdocs/includes/stripe/.gitignore b/htdocs/includes/stripe/stripe-php/.gitignore similarity index 100% rename from htdocs/includes/stripe/.gitignore rename to htdocs/includes/stripe/stripe-php/.gitignore diff --git a/htdocs/includes/stripe/CHANGELOG.md b/htdocs/includes/stripe/stripe-php/CHANGELOG.md similarity index 96% rename from htdocs/includes/stripe/CHANGELOG.md rename to htdocs/includes/stripe/stripe-php/CHANGELOG.md index bed9cff5722..5554f4ceb1f 100644 --- a/htdocs/includes/stripe/CHANGELOG.md +++ b/htdocs/includes/stripe/stripe-php/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 6.43.1 - 2019-08-29 +* [#722](https://github.com/stripe/stripe-php/pull/722) Make `LoggerInterface::error` compatible with its PSR-3 counterpart +* [#714](https://github.com/stripe/stripe-php/pull/714) Add `pending_setup_intent` property in `Subscription` +* [#713](https://github.com/stripe/stripe-php/pull/713) Add typehint to `ApiResponse` +* [#712](https://github.com/stripe/stripe-php/pull/712) Fix comment +* [#701](https://github.com/stripe/stripe-php/pull/701) Start testing PHP 7.3 + +## 6.43.0 - 2019-08-09 +* [#694](https://github.com/stripe/stripe-php/pull/694) Add `SubscriptionItem::createUsageRecord` method + +## 6.42.0 - 2019-08-09 +* [#688](https://github.com/stripe/stripe-php/pull/688) Remove `SubscriptionScheduleRevision` + * Note that this is technically a breaking change, however we've chosen to release it as a minor version in light of the fact that this resource and its API methods were virtually unused. + ## 6.41.0 - 2019-07-31 * [#683](https://github.com/stripe/stripe-php/pull/683) Move the List Balance History API to `/v1/balance_transactions` @@ -60,7 +74,7 @@ * [#642](https://github.com/stripe/stripe-php/pull/642) Fix an issue where existing idempotency keys would be overwritten when using automatic retries ## 6.34.1 - 2019-04-25 -* [#640](https://github.com/stripe/stripe-php/pull/640) Add missing phpdocs +* [#640](https://github.com/stripe/stripe-php/pull/640) Add missing phpdocs ## 6.34.0 - 2019-04-24 * [#626](https://github.com/stripe/stripe-php/pull/626) Add support for the `TaxRate` resource and APIs @@ -148,7 +162,7 @@ * [#564](https://github.com/stripe/stripe-php/pull/564) Add event name constants for subscription schedule aborted/expiring ## 6.23.0 - 2018-11-27 -* [#542](https://github.com/stripe/stripe-php/pull/542) Add support for `ValueList` and `ValueListItem` for Radar +* [#542](https://github.com/stripe/stripe-php/pull/542) Add support for `ValueList` and `ValueListItem` for Radar ## 6.22.1 - 2018-11-20 * [#561](https://github.com/stripe/stripe-php/pull/561) Add cast and some docs to telemetry introduced in 6.22.0/#549 @@ -402,7 +416,7 @@ Pull requests included in this release: * Add support for payouts and recipient transfers ## 4.6.0 - 2017-04-06 -* Please see 4.7.0 instead (no-op release) +* Please see 4.7.0 instead (no-op release) ## 4.5.1 - 2017-03-22 * Remove hard dependency on cURL diff --git a/htdocs/includes/stripe/LICENSE b/htdocs/includes/stripe/stripe-php/LICENSE similarity index 100% rename from htdocs/includes/stripe/LICENSE rename to htdocs/includes/stripe/stripe-php/LICENSE diff --git a/htdocs/includes/stripe/README.md b/htdocs/includes/stripe/stripe-php/README.md similarity index 100% rename from htdocs/includes/stripe/README.md rename to htdocs/includes/stripe/stripe-php/README.md diff --git a/htdocs/includes/stripe/stripe-php/VERSION b/htdocs/includes/stripe/stripe-php/VERSION new file mode 100644 index 00000000000..eb34ef6cbc3 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/VERSION @@ -0,0 +1 @@ +6.43.1 diff --git a/htdocs/includes/stripe/build.php b/htdocs/includes/stripe/stripe-php/build.php old mode 100644 new mode 100755 similarity index 100% rename from htdocs/includes/stripe/build.php rename to htdocs/includes/stripe/stripe-php/build.php diff --git a/htdocs/includes/stripe/composer.json b/htdocs/includes/stripe/stripe-php/composer.json similarity index 100% rename from htdocs/includes/stripe/composer.json rename to htdocs/includes/stripe/stripe-php/composer.json diff --git a/htdocs/includes/stripe/data/ca-certificates.crt b/htdocs/includes/stripe/stripe-php/data/ca-certificates.crt similarity index 100% rename from htdocs/includes/stripe/data/ca-certificates.crt rename to htdocs/includes/stripe/stripe-php/data/ca-certificates.crt diff --git a/htdocs/includes/stripe/init.php b/htdocs/includes/stripe/stripe-php/init.php similarity index 99% rename from htdocs/includes/stripe/init.php rename to htdocs/includes/stripe/stripe-php/init.php index e893cfcda90..05243999637 100644 --- a/htdocs/includes/stripe/init.php +++ b/htdocs/includes/stripe/stripe-php/init.php @@ -122,7 +122,6 @@ require(dirname(__FILE__) . '/lib/SourceTransaction.php'); require(dirname(__FILE__) . '/lib/Subscription.php'); require(dirname(__FILE__) . '/lib/SubscriptionItem.php'); require(dirname(__FILE__) . '/lib/SubscriptionSchedule.php'); -require(dirname(__FILE__) . '/lib/SubscriptionScheduleRevision.php'); require(dirname(__FILE__) . '/lib/TaxId.php'); require(dirname(__FILE__) . '/lib/TaxRate.php'); require(dirname(__FILE__) . '/lib/Terminal/ConnectionToken.php'); diff --git a/htdocs/includes/stripe/lib/Account.php b/htdocs/includes/stripe/stripe-php/lib/Account.php similarity index 99% rename from htdocs/includes/stripe/lib/Account.php rename to htdocs/includes/stripe/stripe-php/lib/Account.php index 1adc6b79d53..4993ca35414 100644 --- a/htdocs/includes/stripe/lib/Account.php +++ b/htdocs/includes/stripe/stripe-php/lib/Account.php @@ -30,7 +30,6 @@ namespace Stripe; */ class Account extends ApiResource { - const OBJECT_NAME = "account"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/AccountLink.php b/htdocs/includes/stripe/stripe-php/lib/AccountLink.php similarity index 99% rename from htdocs/includes/stripe/lib/AccountLink.php rename to htdocs/includes/stripe/stripe-php/lib/AccountLink.php index f2975ae3834..692447dbf69 100644 --- a/htdocs/includes/stripe/lib/AccountLink.php +++ b/htdocs/includes/stripe/stripe-php/lib/AccountLink.php @@ -14,7 +14,6 @@ namespace Stripe; */ class AccountLink extends ApiResource { - const OBJECT_NAME = "account_link"; use ApiOperations\Create; diff --git a/htdocs/includes/stripe/lib/AlipayAccount.php b/htdocs/includes/stripe/stripe-php/lib/AlipayAccount.php similarity index 99% rename from htdocs/includes/stripe/lib/AlipayAccount.php rename to htdocs/includes/stripe/stripe-php/lib/AlipayAccount.php index 70a281bd768..a79705fa4eb 100644 --- a/htdocs/includes/stripe/lib/AlipayAccount.php +++ b/htdocs/includes/stripe/stripe-php/lib/AlipayAccount.php @@ -12,7 +12,6 @@ namespace Stripe; */ class AlipayAccount extends ApiResource { - const OBJECT_NAME = "alipay_account"; use ApiOperations\Delete; diff --git a/htdocs/includes/stripe/lib/ApiOperations/All.php b/htdocs/includes/stripe/stripe-php/lib/ApiOperations/All.php similarity index 100% rename from htdocs/includes/stripe/lib/ApiOperations/All.php rename to htdocs/includes/stripe/stripe-php/lib/ApiOperations/All.php diff --git a/htdocs/includes/stripe/lib/ApiOperations/Create.php b/htdocs/includes/stripe/stripe-php/lib/ApiOperations/Create.php similarity index 100% rename from htdocs/includes/stripe/lib/ApiOperations/Create.php rename to htdocs/includes/stripe/stripe-php/lib/ApiOperations/Create.php diff --git a/htdocs/includes/stripe/lib/ApiOperations/Delete.php b/htdocs/includes/stripe/stripe-php/lib/ApiOperations/Delete.php similarity index 100% rename from htdocs/includes/stripe/lib/ApiOperations/Delete.php rename to htdocs/includes/stripe/stripe-php/lib/ApiOperations/Delete.php diff --git a/htdocs/includes/stripe/lib/ApiOperations/NestedResource.php b/htdocs/includes/stripe/stripe-php/lib/ApiOperations/NestedResource.php similarity index 100% rename from htdocs/includes/stripe/lib/ApiOperations/NestedResource.php rename to htdocs/includes/stripe/stripe-php/lib/ApiOperations/NestedResource.php diff --git a/htdocs/includes/stripe/lib/ApiOperations/Request.php b/htdocs/includes/stripe/stripe-php/lib/ApiOperations/Request.php similarity index 100% rename from htdocs/includes/stripe/lib/ApiOperations/Request.php rename to htdocs/includes/stripe/stripe-php/lib/ApiOperations/Request.php diff --git a/htdocs/includes/stripe/lib/ApiOperations/Retrieve.php b/htdocs/includes/stripe/stripe-php/lib/ApiOperations/Retrieve.php similarity index 100% rename from htdocs/includes/stripe/lib/ApiOperations/Retrieve.php rename to htdocs/includes/stripe/stripe-php/lib/ApiOperations/Retrieve.php diff --git a/htdocs/includes/stripe/lib/ApiOperations/Update.php b/htdocs/includes/stripe/stripe-php/lib/ApiOperations/Update.php similarity index 100% rename from htdocs/includes/stripe/lib/ApiOperations/Update.php rename to htdocs/includes/stripe/stripe-php/lib/ApiOperations/Update.php diff --git a/htdocs/includes/stripe/lib/ApiRequestor.php b/htdocs/includes/stripe/stripe-php/lib/ApiRequestor.php similarity index 99% rename from htdocs/includes/stripe/lib/ApiRequestor.php rename to htdocs/includes/stripe/stripe-php/lib/ApiRequestor.php index 7cf851877de..1f75a007b32 100644 --- a/htdocs/includes/stripe/lib/ApiRequestor.php +++ b/htdocs/includes/stripe/stripe-php/lib/ApiRequestor.php @@ -205,7 +205,7 @@ class ApiRequestor return new Error\Idempotency($msg, $rcode, $rbody, $resp, $rheaders); } - // intentional fall-through + // no break case 404: return new Error\InvalidRequest($msg, $param, $rcode, $rbody, $resp, $rheaders); case 401: diff --git a/htdocs/includes/stripe/lib/ApiResource.php b/htdocs/includes/stripe/stripe-php/lib/ApiResource.php similarity index 100% rename from htdocs/includes/stripe/lib/ApiResource.php rename to htdocs/includes/stripe/stripe-php/lib/ApiResource.php diff --git a/htdocs/includes/stripe/lib/ApiResponse.php b/htdocs/includes/stripe/stripe-php/lib/ApiResponse.php similarity index 84% rename from htdocs/includes/stripe/lib/ApiResponse.php rename to htdocs/includes/stripe/stripe-php/lib/ApiResponse.php index 31f54a50df0..acca75123e6 100644 --- a/htdocs/includes/stripe/lib/ApiResponse.php +++ b/htdocs/includes/stripe/stripe-php/lib/ApiResponse.php @@ -2,6 +2,8 @@ namespace Stripe; +use Stripe\Util\CaseInsensitiveArray; + /** * Class ApiResponse * @@ -17,7 +19,7 @@ class ApiResponse /** * @param string $body * @param integer $code - * @param array|null $headers + * @param array|CaseInsensitiveArray|null $headers * @param array|null $json * * @return obj An APIResponse diff --git a/htdocs/includes/stripe/lib/ApplePayDomain.php b/htdocs/includes/stripe/stripe-php/lib/ApplePayDomain.php similarity index 99% rename from htdocs/includes/stripe/lib/ApplePayDomain.php rename to htdocs/includes/stripe/stripe-php/lib/ApplePayDomain.php index ea84220a7a9..57687c4f2e4 100644 --- a/htdocs/includes/stripe/lib/ApplePayDomain.php +++ b/htdocs/includes/stripe/stripe-php/lib/ApplePayDomain.php @@ -9,7 +9,6 @@ namespace Stripe; */ class ApplePayDomain extends ApiResource { - const OBJECT_NAME = "apple_pay_domain"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/ApplicationFee.php b/htdocs/includes/stripe/stripe-php/lib/ApplicationFee.php similarity index 99% rename from htdocs/includes/stripe/lib/ApplicationFee.php rename to htdocs/includes/stripe/stripe-php/lib/ApplicationFee.php index 0d9fde4c521..4b83071ade4 100644 --- a/htdocs/includes/stripe/lib/ApplicationFee.php +++ b/htdocs/includes/stripe/stripe-php/lib/ApplicationFee.php @@ -24,7 +24,6 @@ namespace Stripe; */ class ApplicationFee extends ApiResource { - const OBJECT_NAME = "application_fee"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/ApplicationFeeRefund.php b/htdocs/includes/stripe/stripe-php/lib/ApplicationFeeRefund.php similarity index 99% rename from htdocs/includes/stripe/lib/ApplicationFeeRefund.php rename to htdocs/includes/stripe/stripe-php/lib/ApplicationFeeRefund.php index 91d7e9d2bc6..b242f2024b4 100644 --- a/htdocs/includes/stripe/lib/ApplicationFeeRefund.php +++ b/htdocs/includes/stripe/stripe-php/lib/ApplicationFeeRefund.php @@ -18,7 +18,6 @@ namespace Stripe; */ class ApplicationFeeRefund extends ApiResource { - const OBJECT_NAME = "fee_refund"; use ApiOperations\Update { diff --git a/htdocs/includes/stripe/lib/Balance.php b/htdocs/includes/stripe/stripe-php/lib/Balance.php similarity index 99% rename from htdocs/includes/stripe/lib/Balance.php rename to htdocs/includes/stripe/stripe-php/lib/Balance.php index 25f88ae74c7..b99871adb85 100644 --- a/htdocs/includes/stripe/lib/Balance.php +++ b/htdocs/includes/stripe/stripe-php/lib/Balance.php @@ -15,7 +15,6 @@ namespace Stripe; */ class Balance extends SingletonApiResource { - const OBJECT_NAME = "balance"; /** diff --git a/htdocs/includes/stripe/lib/BalanceTransaction.php b/htdocs/includes/stripe/stripe-php/lib/BalanceTransaction.php similarity index 99% rename from htdocs/includes/stripe/lib/BalanceTransaction.php rename to htdocs/includes/stripe/stripe-php/lib/BalanceTransaction.php index 403c4aa173e..78805d4d448 100644 --- a/htdocs/includes/stripe/lib/BalanceTransaction.php +++ b/htdocs/includes/stripe/stripe-php/lib/BalanceTransaction.php @@ -24,7 +24,6 @@ namespace Stripe; */ class BalanceTransaction extends ApiResource { - const OBJECT_NAME = "balance_transaction"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/BankAccount.php b/htdocs/includes/stripe/stripe-php/lib/BankAccount.php similarity index 95% rename from htdocs/includes/stripe/lib/BankAccount.php rename to htdocs/includes/stripe/stripe-php/lib/BankAccount.php index 3fdc9188c64..a77f3054ba5 100644 --- a/htdocs/includes/stripe/lib/BankAccount.php +++ b/htdocs/includes/stripe/stripe-php/lib/BankAccount.php @@ -25,7 +25,6 @@ namespace Stripe; */ class BankAccount extends ApiResource { - const OBJECT_NAME = "bank_account"; use ApiOperations\Delete; @@ -93,12 +92,12 @@ class BankAccount extends ApiResource throw new Error\InvalidRequest($msg, null); } - /** - * @param array|null $params - * @param array|string|null $options - * - * @return BankAccount The verified bank account. - */ + /** + * @param array|null $params + * @param array|string|null $options + * + * @return BankAccount The verified bank account. + */ public function verify($params = null, $options = null) { $url = $this->instanceUrl() . '/verify'; diff --git a/htdocs/includes/stripe/lib/BitcoinReceiver.php b/htdocs/includes/stripe/stripe-php/lib/BitcoinReceiver.php similarity index 99% rename from htdocs/includes/stripe/lib/BitcoinReceiver.php rename to htdocs/includes/stripe/stripe-php/lib/BitcoinReceiver.php index b4cc5291b56..a9272dfa288 100644 --- a/htdocs/includes/stripe/lib/BitcoinReceiver.php +++ b/htdocs/includes/stripe/stripe-php/lib/BitcoinReceiver.php @@ -12,7 +12,6 @@ namespace Stripe; */ class BitcoinReceiver extends ApiResource { - const OBJECT_NAME = "bitcoin_receiver"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/BitcoinTransaction.php b/htdocs/includes/stripe/stripe-php/lib/BitcoinTransaction.php similarity index 99% rename from htdocs/includes/stripe/lib/BitcoinTransaction.php rename to htdocs/includes/stripe/stripe-php/lib/BitcoinTransaction.php index 8269fd216eb..122be42314f 100644 --- a/htdocs/includes/stripe/lib/BitcoinTransaction.php +++ b/htdocs/includes/stripe/stripe-php/lib/BitcoinTransaction.php @@ -9,6 +9,5 @@ namespace Stripe; */ class BitcoinTransaction extends ApiResource { - const OBJECT_NAME = "bitcoin_transaction"; } diff --git a/htdocs/includes/stripe/lib/Capability.php b/htdocs/includes/stripe/stripe-php/lib/Capability.php similarity index 99% rename from htdocs/includes/stripe/lib/Capability.php rename to htdocs/includes/stripe/stripe-php/lib/Capability.php index 78cb0393695..aabf54b1f1b 100644 --- a/htdocs/includes/stripe/lib/Capability.php +++ b/htdocs/includes/stripe/stripe-php/lib/Capability.php @@ -17,7 +17,6 @@ namespace Stripe; */ class Capability extends ApiResource { - const OBJECT_NAME = "capability"; use ApiOperations\Update; diff --git a/htdocs/includes/stripe/lib/Card.php b/htdocs/includes/stripe/stripe-php/lib/Card.php similarity index 99% rename from htdocs/includes/stripe/lib/Card.php rename to htdocs/includes/stripe/stripe-php/lib/Card.php index 40de733e780..51eb5add1c9 100644 --- a/htdocs/includes/stripe/lib/Card.php +++ b/htdocs/includes/stripe/stripe-php/lib/Card.php @@ -38,7 +38,6 @@ namespace Stripe; */ class Card extends ApiResource { - const OBJECT_NAME = "card"; use ApiOperations\Delete; diff --git a/htdocs/includes/stripe/lib/Charge.php b/htdocs/includes/stripe/stripe-php/lib/Charge.php similarity index 99% rename from htdocs/includes/stripe/lib/Charge.php rename to htdocs/includes/stripe/stripe-php/lib/Charge.php index 43274c5559c..0c3853c9678 100644 --- a/htdocs/includes/stripe/lib/Charge.php +++ b/htdocs/includes/stripe/stripe-php/lib/Charge.php @@ -53,7 +53,6 @@ namespace Stripe; */ class Charge extends ApiResource { - const OBJECT_NAME = "charge"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/Checkout/Session.php b/htdocs/includes/stripe/stripe-php/lib/Checkout/Session.php similarity index 99% rename from htdocs/includes/stripe/lib/Checkout/Session.php rename to htdocs/includes/stripe/stripe-php/lib/Checkout/Session.php index 33fc6a08ab2..227dd7b6816 100644 --- a/htdocs/includes/stripe/lib/Checkout/Session.php +++ b/htdocs/includes/stripe/stripe-php/lib/Checkout/Session.php @@ -23,7 +23,6 @@ namespace Stripe\Checkout; */ class Session extends \Stripe\ApiResource { - const OBJECT_NAME = "checkout.session"; use \Stripe\ApiOperations\Create; diff --git a/htdocs/includes/stripe/lib/Collection.php b/htdocs/includes/stripe/stripe-php/lib/Collection.php similarity index 99% rename from htdocs/includes/stripe/lib/Collection.php rename to htdocs/includes/stripe/stripe-php/lib/Collection.php index 986cd33090a..38d3835ff03 100644 --- a/htdocs/includes/stripe/lib/Collection.php +++ b/htdocs/includes/stripe/stripe-php/lib/Collection.php @@ -14,7 +14,6 @@ namespace Stripe; */ class Collection extends StripeObject implements \IteratorAggregate { - const OBJECT_NAME = "list"; use ApiOperations\Request; diff --git a/htdocs/includes/stripe/lib/CountrySpec.php b/htdocs/includes/stripe/stripe-php/lib/CountrySpec.php similarity index 99% rename from htdocs/includes/stripe/lib/CountrySpec.php rename to htdocs/includes/stripe/stripe-php/lib/CountrySpec.php index 668bfe62ed9..ef02c340b5e 100644 --- a/htdocs/includes/stripe/lib/CountrySpec.php +++ b/htdocs/includes/stripe/stripe-php/lib/CountrySpec.php @@ -18,7 +18,6 @@ namespace Stripe; */ class CountrySpec extends ApiResource { - const OBJECT_NAME = "country_spec"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/Coupon.php b/htdocs/includes/stripe/stripe-php/lib/Coupon.php similarity index 99% rename from htdocs/includes/stripe/lib/Coupon.php rename to htdocs/includes/stripe/stripe-php/lib/Coupon.php index 51d4fd86593..76d549ad90d 100644 --- a/htdocs/includes/stripe/lib/Coupon.php +++ b/htdocs/includes/stripe/stripe-php/lib/Coupon.php @@ -25,7 +25,6 @@ namespace Stripe; */ class Coupon extends ApiResource { - const OBJECT_NAME = "coupon"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/CreditNote.php b/htdocs/includes/stripe/stripe-php/lib/CreditNote.php similarity index 99% rename from htdocs/includes/stripe/lib/CreditNote.php rename to htdocs/includes/stripe/stripe-php/lib/CreditNote.php index 66351ffb828..c81d86ee66d 100644 --- a/htdocs/includes/stripe/lib/CreditNote.php +++ b/htdocs/includes/stripe/stripe-php/lib/CreditNote.php @@ -27,7 +27,6 @@ namespace Stripe; */ class CreditNote extends ApiResource { - const OBJECT_NAME = "credit_note"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/Customer.php b/htdocs/includes/stripe/stripe-php/lib/Customer.php similarity index 99% rename from htdocs/includes/stripe/lib/Customer.php rename to htdocs/includes/stripe/stripe-php/lib/Customer.php index 6e78f981ee4..a3f7f6311da 100644 --- a/htdocs/includes/stripe/lib/Customer.php +++ b/htdocs/includes/stripe/stripe-php/lib/Customer.php @@ -33,7 +33,6 @@ namespace Stripe; */ class Customer extends ApiResource { - const OBJECT_NAME = "customer"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/CustomerBalanceTransaction.php b/htdocs/includes/stripe/stripe-php/lib/CustomerBalanceTransaction.php similarity index 100% rename from htdocs/includes/stripe/lib/CustomerBalanceTransaction.php rename to htdocs/includes/stripe/stripe-php/lib/CustomerBalanceTransaction.php diff --git a/htdocs/includes/stripe/lib/Discount.php b/htdocs/includes/stripe/stripe-php/lib/Discount.php similarity index 99% rename from htdocs/includes/stripe/lib/Discount.php rename to htdocs/includes/stripe/stripe-php/lib/Discount.php index a72d12bc6e3..68bfc0fd74a 100644 --- a/htdocs/includes/stripe/lib/Discount.php +++ b/htdocs/includes/stripe/stripe-php/lib/Discount.php @@ -16,6 +16,5 @@ namespace Stripe; */ class Discount extends StripeObject { - const OBJECT_NAME = "discount"; } diff --git a/htdocs/includes/stripe/lib/Dispute.php b/htdocs/includes/stripe/stripe-php/lib/Dispute.php similarity index 99% rename from htdocs/includes/stripe/lib/Dispute.php rename to htdocs/includes/stripe/stripe-php/lib/Dispute.php index 2d58daa380a..8ffc2d4cc73 100644 --- a/htdocs/includes/stripe/lib/Dispute.php +++ b/htdocs/includes/stripe/stripe-php/lib/Dispute.php @@ -24,7 +24,6 @@ namespace Stripe; */ class Dispute extends ApiResource { - const OBJECT_NAME = "dispute"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/EphemeralKey.php b/htdocs/includes/stripe/stripe-php/lib/EphemeralKey.php similarity index 99% rename from htdocs/includes/stripe/lib/EphemeralKey.php rename to htdocs/includes/stripe/stripe-php/lib/EphemeralKey.php index 5ed4646b4f7..ea4cc756ccd 100644 --- a/htdocs/includes/stripe/lib/EphemeralKey.php +++ b/htdocs/includes/stripe/stripe-php/lib/EphemeralKey.php @@ -17,7 +17,6 @@ namespace Stripe; */ class EphemeralKey extends ApiResource { - const OBJECT_NAME = "ephemeral_key"; use ApiOperations\Create { diff --git a/htdocs/includes/stripe/lib/Error/Api.php b/htdocs/includes/stripe/stripe-php/lib/Error/Api.php similarity index 100% rename from htdocs/includes/stripe/lib/Error/Api.php rename to htdocs/includes/stripe/stripe-php/lib/Error/Api.php diff --git a/htdocs/includes/stripe/lib/Error/ApiConnection.php b/htdocs/includes/stripe/stripe-php/lib/Error/ApiConnection.php similarity index 100% rename from htdocs/includes/stripe/lib/Error/ApiConnection.php rename to htdocs/includes/stripe/stripe-php/lib/Error/ApiConnection.php diff --git a/htdocs/includes/stripe/lib/Error/Authentication.php b/htdocs/includes/stripe/stripe-php/lib/Error/Authentication.php similarity index 100% rename from htdocs/includes/stripe/lib/Error/Authentication.php rename to htdocs/includes/stripe/stripe-php/lib/Error/Authentication.php diff --git a/htdocs/includes/stripe/lib/Error/Base.php b/htdocs/includes/stripe/stripe-php/lib/Error/Base.php similarity index 100% rename from htdocs/includes/stripe/lib/Error/Base.php rename to htdocs/includes/stripe/stripe-php/lib/Error/Base.php diff --git a/htdocs/includes/stripe/lib/Error/Card.php b/htdocs/includes/stripe/stripe-php/lib/Error/Card.php similarity index 100% rename from htdocs/includes/stripe/lib/Error/Card.php rename to htdocs/includes/stripe/stripe-php/lib/Error/Card.php diff --git a/htdocs/includes/stripe/lib/Error/Idempotency.php b/htdocs/includes/stripe/stripe-php/lib/Error/Idempotency.php similarity index 100% rename from htdocs/includes/stripe/lib/Error/Idempotency.php rename to htdocs/includes/stripe/stripe-php/lib/Error/Idempotency.php diff --git a/htdocs/includes/stripe/lib/Error/InvalidRequest.php b/htdocs/includes/stripe/stripe-php/lib/Error/InvalidRequest.php similarity index 100% rename from htdocs/includes/stripe/lib/Error/InvalidRequest.php rename to htdocs/includes/stripe/stripe-php/lib/Error/InvalidRequest.php diff --git a/htdocs/includes/stripe/lib/Error/OAuth/InvalidClient.php b/htdocs/includes/stripe/stripe-php/lib/Error/OAuth/InvalidClient.php similarity index 100% rename from htdocs/includes/stripe/lib/Error/OAuth/InvalidClient.php rename to htdocs/includes/stripe/stripe-php/lib/Error/OAuth/InvalidClient.php diff --git a/htdocs/includes/stripe/lib/Error/OAuth/InvalidGrant.php b/htdocs/includes/stripe/stripe-php/lib/Error/OAuth/InvalidGrant.php similarity index 100% rename from htdocs/includes/stripe/lib/Error/OAuth/InvalidGrant.php rename to htdocs/includes/stripe/stripe-php/lib/Error/OAuth/InvalidGrant.php diff --git a/htdocs/includes/stripe/lib/Error/OAuth/InvalidRequest.php b/htdocs/includes/stripe/stripe-php/lib/Error/OAuth/InvalidRequest.php similarity index 100% rename from htdocs/includes/stripe/lib/Error/OAuth/InvalidRequest.php rename to htdocs/includes/stripe/stripe-php/lib/Error/OAuth/InvalidRequest.php diff --git a/htdocs/includes/stripe/lib/Error/OAuth/InvalidScope.php b/htdocs/includes/stripe/stripe-php/lib/Error/OAuth/InvalidScope.php similarity index 100% rename from htdocs/includes/stripe/lib/Error/OAuth/InvalidScope.php rename to htdocs/includes/stripe/stripe-php/lib/Error/OAuth/InvalidScope.php diff --git a/htdocs/includes/stripe/lib/Error/OAuth/OAuthBase.php b/htdocs/includes/stripe/stripe-php/lib/Error/OAuth/OAuthBase.php similarity index 100% rename from htdocs/includes/stripe/lib/Error/OAuth/OAuthBase.php rename to htdocs/includes/stripe/stripe-php/lib/Error/OAuth/OAuthBase.php diff --git a/htdocs/includes/stripe/lib/Error/OAuth/UnsupportedGrantType.php b/htdocs/includes/stripe/stripe-php/lib/Error/OAuth/UnsupportedGrantType.php similarity index 100% rename from htdocs/includes/stripe/lib/Error/OAuth/UnsupportedGrantType.php rename to htdocs/includes/stripe/stripe-php/lib/Error/OAuth/UnsupportedGrantType.php diff --git a/htdocs/includes/stripe/lib/Error/OAuth/UnsupportedResponseType.php b/htdocs/includes/stripe/stripe-php/lib/Error/OAuth/UnsupportedResponseType.php similarity index 100% rename from htdocs/includes/stripe/lib/Error/OAuth/UnsupportedResponseType.php rename to htdocs/includes/stripe/stripe-php/lib/Error/OAuth/UnsupportedResponseType.php diff --git a/htdocs/includes/stripe/lib/Error/Permission.php b/htdocs/includes/stripe/stripe-php/lib/Error/Permission.php similarity index 100% rename from htdocs/includes/stripe/lib/Error/Permission.php rename to htdocs/includes/stripe/stripe-php/lib/Error/Permission.php diff --git a/htdocs/includes/stripe/lib/Error/RateLimit.php b/htdocs/includes/stripe/stripe-php/lib/Error/RateLimit.php similarity index 100% rename from htdocs/includes/stripe/lib/Error/RateLimit.php rename to htdocs/includes/stripe/stripe-php/lib/Error/RateLimit.php diff --git a/htdocs/includes/stripe/lib/Error/SignatureVerification.php b/htdocs/includes/stripe/stripe-php/lib/Error/SignatureVerification.php similarity index 100% rename from htdocs/includes/stripe/lib/Error/SignatureVerification.php rename to htdocs/includes/stripe/stripe-php/lib/Error/SignatureVerification.php diff --git a/htdocs/includes/stripe/lib/Event.php b/htdocs/includes/stripe/stripe-php/lib/Event.php similarity index 99% rename from htdocs/includes/stripe/lib/Event.php rename to htdocs/includes/stripe/stripe-php/lib/Event.php index a986c35dfec..f9a004aa6a9 100644 --- a/htdocs/includes/stripe/lib/Event.php +++ b/htdocs/includes/stripe/stripe-php/lib/Event.php @@ -20,7 +20,6 @@ namespace Stripe; */ class Event extends ApiResource { - const OBJECT_NAME = "event"; /** diff --git a/htdocs/includes/stripe/lib/ExchangeRate.php b/htdocs/includes/stripe/stripe-php/lib/ExchangeRate.php similarity index 99% rename from htdocs/includes/stripe/lib/ExchangeRate.php rename to htdocs/includes/stripe/stripe-php/lib/ExchangeRate.php index 803a5f87700..6a7e7a36a38 100644 --- a/htdocs/includes/stripe/lib/ExchangeRate.php +++ b/htdocs/includes/stripe/stripe-php/lib/ExchangeRate.php @@ -9,7 +9,6 @@ namespace Stripe; */ class ExchangeRate extends ApiResource { - const OBJECT_NAME = "exchange_rate"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/File.php b/htdocs/includes/stripe/stripe-php/lib/File.php similarity index 100% rename from htdocs/includes/stripe/lib/File.php rename to htdocs/includes/stripe/stripe-php/lib/File.php diff --git a/htdocs/includes/stripe/lib/FileLink.php b/htdocs/includes/stripe/stripe-php/lib/FileLink.php similarity index 99% rename from htdocs/includes/stripe/lib/FileLink.php rename to htdocs/includes/stripe/stripe-php/lib/FileLink.php index 2a012b36105..385971f7d82 100644 --- a/htdocs/includes/stripe/lib/FileLink.php +++ b/htdocs/includes/stripe/stripe-php/lib/FileLink.php @@ -19,7 +19,6 @@ namespace Stripe; */ class FileLink extends ApiResource { - const OBJECT_NAME = "file_link"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/FileUpload.php b/htdocs/includes/stripe/stripe-php/lib/FileUpload.php similarity index 100% rename from htdocs/includes/stripe/lib/FileUpload.php rename to htdocs/includes/stripe/stripe-php/lib/FileUpload.php diff --git a/htdocs/includes/stripe/lib/HttpClient/ClientInterface.php b/htdocs/includes/stripe/stripe-php/lib/HttpClient/ClientInterface.php similarity index 100% rename from htdocs/includes/stripe/lib/HttpClient/ClientInterface.php rename to htdocs/includes/stripe/stripe-php/lib/HttpClient/ClientInterface.php diff --git a/htdocs/includes/stripe/lib/HttpClient/CurlClient.php b/htdocs/includes/stripe/stripe-php/lib/HttpClient/CurlClient.php similarity index 100% rename from htdocs/includes/stripe/lib/HttpClient/CurlClient.php rename to htdocs/includes/stripe/stripe-php/lib/HttpClient/CurlClient.php diff --git a/htdocs/includes/stripe/lib/Invoice.php b/htdocs/includes/stripe/stripe-php/lib/Invoice.php similarity index 99% rename from htdocs/includes/stripe/lib/Invoice.php rename to htdocs/includes/stripe/stripe-php/lib/Invoice.php index 31a84585485..a309dd9e477 100644 --- a/htdocs/includes/stripe/lib/Invoice.php +++ b/htdocs/includes/stripe/stripe-php/lib/Invoice.php @@ -70,7 +70,6 @@ namespace Stripe; */ class Invoice extends ApiResource { - const OBJECT_NAME = "invoice"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/InvoiceItem.php b/htdocs/includes/stripe/stripe-php/lib/InvoiceItem.php similarity index 99% rename from htdocs/includes/stripe/lib/InvoiceItem.php rename to htdocs/includes/stripe/stripe-php/lib/InvoiceItem.php index 02ca0f2d7ee..2f74dabec5c 100644 --- a/htdocs/includes/stripe/lib/InvoiceItem.php +++ b/htdocs/includes/stripe/stripe-php/lib/InvoiceItem.php @@ -29,7 +29,6 @@ namespace Stripe; */ class InvoiceItem extends ApiResource { - const OBJECT_NAME = "invoiceitem"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/InvoiceLineItem.php b/htdocs/includes/stripe/stripe-php/lib/InvoiceLineItem.php similarity index 100% rename from htdocs/includes/stripe/lib/InvoiceLineItem.php rename to htdocs/includes/stripe/stripe-php/lib/InvoiceLineItem.php diff --git a/htdocs/includes/stripe/lib/IssuerFraudRecord.php b/htdocs/includes/stripe/stripe-php/lib/IssuerFraudRecord.php similarity index 99% rename from htdocs/includes/stripe/lib/IssuerFraudRecord.php rename to htdocs/includes/stripe/stripe-php/lib/IssuerFraudRecord.php index 8db4b31b0b4..805dc502885 100644 --- a/htdocs/includes/stripe/lib/IssuerFraudRecord.php +++ b/htdocs/includes/stripe/stripe-php/lib/IssuerFraudRecord.php @@ -17,7 +17,6 @@ namespace Stripe; */ class IssuerFraudRecord extends ApiResource { - const OBJECT_NAME = "issuer_fraud_record"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/Issuing/Authorization.php b/htdocs/includes/stripe/stripe-php/lib/Issuing/Authorization.php similarity index 100% rename from htdocs/includes/stripe/lib/Issuing/Authorization.php rename to htdocs/includes/stripe/stripe-php/lib/Issuing/Authorization.php diff --git a/htdocs/includes/stripe/lib/Issuing/Card.php b/htdocs/includes/stripe/stripe-php/lib/Issuing/Card.php similarity index 100% rename from htdocs/includes/stripe/lib/Issuing/Card.php rename to htdocs/includes/stripe/stripe-php/lib/Issuing/Card.php diff --git a/htdocs/includes/stripe/lib/Issuing/CardDetails.php b/htdocs/includes/stripe/stripe-php/lib/Issuing/CardDetails.php similarity index 100% rename from htdocs/includes/stripe/lib/Issuing/CardDetails.php rename to htdocs/includes/stripe/stripe-php/lib/Issuing/CardDetails.php diff --git a/htdocs/includes/stripe/lib/Issuing/Cardholder.php b/htdocs/includes/stripe/stripe-php/lib/Issuing/Cardholder.php similarity index 100% rename from htdocs/includes/stripe/lib/Issuing/Cardholder.php rename to htdocs/includes/stripe/stripe-php/lib/Issuing/Cardholder.php diff --git a/htdocs/includes/stripe/lib/Issuing/Dispute.php b/htdocs/includes/stripe/stripe-php/lib/Issuing/Dispute.php similarity index 100% rename from htdocs/includes/stripe/lib/Issuing/Dispute.php rename to htdocs/includes/stripe/stripe-php/lib/Issuing/Dispute.php diff --git a/htdocs/includes/stripe/lib/Issuing/Transaction.php b/htdocs/includes/stripe/stripe-php/lib/Issuing/Transaction.php similarity index 100% rename from htdocs/includes/stripe/lib/Issuing/Transaction.php rename to htdocs/includes/stripe/stripe-php/lib/Issuing/Transaction.php diff --git a/htdocs/includes/stripe/lib/LoginLink.php b/htdocs/includes/stripe/stripe-php/lib/LoginLink.php similarity index 99% rename from htdocs/includes/stripe/lib/LoginLink.php rename to htdocs/includes/stripe/stripe-php/lib/LoginLink.php index 3a443bf1681..9f677364b17 100644 --- a/htdocs/includes/stripe/lib/LoginLink.php +++ b/htdocs/includes/stripe/stripe-php/lib/LoginLink.php @@ -13,6 +13,5 @@ namespace Stripe; */ class LoginLink extends ApiResource { - const OBJECT_NAME = "login_link"; } diff --git a/htdocs/includes/stripe/lib/OAuth.php b/htdocs/includes/stripe/stripe-php/lib/OAuth.php similarity index 100% rename from htdocs/includes/stripe/lib/OAuth.php rename to htdocs/includes/stripe/stripe-php/lib/OAuth.php diff --git a/htdocs/includes/stripe/lib/Order.php b/htdocs/includes/stripe/stripe-php/lib/Order.php similarity index 99% rename from htdocs/includes/stripe/lib/Order.php rename to htdocs/includes/stripe/stripe-php/lib/Order.php index 0688c6ef937..1f2ce2563ac 100644 --- a/htdocs/includes/stripe/lib/Order.php +++ b/htdocs/includes/stripe/stripe-php/lib/Order.php @@ -33,7 +33,6 @@ namespace Stripe; */ class Order extends ApiResource { - const OBJECT_NAME = "order"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/OrderItem.php b/htdocs/includes/stripe/stripe-php/lib/OrderItem.php similarity index 99% rename from htdocs/includes/stripe/lib/OrderItem.php rename to htdocs/includes/stripe/stripe-php/lib/OrderItem.php index 26d49b4e751..6ef1242fc34 100644 --- a/htdocs/includes/stripe/lib/OrderItem.php +++ b/htdocs/includes/stripe/stripe-php/lib/OrderItem.php @@ -17,6 +17,5 @@ namespace Stripe; */ class OrderItem extends StripeObject { - const OBJECT_NAME = "order_item"; } diff --git a/htdocs/includes/stripe/lib/OrderReturn.php b/htdocs/includes/stripe/stripe-php/lib/OrderReturn.php similarity index 99% rename from htdocs/includes/stripe/lib/OrderReturn.php rename to htdocs/includes/stripe/stripe-php/lib/OrderReturn.php index f3705e86166..3b1ca8efa12 100644 --- a/htdocs/includes/stripe/lib/OrderReturn.php +++ b/htdocs/includes/stripe/stripe-php/lib/OrderReturn.php @@ -19,7 +19,6 @@ namespace Stripe; */ class OrderReturn extends ApiResource { - const OBJECT_NAME = "order_return"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/PaymentIntent.php b/htdocs/includes/stripe/stripe-php/lib/PaymentIntent.php similarity index 99% rename from htdocs/includes/stripe/lib/PaymentIntent.php rename to htdocs/includes/stripe/stripe-php/lib/PaymentIntent.php index 47cbf8fc6cb..b70b1577899 100644 --- a/htdocs/includes/stripe/lib/PaymentIntent.php +++ b/htdocs/includes/stripe/stripe-php/lib/PaymentIntent.php @@ -42,7 +42,6 @@ namespace Stripe; */ class PaymentIntent extends ApiResource { - const OBJECT_NAME = "payment_intent"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/PaymentMethod.php b/htdocs/includes/stripe/stripe-php/lib/PaymentMethod.php similarity index 99% rename from htdocs/includes/stripe/lib/PaymentMethod.php rename to htdocs/includes/stripe/stripe-php/lib/PaymentMethod.php index 1a0bc371d5d..c0557e8c394 100644 --- a/htdocs/includes/stripe/lib/PaymentMethod.php +++ b/htdocs/includes/stripe/stripe-php/lib/PaymentMethod.php @@ -22,7 +22,6 @@ namespace Stripe; */ class PaymentMethod extends ApiResource { - const OBJECT_NAME = "payment_method"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/Payout.php b/htdocs/includes/stripe/stripe-php/lib/Payout.php similarity index 99% rename from htdocs/includes/stripe/lib/Payout.php rename to htdocs/includes/stripe/stripe-php/lib/Payout.php index 365d7e47ee9..131bd4ae06d 100644 --- a/htdocs/includes/stripe/lib/Payout.php +++ b/htdocs/includes/stripe/stripe-php/lib/Payout.php @@ -30,7 +30,6 @@ namespace Stripe; */ class Payout extends ApiResource { - const OBJECT_NAME = "payout"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/Person.php b/htdocs/includes/stripe/stripe-php/lib/Person.php similarity index 99% rename from htdocs/includes/stripe/lib/Person.php rename to htdocs/includes/stripe/stripe-php/lib/Person.php index f79b80da060..5540f7c5f28 100644 --- a/htdocs/includes/stripe/lib/Person.php +++ b/htdocs/includes/stripe/stripe-php/lib/Person.php @@ -35,7 +35,6 @@ namespace Stripe; */ class Person extends ApiResource { - const OBJECT_NAME = "person"; use ApiOperations\Delete; diff --git a/htdocs/includes/stripe/lib/Plan.php b/htdocs/includes/stripe/stripe-php/lib/Plan.php similarity index 99% rename from htdocs/includes/stripe/lib/Plan.php rename to htdocs/includes/stripe/stripe-php/lib/Plan.php index 54a2b58eb35..1a7ae87dda8 100644 --- a/htdocs/includes/stripe/lib/Plan.php +++ b/htdocs/includes/stripe/stripe-php/lib/Plan.php @@ -29,7 +29,6 @@ namespace Stripe; */ class Plan extends ApiResource { - const OBJECT_NAME = "plan"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/Product.php b/htdocs/includes/stripe/stripe-php/lib/Product.php similarity index 99% rename from htdocs/includes/stripe/lib/Product.php rename to htdocs/includes/stripe/stripe-php/lib/Product.php index cb27ef42d8c..6c60d20c4a7 100644 --- a/htdocs/includes/stripe/lib/Product.php +++ b/htdocs/includes/stripe/stripe-php/lib/Product.php @@ -29,7 +29,6 @@ namespace Stripe; */ class Product extends ApiResource { - const OBJECT_NAME = "product"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/Radar/EarlyFraudWarning.php b/htdocs/includes/stripe/stripe-php/lib/Radar/EarlyFraudWarning.php similarity index 100% rename from htdocs/includes/stripe/lib/Radar/EarlyFraudWarning.php rename to htdocs/includes/stripe/stripe-php/lib/Radar/EarlyFraudWarning.php diff --git a/htdocs/includes/stripe/lib/Radar/ValueList.php b/htdocs/includes/stripe/stripe-php/lib/Radar/ValueList.php similarity index 100% rename from htdocs/includes/stripe/lib/Radar/ValueList.php rename to htdocs/includes/stripe/stripe-php/lib/Radar/ValueList.php diff --git a/htdocs/includes/stripe/lib/Radar/ValueListItem.php b/htdocs/includes/stripe/stripe-php/lib/Radar/ValueListItem.php similarity index 100% rename from htdocs/includes/stripe/lib/Radar/ValueListItem.php rename to htdocs/includes/stripe/stripe-php/lib/Radar/ValueListItem.php diff --git a/htdocs/includes/stripe/lib/Recipient.php b/htdocs/includes/stripe/stripe-php/lib/Recipient.php similarity index 99% rename from htdocs/includes/stripe/lib/Recipient.php rename to htdocs/includes/stripe/stripe-php/lib/Recipient.php index 2d5eda5cf7f..35a695f5084 100644 --- a/htdocs/includes/stripe/lib/Recipient.php +++ b/htdocs/includes/stripe/stripe-php/lib/Recipient.php @@ -24,7 +24,6 @@ namespace Stripe; */ class Recipient extends ApiResource { - const OBJECT_NAME = "recipient"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/RecipientTransfer.php b/htdocs/includes/stripe/stripe-php/lib/RecipientTransfer.php similarity index 99% rename from htdocs/includes/stripe/lib/RecipientTransfer.php rename to htdocs/includes/stripe/stripe-php/lib/RecipientTransfer.php index 17de5a52e51..7a2ec1f3fb7 100644 --- a/htdocs/includes/stripe/lib/RecipientTransfer.php +++ b/htdocs/includes/stripe/stripe-php/lib/RecipientTransfer.php @@ -34,6 +34,5 @@ namespace Stripe; */ class RecipientTransfer extends ApiResource { - const OBJECT_NAME = "recipient_transfer"; } diff --git a/htdocs/includes/stripe/lib/Refund.php b/htdocs/includes/stripe/stripe-php/lib/Refund.php similarity index 99% rename from htdocs/includes/stripe/lib/Refund.php rename to htdocs/includes/stripe/stripe-php/lib/Refund.php index 6f3fdfaf445..f8b4529b72e 100644 --- a/htdocs/includes/stripe/lib/Refund.php +++ b/htdocs/includes/stripe/stripe-php/lib/Refund.php @@ -26,7 +26,6 @@ namespace Stripe; */ class Refund extends ApiResource { - const OBJECT_NAME = "refund"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/Reporting/ReportRun.php b/htdocs/includes/stripe/stripe-php/lib/Reporting/ReportRun.php similarity index 100% rename from htdocs/includes/stripe/lib/Reporting/ReportRun.php rename to htdocs/includes/stripe/stripe-php/lib/Reporting/ReportRun.php diff --git a/htdocs/includes/stripe/lib/Reporting/ReportType.php b/htdocs/includes/stripe/stripe-php/lib/Reporting/ReportType.php similarity index 100% rename from htdocs/includes/stripe/lib/Reporting/ReportType.php rename to htdocs/includes/stripe/stripe-php/lib/Reporting/ReportType.php diff --git a/htdocs/includes/stripe/lib/RequestTelemetry.php b/htdocs/includes/stripe/stripe-php/lib/RequestTelemetry.php similarity index 100% rename from htdocs/includes/stripe/lib/RequestTelemetry.php rename to htdocs/includes/stripe/stripe-php/lib/RequestTelemetry.php diff --git a/htdocs/includes/stripe/lib/Review.php b/htdocs/includes/stripe/stripe-php/lib/Review.php similarity index 100% rename from htdocs/includes/stripe/lib/Review.php rename to htdocs/includes/stripe/stripe-php/lib/Review.php diff --git a/htdocs/includes/stripe/lib/SKU.php b/htdocs/includes/stripe/stripe-php/lib/SKU.php similarity index 99% rename from htdocs/includes/stripe/lib/SKU.php rename to htdocs/includes/stripe/stripe-php/lib/SKU.php index 5b50df8a847..cb3aa6f73f1 100644 --- a/htdocs/includes/stripe/lib/SKU.php +++ b/htdocs/includes/stripe/stripe-php/lib/SKU.php @@ -24,7 +24,6 @@ namespace Stripe; */ class SKU extends ApiResource { - const OBJECT_NAME = "sku"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/SetupIntent.php b/htdocs/includes/stripe/stripe-php/lib/SetupIntent.php similarity index 99% rename from htdocs/includes/stripe/lib/SetupIntent.php rename to htdocs/includes/stripe/stripe-php/lib/SetupIntent.php index f476fb35fa9..176a411b67f 100644 --- a/htdocs/includes/stripe/lib/SetupIntent.php +++ b/htdocs/includes/stripe/stripe-php/lib/SetupIntent.php @@ -25,7 +25,6 @@ namespace Stripe; */ class SetupIntent extends ApiResource { - const OBJECT_NAME = "setup_intent"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/Sigma/ScheduledQueryRun.php b/htdocs/includes/stripe/stripe-php/lib/Sigma/ScheduledQueryRun.php similarity index 100% rename from htdocs/includes/stripe/lib/Sigma/ScheduledQueryRun.php rename to htdocs/includes/stripe/stripe-php/lib/Sigma/ScheduledQueryRun.php diff --git a/htdocs/includes/stripe/lib/SingletonApiResource.php b/htdocs/includes/stripe/stripe-php/lib/SingletonApiResource.php similarity index 100% rename from htdocs/includes/stripe/lib/SingletonApiResource.php rename to htdocs/includes/stripe/stripe-php/lib/SingletonApiResource.php diff --git a/htdocs/includes/stripe/lib/Source.php b/htdocs/includes/stripe/stripe-php/lib/Source.php similarity index 99% rename from htdocs/includes/stripe/lib/Source.php rename to htdocs/includes/stripe/stripe-php/lib/Source.php index 1e2c8c73565..ec5cc42127e 100644 --- a/htdocs/includes/stripe/lib/Source.php +++ b/htdocs/includes/stripe/stripe-php/lib/Source.php @@ -43,7 +43,6 @@ namespace Stripe; */ class Source extends ApiResource { - const OBJECT_NAME = "source"; use ApiOperations\Create; diff --git a/htdocs/includes/stripe/lib/SourceTransaction.php b/htdocs/includes/stripe/stripe-php/lib/SourceTransaction.php similarity index 99% rename from htdocs/includes/stripe/lib/SourceTransaction.php rename to htdocs/includes/stripe/stripe-php/lib/SourceTransaction.php index 018a896240e..d004032c569 100644 --- a/htdocs/includes/stripe/lib/SourceTransaction.php +++ b/htdocs/includes/stripe/stripe-php/lib/SourceTransaction.php @@ -18,6 +18,5 @@ namespace Stripe; */ class SourceTransaction extends ApiResource { - const OBJECT_NAME = "source_transaction"; } diff --git a/htdocs/includes/stripe/lib/Stripe.php b/htdocs/includes/stripe/stripe-php/lib/Stripe.php similarity index 99% rename from htdocs/includes/stripe/lib/Stripe.php rename to htdocs/includes/stripe/stripe-php/lib/Stripe.php index 2397ef9c418..0b533e0eb5c 100644 --- a/htdocs/includes/stripe/lib/Stripe.php +++ b/htdocs/includes/stripe/stripe-php/lib/Stripe.php @@ -46,7 +46,7 @@ class Stripe // @var int Maximum number of request retries public static $maxNetworkRetries = 0; - // @var boolean Whether client telemetry is enabled. Defaults to false. + // @var boolean Whether client telemetry is enabled. Defaults to true. public static $enableTelemetry = true; // @var float Maximum delay between retries, in seconds @@ -55,7 +55,7 @@ class Stripe // @var float Initial delay between retries, in seconds private static $initialNetworkRetryDelay = 0.5; - const VERSION = '6.41.0'; + const VERSION = '6.43.1'; /** * @return string The API key used for requests. diff --git a/htdocs/includes/stripe/lib/StripeObject.php b/htdocs/includes/stripe/stripe-php/lib/StripeObject.php similarity index 99% rename from htdocs/includes/stripe/lib/StripeObject.php rename to htdocs/includes/stripe/stripe-php/lib/StripeObject.php index 432e95b7f0b..62e02c0e0cc 100644 --- a/htdocs/includes/stripe/lib/StripeObject.php +++ b/htdocs/includes/stripe/stripe-php/lib/StripeObject.php @@ -153,7 +153,7 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable $nullval = null; if (!empty($this->_values) && array_key_exists($k, $this->_values)) { return $this->_values[$k]; - } else if (!empty($this->_transientValues) && $this->_transientValues->includes($k)) { + } elseif (!empty($this->_transientValues) && $this->_transientValues->includes($k)) { $class = get_class($this); $attrs = join(', ', array_keys($this->_values)); $message = "Stripe Notice: Undefined property of $class instance: $k. " diff --git a/htdocs/includes/stripe/lib/Subscription.php b/htdocs/includes/stripe/stripe-php/lib/Subscription.php similarity index 98% rename from htdocs/includes/stripe/lib/Subscription.php rename to htdocs/includes/stripe/stripe-php/lib/Subscription.php index f5a46171d81..a1087a56a4c 100644 --- a/htdocs/includes/stripe/lib/Subscription.php +++ b/htdocs/includes/stripe/stripe-php/lib/Subscription.php @@ -28,6 +28,7 @@ namespace Stripe; * @property string $latest_invoice * @property boolean $livemode * @property StripeObject $metadata + * @property string $pending_setup_intent * @property Plan $plan * @property int $quantity * @property SubscriptionSchedule $schedule @@ -42,7 +43,6 @@ namespace Stripe; */ class Subscription extends ApiResource { - const OBJECT_NAME = "subscription"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/SubscriptionItem.php b/htdocs/includes/stripe/stripe-php/lib/SubscriptionItem.php similarity index 65% rename from htdocs/includes/stripe/lib/SubscriptionItem.php rename to htdocs/includes/stripe/stripe-php/lib/SubscriptionItem.php index 5baa540fe98..d0d2dea8fcf 100644 --- a/htdocs/includes/stripe/lib/SubscriptionItem.php +++ b/htdocs/includes/stripe/stripe-php/lib/SubscriptionItem.php @@ -19,20 +19,34 @@ namespace Stripe; */ class SubscriptionItem extends ApiResource { - const OBJECT_NAME = "subscription_item"; + const PATH_USAGE_RECORDS = '/usage_records'; + use ApiOperations\All; use ApiOperations\Create; use ApiOperations\Delete; + use ApiOperations\NestedResource; use ApiOperations\Retrieve; use ApiOperations\Update; + /** + * @param string|null $id The ID of the subscription item on which to create the usage record. + * @param array|null $params + * @param array|string|null $opts + * + * @return ApiResource + */ + public static function createUsageRecord($id, $params = null, $opts = null) + { + return self::_createNestedResource($id, static::PATH_USAGE_RECORDS, $params, $opts); + } + /** * @param array|null $params * @param array|string|null $options * - * @return Collection The list of source transactions. + * @return Collection The list of usage record summaries. */ public function usageRecordSummaries($params = null, $options = null) { diff --git a/htdocs/includes/stripe/lib/SubscriptionSchedule.php b/htdocs/includes/stripe/stripe-php/lib/SubscriptionSchedule.php similarity index 56% rename from htdocs/includes/stripe/lib/SubscriptionSchedule.php rename to htdocs/includes/stripe/stripe-php/lib/SubscriptionSchedule.php index ac3686f1db8..e41f279a036 100644 --- a/htdocs/includes/stripe/lib/SubscriptionSchedule.php +++ b/htdocs/includes/stripe/stripe-php/lib/SubscriptionSchedule.php @@ -30,7 +30,6 @@ namespace Stripe; */ class SubscriptionSchedule extends ApiResource { - const OBJECT_NAME = "subscription_schedule"; use ApiOperations\All; @@ -39,8 +38,6 @@ class SubscriptionSchedule extends ApiResource use ApiOperations\Update; use ApiOperations\NestedResource; - const PATH_REVISIONS = '/revisions'; - /** * @param array|null $params * @param array|string|null $opts @@ -68,44 +65,4 @@ class SubscriptionSchedule extends ApiResource $this->refreshFrom($response, $opts); return $this; } - - /** - * @param array|null $params - * @param array|string|null $options - * - * @return Collection The list of subscription schedule revisions. - */ - public function revisions($params = null, $options = null) - { - $url = $this->instanceUrl() . '/revisions'; - list($response, $opts) = $this->_request('get', $url, $params, $options); - $obj = Util\Util::convertToStripeObject($response, $opts); - $obj->setLastResponse($response); - return $obj; - } - - /** - * @param array|null $id The ID of the subscription schedule to which the person belongs. - * @param array|null $personId The ID of the person to retrieve. - * @param array|null $params - * @param array|string|null $opts - * - * @return Revision - */ - public static function retrieveRevision($id, $personId, $params = null, $opts = null) - { - return self::_retrieveNestedResource($id, static::PATH_REVISIONS, $personId, $params, $opts); - } - - /** - * @param array|null $id The ID of the subscription schedule on which to retrieve the persons. - * @param array|null $params - * @param array|string|null $opts - * - * @return Collection The list of revisions. - */ - public static function allRevisions($id, $params = null, $opts = null) - { - return self::_allNestedResources($id, static::PATH_REVISIONS, $params, $opts); - } } diff --git a/htdocs/includes/stripe/lib/TaxId.php b/htdocs/includes/stripe/stripe-php/lib/TaxId.php similarity index 99% rename from htdocs/includes/stripe/lib/TaxId.php rename to htdocs/includes/stripe/stripe-php/lib/TaxId.php index 0f72a2ac95f..8d607132e6e 100644 --- a/htdocs/includes/stripe/lib/TaxId.php +++ b/htdocs/includes/stripe/stripe-php/lib/TaxId.php @@ -19,7 +19,6 @@ namespace Stripe; */ class TaxId extends ApiResource { - const OBJECT_NAME = "tax_id"; use ApiOperations\Delete; diff --git a/htdocs/includes/stripe/lib/TaxRate.php b/htdocs/includes/stripe/stripe-php/lib/TaxRate.php similarity index 99% rename from htdocs/includes/stripe/lib/TaxRate.php rename to htdocs/includes/stripe/stripe-php/lib/TaxRate.php index 25884dd840f..9f416507cf4 100644 --- a/htdocs/includes/stripe/lib/TaxRate.php +++ b/htdocs/includes/stripe/stripe-php/lib/TaxRate.php @@ -21,7 +21,6 @@ namespace Stripe; */ class TaxRate extends ApiResource { - const OBJECT_NAME = "tax_rate"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/Terminal/ConnectionToken.php b/htdocs/includes/stripe/stripe-php/lib/Terminal/ConnectionToken.php similarity index 100% rename from htdocs/includes/stripe/lib/Terminal/ConnectionToken.php rename to htdocs/includes/stripe/stripe-php/lib/Terminal/ConnectionToken.php diff --git a/htdocs/includes/stripe/lib/Terminal/Location.php b/htdocs/includes/stripe/stripe-php/lib/Terminal/Location.php similarity index 100% rename from htdocs/includes/stripe/lib/Terminal/Location.php rename to htdocs/includes/stripe/stripe-php/lib/Terminal/Location.php diff --git a/htdocs/includes/stripe/lib/Terminal/Reader.php b/htdocs/includes/stripe/stripe-php/lib/Terminal/Reader.php similarity index 100% rename from htdocs/includes/stripe/lib/Terminal/Reader.php rename to htdocs/includes/stripe/stripe-php/lib/Terminal/Reader.php diff --git a/htdocs/includes/stripe/lib/ThreeDSecure.php b/htdocs/includes/stripe/stripe-php/lib/ThreeDSecure.php similarity index 99% rename from htdocs/includes/stripe/lib/ThreeDSecure.php rename to htdocs/includes/stripe/stripe-php/lib/ThreeDSecure.php index 5e67e351ba7..3869eba85b3 100644 --- a/htdocs/includes/stripe/lib/ThreeDSecure.php +++ b/htdocs/includes/stripe/stripe-php/lib/ThreeDSecure.php @@ -4,7 +4,6 @@ namespace Stripe; class ThreeDSecure extends ApiResource { - const OBJECT_NAME = "three_d_secure"; use ApiOperations\Create; diff --git a/htdocs/includes/stripe/lib/Token.php b/htdocs/includes/stripe/stripe-php/lib/Token.php similarity index 99% rename from htdocs/includes/stripe/lib/Token.php rename to htdocs/includes/stripe/stripe-php/lib/Token.php index 989219fc789..629d51f6867 100644 --- a/htdocs/includes/stripe/lib/Token.php +++ b/htdocs/includes/stripe/stripe-php/lib/Token.php @@ -19,7 +19,6 @@ namespace Stripe; */ class Token extends ApiResource { - const OBJECT_NAME = "token"; use ApiOperations\Create; diff --git a/htdocs/includes/stripe/lib/Topup.php b/htdocs/includes/stripe/stripe-php/lib/Topup.php similarity index 99% rename from htdocs/includes/stripe/lib/Topup.php rename to htdocs/includes/stripe/stripe-php/lib/Topup.php index 9ad96670a55..37625a329ff 100644 --- a/htdocs/includes/stripe/lib/Topup.php +++ b/htdocs/includes/stripe/stripe-php/lib/Topup.php @@ -26,7 +26,6 @@ namespace Stripe; */ class Topup extends ApiResource { - const OBJECT_NAME = "topup"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/Transfer.php b/htdocs/includes/stripe/stripe-php/lib/Transfer.php similarity index 99% rename from htdocs/includes/stripe/lib/Transfer.php rename to htdocs/includes/stripe/stripe-php/lib/Transfer.php index dff2faa3329..bf9fa25ce37 100644 --- a/htdocs/includes/stripe/lib/Transfer.php +++ b/htdocs/includes/stripe/stripe-php/lib/Transfer.php @@ -27,7 +27,6 @@ namespace Stripe; */ class Transfer extends ApiResource { - const OBJECT_NAME = "transfer"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/TransferReversal.php b/htdocs/includes/stripe/stripe-php/lib/TransferReversal.php similarity index 99% rename from htdocs/includes/stripe/lib/TransferReversal.php rename to htdocs/includes/stripe/stripe-php/lib/TransferReversal.php index c945e5a9360..a4f94f2fb43 100644 --- a/htdocs/includes/stripe/lib/TransferReversal.php +++ b/htdocs/includes/stripe/stripe-php/lib/TransferReversal.php @@ -20,7 +20,6 @@ namespace Stripe; */ class TransferReversal extends ApiResource { - const OBJECT_NAME = "transfer_reversal"; use ApiOperations\Update { diff --git a/htdocs/includes/stripe/lib/UsageRecord.php b/htdocs/includes/stripe/stripe-php/lib/UsageRecord.php similarity index 99% rename from htdocs/includes/stripe/lib/UsageRecord.php rename to htdocs/includes/stripe/stripe-php/lib/UsageRecord.php index a9e3a25e3e9..1239222d49d 100644 --- a/htdocs/includes/stripe/lib/UsageRecord.php +++ b/htdocs/includes/stripe/stripe-php/lib/UsageRecord.php @@ -16,7 +16,6 @@ namespace Stripe; */ class UsageRecord extends ApiResource { - const OBJECT_NAME = "usage_record"; /** diff --git a/htdocs/includes/stripe/lib/UsageRecordSummary.php b/htdocs/includes/stripe/stripe-php/lib/UsageRecordSummary.php similarity index 99% rename from htdocs/includes/stripe/lib/UsageRecordSummary.php rename to htdocs/includes/stripe/stripe-php/lib/UsageRecordSummary.php index b8f4aebe974..9d3e7a396ed 100644 --- a/htdocs/includes/stripe/lib/UsageRecordSummary.php +++ b/htdocs/includes/stripe/stripe-php/lib/UsageRecordSummary.php @@ -17,6 +17,5 @@ namespace Stripe; */ class UsageRecordSummary extends ApiResource { - const OBJECT_NAME = "usage_record_summary"; } diff --git a/htdocs/includes/stripe/lib/Util/AutoPagingIterator.php b/htdocs/includes/stripe/stripe-php/lib/Util/AutoPagingIterator.php similarity index 100% rename from htdocs/includes/stripe/lib/Util/AutoPagingIterator.php rename to htdocs/includes/stripe/stripe-php/lib/Util/AutoPagingIterator.php diff --git a/htdocs/includes/stripe/lib/Util/CaseInsensitiveArray.php b/htdocs/includes/stripe/stripe-php/lib/Util/CaseInsensitiveArray.php similarity index 100% rename from htdocs/includes/stripe/lib/Util/CaseInsensitiveArray.php rename to htdocs/includes/stripe/stripe-php/lib/Util/CaseInsensitiveArray.php diff --git a/htdocs/includes/stripe/lib/Util/DefaultLogger.php b/htdocs/includes/stripe/stripe-php/lib/Util/DefaultLogger.php similarity index 100% rename from htdocs/includes/stripe/lib/Util/DefaultLogger.php rename to htdocs/includes/stripe/stripe-php/lib/Util/DefaultLogger.php diff --git a/htdocs/includes/stripe/lib/Util/LoggerInterface.php b/htdocs/includes/stripe/stripe-php/lib/Util/LoggerInterface.php similarity index 98% rename from htdocs/includes/stripe/lib/Util/LoggerInterface.php rename to htdocs/includes/stripe/stripe-php/lib/Util/LoggerInterface.php index bbdfc929982..cf04e1d2bad 100644 --- a/htdocs/includes/stripe/lib/Util/LoggerInterface.php +++ b/htdocs/includes/stripe/stripe-php/lib/Util/LoggerInterface.php @@ -30,7 +30,7 @@ interface LoggerInterface * * @param string $message * @param array $context - * @return null + * @return void */ public function error($message, array $context = []); } diff --git a/htdocs/includes/stripe/lib/Util/RandomGenerator.php b/htdocs/includes/stripe/stripe-php/lib/Util/RandomGenerator.php similarity index 100% rename from htdocs/includes/stripe/lib/Util/RandomGenerator.php rename to htdocs/includes/stripe/stripe-php/lib/Util/RandomGenerator.php diff --git a/htdocs/includes/stripe/lib/Util/RequestOptions.php b/htdocs/includes/stripe/stripe-php/lib/Util/RequestOptions.php similarity index 100% rename from htdocs/includes/stripe/lib/Util/RequestOptions.php rename to htdocs/includes/stripe/stripe-php/lib/Util/RequestOptions.php diff --git a/htdocs/includes/stripe/lib/Util/Set.php b/htdocs/includes/stripe/stripe-php/lib/Util/Set.php similarity index 100% rename from htdocs/includes/stripe/lib/Util/Set.php rename to htdocs/includes/stripe/stripe-php/lib/Util/Set.php diff --git a/htdocs/includes/stripe/lib/Util/Util.php b/htdocs/includes/stripe/stripe-php/lib/Util/Util.php similarity index 99% rename from htdocs/includes/stripe/lib/Util/Util.php rename to htdocs/includes/stripe/stripe-php/lib/Util/Util.php index f9f15440023..dd8677aa099 100644 --- a/htdocs/includes/stripe/lib/Util/Util.php +++ b/htdocs/includes/stripe/stripe-php/lib/Util/Util.php @@ -135,7 +135,6 @@ abstract class Util \Stripe\Subscription::OBJECT_NAME => 'Stripe\\Subscription', \Stripe\SubscriptionItem::OBJECT_NAME => 'Stripe\\SubscriptionItem', \Stripe\SubscriptionSchedule::OBJECT_NAME => 'Stripe\\SubscriptionSchedule', - \Stripe\SubscriptionScheduleRevision::OBJECT_NAME => 'Stripe\\SubscriptionScheduleRevision', \Stripe\TaxId::OBJECT_NAME => 'Stripe\\TaxId', \Stripe\TaxRate::OBJECT_NAME => 'Stripe\\TaxRate', \Stripe\ThreeDSecure::OBJECT_NAME => 'Stripe\\ThreeDSecure', diff --git a/htdocs/includes/stripe/lib/Webhook.php b/htdocs/includes/stripe/stripe-php/lib/Webhook.php similarity index 100% rename from htdocs/includes/stripe/lib/Webhook.php rename to htdocs/includes/stripe/stripe-php/lib/Webhook.php diff --git a/htdocs/includes/stripe/lib/WebhookEndpoint.php b/htdocs/includes/stripe/stripe-php/lib/WebhookEndpoint.php similarity index 99% rename from htdocs/includes/stripe/lib/WebhookEndpoint.php rename to htdocs/includes/stripe/stripe-php/lib/WebhookEndpoint.php index 27ecacf690c..636c7e1927d 100644 --- a/htdocs/includes/stripe/lib/WebhookEndpoint.php +++ b/htdocs/includes/stripe/stripe-php/lib/WebhookEndpoint.php @@ -18,7 +18,6 @@ namespace Stripe; */ class WebhookEndpoint extends ApiResource { - const OBJECT_NAME = "webhook_endpoint"; use ApiOperations\All; diff --git a/htdocs/includes/stripe/lib/WebhookSignature.php b/htdocs/includes/stripe/stripe-php/lib/WebhookSignature.php similarity index 100% rename from htdocs/includes/stripe/lib/WebhookSignature.php rename to htdocs/includes/stripe/stripe-php/lib/WebhookSignature.php diff --git a/htdocs/includes/stripe/update_certs.php b/htdocs/includes/stripe/stripe-php/update_certs.php old mode 100644 new mode 100755 similarity index 100% rename from htdocs/includes/stripe/update_certs.php rename to htdocs/includes/stripe/stripe-php/update_certs.php diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 1f1c1ed40d4..b29ac2400e9 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -195,7 +195,7 @@ if ((empty($paymentmethod) || $paymentmethod == 'paybox') && ! empty($conf->payb } if ((empty($paymentmethod) || $paymentmethod == 'stripe') && ! empty($conf->stripe->enabled)) { - require_once DOL_DOCUMENT_ROOT.'/stripe/config.php'; // This include also /stripe/lib/stripe.lib.php, /includes/stripe/init.php, ... + require_once DOL_DOCUMENT_ROOT.'/stripe/config.php'; // This include also /stripe/lib/stripe.lib.php, /includes/stripe/stripe-php/init.php, ... } // Initialize $validpaymentmethod diff --git a/htdocs/public/stripe/confirm_payment.php b/htdocs/public/stripe/confirm_payment.php index 51c2a1bf9a5..7e7dd12fcff 100644 --- a/htdocs/public/stripe/confirm_payment.php +++ b/htdocs/public/stripe/confirm_payment.php @@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; -require_once DOL_DOCUMENT_ROOT.'/includes/stripe/init.php'; +require_once DOL_DOCUMENT_ROOT.'/includes/stripe/stripe-php/init.php'; require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; if (empty($conf->stripe->enabled)) accessforbidden('', 0, 0, 1); diff --git a/htdocs/public/stripe/ipn.php b/htdocs/public/stripe/ipn.php index f634d49ebac..219ad7e487d 100644 --- a/htdocs/public/stripe/ipn.php +++ b/htdocs/public/stripe/ipn.php @@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; -require_once DOL_DOCUMENT_ROOT.'/includes/stripe/init.php'; +require_once DOL_DOCUMENT_ROOT.'/includes/stripe/stripe-php/init.php'; require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; diff --git a/htdocs/stripe/config.php b/htdocs/stripe/config.php index 65d80f9587b..730203245f4 100644 --- a/htdocs/stripe/config.php +++ b/htdocs/stripe/config.php @@ -25,8 +25,8 @@ * \brief Page to move config in api */ -require_once DOL_DOCUMENT_ROOT.'/includes/stripe/init.php'; -require_once DOL_DOCUMENT_ROOT.'/includes/stripe/lib/Stripe.php'; +require_once DOL_DOCUMENT_ROOT.'/includes/stripe/stripe-php/init.php'; +require_once DOL_DOCUMENT_ROOT.'/includes/stripe/stripe-php/lib/Stripe.php'; //global $stripe; global $conf; From 29843165ec4cf922788c689a115a0619577cba5b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 13 Mar 2020 03:28:13 +0100 Subject: [PATCH 261/313] Use the header and footer of public pages for the payment ok and ko page --- htdocs/public/payment/paymentko.php | 29 ++++++++++++---- htdocs/public/payment/paymentok.php | 51 +++++++++++++++++++---------- 2 files changed, 55 insertions(+), 25 deletions(-) diff --git a/htdocs/public/payment/paymentko.php b/htdocs/public/payment/paymentko.php index 2c8b23396c7..eac2fdf9f47 100644 --- a/htdocs/public/payment/paymentko.php +++ b/htdocs/public/payment/paymentko.php @@ -68,6 +68,7 @@ $suffix = GETPOST("suffix", 'aZ09'); // Detect $paymentmethod $paymentmethod = ''; +$reg = array(); if (preg_match('/PM=([^\.]+)/', $FULLTAG, $reg)) { $paymentmethod = $reg[1]; @@ -203,14 +204,14 @@ if (!empty($conf->global->ONLINE_PAYMENT_CSS_URL)) $head = 'dol_hide_leftmenu) ? '
' : '').'
'; +llxHeader($head, $langs->trans("PaymentForm"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea); // Show ko message print ''."\n"; print '
'."\n"; - // Show logo (search order: logo defined by PAYMENT_LOGO_suffix, then PAYMENT_LOGO, then small company logo, large company logo, theme logo, common logo) $width = 0; // Define logo and logosmall @@ -222,25 +223,39 @@ elseif (!empty($conf->global->ONLINE_PAYMENT_LOGO)) $logosmall = $conf->global-> //print ''."\n"; // Define urllogo $urllogo = ''; +$urllogofull = ''; if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall)) { - $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&file='.urlencode('logos/thumbs/'.$logosmall); + $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); + $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); $width = 150; } elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo)) { - $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&file='.urlencode('logos/'.$logo); + $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); + $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); $width = 150; } + // Output html code for logo if ($urllogo) { - print '
'; + print '
'; + print '
'; - print '
'; + print '>'; + print '
'; + if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { + print ''; + } + print '
'; } + +print '

'; + + print $langs->trans("YourPaymentHasNotBeenRecorded")."

"; $key = 'ONLINE_PAYMENT_MESSAGE_KO'; diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index 4661067b78e..5029d717a10 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -78,6 +78,7 @@ $suffix=GETPOST("suffix", 'aZ09'); // Detect $paymentmethod $paymentmethod=''; +$reg = array(); if (preg_match('/PM=([^\.]+)/', $FULLTAG, $reg)) { $paymentmethod=$reg[1]; @@ -136,45 +137,59 @@ if (! empty($conf->global->ONLINE_PAYMENT_CSS_URL)) $head='dol_hide_leftmenu) ? '
' : '').'
'; +llxHeader($head, $langs->trans("PaymentForm"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea); // Show message print ''."\n"; -print '
'."\n"; +print '
'."\n"; // Show logo (search order: logo defined by PAYMENT_LOGO_suffix, then PAYMENT_LOGO, then small company logo, large company logo, theme logo, common logo) -$width=0; +$width = 0; // Define logo and logosmall -$logosmall=$mysoc->logo_small; -$logo=$mysoc->logo; -$paramlogo='ONLINE_PAYMENT_LOGO_'.$suffix; -if (! empty($conf->global->$paramlogo)) $logosmall=$conf->global->$paramlogo; -elseif (! empty($conf->global->ONLINE_PAYMENT_LOGO)) $logosmall=$conf->global->ONLINE_PAYMENT_LOGO; +$logosmall = $mysoc->logo_small; +$logo = $mysoc->logo; +$paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix; +if (!empty($conf->global->$paramlogo)) $logosmall = $conf->global->$paramlogo; +elseif (!empty($conf->global->ONLINE_PAYMENT_LOGO)) $logosmall = $conf->global->ONLINE_PAYMENT_LOGO; //print ''."\n"; // Define urllogo -$urllogo=''; -if (! empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall)) +$urllogo = ''; +$urllogofull = ''; +if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall)) { - $urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&file='.urlencode('logos/thumbs/'.$logosmall); - $width=150; + $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); + $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); + $width = 150; } -elseif (! empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo)) +elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo)) { - $urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&file='.urlencode('logos/'.$logo); - $width=150; + $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); + $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); + $width = 150; } + // Output html code for logo if ($urllogo) { - print '
'; + print '
'; + print '
'; - print '
'; + print '>'; + print '
'; + if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { + print ''; + } + print '
'; } +print '

'; + + if (! empty($conf->paypal->enabled)) { if ($paymentmethod == 'paypal') // We call this page only if payment is ok on payment system From db254b70d4d89823b9f65afaeb2024ce1f869133 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 13 Mar 2020 03:39:48 +0100 Subject: [PATCH 262/313] Update doc --- .github/CONTRIBUTING.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 19c076242f8..66267e42b99 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -101,8 +101,9 @@ Long description (Can span accross multiple lines). ### Pull Requests -When submitting a pull request, use same rule as [Commits](#commits) for the message. +Pull Request process is the process to submit a change (enhancement, bug fix, ...) into the code of the project. There is some rules and process to follow... +When submitting a pull request, use same rule as [Commits](#commits) for the message. If your pull request only contains one commit, GitHub will be smart enough to fill it for you. Otherwise, please be a bit verbose about what you're providing. @@ -111,7 +112,7 @@ Also, some code changes need a prior approbation: * if you want to include a new external library (into htdocs/includes directory), please ask before to the project manager (@eldy) to see if such a library can be accepted. -* if you add a new table, you must first create a page on http://wiki.dolibarr.org/index.php/Category:Table_SQL (copy an existing page changing its name to see it into this index page). Than ask the project manager (@eldy) if the new data model you plan to add can be accepted as you suggest. +* if you add a new table, you must first create a page on https://wiki.dolibarr.org/index.php/Category:Table_SQL (copy an existing page changing its name to see it into this index page). Than ask the project manager (@eldy) if the new data model you plan to add can be accepted as you suggest. Once a PR has been submitted, you may need to wait for its integration. It is common that the project leader let the PR open for a long delay to allow every developer discuss about the PR. From c3347326b21e7d461943989a296ddf224bb0b246 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 13 Mar 2020 03:53:57 +0100 Subject: [PATCH 263/313] Update doc --- .github/CONTRIBUTING.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 66267e42b99..bb9d829dc9e 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -101,18 +101,19 @@ Long description (Can span accross multiple lines). ### Pull Requests -Pull Request process is the process to submit a change (enhancement, bug fix, ...) into the code of the project. There is some rules and process to follow... +Pull Request (PR) process is the process to submit a change (enhancement, bug fix, ...) into the code of the project. There is some rules to know and +a process to follow to optimize the chance to have PRs merged efficiently... When submitting a pull request, use same rule as [Commits](#commits) for the message. -If your pull request only contains one commit, GitHub will be smart enough to fill it for you. +If your pull request only contains 1 commit, GitHub will be smart enough to fill it for you. Otherwise, please be a bit verbose about what you're providing. -Your Pull Request (PR) must pass the Continuous Integration checks. +Your Pull Request (PR) must pass the Continuous Integration checks and code quality checks. Also, some code changes need a prior approbation: * if you want to include a new external library (into htdocs/includes directory), please ask before to the project manager (@eldy) to see if such a library can be accepted. -* if you add a new table, you must first create a page on https://wiki.dolibarr.org/index.php/Category:Table_SQL (copy an existing page changing its name to see it into this index page). Than ask the project manager (@eldy) if the new data model you plan to add can be accepted as you suggest. +* if you add a new table, you must first create a page on https://wiki.dolibarr.org/index.php/Category:Table_SQL (copy an existing page changing its name to see it into this index page). Than ask the project manager (@eldy) if the new data model you plan to add is compatible with curent and future works in progress and can be accepted as you suggest. Once a PR has been submitted, you may need to wait for its integration. It is common that the project leader let the PR open for a long delay to allow every developer discuss about the PR. @@ -121,9 +122,9 @@ If the label of PR start with "WIP" (Work In Progress), it will not be analyzed If your PR has errors reported by the Continuous Integration Platform, it means your PR is not valid and nothing will be done with it. It will be kept open to allow developers to fix this, or it may be closed several month later. Don't expect anything on your PR if you have such errors, you MUST first fix the Continuous Integration error to have it taken into consideration. If the PR is valid, and is kept open for a long time, a tag will also be added on the PR to describe the status of your PR and why the PR is kept open. By putting your mouse on the tag, you will get a full explanation of the tag/status that explain why your PR has not been integrated yet. -In most cases, it gives you information of things you have to do to have the PR taken into consideration (for example a change is requested, a conflict is expected to be solved, some questions were asked). If you have a yellow, red flag of purple flag, don't expect to have your PR validated. You must first provide the answer the flag ask you. The majority of PR are waiting an action of the developer/author. +In most cases, it gives you information of things you have to do to have the PR taken into consideration (for example a change is requested, a conflict is expected to be solved, some questions were asked). If you have a yellow, red flag of purple flag, don't expect to have your PR validated. You must first provide the answer the tag ask you. The majority of open PR are waiting an action of the author of the PR. -Statistics on Dolibarr project shows that around 95% of submitted PR are reviewed and tagged. This is one of the most important ratio of answered PR in Open Source world. Don't expect the core team to reach the 100%. With the increasing popularity of Dolibarr, this ratio will probably decrease in future. +Statistics on Dolibarr project shows that around 95% of submitted PR are reviewed and tagged. Average answer delay is also one of the best among Open source project (just few days before having the Answer Tag set). This is one of the most important ratio of answered PR in Open Source world for a major project. Don't expect the core team to reach the 100%. A so high ratio is very rare on a so popular project and with the increasing popularity of Dolibarr, this ratio will probably decrease in future to a more common level. ### Resources From 9bb8143696f0e8bea3bf4effed763d5ee1deb348 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 13 Mar 2020 03:59:58 +0100 Subject: [PATCH 264/313] Doc --- .github/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index bb9d829dc9e..14f3e156e97 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -115,7 +115,7 @@ Also, some code changes need a prior approbation: * if you add a new table, you must first create a page on https://wiki.dolibarr.org/index.php/Category:Table_SQL (copy an existing page changing its name to see it into this index page). Than ask the project manager (@eldy) if the new data model you plan to add is compatible with curent and future works in progress and can be accepted as you suggest. -Once a PR has been submitted, you may need to wait for its integration. It is common that the project leader let the PR open for a long delay to allow every developer discuss about the PR. +Once a PR has been submitted, you may need to wait for its integration. It is common that the project leader let the PR open for a long delay to allow every developer discuss about the PR (A label is added in such a case). If the label of PR start with "WIP" (Work In Progress), it will not be analyzed (until you change the label of PR). From 280d77a0d6348065e34cf37f37eae68f5b1ab03a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 13 Mar 2020 04:01:47 +0100 Subject: [PATCH 265/313] Typo --- .github/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 14f3e156e97..5e56ac2a1fc 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -113,7 +113,7 @@ Also, some code changes need a prior approbation: * if you want to include a new external library (into htdocs/includes directory), please ask before to the project manager (@eldy) to see if such a library can be accepted. -* if you add a new table, you must first create a page on https://wiki.dolibarr.org/index.php/Category:Table_SQL (copy an existing page changing its name to see it into this index page). Than ask the project manager (@eldy) if the new data model you plan to add is compatible with curent and future works in progress and can be accepted as you suggest. +* if you add a new table, you must first create a page on https://wiki.dolibarr.org/index.php/Category:Table_SQL (copy an existing page changing its name to see it into this index page). Then ask the project manager (@eldy) if the new data model you plan to add is compatible with curent and future works in progress and can be accepted as you suggest. Once a PR has been submitted, you may need to wait for its integration. It is common that the project leader let the PR open for a long delay to allow every developer discuss about the PR (A label is added in such a case). From 6dda972ff51c1e53d477042a7ab53b316da141ac Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 13 Mar 2020 04:12:42 +0100 Subject: [PATCH 266/313] Doxygen --- htdocs/core/class/evalmath.class.php | 253 +++++++++++++++++---------- 1 file changed, 161 insertions(+), 92 deletions(-) diff --git a/htdocs/core/class/evalmath.class.php b/htdocs/core/class/evalmath.class.php index 9d970aed789..536ecf2f271 100644 --- a/htdocs/core/class/evalmath.class.php +++ b/htdocs/core/class/evalmath.class.php @@ -1,100 +1,110 @@ + * + * ================================================================================ + * + * NAME + * EvalMath - safely evaluate math expressions + * + * SYNOPSIS + * include('evalmath.class.php'); + * $m = new EvalMath; + * // basic evaluation: + * $result = $m->evaluate('2+2'); + * // supports: order of operation; parentheses; negation; built-in functions + * $result = $m->evaluate('-8(5/2)^2*(1-sqrt(4))-8'); + * // create your own variables + * $m->evaluate('a = e^(ln(pi))'); + * // or functions + * $m->evaluate('f(x,y) = x^2 + y^2 - 2x*y + 1'); + * // and then use them + * $result = $m->evaluate('3*f(42,a)'); + * + * DESCRIPTION + * Use the EvalMath class when you want to evaluate mathematical expressions + * from untrusted sources. You can define your own variables and functions, + * which are stored in the object. Try it, it's fun! + * + * METHODS + * $m->evalute($expr) + * Evaluates the expression and returns the result. If an error occurs, + * prints a warning and returns false. If $expr is a function assignment, + * returns true on success. + * + * $m->e($expr) + * A synonym for $m->evaluate(). + * + * $m->vars() + * Returns an associative array of all user-defined variables and values. + * + * $m->funcs() + * Returns an array of all user-defined functions. + * + * PARAMETERS + * $m->suppress_errors + * Set to true to turn off warnings when evaluating expressions + * + * $m->last_error + * If the last evaluation failed, contains a string describing the error. + * (Useful when suppress_errors is on). + * + * $m->last_error_code + * If the last evaluation failed, 2 element array with numeric code and extra info + * + * AUTHOR INFORMATION + * Copyright 2005, Miles Kaufmann. + * + * LICENSE + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * 1 Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ -EvalMath - PHP Class to safely evaluate math expressions -Copyright (C) 2005 Miles Kaufmann +/** + * \file core/class/evalmath.class.php + * \ingroup core + * \brief This file for Math evaluation + */ -================================================================================ - -NAME - EvalMath - safely evaluate math expressions - -SYNOPSIS - include('evalmath.class.php'); - $m = new EvalMath; - // basic evaluation: - $result = $m->evaluate('2+2'); - // supports: order of operation; parentheses; negation; built-in functions - $result = $m->evaluate('-8(5/2)^2*(1-sqrt(4))-8'); - // create your own variables - $m->evaluate('a = e^(ln(pi))'); - // or functions - $m->evaluate('f(x,y) = x^2 + y^2 - 2x*y + 1'); - // and then use them - $result = $m->evaluate('3*f(42,a)'); - -DESCRIPTION - Use the EvalMath class when you want to evaluate mathematical expressions - from untrusted sources. You can define your own variables and functions, - which are stored in the object. Try it, it's fun! - -METHODS - $m->evalute($expr) - Evaluates the expression and returns the result. If an error occurs, - prints a warning and returns false. If $expr is a function assignment, - returns true on success. - - $m->e($expr) - A synonym for $m->evaluate(). - - $m->vars() - Returns an associative array of all user-defined variables and values. - - $m->funcs() - Returns an array of all user-defined functions. - -PARAMETERS - $m->suppress_errors - Set to true to turn off warnings when evaluating expressions - - $m->last_error - If the last evaluation failed, contains a string describing the error. - (Useful when suppress_errors is on). - - $m->last_error_code - If the last evaluation failed, 2 element array with numeric code and extra info - -AUTHOR INFORMATION - Copyright 2005, Miles Kaufmann. - -LICENSE - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - 1 Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. The name of the author may not be used to endorse or promote - products derived from this software without specific prior written - permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -*/ +/** + * Class EvalMath + */ class EvalMath { - var $suppress_errors = false; - var $last_error = null; - var $last_error_code = null; + public $suppress_errors = false; + public $last_error = null; + public $last_error_code = null; - var $v = array('e'=>2.71,'pi'=>3.14159); // variables (and constants) - var $f = array(); // user-defined functions - var $vb = array('e', 'pi'); // constants - var $fb = array( // built-in functions + public $v = array('e'=>2.71,'pi'=>3.14159); // variables (and constants) + public $f = array(); // user-defined functions + public $vb = array('e', 'pi'); // constants + public $fb = array( // built-in functions 'sin','sinh','arcsin','asin','arcsinh','asinh', 'cos','cosh','arccos','acos','arccosh','acosh', 'tan','tanh','arctan','atan','arctanh','atanh', @@ -109,10 +119,22 @@ class EvalMath $this->v['e'] = exp(1); } + /** + * Evaluate + * + * @param string $expr String + * @return boolean|number|NULL|mixed Result + */ function e($expr) { return $this->evaluate($expr); } + /** + * Evaluate + * + * @param string $expr String + * @return boolean|number|NULL|mixed Result + */ function evaluate($expr) { $this->last_error = null; $this->last_error_code = null; @@ -155,6 +177,11 @@ class EvalMath } } + /** + * vars + * + * @return string Output + */ function vars() { $output = $this->v; unset($output['pi']); @@ -162,6 +189,11 @@ class EvalMath return $output; } + /** + * vars + * + * @return string Output + */ function funcs() { $output = array(); foreach ($this->f as $fnn=>$dat) @@ -169,9 +201,15 @@ class EvalMath return $output; } + //===================== HERE BE INTERNAL METHODS ====================\\ - // Convert infix to postfix notation + /** + * Convert infix to postfix notation + * + * @param string $expr Expression + * @return string Output + */ function nfx($expr) { $index = 0; @@ -297,7 +335,14 @@ class EvalMath return $output; } - // evaluate postfix notation + + /** + * evaluate postfix notation + * + * @param string $tokens Expression + * @param array $vars Array + * @return string Output + */ function pfx($tokens, $vars = array()) { if ($tokens == false) return false; @@ -359,7 +404,14 @@ class EvalMath return $stack->pop(); } - // trigger an error, but nicely, if need be + /** + * trigger an error, but nicely, if need be + * + * @param string $code Code + * @param string $msg Msg + * @param string|null $info sting + * @return boolean False + */ function trigger($code, $msg, $info = null) { $this->last_error = $msg; $this->last_error_code = array($code, $info); @@ -376,11 +428,22 @@ class EvalMathStack var $stack = array(); var $count = 0; + /** + * push + * + * @param string $val Val + * @return void + */ function push($val) { $this->stack[$this->count] = $val; $this->count++; } + /** + * pop + * + * @return mixed Stack + */ function pop() { if ($this->count > 0) { $this->count--; @@ -389,6 +452,12 @@ class EvalMathStack return null; } + /** + * last + * + * @param int $n N + * @return mixed Stack + */ function last($n=1) { if (isset($this->stack[$this->count-$n])) { return $this->stack[$this->count-$n]; From 826ed679217e8da3fe5ea9deb48eae00b5b89c5d Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Fri, 13 Mar 2020 09:01:22 +0100 Subject: [PATCH 267/313] FIX travis errors sql escape --- htdocs/core/modules/takepos/mod_takepos_ref_simple.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/takepos/mod_takepos_ref_simple.php b/htdocs/core/modules/takepos/mod_takepos_ref_simple.php index f63acb7f7e4..4275e202f6e 100644 --- a/htdocs/core/modules/takepos/mod_takepos_ref_simple.php +++ b/htdocs/core/modules/takepos/mod_takepos_ref_simple.php @@ -92,7 +92,7 @@ class mod_takepos_ref_simple extends ModeleNumRefTakepos $posindice = 8; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM " . $posindice . ") AS SIGNED)) as max"; $sql .= " FROM " . MAIN_DB_PREFIX . "facture"; - $sql .= " WHERE ref LIKE '" . $this->prefix . "____-%'"; + $sql .= " WHERE ref LIKE '" . $db->escape($this->prefix) . "____-%'"; $sql .= " AND entity = " . $conf->entity; $resql = $db->query($sql); @@ -131,7 +131,7 @@ class mod_takepos_ref_simple extends ModeleNumRefTakepos $posindice = strlen($this->prefix . $pos_source . '-____-') + 1; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM " . $posindice . ") AS SIGNED)) as max"; // This is standard SQL $sql .= " FROM " . MAIN_DB_PREFIX . "facture"; - $sql .= " WHERE ref LIKE '" . $this->prefix . $pos_source . "-____-%'"; + $sql .= " WHERE ref LIKE '" . $db->escape($this->prefix . $pos_source) . "-____-%'"; $sql .= " AND entity IN (".getEntity('invoicenumber', 1, $invoice).")"; $resql = $db->query($sql); @@ -152,7 +152,7 @@ class mod_takepos_ref_simple extends ModeleNumRefTakepos $ref = ''; $sql = "SELECT ref as ref"; $sql .= " FROM ". MAIN_DB_PREFIX . "facture"; - $sql .= " WHERE ref LIKE '" . $this->prefix . $pos_source . "-____-" . $num . "'"; + $sql .= " WHERE ref LIKE '" . $db->escape($this->prefix . $pos_source) . "-____-" . $num . "'"; $sql .= " AND entity IN (".getEntity('invoicenumber', 1, $invoice).")"; $sql .= " ORDER BY ref DESC"; From 68f14ef48322b4a76082f5f5af296e89f7593cf1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 13 Mar 2020 09:37:26 +0100 Subject: [PATCH 268/313] Fix missing js --- htdocs/includes/nnnick/chartjs/.gitignore | 1 - .../nnnick/chartjs/dist/Chart.bundle.js | 20755 ++++++++++++++++ .../nnnick/chartjs/dist/Chart.bundle.min.js | 7 + htdocs/includes/nnnick/chartjs/dist/Chart.css | 47 + htdocs/includes/nnnick/chartjs/dist/Chart.js | 16151 ++++++++++++ .../nnnick/chartjs/dist/Chart.min.css | 1 + .../includes/nnnick/chartjs/dist/Chart.min.js | 7 + 7 files changed, 36968 insertions(+), 1 deletion(-) create mode 100644 htdocs/includes/nnnick/chartjs/dist/Chart.bundle.js create mode 100644 htdocs/includes/nnnick/chartjs/dist/Chart.bundle.min.js create mode 100644 htdocs/includes/nnnick/chartjs/dist/Chart.css create mode 100644 htdocs/includes/nnnick/chartjs/dist/Chart.js create mode 100644 htdocs/includes/nnnick/chartjs/dist/Chart.min.css create mode 100644 htdocs/includes/nnnick/chartjs/dist/Chart.min.js diff --git a/htdocs/includes/nnnick/chartjs/.gitignore b/htdocs/includes/nnnick/chartjs/.gitignore index 6a066b92f38..c4998047b01 100644 --- a/htdocs/includes/nnnick/chartjs/.gitignore +++ b/htdocs/includes/nnnick/chartjs/.gitignore @@ -1,7 +1,6 @@ /_book /coverage /custom -/dist /docs/index.md /gh-pages /jsdoc diff --git a/htdocs/includes/nnnick/chartjs/dist/Chart.bundle.js b/htdocs/includes/nnnick/chartjs/dist/Chart.bundle.js new file mode 100644 index 00000000000..204156a8fc7 --- /dev/null +++ b/htdocs/includes/nnnick/chartjs/dist/Chart.bundle.js @@ -0,0 +1,20755 @@ +/*! + * Chart.js v2.9.3 + * https://www.chartjs.org + * (c) 2019 Chart.js Contributors + * Released under the MIT License + */ +(function (global, factory) { +typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : +typeof define === 'function' && define.amd ? define(factory) : +(global = global || self, global.Chart = factory()); +}(this, (function () { 'use strict'; + +var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + +function commonjsRequire () { + throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs'); +} + +function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; +} + +function getCjsExportFromNamespace (n) { + return n && n['default'] || n; +} + +var colorName = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] +}; + +var conversions = createCommonjsModule(function (module) { +/* MIT license */ + + +// NOTE: conversions should only return primitive values (i.e. arrays, or +// values that give correct `typeof` results). +// do not use box values types (i.e. Number(), String(), etc.) + +var reverseKeywords = {}; +for (var key in colorName) { + if (colorName.hasOwnProperty(key)) { + reverseKeywords[colorName[key]] = key; + } +} + +var convert = module.exports = { + rgb: {channels: 3, labels: 'rgb'}, + hsl: {channels: 3, labels: 'hsl'}, + hsv: {channels: 3, labels: 'hsv'}, + hwb: {channels: 3, labels: 'hwb'}, + cmyk: {channels: 4, labels: 'cmyk'}, + xyz: {channels: 3, labels: 'xyz'}, + lab: {channels: 3, labels: 'lab'}, + lch: {channels: 3, labels: 'lch'}, + hex: {channels: 1, labels: ['hex']}, + keyword: {channels: 1, labels: ['keyword']}, + ansi16: {channels: 1, labels: ['ansi16']}, + ansi256: {channels: 1, labels: ['ansi256']}, + hcg: {channels: 3, labels: ['h', 'c', 'g']}, + apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, + gray: {channels: 1, labels: ['gray']} +}; + +// hide .channels and .labels properties +for (var model in convert) { + if (convert.hasOwnProperty(model)) { + if (!('channels' in convert[model])) { + throw new Error('missing channels property: ' + model); + } + + if (!('labels' in convert[model])) { + throw new Error('missing channel labels property: ' + model); + } + + if (convert[model].labels.length !== convert[model].channels) { + throw new Error('channel and label counts mismatch: ' + model); + } + + var channels = convert[model].channels; + var labels = convert[model].labels; + delete convert[model].channels; + delete convert[model].labels; + Object.defineProperty(convert[model], 'channels', {value: channels}); + Object.defineProperty(convert[model], 'labels', {value: labels}); + } +} + +convert.rgb.hsl = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var min = Math.min(r, g, b); + var max = Math.max(r, g, b); + var delta = max - min; + var h; + var s; + var l; + + if (max === min) { + h = 0; + } else if (r === max) { + h = (g - b) / delta; + } else if (g === max) { + h = 2 + (b - r) / delta; + } else if (b === max) { + h = 4 + (r - g) / delta; + } + + h = Math.min(h * 60, 360); + + if (h < 0) { + h += 360; + } + + l = (min + max) / 2; + + if (max === min) { + s = 0; + } else if (l <= 0.5) { + s = delta / (max + min); + } else { + s = delta / (2 - max - min); + } + + return [h, s * 100, l * 100]; +}; + +convert.rgb.hsv = function (rgb) { + var rdif; + var gdif; + var bdif; + var h; + var s; + + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var v = Math.max(r, g, b); + var diff = v - Math.min(r, g, b); + var diffc = function (c) { + return (v - c) / 6 / diff + 1 / 2; + }; + + if (diff === 0) { + h = s = 0; + } else { + s = diff / v; + rdif = diffc(r); + gdif = diffc(g); + bdif = diffc(b); + + if (r === v) { + h = bdif - gdif; + } else if (g === v) { + h = (1 / 3) + rdif - bdif; + } else if (b === v) { + h = (2 / 3) + gdif - rdif; + } + if (h < 0) { + h += 1; + } else if (h > 1) { + h -= 1; + } + } + + return [ + h * 360, + s * 100, + v * 100 + ]; +}; + +convert.rgb.hwb = function (rgb) { + var r = rgb[0]; + var g = rgb[1]; + var b = rgb[2]; + var h = convert.rgb.hsl(rgb)[0]; + var w = 1 / 255 * Math.min(r, Math.min(g, b)); + + b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); + + return [h, w * 100, b * 100]; +}; + +convert.rgb.cmyk = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var c; + var m; + var y; + var k; + + k = Math.min(1 - r, 1 - g, 1 - b); + c = (1 - r - k) / (1 - k) || 0; + m = (1 - g - k) / (1 - k) || 0; + y = (1 - b - k) / (1 - k) || 0; + + return [c * 100, m * 100, y * 100, k * 100]; +}; + +/** + * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance + * */ +function comparativeDistance(x, y) { + return ( + Math.pow(x[0] - y[0], 2) + + Math.pow(x[1] - y[1], 2) + + Math.pow(x[2] - y[2], 2) + ); +} + +convert.rgb.keyword = function (rgb) { + var reversed = reverseKeywords[rgb]; + if (reversed) { + return reversed; + } + + var currentClosestDistance = Infinity; + var currentClosestKeyword; + + for (var keyword in colorName) { + if (colorName.hasOwnProperty(keyword)) { + var value = colorName[keyword]; + + // Compute comparative distance + var distance = comparativeDistance(rgb, value); + + // Check if its less, if so set as closest + if (distance < currentClosestDistance) { + currentClosestDistance = distance; + currentClosestKeyword = keyword; + } + } + } + + return currentClosestKeyword; +}; + +convert.keyword.rgb = function (keyword) { + return colorName[keyword]; +}; + +convert.rgb.xyz = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + + // assume sRGB + r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92); + g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92); + b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92); + + var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); + var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); + var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); + + return [x * 100, y * 100, z * 100]; +}; + +convert.rgb.lab = function (rgb) { + var xyz = convert.rgb.xyz(rgb); + var x = xyz[0]; + var y = xyz[1]; + var z = xyz[2]; + var l; + var a; + var b; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); + + l = (116 * y) - 16; + a = 500 * (x - y); + b = 200 * (y - z); + + return [l, a, b]; +}; + +convert.hsl.rgb = function (hsl) { + var h = hsl[0] / 360; + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var t1; + var t2; + var t3; + var rgb; + var val; + + if (s === 0) { + val = l * 255; + return [val, val, val]; + } + + if (l < 0.5) { + t2 = l * (1 + s); + } else { + t2 = l + s - l * s; + } + + t1 = 2 * l - t2; + + rgb = [0, 0, 0]; + for (var i = 0; i < 3; i++) { + t3 = h + 1 / 3 * -(i - 1); + if (t3 < 0) { + t3++; + } + if (t3 > 1) { + t3--; + } + + if (6 * t3 < 1) { + val = t1 + (t2 - t1) * 6 * t3; + } else if (2 * t3 < 1) { + val = t2; + } else if (3 * t3 < 2) { + val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; + } else { + val = t1; + } + + rgb[i] = val * 255; + } + + return rgb; +}; + +convert.hsl.hsv = function (hsl) { + var h = hsl[0]; + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var smin = s; + var lmin = Math.max(l, 0.01); + var sv; + var v; + + l *= 2; + s *= (l <= 1) ? l : 2 - l; + smin *= lmin <= 1 ? lmin : 2 - lmin; + v = (l + s) / 2; + sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); + + return [h, sv * 100, v * 100]; +}; + +convert.hsv.rgb = function (hsv) { + var h = hsv[0] / 60; + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var hi = Math.floor(h) % 6; + + var f = h - Math.floor(h); + var p = 255 * v * (1 - s); + var q = 255 * v * (1 - (s * f)); + var t = 255 * v * (1 - (s * (1 - f))); + v *= 255; + + switch (hi) { + case 0: + return [v, t, p]; + case 1: + return [q, v, p]; + case 2: + return [p, v, t]; + case 3: + return [p, q, v]; + case 4: + return [t, p, v]; + case 5: + return [v, p, q]; + } +}; + +convert.hsv.hsl = function (hsv) { + var h = hsv[0]; + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var vmin = Math.max(v, 0.01); + var lmin; + var sl; + var l; + + l = (2 - s) * v; + lmin = (2 - s) * vmin; + sl = s * vmin; + sl /= (lmin <= 1) ? lmin : 2 - lmin; + sl = sl || 0; + l /= 2; + + return [h, sl * 100, l * 100]; +}; + +// http://dev.w3.org/csswg/css-color/#hwb-to-rgb +convert.hwb.rgb = function (hwb) { + var h = hwb[0] / 360; + var wh = hwb[1] / 100; + var bl = hwb[2] / 100; + var ratio = wh + bl; + var i; + var v; + var f; + var n; + + // wh + bl cant be > 1 + if (ratio > 1) { + wh /= ratio; + bl /= ratio; + } + + i = Math.floor(6 * h); + v = 1 - bl; + f = 6 * h - i; + + if ((i & 0x01) !== 0) { + f = 1 - f; + } + + n = wh + f * (v - wh); // linear interpolation + + var r; + var g; + var b; + switch (i) { + default: + case 6: + case 0: r = v; g = n; b = wh; break; + case 1: r = n; g = v; b = wh; break; + case 2: r = wh; g = v; b = n; break; + case 3: r = wh; g = n; b = v; break; + case 4: r = n; g = wh; b = v; break; + case 5: r = v; g = wh; b = n; break; + } + + return [r * 255, g * 255, b * 255]; +}; + +convert.cmyk.rgb = function (cmyk) { + var c = cmyk[0] / 100; + var m = cmyk[1] / 100; + var y = cmyk[2] / 100; + var k = cmyk[3] / 100; + var r; + var g; + var b; + + r = 1 - Math.min(1, c * (1 - k) + k); + g = 1 - Math.min(1, m * (1 - k) + k); + b = 1 - Math.min(1, y * (1 - k) + k); + + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.rgb = function (xyz) { + var x = xyz[0] / 100; + var y = xyz[1] / 100; + var z = xyz[2] / 100; + var r; + var g; + var b; + + r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); + g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); + b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); + + // assume sRGB + r = r > 0.0031308 + ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055) + : r * 12.92; + + g = g > 0.0031308 + ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055) + : g * 12.92; + + b = b > 0.0031308 + ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055) + : b * 12.92; + + r = Math.min(Math.max(0, r), 1); + g = Math.min(Math.max(0, g), 1); + b = Math.min(Math.max(0, b), 1); + + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.lab = function (xyz) { + var x = xyz[0]; + var y = xyz[1]; + var z = xyz[2]; + var l; + var a; + var b; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); + + l = (116 * y) - 16; + a = 500 * (x - y); + b = 200 * (y - z); + + return [l, a, b]; +}; + +convert.lab.xyz = function (lab) { + var l = lab[0]; + var a = lab[1]; + var b = lab[2]; + var x; + var y; + var z; + + y = (l + 16) / 116; + x = a / 500 + y; + z = y - b / 200; + + var y2 = Math.pow(y, 3); + var x2 = Math.pow(x, 3); + var z2 = Math.pow(z, 3); + y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; + x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; + z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; + + x *= 95.047; + y *= 100; + z *= 108.883; + + return [x, y, z]; +}; + +convert.lab.lch = function (lab) { + var l = lab[0]; + var a = lab[1]; + var b = lab[2]; + var hr; + var h; + var c; + + hr = Math.atan2(b, a); + h = hr * 360 / 2 / Math.PI; + + if (h < 0) { + h += 360; + } + + c = Math.sqrt(a * a + b * b); + + return [l, c, h]; +}; + +convert.lch.lab = function (lch) { + var l = lch[0]; + var c = lch[1]; + var h = lch[2]; + var a; + var b; + var hr; + + hr = h / 360 * 2 * Math.PI; + a = c * Math.cos(hr); + b = c * Math.sin(hr); + + return [l, a, b]; +}; + +convert.rgb.ansi16 = function (args) { + var r = args[0]; + var g = args[1]; + var b = args[2]; + var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization + + value = Math.round(value / 50); + + if (value === 0) { + return 30; + } + + var ansi = 30 + + ((Math.round(b / 255) << 2) + | (Math.round(g / 255) << 1) + | Math.round(r / 255)); + + if (value === 2) { + ansi += 60; + } + + return ansi; +}; + +convert.hsv.ansi16 = function (args) { + // optimization here; we already know the value and don't need to get + // it converted for us. + return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); +}; + +convert.rgb.ansi256 = function (args) { + var r = args[0]; + var g = args[1]; + var b = args[2]; + + // we use the extended greyscale palette here, with the exception of + // black and white. normal palette only has 4 greyscale shades. + if (r === g && g === b) { + if (r < 8) { + return 16; + } + + if (r > 248) { + return 231; + } + + return Math.round(((r - 8) / 247) * 24) + 232; + } + + var ansi = 16 + + (36 * Math.round(r / 255 * 5)) + + (6 * Math.round(g / 255 * 5)) + + Math.round(b / 255 * 5); + + return ansi; +}; + +convert.ansi16.rgb = function (args) { + var color = args % 10; + + // handle greyscale + if (color === 0 || color === 7) { + if (args > 50) { + color += 3.5; + } + + color = color / 10.5 * 255; + + return [color, color, color]; + } + + var mult = (~~(args > 50) + 1) * 0.5; + var r = ((color & 1) * mult) * 255; + var g = (((color >> 1) & 1) * mult) * 255; + var b = (((color >> 2) & 1) * mult) * 255; + + return [r, g, b]; +}; + +convert.ansi256.rgb = function (args) { + // handle greyscale + if (args >= 232) { + var c = (args - 232) * 10 + 8; + return [c, c, c]; + } + + args -= 16; + + var rem; + var r = Math.floor(args / 36) / 5 * 255; + var g = Math.floor((rem = args % 36) / 6) / 5 * 255; + var b = (rem % 6) / 5 * 255; + + return [r, g, b]; +}; + +convert.rgb.hex = function (args) { + var integer = ((Math.round(args[0]) & 0xFF) << 16) + + ((Math.round(args[1]) & 0xFF) << 8) + + (Math.round(args[2]) & 0xFF); + + var string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.hex.rgb = function (args) { + var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); + if (!match) { + return [0, 0, 0]; + } + + var colorString = match[0]; + + if (match[0].length === 3) { + colorString = colorString.split('').map(function (char) { + return char + char; + }).join(''); + } + + var integer = parseInt(colorString, 16); + var r = (integer >> 16) & 0xFF; + var g = (integer >> 8) & 0xFF; + var b = integer & 0xFF; + + return [r, g, b]; +}; + +convert.rgb.hcg = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var max = Math.max(Math.max(r, g), b); + var min = Math.min(Math.min(r, g), b); + var chroma = (max - min); + var grayscale; + var hue; + + if (chroma < 1) { + grayscale = min / (1 - chroma); + } else { + grayscale = 0; + } + + if (chroma <= 0) { + hue = 0; + } else + if (max === r) { + hue = ((g - b) / chroma) % 6; + } else + if (max === g) { + hue = 2 + (b - r) / chroma; + } else { + hue = 4 + (r - g) / chroma + 4; + } + + hue /= 6; + hue %= 1; + + return [hue * 360, chroma * 100, grayscale * 100]; +}; + +convert.hsl.hcg = function (hsl) { + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var c = 1; + var f = 0; + + if (l < 0.5) { + c = 2.0 * s * l; + } else { + c = 2.0 * s * (1.0 - l); + } + + if (c < 1.0) { + f = (l - 0.5 * c) / (1.0 - c); + } + + return [hsl[0], c * 100, f * 100]; +}; + +convert.hsv.hcg = function (hsv) { + var s = hsv[1] / 100; + var v = hsv[2] / 100; + + var c = s * v; + var f = 0; + + if (c < 1.0) { + f = (v - c) / (1 - c); + } + + return [hsv[0], c * 100, f * 100]; +}; + +convert.hcg.rgb = function (hcg) { + var h = hcg[0] / 360; + var c = hcg[1] / 100; + var g = hcg[2] / 100; + + if (c === 0.0) { + return [g * 255, g * 255, g * 255]; + } + + var pure = [0, 0, 0]; + var hi = (h % 1) * 6; + var v = hi % 1; + var w = 1 - v; + var mg = 0; + + switch (Math.floor(hi)) { + case 0: + pure[0] = 1; pure[1] = v; pure[2] = 0; break; + case 1: + pure[0] = w; pure[1] = 1; pure[2] = 0; break; + case 2: + pure[0] = 0; pure[1] = 1; pure[2] = v; break; + case 3: + pure[0] = 0; pure[1] = w; pure[2] = 1; break; + case 4: + pure[0] = v; pure[1] = 0; pure[2] = 1; break; + default: + pure[0] = 1; pure[1] = 0; pure[2] = w; + } + + mg = (1.0 - c) * g; + + return [ + (c * pure[0] + mg) * 255, + (c * pure[1] + mg) * 255, + (c * pure[2] + mg) * 255 + ]; +}; + +convert.hcg.hsv = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + + var v = c + g * (1.0 - c); + var f = 0; + + if (v > 0.0) { + f = c / v; + } + + return [hcg[0], f * 100, v * 100]; +}; + +convert.hcg.hsl = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + + var l = g * (1.0 - c) + 0.5 * c; + var s = 0; + + if (l > 0.0 && l < 0.5) { + s = c / (2 * l); + } else + if (l >= 0.5 && l < 1.0) { + s = c / (2 * (1 - l)); + } + + return [hcg[0], s * 100, l * 100]; +}; + +convert.hcg.hwb = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + var v = c + g * (1.0 - c); + return [hcg[0], (v - c) * 100, (1 - v) * 100]; +}; + +convert.hwb.hcg = function (hwb) { + var w = hwb[1] / 100; + var b = hwb[2] / 100; + var v = 1 - b; + var c = v - w; + var g = 0; + + if (c < 1) { + g = (v - c) / (1 - c); + } + + return [hwb[0], c * 100, g * 100]; +}; + +convert.apple.rgb = function (apple) { + return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; +}; + +convert.rgb.apple = function (rgb) { + return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; +}; + +convert.gray.rgb = function (args) { + return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; +}; + +convert.gray.hsl = convert.gray.hsv = function (args) { + return [0, 0, args[0]]; +}; + +convert.gray.hwb = function (gray) { + return [0, 100, gray[0]]; +}; + +convert.gray.cmyk = function (gray) { + return [0, 0, 0, gray[0]]; +}; + +convert.gray.lab = function (gray) { + return [gray[0], 0, 0]; +}; + +convert.gray.hex = function (gray) { + var val = Math.round(gray[0] / 100 * 255) & 0xFF; + var integer = (val << 16) + (val << 8) + val; + + var string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.rgb.gray = function (rgb) { + var val = (rgb[0] + rgb[1] + rgb[2]) / 3; + return [val / 255 * 100]; +}; +}); +var conversions_1 = conversions.rgb; +var conversions_2 = conversions.hsl; +var conversions_3 = conversions.hsv; +var conversions_4 = conversions.hwb; +var conversions_5 = conversions.cmyk; +var conversions_6 = conversions.xyz; +var conversions_7 = conversions.lab; +var conversions_8 = conversions.lch; +var conversions_9 = conversions.hex; +var conversions_10 = conversions.keyword; +var conversions_11 = conversions.ansi16; +var conversions_12 = conversions.ansi256; +var conversions_13 = conversions.hcg; +var conversions_14 = conversions.apple; +var conversions_15 = conversions.gray; + +/* + this function routes a model to all other models. + + all functions that are routed have a property `.conversion` attached + to the returned synthetic function. This property is an array + of strings, each with the steps in between the 'from' and 'to' + color models (inclusive). + + conversions that are not possible simply are not included. +*/ + +function buildGraph() { + var graph = {}; + // https://jsperf.com/object-keys-vs-for-in-with-closure/3 + var models = Object.keys(conversions); + + for (var len = models.length, i = 0; i < len; i++) { + graph[models[i]] = { + // http://jsperf.com/1-vs-infinity + // micro-opt, but this is simple. + distance: -1, + parent: null + }; + } + + return graph; +} + +// https://en.wikipedia.org/wiki/Breadth-first_search +function deriveBFS(fromModel) { + var graph = buildGraph(); + var queue = [fromModel]; // unshift -> queue -> pop + + graph[fromModel].distance = 0; + + while (queue.length) { + var current = queue.pop(); + var adjacents = Object.keys(conversions[current]); + + for (var len = adjacents.length, i = 0; i < len; i++) { + var adjacent = adjacents[i]; + var node = graph[adjacent]; + + if (node.distance === -1) { + node.distance = graph[current].distance + 1; + node.parent = current; + queue.unshift(adjacent); + } + } + } + + return graph; +} + +function link(from, to) { + return function (args) { + return to(from(args)); + }; +} + +function wrapConversion(toModel, graph) { + var path = [graph[toModel].parent, toModel]; + var fn = conversions[graph[toModel].parent][toModel]; + + var cur = graph[toModel].parent; + while (graph[cur].parent) { + path.unshift(graph[cur].parent); + fn = link(conversions[graph[cur].parent][cur], fn); + cur = graph[cur].parent; + } + + fn.conversion = path; + return fn; +} + +var route = function (fromModel) { + var graph = deriveBFS(fromModel); + var conversion = {}; + + var models = Object.keys(graph); + for (var len = models.length, i = 0; i < len; i++) { + var toModel = models[i]; + var node = graph[toModel]; + + if (node.parent === null) { + // no possible conversion, or this node is the source model. + continue; + } + + conversion[toModel] = wrapConversion(toModel, graph); + } + + return conversion; +}; + +var convert = {}; + +var models = Object.keys(conversions); + +function wrapRaw(fn) { + var wrappedFn = function (args) { + if (args === undefined || args === null) { + return args; + } + + if (arguments.length > 1) { + args = Array.prototype.slice.call(arguments); + } + + return fn(args); + }; + + // preserve .conversion property if there is one + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +function wrapRounded(fn) { + var wrappedFn = function (args) { + if (args === undefined || args === null) { + return args; + } + + if (arguments.length > 1) { + args = Array.prototype.slice.call(arguments); + } + + var result = fn(args); + + // we're assuming the result is an array here. + // see notice in conversions.js; don't use box types + // in conversion functions. + if (typeof result === 'object') { + for (var len = result.length, i = 0; i < len; i++) { + result[i] = Math.round(result[i]); + } + } + + return result; + }; + + // preserve .conversion property if there is one + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +models.forEach(function (fromModel) { + convert[fromModel] = {}; + + Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); + Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); + + var routes = route(fromModel); + var routeModels = Object.keys(routes); + + routeModels.forEach(function (toModel) { + var fn = routes[toModel]; + + convert[fromModel][toModel] = wrapRounded(fn); + convert[fromModel][toModel].raw = wrapRaw(fn); + }); +}); + +var colorConvert = convert; + +var colorName$1 = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] +}; + +/* MIT license */ + + +var colorString = { + getRgba: getRgba, + getHsla: getHsla, + getRgb: getRgb, + getHsl: getHsl, + getHwb: getHwb, + getAlpha: getAlpha, + + hexString: hexString, + rgbString: rgbString, + rgbaString: rgbaString, + percentString: percentString, + percentaString: percentaString, + hslString: hslString, + hslaString: hslaString, + hwbString: hwbString, + keyword: keyword +}; + +function getRgba(string) { + if (!string) { + return; + } + var abbr = /^#([a-fA-F0-9]{3,4})$/i, + hex = /^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i, + rgba = /^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i, + per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i, + keyword = /(\w+)/; + + var rgb = [0, 0, 0], + a = 1, + match = string.match(abbr), + hexAlpha = ""; + if (match) { + match = match[1]; + hexAlpha = match[3]; + for (var i = 0; i < rgb.length; i++) { + rgb[i] = parseInt(match[i] + match[i], 16); + } + if (hexAlpha) { + a = Math.round((parseInt(hexAlpha + hexAlpha, 16) / 255) * 100) / 100; + } + } + else if (match = string.match(hex)) { + hexAlpha = match[2]; + match = match[1]; + for (var i = 0; i < rgb.length; i++) { + rgb[i] = parseInt(match.slice(i * 2, i * 2 + 2), 16); + } + if (hexAlpha) { + a = Math.round((parseInt(hexAlpha, 16) / 255) * 100) / 100; + } + } + else if (match = string.match(rgba)) { + for (var i = 0; i < rgb.length; i++) { + rgb[i] = parseInt(match[i + 1]); + } + a = parseFloat(match[4]); + } + else if (match = string.match(per)) { + for (var i = 0; i < rgb.length; i++) { + rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55); + } + a = parseFloat(match[4]); + } + else if (match = string.match(keyword)) { + if (match[1] == "transparent") { + return [0, 0, 0, 0]; + } + rgb = colorName$1[match[1]]; + if (!rgb) { + return; + } + } + + for (var i = 0; i < rgb.length; i++) { + rgb[i] = scale(rgb[i], 0, 255); + } + if (!a && a != 0) { + a = 1; + } + else { + a = scale(a, 0, 1); + } + rgb[3] = a; + return rgb; +} + +function getHsla(string) { + if (!string) { + return; + } + var hsl = /^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/; + var match = string.match(hsl); + if (match) { + var alpha = parseFloat(match[4]); + var h = scale(parseInt(match[1]), 0, 360), + s = scale(parseFloat(match[2]), 0, 100), + l = scale(parseFloat(match[3]), 0, 100), + a = scale(isNaN(alpha) ? 1 : alpha, 0, 1); + return [h, s, l, a]; + } +} + +function getHwb(string) { + if (!string) { + return; + } + var hwb = /^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/; + var match = string.match(hwb); + if (match) { + var alpha = parseFloat(match[4]); + var h = scale(parseInt(match[1]), 0, 360), + w = scale(parseFloat(match[2]), 0, 100), + b = scale(parseFloat(match[3]), 0, 100), + a = scale(isNaN(alpha) ? 1 : alpha, 0, 1); + return [h, w, b, a]; + } +} + +function getRgb(string) { + var rgba = getRgba(string); + return rgba && rgba.slice(0, 3); +} + +function getHsl(string) { + var hsla = getHsla(string); + return hsla && hsla.slice(0, 3); +} + +function getAlpha(string) { + var vals = getRgba(string); + if (vals) { + return vals[3]; + } + else if (vals = getHsla(string)) { + return vals[3]; + } + else if (vals = getHwb(string)) { + return vals[3]; + } +} + +// generators +function hexString(rgba, a) { + var a = (a !== undefined && rgba.length === 3) ? a : rgba[3]; + return "#" + hexDouble(rgba[0]) + + hexDouble(rgba[1]) + + hexDouble(rgba[2]) + + ( + (a >= 0 && a < 1) + ? hexDouble(Math.round(a * 255)) + : "" + ); +} + +function rgbString(rgba, alpha) { + if (alpha < 1 || (rgba[3] && rgba[3] < 1)) { + return rgbaString(rgba, alpha); + } + return "rgb(" + rgba[0] + ", " + rgba[1] + ", " + rgba[2] + ")"; +} + +function rgbaString(rgba, alpha) { + if (alpha === undefined) { + alpha = (rgba[3] !== undefined ? rgba[3] : 1); + } + return "rgba(" + rgba[0] + ", " + rgba[1] + ", " + rgba[2] + + ", " + alpha + ")"; +} + +function percentString(rgba, alpha) { + if (alpha < 1 || (rgba[3] && rgba[3] < 1)) { + return percentaString(rgba, alpha); + } + var r = Math.round(rgba[0]/255 * 100), + g = Math.round(rgba[1]/255 * 100), + b = Math.round(rgba[2]/255 * 100); + + return "rgb(" + r + "%, " + g + "%, " + b + "%)"; +} + +function percentaString(rgba, alpha) { + var r = Math.round(rgba[0]/255 * 100), + g = Math.round(rgba[1]/255 * 100), + b = Math.round(rgba[2]/255 * 100); + return "rgba(" + r + "%, " + g + "%, " + b + "%, " + (alpha || rgba[3] || 1) + ")"; +} + +function hslString(hsla, alpha) { + if (alpha < 1 || (hsla[3] && hsla[3] < 1)) { + return hslaString(hsla, alpha); + } + return "hsl(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%)"; +} + +function hslaString(hsla, alpha) { + if (alpha === undefined) { + alpha = (hsla[3] !== undefined ? hsla[3] : 1); + } + return "hsla(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%, " + + alpha + ")"; +} + +// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax +// (hwb have alpha optional & 1 is default value) +function hwbString(hwb, alpha) { + if (alpha === undefined) { + alpha = (hwb[3] !== undefined ? hwb[3] : 1); + } + return "hwb(" + hwb[0] + ", " + hwb[1] + "%, " + hwb[2] + "%" + + (alpha !== undefined && alpha !== 1 ? ", " + alpha : "") + ")"; +} + +function keyword(rgb) { + return reverseNames[rgb.slice(0, 3)]; +} + +// helpers +function scale(num, min, max) { + return Math.min(Math.max(min, num), max); +} + +function hexDouble(num) { + var str = num.toString(16).toUpperCase(); + return (str.length < 2) ? "0" + str : str; +} + + +//create a list of reverse color names +var reverseNames = {}; +for (var name in colorName$1) { + reverseNames[colorName$1[name]] = name; +} + +/* MIT license */ + + + +var Color = function (obj) { + if (obj instanceof Color) { + return obj; + } + if (!(this instanceof Color)) { + return new Color(obj); + } + + this.valid = false; + this.values = { + rgb: [0, 0, 0], + hsl: [0, 0, 0], + hsv: [0, 0, 0], + hwb: [0, 0, 0], + cmyk: [0, 0, 0, 0], + alpha: 1 + }; + + // parse Color() argument + var vals; + if (typeof obj === 'string') { + vals = colorString.getRgba(obj); + if (vals) { + this.setValues('rgb', vals); + } else if (vals = colorString.getHsla(obj)) { + this.setValues('hsl', vals); + } else if (vals = colorString.getHwb(obj)) { + this.setValues('hwb', vals); + } + } else if (typeof obj === 'object') { + vals = obj; + if (vals.r !== undefined || vals.red !== undefined) { + this.setValues('rgb', vals); + } else if (vals.l !== undefined || vals.lightness !== undefined) { + this.setValues('hsl', vals); + } else if (vals.v !== undefined || vals.value !== undefined) { + this.setValues('hsv', vals); + } else if (vals.w !== undefined || vals.whiteness !== undefined) { + this.setValues('hwb', vals); + } else if (vals.c !== undefined || vals.cyan !== undefined) { + this.setValues('cmyk', vals); + } + } +}; + +Color.prototype = { + isValid: function () { + return this.valid; + }, + rgb: function () { + return this.setSpace('rgb', arguments); + }, + hsl: function () { + return this.setSpace('hsl', arguments); + }, + hsv: function () { + return this.setSpace('hsv', arguments); + }, + hwb: function () { + return this.setSpace('hwb', arguments); + }, + cmyk: function () { + return this.setSpace('cmyk', arguments); + }, + + rgbArray: function () { + return this.values.rgb; + }, + hslArray: function () { + return this.values.hsl; + }, + hsvArray: function () { + return this.values.hsv; + }, + hwbArray: function () { + var values = this.values; + if (values.alpha !== 1) { + return values.hwb.concat([values.alpha]); + } + return values.hwb; + }, + cmykArray: function () { + return this.values.cmyk; + }, + rgbaArray: function () { + var values = this.values; + return values.rgb.concat([values.alpha]); + }, + hslaArray: function () { + var values = this.values; + return values.hsl.concat([values.alpha]); + }, + alpha: function (val) { + if (val === undefined) { + return this.values.alpha; + } + this.setValues('alpha', val); + return this; + }, + + red: function (val) { + return this.setChannel('rgb', 0, val); + }, + green: function (val) { + return this.setChannel('rgb', 1, val); + }, + blue: function (val) { + return this.setChannel('rgb', 2, val); + }, + hue: function (val) { + if (val) { + val %= 360; + val = val < 0 ? 360 + val : val; + } + return this.setChannel('hsl', 0, val); + }, + saturation: function (val) { + return this.setChannel('hsl', 1, val); + }, + lightness: function (val) { + return this.setChannel('hsl', 2, val); + }, + saturationv: function (val) { + return this.setChannel('hsv', 1, val); + }, + whiteness: function (val) { + return this.setChannel('hwb', 1, val); + }, + blackness: function (val) { + return this.setChannel('hwb', 2, val); + }, + value: function (val) { + return this.setChannel('hsv', 2, val); + }, + cyan: function (val) { + return this.setChannel('cmyk', 0, val); + }, + magenta: function (val) { + return this.setChannel('cmyk', 1, val); + }, + yellow: function (val) { + return this.setChannel('cmyk', 2, val); + }, + black: function (val) { + return this.setChannel('cmyk', 3, val); + }, + + hexString: function () { + return colorString.hexString(this.values.rgb); + }, + rgbString: function () { + return colorString.rgbString(this.values.rgb, this.values.alpha); + }, + rgbaString: function () { + return colorString.rgbaString(this.values.rgb, this.values.alpha); + }, + percentString: function () { + return colorString.percentString(this.values.rgb, this.values.alpha); + }, + hslString: function () { + return colorString.hslString(this.values.hsl, this.values.alpha); + }, + hslaString: function () { + return colorString.hslaString(this.values.hsl, this.values.alpha); + }, + hwbString: function () { + return colorString.hwbString(this.values.hwb, this.values.alpha); + }, + keyword: function () { + return colorString.keyword(this.values.rgb, this.values.alpha); + }, + + rgbNumber: function () { + var rgb = this.values.rgb; + return (rgb[0] << 16) | (rgb[1] << 8) | rgb[2]; + }, + + luminosity: function () { + // http://www.w3.org/TR/WCAG20/#relativeluminancedef + var rgb = this.values.rgb; + var lum = []; + for (var i = 0; i < rgb.length; i++) { + var chan = rgb[i] / 255; + lum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4); + } + return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2]; + }, + + contrast: function (color2) { + // http://www.w3.org/TR/WCAG20/#contrast-ratiodef + var lum1 = this.luminosity(); + var lum2 = color2.luminosity(); + if (lum1 > lum2) { + return (lum1 + 0.05) / (lum2 + 0.05); + } + return (lum2 + 0.05) / (lum1 + 0.05); + }, + + level: function (color2) { + var contrastRatio = this.contrast(color2); + if (contrastRatio >= 7.1) { + return 'AAA'; + } + + return (contrastRatio >= 4.5) ? 'AA' : ''; + }, + + dark: function () { + // YIQ equation from http://24ways.org/2010/calculating-color-contrast + var rgb = this.values.rgb; + var yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000; + return yiq < 128; + }, + + light: function () { + return !this.dark(); + }, + + negate: function () { + var rgb = []; + for (var i = 0; i < 3; i++) { + rgb[i] = 255 - this.values.rgb[i]; + } + this.setValues('rgb', rgb); + return this; + }, + + lighten: function (ratio) { + var hsl = this.values.hsl; + hsl[2] += hsl[2] * ratio; + this.setValues('hsl', hsl); + return this; + }, + + darken: function (ratio) { + var hsl = this.values.hsl; + hsl[2] -= hsl[2] * ratio; + this.setValues('hsl', hsl); + return this; + }, + + saturate: function (ratio) { + var hsl = this.values.hsl; + hsl[1] += hsl[1] * ratio; + this.setValues('hsl', hsl); + return this; + }, + + desaturate: function (ratio) { + var hsl = this.values.hsl; + hsl[1] -= hsl[1] * ratio; + this.setValues('hsl', hsl); + return this; + }, + + whiten: function (ratio) { + var hwb = this.values.hwb; + hwb[1] += hwb[1] * ratio; + this.setValues('hwb', hwb); + return this; + }, + + blacken: function (ratio) { + var hwb = this.values.hwb; + hwb[2] += hwb[2] * ratio; + this.setValues('hwb', hwb); + return this; + }, + + greyscale: function () { + var rgb = this.values.rgb; + // http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale + var val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11; + this.setValues('rgb', [val, val, val]); + return this; + }, + + clearer: function (ratio) { + var alpha = this.values.alpha; + this.setValues('alpha', alpha - (alpha * ratio)); + return this; + }, + + opaquer: function (ratio) { + var alpha = this.values.alpha; + this.setValues('alpha', alpha + (alpha * ratio)); + return this; + }, + + rotate: function (degrees) { + var hsl = this.values.hsl; + var hue = (hsl[0] + degrees) % 360; + hsl[0] = hue < 0 ? 360 + hue : hue; + this.setValues('hsl', hsl); + return this; + }, + + /** + * Ported from sass implementation in C + * https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209 + */ + mix: function (mixinColor, weight) { + var color1 = this; + var color2 = mixinColor; + var p = weight === undefined ? 0.5 : weight; + + var w = 2 * p - 1; + var a = color1.alpha() - color2.alpha(); + + var w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0; + var w2 = 1 - w1; + + return this + .rgb( + w1 * color1.red() + w2 * color2.red(), + w1 * color1.green() + w2 * color2.green(), + w1 * color1.blue() + w2 * color2.blue() + ) + .alpha(color1.alpha() * p + color2.alpha() * (1 - p)); + }, + + toJSON: function () { + return this.rgb(); + }, + + clone: function () { + // NOTE(SB): using node-clone creates a dependency to Buffer when using browserify, + // making the final build way to big to embed in Chart.js. So let's do it manually, + // assuming that values to clone are 1 dimension arrays containing only numbers, + // except 'alpha' which is a number. + var result = new Color(); + var source = this.values; + var target = result.values; + var value, type; + + for (var prop in source) { + if (source.hasOwnProperty(prop)) { + value = source[prop]; + type = ({}).toString.call(value); + if (type === '[object Array]') { + target[prop] = value.slice(0); + } else if (type === '[object Number]') { + target[prop] = value; + } else { + console.error('unexpected color value:', value); + } + } + } + + return result; + } +}; + +Color.prototype.spaces = { + rgb: ['red', 'green', 'blue'], + hsl: ['hue', 'saturation', 'lightness'], + hsv: ['hue', 'saturation', 'value'], + hwb: ['hue', 'whiteness', 'blackness'], + cmyk: ['cyan', 'magenta', 'yellow', 'black'] +}; + +Color.prototype.maxes = { + rgb: [255, 255, 255], + hsl: [360, 100, 100], + hsv: [360, 100, 100], + hwb: [360, 100, 100], + cmyk: [100, 100, 100, 100] +}; + +Color.prototype.getValues = function (space) { + var values = this.values; + var vals = {}; + + for (var i = 0; i < space.length; i++) { + vals[space.charAt(i)] = values[space][i]; + } + + if (values.alpha !== 1) { + vals.a = values.alpha; + } + + // {r: 255, g: 255, b: 255, a: 0.4} + return vals; +}; + +Color.prototype.setValues = function (space, vals) { + var values = this.values; + var spaces = this.spaces; + var maxes = this.maxes; + var alpha = 1; + var i; + + this.valid = true; + + if (space === 'alpha') { + alpha = vals; + } else if (vals.length) { + // [10, 10, 10] + values[space] = vals.slice(0, space.length); + alpha = vals[space.length]; + } else if (vals[space.charAt(0)] !== undefined) { + // {r: 10, g: 10, b: 10} + for (i = 0; i < space.length; i++) { + values[space][i] = vals[space.charAt(i)]; + } + + alpha = vals.a; + } else if (vals[spaces[space][0]] !== undefined) { + // {red: 10, green: 10, blue: 10} + var chans = spaces[space]; + + for (i = 0; i < space.length; i++) { + values[space][i] = vals[chans[i]]; + } + + alpha = vals.alpha; + } + + values.alpha = Math.max(0, Math.min(1, (alpha === undefined ? values.alpha : alpha))); + + if (space === 'alpha') { + return false; + } + + var capped; + + // cap values of the space prior converting all values + for (i = 0; i < space.length; i++) { + capped = Math.max(0, Math.min(maxes[space][i], values[space][i])); + values[space][i] = Math.round(capped); + } + + // convert to all the other color spaces + for (var sname in spaces) { + if (sname !== space) { + values[sname] = colorConvert[space][sname](values[space]); + } + } + + return true; +}; + +Color.prototype.setSpace = function (space, args) { + var vals = args[0]; + + if (vals === undefined) { + // color.rgb() + return this.getValues(space); + } + + // color.rgb(10, 10, 10) + if (typeof vals === 'number') { + vals = Array.prototype.slice.call(args); + } + + this.setValues(space, vals); + return this; +}; + +Color.prototype.setChannel = function (space, index, val) { + var svalues = this.values[space]; + if (val === undefined) { + // color.red() + return svalues[index]; + } else if (val === svalues[index]) { + // color.red(color.red()) + return this; + } + + // color.red(100) + svalues[index] = val; + this.setValues(space, svalues); + + return this; +}; + +if (typeof window !== 'undefined') { + window.Color = Color; +} + +var chartjsColor = Color; + +/** + * @namespace Chart.helpers + */ +var helpers = { + /** + * An empty function that can be used, for example, for optional callback. + */ + noop: function() {}, + + /** + * Returns a unique id, sequentially generated from a global variable. + * @returns {number} + * @function + */ + uid: (function() { + var id = 0; + return function() { + return id++; + }; + }()), + + /** + * Returns true if `value` is neither null nor undefined, else returns false. + * @param {*} value - The value to test. + * @returns {boolean} + * @since 2.7.0 + */ + isNullOrUndef: function(value) { + return value === null || typeof value === 'undefined'; + }, + + /** + * Returns true if `value` is an array (including typed arrays), else returns false. + * @param {*} value - The value to test. + * @returns {boolean} + * @function + */ + isArray: function(value) { + if (Array.isArray && Array.isArray(value)) { + return true; + } + var type = Object.prototype.toString.call(value); + if (type.substr(0, 7) === '[object' && type.substr(-6) === 'Array]') { + return true; + } + return false; + }, + + /** + * Returns true if `value` is an object (excluding null), else returns false. + * @param {*} value - The value to test. + * @returns {boolean} + * @since 2.7.0 + */ + isObject: function(value) { + return value !== null && Object.prototype.toString.call(value) === '[object Object]'; + }, + + /** + * Returns true if `value` is a finite number, else returns false + * @param {*} value - The value to test. + * @returns {boolean} + */ + isFinite: function(value) { + return (typeof value === 'number' || value instanceof Number) && isFinite(value); + }, + + /** + * Returns `value` if defined, else returns `defaultValue`. + * @param {*} value - The value to return if defined. + * @param {*} defaultValue - The value to return if `value` is undefined. + * @returns {*} + */ + valueOrDefault: function(value, defaultValue) { + return typeof value === 'undefined' ? defaultValue : value; + }, + + /** + * Returns value at the given `index` in array if defined, else returns `defaultValue`. + * @param {Array} value - The array to lookup for value at `index`. + * @param {number} index - The index in `value` to lookup for value. + * @param {*} defaultValue - The value to return if `value[index]` is undefined. + * @returns {*} + */ + valueAtIndexOrDefault: function(value, index, defaultValue) { + return helpers.valueOrDefault(helpers.isArray(value) ? value[index] : value, defaultValue); + }, + + /** + * Calls `fn` with the given `args` in the scope defined by `thisArg` and returns the + * value returned by `fn`. If `fn` is not a function, this method returns undefined. + * @param {function} fn - The function to call. + * @param {Array|undefined|null} args - The arguments with which `fn` should be called. + * @param {object} [thisArg] - The value of `this` provided for the call to `fn`. + * @returns {*} + */ + callback: function(fn, args, thisArg) { + if (fn && typeof fn.call === 'function') { + return fn.apply(thisArg, args); + } + }, + + /** + * Note(SB) for performance sake, this method should only be used when loopable type + * is unknown or in none intensive code (not called often and small loopable). Else + * it's preferable to use a regular for() loop and save extra function calls. + * @param {object|Array} loopable - The object or array to be iterated. + * @param {function} fn - The function to call for each item. + * @param {object} [thisArg] - The value of `this` provided for the call to `fn`. + * @param {boolean} [reverse] - If true, iterates backward on the loopable. + */ + each: function(loopable, fn, thisArg, reverse) { + var i, len, keys; + if (helpers.isArray(loopable)) { + len = loopable.length; + if (reverse) { + for (i = len - 1; i >= 0; i--) { + fn.call(thisArg, loopable[i], i); + } + } else { + for (i = 0; i < len; i++) { + fn.call(thisArg, loopable[i], i); + } + } + } else if (helpers.isObject(loopable)) { + keys = Object.keys(loopable); + len = keys.length; + for (i = 0; i < len; i++) { + fn.call(thisArg, loopable[keys[i]], keys[i]); + } + } + }, + + /** + * Returns true if the `a0` and `a1` arrays have the same content, else returns false. + * @see https://stackoverflow.com/a/14853974 + * @param {Array} a0 - The array to compare + * @param {Array} a1 - The array to compare + * @returns {boolean} + */ + arrayEquals: function(a0, a1) { + var i, ilen, v0, v1; + + if (!a0 || !a1 || a0.length !== a1.length) { + return false; + } + + for (i = 0, ilen = a0.length; i < ilen; ++i) { + v0 = a0[i]; + v1 = a1[i]; + + if (v0 instanceof Array && v1 instanceof Array) { + if (!helpers.arrayEquals(v0, v1)) { + return false; + } + } else if (v0 !== v1) { + // NOTE: two different object instances will never be equal: {x:20} != {x:20} + return false; + } + } + + return true; + }, + + /** + * Returns a deep copy of `source` without keeping references on objects and arrays. + * @param {*} source - The value to clone. + * @returns {*} + */ + clone: function(source) { + if (helpers.isArray(source)) { + return source.map(helpers.clone); + } + + if (helpers.isObject(source)) { + var target = {}; + var keys = Object.keys(source); + var klen = keys.length; + var k = 0; + + for (; k < klen; ++k) { + target[keys[k]] = helpers.clone(source[keys[k]]); + } + + return target; + } + + return source; + }, + + /** + * The default merger when Chart.helpers.merge is called without merger option. + * Note(SB): also used by mergeConfig and mergeScaleConfig as fallback. + * @private + */ + _merger: function(key, target, source, options) { + var tval = target[key]; + var sval = source[key]; + + if (helpers.isObject(tval) && helpers.isObject(sval)) { + helpers.merge(tval, sval, options); + } else { + target[key] = helpers.clone(sval); + } + }, + + /** + * Merges source[key] in target[key] only if target[key] is undefined. + * @private + */ + _mergerIf: function(key, target, source) { + var tval = target[key]; + var sval = source[key]; + + if (helpers.isObject(tval) && helpers.isObject(sval)) { + helpers.mergeIf(tval, sval); + } else if (!target.hasOwnProperty(key)) { + target[key] = helpers.clone(sval); + } + }, + + /** + * Recursively deep copies `source` properties into `target` with the given `options`. + * IMPORTANT: `target` is not cloned and will be updated with `source` properties. + * @param {object} target - The target object in which all sources are merged into. + * @param {object|object[]} source - Object(s) to merge into `target`. + * @param {object} [options] - Merging options: + * @param {function} [options.merger] - The merge method (key, target, source, options) + * @returns {object} The `target` object. + */ + merge: function(target, source, options) { + var sources = helpers.isArray(source) ? source : [source]; + var ilen = sources.length; + var merge, i, keys, klen, k; + + if (!helpers.isObject(target)) { + return target; + } + + options = options || {}; + merge = options.merger || helpers._merger; + + for (i = 0; i < ilen; ++i) { + source = sources[i]; + if (!helpers.isObject(source)) { + continue; + } + + keys = Object.keys(source); + for (k = 0, klen = keys.length; k < klen; ++k) { + merge(keys[k], target, source, options); + } + } + + return target; + }, + + /** + * Recursively deep copies `source` properties into `target` *only* if not defined in target. + * IMPORTANT: `target` is not cloned and will be updated with `source` properties. + * @param {object} target - The target object in which all sources are merged into. + * @param {object|object[]} source - Object(s) to merge into `target`. + * @returns {object} The `target` object. + */ + mergeIf: function(target, source) { + return helpers.merge(target, source, {merger: helpers._mergerIf}); + }, + + /** + * Applies the contents of two or more objects together into the first object. + * @param {object} target - The target object in which all objects are merged into. + * @param {object} arg1 - Object containing additional properties to merge in target. + * @param {object} argN - Additional objects containing properties to merge in target. + * @returns {object} The `target` object. + */ + extend: Object.assign || function(target) { + return helpers.merge(target, [].slice.call(arguments, 1), { + merger: function(key, dst, src) { + dst[key] = src[key]; + } + }); + }, + + /** + * Basic javascript inheritance based on the model created in Backbone.js + */ + inherits: function(extensions) { + var me = this; + var ChartElement = (extensions && extensions.hasOwnProperty('constructor')) ? extensions.constructor : function() { + return me.apply(this, arguments); + }; + + var Surrogate = function() { + this.constructor = ChartElement; + }; + + Surrogate.prototype = me.prototype; + ChartElement.prototype = new Surrogate(); + ChartElement.extend = helpers.inherits; + + if (extensions) { + helpers.extend(ChartElement.prototype, extensions); + } + + ChartElement.__super__ = me.prototype; + return ChartElement; + }, + + _deprecated: function(scope, value, previous, current) { + if (value !== undefined) { + console.warn(scope + ': "' + previous + + '" is deprecated. Please use "' + current + '" instead'); + } + } +}; + +var helpers_core = helpers; + +// DEPRECATIONS + +/** + * Provided for backward compatibility, use Chart.helpers.callback instead. + * @function Chart.helpers.callCallback + * @deprecated since version 2.6.0 + * @todo remove at version 3 + * @private + */ +helpers.callCallback = helpers.callback; + +/** + * Provided for backward compatibility, use Array.prototype.indexOf instead. + * Array.prototype.indexOf compatibility: Chrome, Opera, Safari, FF1.5+, IE9+ + * @function Chart.helpers.indexOf + * @deprecated since version 2.7.0 + * @todo remove at version 3 + * @private + */ +helpers.indexOf = function(array, item, fromIndex) { + return Array.prototype.indexOf.call(array, item, fromIndex); +}; + +/** + * Provided for backward compatibility, use Chart.helpers.valueOrDefault instead. + * @function Chart.helpers.getValueOrDefault + * @deprecated since version 2.7.0 + * @todo remove at version 3 + * @private + */ +helpers.getValueOrDefault = helpers.valueOrDefault; + +/** + * Provided for backward compatibility, use Chart.helpers.valueAtIndexOrDefault instead. + * @function Chart.helpers.getValueAtIndexOrDefault + * @deprecated since version 2.7.0 + * @todo remove at version 3 + * @private + */ +helpers.getValueAtIndexOrDefault = helpers.valueAtIndexOrDefault; + +/** + * Easing functions adapted from Robert Penner's easing equations. + * @namespace Chart.helpers.easingEffects + * @see http://www.robertpenner.com/easing/ + */ +var effects = { + linear: function(t) { + return t; + }, + + easeInQuad: function(t) { + return t * t; + }, + + easeOutQuad: function(t) { + return -t * (t - 2); + }, + + easeInOutQuad: function(t) { + if ((t /= 0.5) < 1) { + return 0.5 * t * t; + } + return -0.5 * ((--t) * (t - 2) - 1); + }, + + easeInCubic: function(t) { + return t * t * t; + }, + + easeOutCubic: function(t) { + return (t = t - 1) * t * t + 1; + }, + + easeInOutCubic: function(t) { + if ((t /= 0.5) < 1) { + return 0.5 * t * t * t; + } + return 0.5 * ((t -= 2) * t * t + 2); + }, + + easeInQuart: function(t) { + return t * t * t * t; + }, + + easeOutQuart: function(t) { + return -((t = t - 1) * t * t * t - 1); + }, + + easeInOutQuart: function(t) { + if ((t /= 0.5) < 1) { + return 0.5 * t * t * t * t; + } + return -0.5 * ((t -= 2) * t * t * t - 2); + }, + + easeInQuint: function(t) { + return t * t * t * t * t; + }, + + easeOutQuint: function(t) { + return (t = t - 1) * t * t * t * t + 1; + }, + + easeInOutQuint: function(t) { + if ((t /= 0.5) < 1) { + return 0.5 * t * t * t * t * t; + } + return 0.5 * ((t -= 2) * t * t * t * t + 2); + }, + + easeInSine: function(t) { + return -Math.cos(t * (Math.PI / 2)) + 1; + }, + + easeOutSine: function(t) { + return Math.sin(t * (Math.PI / 2)); + }, + + easeInOutSine: function(t) { + return -0.5 * (Math.cos(Math.PI * t) - 1); + }, + + easeInExpo: function(t) { + return (t === 0) ? 0 : Math.pow(2, 10 * (t - 1)); + }, + + easeOutExpo: function(t) { + return (t === 1) ? 1 : -Math.pow(2, -10 * t) + 1; + }, + + easeInOutExpo: function(t) { + if (t === 0) { + return 0; + } + if (t === 1) { + return 1; + } + if ((t /= 0.5) < 1) { + return 0.5 * Math.pow(2, 10 * (t - 1)); + } + return 0.5 * (-Math.pow(2, -10 * --t) + 2); + }, + + easeInCirc: function(t) { + if (t >= 1) { + return t; + } + return -(Math.sqrt(1 - t * t) - 1); + }, + + easeOutCirc: function(t) { + return Math.sqrt(1 - (t = t - 1) * t); + }, + + easeInOutCirc: function(t) { + if ((t /= 0.5) < 1) { + return -0.5 * (Math.sqrt(1 - t * t) - 1); + } + return 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1); + }, + + easeInElastic: function(t) { + var s = 1.70158; + var p = 0; + var a = 1; + if (t === 0) { + return 0; + } + if (t === 1) { + return 1; + } + if (!p) { + p = 0.3; + } + if (a < 1) { + a = 1; + s = p / 4; + } else { + s = p / (2 * Math.PI) * Math.asin(1 / a); + } + return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p)); + }, + + easeOutElastic: function(t) { + var s = 1.70158; + var p = 0; + var a = 1; + if (t === 0) { + return 0; + } + if (t === 1) { + return 1; + } + if (!p) { + p = 0.3; + } + if (a < 1) { + a = 1; + s = p / 4; + } else { + s = p / (2 * Math.PI) * Math.asin(1 / a); + } + return a * Math.pow(2, -10 * t) * Math.sin((t - s) * (2 * Math.PI) / p) + 1; + }, + + easeInOutElastic: function(t) { + var s = 1.70158; + var p = 0; + var a = 1; + if (t === 0) { + return 0; + } + if ((t /= 0.5) === 2) { + return 1; + } + if (!p) { + p = 0.45; + } + if (a < 1) { + a = 1; + s = p / 4; + } else { + s = p / (2 * Math.PI) * Math.asin(1 / a); + } + if (t < 1) { + return -0.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p)); + } + return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p) * 0.5 + 1; + }, + easeInBack: function(t) { + var s = 1.70158; + return t * t * ((s + 1) * t - s); + }, + + easeOutBack: function(t) { + var s = 1.70158; + return (t = t - 1) * t * ((s + 1) * t + s) + 1; + }, + + easeInOutBack: function(t) { + var s = 1.70158; + if ((t /= 0.5) < 1) { + return 0.5 * (t * t * (((s *= (1.525)) + 1) * t - s)); + } + return 0.5 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2); + }, + + easeInBounce: function(t) { + return 1 - effects.easeOutBounce(1 - t); + }, + + easeOutBounce: function(t) { + if (t < (1 / 2.75)) { + return 7.5625 * t * t; + } + if (t < (2 / 2.75)) { + return 7.5625 * (t -= (1.5 / 2.75)) * t + 0.75; + } + if (t < (2.5 / 2.75)) { + return 7.5625 * (t -= (2.25 / 2.75)) * t + 0.9375; + } + return 7.5625 * (t -= (2.625 / 2.75)) * t + 0.984375; + }, + + easeInOutBounce: function(t) { + if (t < 0.5) { + return effects.easeInBounce(t * 2) * 0.5; + } + return effects.easeOutBounce(t * 2 - 1) * 0.5 + 0.5; + } +}; + +var helpers_easing = { + effects: effects +}; + +// DEPRECATIONS + +/** + * Provided for backward compatibility, use Chart.helpers.easing.effects instead. + * @function Chart.helpers.easingEffects + * @deprecated since version 2.7.0 + * @todo remove at version 3 + * @private + */ +helpers_core.easingEffects = effects; + +var PI = Math.PI; +var RAD_PER_DEG = PI / 180; +var DOUBLE_PI = PI * 2; +var HALF_PI = PI / 2; +var QUARTER_PI = PI / 4; +var TWO_THIRDS_PI = PI * 2 / 3; + +/** + * @namespace Chart.helpers.canvas + */ +var exports$1 = { + /** + * Clears the entire canvas associated to the given `chart`. + * @param {Chart} chart - The chart for which to clear the canvas. + */ + clear: function(chart) { + chart.ctx.clearRect(0, 0, chart.width, chart.height); + }, + + /** + * Creates a "path" for a rectangle with rounded corners at position (x, y) with a + * given size (width, height) and the same `radius` for all corners. + * @param {CanvasRenderingContext2D} ctx - The canvas 2D Context. + * @param {number} x - The x axis of the coordinate for the rectangle starting point. + * @param {number} y - The y axis of the coordinate for the rectangle starting point. + * @param {number} width - The rectangle's width. + * @param {number} height - The rectangle's height. + * @param {number} radius - The rounded amount (in pixels) for the four corners. + * @todo handle `radius` as top-left, top-right, bottom-right, bottom-left array/object? + */ + roundedRect: function(ctx, x, y, width, height, radius) { + if (radius) { + var r = Math.min(radius, height / 2, width / 2); + var left = x + r; + var top = y + r; + var right = x + width - r; + var bottom = y + height - r; + + ctx.moveTo(x, top); + if (left < right && top < bottom) { + ctx.arc(left, top, r, -PI, -HALF_PI); + ctx.arc(right, top, r, -HALF_PI, 0); + ctx.arc(right, bottom, r, 0, HALF_PI); + ctx.arc(left, bottom, r, HALF_PI, PI); + } else if (left < right) { + ctx.moveTo(left, y); + ctx.arc(right, top, r, -HALF_PI, HALF_PI); + ctx.arc(left, top, r, HALF_PI, PI + HALF_PI); + } else if (top < bottom) { + ctx.arc(left, top, r, -PI, 0); + ctx.arc(left, bottom, r, 0, PI); + } else { + ctx.arc(left, top, r, -PI, PI); + } + ctx.closePath(); + ctx.moveTo(x, y); + } else { + ctx.rect(x, y, width, height); + } + }, + + drawPoint: function(ctx, style, radius, x, y, rotation) { + var type, xOffset, yOffset, size, cornerRadius; + var rad = (rotation || 0) * RAD_PER_DEG; + + if (style && typeof style === 'object') { + type = style.toString(); + if (type === '[object HTMLImageElement]' || type === '[object HTMLCanvasElement]') { + ctx.save(); + ctx.translate(x, y); + ctx.rotate(rad); + ctx.drawImage(style, -style.width / 2, -style.height / 2, style.width, style.height); + ctx.restore(); + return; + } + } + + if (isNaN(radius) || radius <= 0) { + return; + } + + ctx.beginPath(); + + switch (style) { + // Default includes circle + default: + ctx.arc(x, y, radius, 0, DOUBLE_PI); + ctx.closePath(); + break; + case 'triangle': + ctx.moveTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius); + rad += TWO_THIRDS_PI; + ctx.lineTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius); + rad += TWO_THIRDS_PI; + ctx.lineTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius); + ctx.closePath(); + break; + case 'rectRounded': + // NOTE: the rounded rect implementation changed to use `arc` instead of + // `quadraticCurveTo` since it generates better results when rect is + // almost a circle. 0.516 (instead of 0.5) produces results with visually + // closer proportion to the previous impl and it is inscribed in the + // circle with `radius`. For more details, see the following PRs: + // https://github.com/chartjs/Chart.js/issues/5597 + // https://github.com/chartjs/Chart.js/issues/5858 + cornerRadius = radius * 0.516; + size = radius - cornerRadius; + xOffset = Math.cos(rad + QUARTER_PI) * size; + yOffset = Math.sin(rad + QUARTER_PI) * size; + ctx.arc(x - xOffset, y - yOffset, cornerRadius, rad - PI, rad - HALF_PI); + ctx.arc(x + yOffset, y - xOffset, cornerRadius, rad - HALF_PI, rad); + ctx.arc(x + xOffset, y + yOffset, cornerRadius, rad, rad + HALF_PI); + ctx.arc(x - yOffset, y + xOffset, cornerRadius, rad + HALF_PI, rad + PI); + ctx.closePath(); + break; + case 'rect': + if (!rotation) { + size = Math.SQRT1_2 * radius; + ctx.rect(x - size, y - size, 2 * size, 2 * size); + break; + } + rad += QUARTER_PI; + /* falls through */ + case 'rectRot': + xOffset = Math.cos(rad) * radius; + yOffset = Math.sin(rad) * radius; + ctx.moveTo(x - xOffset, y - yOffset); + ctx.lineTo(x + yOffset, y - xOffset); + ctx.lineTo(x + xOffset, y + yOffset); + ctx.lineTo(x - yOffset, y + xOffset); + ctx.closePath(); + break; + case 'crossRot': + rad += QUARTER_PI; + /* falls through */ + case 'cross': + xOffset = Math.cos(rad) * radius; + yOffset = Math.sin(rad) * radius; + ctx.moveTo(x - xOffset, y - yOffset); + ctx.lineTo(x + xOffset, y + yOffset); + ctx.moveTo(x + yOffset, y - xOffset); + ctx.lineTo(x - yOffset, y + xOffset); + break; + case 'star': + xOffset = Math.cos(rad) * radius; + yOffset = Math.sin(rad) * radius; + ctx.moveTo(x - xOffset, y - yOffset); + ctx.lineTo(x + xOffset, y + yOffset); + ctx.moveTo(x + yOffset, y - xOffset); + ctx.lineTo(x - yOffset, y + xOffset); + rad += QUARTER_PI; + xOffset = Math.cos(rad) * radius; + yOffset = Math.sin(rad) * radius; + ctx.moveTo(x - xOffset, y - yOffset); + ctx.lineTo(x + xOffset, y + yOffset); + ctx.moveTo(x + yOffset, y - xOffset); + ctx.lineTo(x - yOffset, y + xOffset); + break; + case 'line': + xOffset = Math.cos(rad) * radius; + yOffset = Math.sin(rad) * radius; + ctx.moveTo(x - xOffset, y - yOffset); + ctx.lineTo(x + xOffset, y + yOffset); + break; + case 'dash': + ctx.moveTo(x, y); + ctx.lineTo(x + Math.cos(rad) * radius, y + Math.sin(rad) * radius); + break; + } + + ctx.fill(); + ctx.stroke(); + }, + + /** + * Returns true if the point is inside the rectangle + * @param {object} point - The point to test + * @param {object} area - The rectangle + * @returns {boolean} + * @private + */ + _isPointInArea: function(point, area) { + var epsilon = 1e-6; // 1e-6 is margin in pixels for accumulated error. + + return point.x > area.left - epsilon && point.x < area.right + epsilon && + point.y > area.top - epsilon && point.y < area.bottom + epsilon; + }, + + clipArea: function(ctx, area) { + ctx.save(); + ctx.beginPath(); + ctx.rect(area.left, area.top, area.right - area.left, area.bottom - area.top); + ctx.clip(); + }, + + unclipArea: function(ctx) { + ctx.restore(); + }, + + lineTo: function(ctx, previous, target, flip) { + var stepped = target.steppedLine; + if (stepped) { + if (stepped === 'middle') { + var midpoint = (previous.x + target.x) / 2.0; + ctx.lineTo(midpoint, flip ? target.y : previous.y); + ctx.lineTo(midpoint, flip ? previous.y : target.y); + } else if ((stepped === 'after' && !flip) || (stepped !== 'after' && flip)) { + ctx.lineTo(previous.x, target.y); + } else { + ctx.lineTo(target.x, previous.y); + } + ctx.lineTo(target.x, target.y); + return; + } + + if (!target.tension) { + ctx.lineTo(target.x, target.y); + return; + } + + ctx.bezierCurveTo( + flip ? previous.controlPointPreviousX : previous.controlPointNextX, + flip ? previous.controlPointPreviousY : previous.controlPointNextY, + flip ? target.controlPointNextX : target.controlPointPreviousX, + flip ? target.controlPointNextY : target.controlPointPreviousY, + target.x, + target.y); + } +}; + +var helpers_canvas = exports$1; + +// DEPRECATIONS + +/** + * Provided for backward compatibility, use Chart.helpers.canvas.clear instead. + * @namespace Chart.helpers.clear + * @deprecated since version 2.7.0 + * @todo remove at version 3 + * @private + */ +helpers_core.clear = exports$1.clear; + +/** + * Provided for backward compatibility, use Chart.helpers.canvas.roundedRect instead. + * @namespace Chart.helpers.drawRoundedRectangle + * @deprecated since version 2.7.0 + * @todo remove at version 3 + * @private + */ +helpers_core.drawRoundedRectangle = function(ctx) { + ctx.beginPath(); + exports$1.roundedRect.apply(exports$1, arguments); +}; + +var defaults = { + /** + * @private + */ + _set: function(scope, values) { + return helpers_core.merge(this[scope] || (this[scope] = {}), values); + } +}; + +// TODO(v3): remove 'global' from namespace. all default are global and +// there's inconsistency around which options are under 'global' +defaults._set('global', { + defaultColor: 'rgba(0,0,0,0.1)', + defaultFontColor: '#666', + defaultFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif", + defaultFontSize: 12, + defaultFontStyle: 'normal', + defaultLineHeight: 1.2, + showLines: true +}); + +var core_defaults = defaults; + +var valueOrDefault = helpers_core.valueOrDefault; + +/** + * Converts the given font object into a CSS font string. + * @param {object} font - A font object. + * @return {string} The CSS font string. See https://developer.mozilla.org/en-US/docs/Web/CSS/font + * @private + */ +function toFontString(font) { + if (!font || helpers_core.isNullOrUndef(font.size) || helpers_core.isNullOrUndef(font.family)) { + return null; + } + + return (font.style ? font.style + ' ' : '') + + (font.weight ? font.weight + ' ' : '') + + font.size + 'px ' + + font.family; +} + +/** + * @alias Chart.helpers.options + * @namespace + */ +var helpers_options = { + /** + * Converts the given line height `value` in pixels for a specific font `size`. + * @param {number|string} value - The lineHeight to parse (eg. 1.6, '14px', '75%', '1.6em'). + * @param {number} size - The font size (in pixels) used to resolve relative `value`. + * @returns {number} The effective line height in pixels (size * 1.2 if value is invalid). + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/line-height + * @since 2.7.0 + */ + toLineHeight: function(value, size) { + var matches = ('' + value).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/); + if (!matches || matches[1] === 'normal') { + return size * 1.2; + } + + value = +matches[2]; + + switch (matches[3]) { + case 'px': + return value; + case '%': + value /= 100; + break; + } + + return size * value; + }, + + /** + * Converts the given value into a padding object with pre-computed width/height. + * @param {number|object} value - If a number, set the value to all TRBL component, + * else, if and object, use defined properties and sets undefined ones to 0. + * @returns {object} The padding values (top, right, bottom, left, width, height) + * @since 2.7.0 + */ + toPadding: function(value) { + var t, r, b, l; + + if (helpers_core.isObject(value)) { + t = +value.top || 0; + r = +value.right || 0; + b = +value.bottom || 0; + l = +value.left || 0; + } else { + t = r = b = l = +value || 0; + } + + return { + top: t, + right: r, + bottom: b, + left: l, + height: t + b, + width: l + r + }; + }, + + /** + * Parses font options and returns the font object. + * @param {object} options - A object that contains font options to be parsed. + * @return {object} The font object. + * @todo Support font.* options and renamed to toFont(). + * @private + */ + _parseFont: function(options) { + var globalDefaults = core_defaults.global; + var size = valueOrDefault(options.fontSize, globalDefaults.defaultFontSize); + var font = { + family: valueOrDefault(options.fontFamily, globalDefaults.defaultFontFamily), + lineHeight: helpers_core.options.toLineHeight(valueOrDefault(options.lineHeight, globalDefaults.defaultLineHeight), size), + size: size, + style: valueOrDefault(options.fontStyle, globalDefaults.defaultFontStyle), + weight: null, + string: '' + }; + + font.string = toFontString(font); + return font; + }, + + /** + * Evaluates the given `inputs` sequentially and returns the first defined value. + * @param {Array} inputs - An array of values, falling back to the last value. + * @param {object} [context] - If defined and the current value is a function, the value + * is called with `context` as first argument and the result becomes the new input. + * @param {number} [index] - If defined and the current value is an array, the value + * at `index` become the new input. + * @param {object} [info] - object to return information about resolution in + * @param {boolean} [info.cacheable] - Will be set to `false` if option is not cacheable. + * @since 2.7.0 + */ + resolve: function(inputs, context, index, info) { + var cacheable = true; + var i, ilen, value; + + for (i = 0, ilen = inputs.length; i < ilen; ++i) { + value = inputs[i]; + if (value === undefined) { + continue; + } + if (context !== undefined && typeof value === 'function') { + value = value(context); + cacheable = false; + } + if (index !== undefined && helpers_core.isArray(value)) { + value = value[index]; + cacheable = false; + } + if (value !== undefined) { + if (info && !cacheable) { + info.cacheable = false; + } + return value; + } + } + } +}; + +/** + * @alias Chart.helpers.math + * @namespace + */ +var exports$2 = { + /** + * Returns an array of factors sorted from 1 to sqrt(value) + * @private + */ + _factorize: function(value) { + var result = []; + var sqrt = Math.sqrt(value); + var i; + + for (i = 1; i < sqrt; i++) { + if (value % i === 0) { + result.push(i); + result.push(value / i); + } + } + if (sqrt === (sqrt | 0)) { // if value is a square number + result.push(sqrt); + } + + result.sort(function(a, b) { + return a - b; + }).pop(); + return result; + }, + + log10: Math.log10 || function(x) { + var exponent = Math.log(x) * Math.LOG10E; // Math.LOG10E = 1 / Math.LN10. + // Check for whole powers of 10, + // which due to floating point rounding error should be corrected. + var powerOf10 = Math.round(exponent); + var isPowerOf10 = x === Math.pow(10, powerOf10); + + return isPowerOf10 ? powerOf10 : exponent; + } +}; + +var helpers_math = exports$2; + +// DEPRECATIONS + +/** + * Provided for backward compatibility, use Chart.helpers.math.log10 instead. + * @namespace Chart.helpers.log10 + * @deprecated since version 2.9.0 + * @todo remove at version 3 + * @private + */ +helpers_core.log10 = exports$2.log10; + +var getRtlAdapter = function(rectX, width) { + return { + x: function(x) { + return rectX + rectX + width - x; + }, + setWidth: function(w) { + width = w; + }, + textAlign: function(align) { + if (align === 'center') { + return align; + } + return align === 'right' ? 'left' : 'right'; + }, + xPlus: function(x, value) { + return x - value; + }, + leftForLtr: function(x, itemWidth) { + return x - itemWidth; + }, + }; +}; + +var getLtrAdapter = function() { + return { + x: function(x) { + return x; + }, + setWidth: function(w) { // eslint-disable-line no-unused-vars + }, + textAlign: function(align) { + return align; + }, + xPlus: function(x, value) { + return x + value; + }, + leftForLtr: function(x, _itemWidth) { // eslint-disable-line no-unused-vars + return x; + }, + }; +}; + +var getAdapter = function(rtl, rectX, width) { + return rtl ? getRtlAdapter(rectX, width) : getLtrAdapter(); +}; + +var overrideTextDirection = function(ctx, direction) { + var style, original; + if (direction === 'ltr' || direction === 'rtl') { + style = ctx.canvas.style; + original = [ + style.getPropertyValue('direction'), + style.getPropertyPriority('direction'), + ]; + + style.setProperty('direction', direction, 'important'); + ctx.prevTextDirection = original; + } +}; + +var restoreTextDirection = function(ctx) { + var original = ctx.prevTextDirection; + if (original !== undefined) { + delete ctx.prevTextDirection; + ctx.canvas.style.setProperty('direction', original[0], original[1]); + } +}; + +var helpers_rtl = { + getRtlAdapter: getAdapter, + overrideTextDirection: overrideTextDirection, + restoreTextDirection: restoreTextDirection, +}; + +var helpers$1 = helpers_core; +var easing = helpers_easing; +var canvas = helpers_canvas; +var options = helpers_options; +var math = helpers_math; +var rtl = helpers_rtl; +helpers$1.easing = easing; +helpers$1.canvas = canvas; +helpers$1.options = options; +helpers$1.math = math; +helpers$1.rtl = rtl; + +function interpolate(start, view, model, ease) { + var keys = Object.keys(model); + var i, ilen, key, actual, origin, target, type, c0, c1; + + for (i = 0, ilen = keys.length; i < ilen; ++i) { + key = keys[i]; + + target = model[key]; + + // if a value is added to the model after pivot() has been called, the view + // doesn't contain it, so let's initialize the view to the target value. + if (!view.hasOwnProperty(key)) { + view[key] = target; + } + + actual = view[key]; + + if (actual === target || key[0] === '_') { + continue; + } + + if (!start.hasOwnProperty(key)) { + start[key] = actual; + } + + origin = start[key]; + + type = typeof target; + + if (type === typeof origin) { + if (type === 'string') { + c0 = chartjsColor(origin); + if (c0.valid) { + c1 = chartjsColor(target); + if (c1.valid) { + view[key] = c1.mix(c0, ease).rgbString(); + continue; + } + } + } else if (helpers$1.isFinite(origin) && helpers$1.isFinite(target)) { + view[key] = origin + (target - origin) * ease; + continue; + } + } + + view[key] = target; + } +} + +var Element = function(configuration) { + helpers$1.extend(this, configuration); + this.initialize.apply(this, arguments); +}; + +helpers$1.extend(Element.prototype, { + _type: undefined, + + initialize: function() { + this.hidden = false; + }, + + pivot: function() { + var me = this; + if (!me._view) { + me._view = helpers$1.extend({}, me._model); + } + me._start = {}; + return me; + }, + + transition: function(ease) { + var me = this; + var model = me._model; + var start = me._start; + var view = me._view; + + // No animation -> No Transition + if (!model || ease === 1) { + me._view = helpers$1.extend({}, model); + me._start = null; + return me; + } + + if (!view) { + view = me._view = {}; + } + + if (!start) { + start = me._start = {}; + } + + interpolate(start, view, model, ease); + + return me; + }, + + tooltipPosition: function() { + return { + x: this._model.x, + y: this._model.y + }; + }, + + hasValue: function() { + return helpers$1.isNumber(this._model.x) && helpers$1.isNumber(this._model.y); + } +}); + +Element.extend = helpers$1.inherits; + +var core_element = Element; + +var exports$3 = core_element.extend({ + chart: null, // the animation associated chart instance + currentStep: 0, // the current animation step + numSteps: 60, // default number of steps + easing: '', // the easing to use for this animation + render: null, // render function used by the animation service + + onAnimationProgress: null, // user specified callback to fire on each step of the animation + onAnimationComplete: null, // user specified callback to fire when the animation finishes +}); + +var core_animation = exports$3; + +// DEPRECATIONS + +/** + * Provided for backward compatibility, use Chart.Animation instead + * @prop Chart.Animation#animationObject + * @deprecated since version 2.6.0 + * @todo remove at version 3 + */ +Object.defineProperty(exports$3.prototype, 'animationObject', { + get: function() { + return this; + } +}); + +/** + * Provided for backward compatibility, use Chart.Animation#chart instead + * @prop Chart.Animation#chartInstance + * @deprecated since version 2.6.0 + * @todo remove at version 3 + */ +Object.defineProperty(exports$3.prototype, 'chartInstance', { + get: function() { + return this.chart; + }, + set: function(value) { + this.chart = value; + } +}); + +core_defaults._set('global', { + animation: { + duration: 1000, + easing: 'easeOutQuart', + onProgress: helpers$1.noop, + onComplete: helpers$1.noop + } +}); + +var core_animations = { + animations: [], + request: null, + + /** + * @param {Chart} chart - The chart to animate. + * @param {Chart.Animation} animation - The animation that we will animate. + * @param {number} duration - The animation duration in ms. + * @param {boolean} lazy - if true, the chart is not marked as animating to enable more responsive interactions + */ + addAnimation: function(chart, animation, duration, lazy) { + var animations = this.animations; + var i, ilen; + + animation.chart = chart; + animation.startTime = Date.now(); + animation.duration = duration; + + if (!lazy) { + chart.animating = true; + } + + for (i = 0, ilen = animations.length; i < ilen; ++i) { + if (animations[i].chart === chart) { + animations[i] = animation; + return; + } + } + + animations.push(animation); + + // If there are no animations queued, manually kickstart a digest, for lack of a better word + if (animations.length === 1) { + this.requestAnimationFrame(); + } + }, + + cancelAnimation: function(chart) { + var index = helpers$1.findIndex(this.animations, function(animation) { + return animation.chart === chart; + }); + + if (index !== -1) { + this.animations.splice(index, 1); + chart.animating = false; + } + }, + + requestAnimationFrame: function() { + var me = this; + if (me.request === null) { + // Skip animation frame requests until the active one is executed. + // This can happen when processing mouse events, e.g. 'mousemove' + // and 'mouseout' events will trigger multiple renders. + me.request = helpers$1.requestAnimFrame.call(window, function() { + me.request = null; + me.startDigest(); + }); + } + }, + + /** + * @private + */ + startDigest: function() { + var me = this; + + me.advance(); + + // Do we have more stuff to animate? + if (me.animations.length > 0) { + me.requestAnimationFrame(); + } + }, + + /** + * @private + */ + advance: function() { + var animations = this.animations; + var animation, chart, numSteps, nextStep; + var i = 0; + + // 1 animation per chart, so we are looping charts here + while (i < animations.length) { + animation = animations[i]; + chart = animation.chart; + numSteps = animation.numSteps; + + // Make sure that currentStep starts at 1 + // https://github.com/chartjs/Chart.js/issues/6104 + nextStep = Math.floor((Date.now() - animation.startTime) / animation.duration * numSteps) + 1; + animation.currentStep = Math.min(nextStep, numSteps); + + helpers$1.callback(animation.render, [chart, animation], chart); + helpers$1.callback(animation.onAnimationProgress, [animation], chart); + + if (animation.currentStep >= numSteps) { + helpers$1.callback(animation.onAnimationComplete, [animation], chart); + chart.animating = false; + animations.splice(i, 1); + } else { + ++i; + } + } + } +}; + +var resolve = helpers$1.options.resolve; + +var arrayEvents = ['push', 'pop', 'shift', 'splice', 'unshift']; + +/** + * Hooks the array methods that add or remove values ('push', pop', 'shift', 'splice', + * 'unshift') and notify the listener AFTER the array has been altered. Listeners are + * called on the 'onData*' callbacks (e.g. onDataPush, etc.) with same arguments. + */ +function listenArrayEvents(array, listener) { + if (array._chartjs) { + array._chartjs.listeners.push(listener); + return; + } + + Object.defineProperty(array, '_chartjs', { + configurable: true, + enumerable: false, + value: { + listeners: [listener] + } + }); + + arrayEvents.forEach(function(key) { + var method = 'onData' + key.charAt(0).toUpperCase() + key.slice(1); + var base = array[key]; + + Object.defineProperty(array, key, { + configurable: true, + enumerable: false, + value: function() { + var args = Array.prototype.slice.call(arguments); + var res = base.apply(this, args); + + helpers$1.each(array._chartjs.listeners, function(object) { + if (typeof object[method] === 'function') { + object[method].apply(object, args); + } + }); + + return res; + } + }); + }); +} + +/** + * Removes the given array event listener and cleanup extra attached properties (such as + * the _chartjs stub and overridden methods) if array doesn't have any more listeners. + */ +function unlistenArrayEvents(array, listener) { + var stub = array._chartjs; + if (!stub) { + return; + } + + var listeners = stub.listeners; + var index = listeners.indexOf(listener); + if (index !== -1) { + listeners.splice(index, 1); + } + + if (listeners.length > 0) { + return; + } + + arrayEvents.forEach(function(key) { + delete array[key]; + }); + + delete array._chartjs; +} + +// Base class for all dataset controllers (line, bar, etc) +var DatasetController = function(chart, datasetIndex) { + this.initialize(chart, datasetIndex); +}; + +helpers$1.extend(DatasetController.prototype, { + + /** + * Element type used to generate a meta dataset (e.g. Chart.element.Line). + * @type {Chart.core.element} + */ + datasetElementType: null, + + /** + * Element type used to generate a meta data (e.g. Chart.element.Point). + * @type {Chart.core.element} + */ + dataElementType: null, + + /** + * Dataset element option keys to be resolved in _resolveDatasetElementOptions. + * A derived controller may override this to resolve controller-specific options. + * The keys defined here are for backward compatibility for legend styles. + * @private + */ + _datasetElementOptions: [ + 'backgroundColor', + 'borderCapStyle', + 'borderColor', + 'borderDash', + 'borderDashOffset', + 'borderJoinStyle', + 'borderWidth' + ], + + /** + * Data element option keys to be resolved in _resolveDataElementOptions. + * A derived controller may override this to resolve controller-specific options. + * The keys defined here are for backward compatibility for legend styles. + * @private + */ + _dataElementOptions: [ + 'backgroundColor', + 'borderColor', + 'borderWidth', + 'pointStyle' + ], + + initialize: function(chart, datasetIndex) { + var me = this; + me.chart = chart; + me.index = datasetIndex; + me.linkScales(); + me.addElements(); + me._type = me.getMeta().type; + }, + + updateIndex: function(datasetIndex) { + this.index = datasetIndex; + }, + + linkScales: function() { + var me = this; + var meta = me.getMeta(); + var chart = me.chart; + var scales = chart.scales; + var dataset = me.getDataset(); + var scalesOpts = chart.options.scales; + + if (meta.xAxisID === null || !(meta.xAxisID in scales) || dataset.xAxisID) { + meta.xAxisID = dataset.xAxisID || scalesOpts.xAxes[0].id; + } + if (meta.yAxisID === null || !(meta.yAxisID in scales) || dataset.yAxisID) { + meta.yAxisID = dataset.yAxisID || scalesOpts.yAxes[0].id; + } + }, + + getDataset: function() { + return this.chart.data.datasets[this.index]; + }, + + getMeta: function() { + return this.chart.getDatasetMeta(this.index); + }, + + getScaleForId: function(scaleID) { + return this.chart.scales[scaleID]; + }, + + /** + * @private + */ + _getValueScaleId: function() { + return this.getMeta().yAxisID; + }, + + /** + * @private + */ + _getIndexScaleId: function() { + return this.getMeta().xAxisID; + }, + + /** + * @private + */ + _getValueScale: function() { + return this.getScaleForId(this._getValueScaleId()); + }, + + /** + * @private + */ + _getIndexScale: function() { + return this.getScaleForId(this._getIndexScaleId()); + }, + + reset: function() { + this._update(true); + }, + + /** + * @private + */ + destroy: function() { + if (this._data) { + unlistenArrayEvents(this._data, this); + } + }, + + createMetaDataset: function() { + var me = this; + var type = me.datasetElementType; + return type && new type({ + _chart: me.chart, + _datasetIndex: me.index + }); + }, + + createMetaData: function(index) { + var me = this; + var type = me.dataElementType; + return type && new type({ + _chart: me.chart, + _datasetIndex: me.index, + _index: index + }); + }, + + addElements: function() { + var me = this; + var meta = me.getMeta(); + var data = me.getDataset().data || []; + var metaData = meta.data; + var i, ilen; + + for (i = 0, ilen = data.length; i < ilen; ++i) { + metaData[i] = metaData[i] || me.createMetaData(i); + } + + meta.dataset = meta.dataset || me.createMetaDataset(); + }, + + addElementAndReset: function(index) { + var element = this.createMetaData(index); + this.getMeta().data.splice(index, 0, element); + this.updateElement(element, index, true); + }, + + buildOrUpdateElements: function() { + var me = this; + var dataset = me.getDataset(); + var data = dataset.data || (dataset.data = []); + + // In order to correctly handle data addition/deletion animation (an thus simulate + // real-time charts), we need to monitor these data modifications and synchronize + // the internal meta data accordingly. + if (me._data !== data) { + if (me._data) { + // This case happens when the user replaced the data array instance. + unlistenArrayEvents(me._data, me); + } + + if (data && Object.isExtensible(data)) { + listenArrayEvents(data, me); + } + me._data = data; + } + + // Re-sync meta data in case the user replaced the data array or if we missed + // any updates and so make sure that we handle number of datapoints changing. + me.resyncElements(); + }, + + /** + * Returns the merged user-supplied and default dataset-level options + * @private + */ + _configure: function() { + var me = this; + me._config = helpers$1.merge({}, [ + me.chart.options.datasets[me._type], + me.getDataset(), + ], { + merger: function(key, target, source) { + if (key !== '_meta' && key !== 'data') { + helpers$1._merger(key, target, source); + } + } + }); + }, + + _update: function(reset) { + var me = this; + me._configure(); + me._cachedDataOpts = null; + me.update(reset); + }, + + update: helpers$1.noop, + + transition: function(easingValue) { + var meta = this.getMeta(); + var elements = meta.data || []; + var ilen = elements.length; + var i = 0; + + for (; i < ilen; ++i) { + elements[i].transition(easingValue); + } + + if (meta.dataset) { + meta.dataset.transition(easingValue); + } + }, + + draw: function() { + var meta = this.getMeta(); + var elements = meta.data || []; + var ilen = elements.length; + var i = 0; + + if (meta.dataset) { + meta.dataset.draw(); + } + + for (; i < ilen; ++i) { + elements[i].draw(); + } + }, + + /** + * Returns a set of predefined style properties that should be used to represent the dataset + * or the data if the index is specified + * @param {number} index - data index + * @return {IStyleInterface} style object + */ + getStyle: function(index) { + var me = this; + var meta = me.getMeta(); + var dataset = meta.dataset; + var style; + + me._configure(); + if (dataset && index === undefined) { + style = me._resolveDatasetElementOptions(dataset || {}); + } else { + index = index || 0; + style = me._resolveDataElementOptions(meta.data[index] || {}, index); + } + + if (style.fill === false || style.fill === null) { + style.backgroundColor = style.borderColor; + } + + return style; + }, + + /** + * @private + */ + _resolveDatasetElementOptions: function(element, hover) { + var me = this; + var chart = me.chart; + var datasetOpts = me._config; + var custom = element.custom || {}; + var options = chart.options.elements[me.datasetElementType.prototype._type] || {}; + var elementOptions = me._datasetElementOptions; + var values = {}; + var i, ilen, key, readKey; + + // Scriptable options + var context = { + chart: chart, + dataset: me.getDataset(), + datasetIndex: me.index, + hover: hover + }; + + for (i = 0, ilen = elementOptions.length; i < ilen; ++i) { + key = elementOptions[i]; + readKey = hover ? 'hover' + key.charAt(0).toUpperCase() + key.slice(1) : key; + values[key] = resolve([ + custom[readKey], + datasetOpts[readKey], + options[readKey] + ], context); + } + + return values; + }, + + /** + * @private + */ + _resolveDataElementOptions: function(element, index) { + var me = this; + var custom = element && element.custom; + var cached = me._cachedDataOpts; + if (cached && !custom) { + return cached; + } + var chart = me.chart; + var datasetOpts = me._config; + var options = chart.options.elements[me.dataElementType.prototype._type] || {}; + var elementOptions = me._dataElementOptions; + var values = {}; + + // Scriptable options + var context = { + chart: chart, + dataIndex: index, + dataset: me.getDataset(), + datasetIndex: me.index + }; + + // `resolve` sets cacheable to `false` if any option is indexed or scripted + var info = {cacheable: !custom}; + + var keys, i, ilen, key; + + custom = custom || {}; + + if (helpers$1.isArray(elementOptions)) { + for (i = 0, ilen = elementOptions.length; i < ilen; ++i) { + key = elementOptions[i]; + values[key] = resolve([ + custom[key], + datasetOpts[key], + options[key] + ], context, index, info); + } + } else { + keys = Object.keys(elementOptions); + for (i = 0, ilen = keys.length; i < ilen; ++i) { + key = keys[i]; + values[key] = resolve([ + custom[key], + datasetOpts[elementOptions[key]], + datasetOpts[key], + options[key] + ], context, index, info); + } + } + + if (info.cacheable) { + me._cachedDataOpts = Object.freeze(values); + } + + return values; + }, + + removeHoverStyle: function(element) { + helpers$1.merge(element._model, element.$previousStyle || {}); + delete element.$previousStyle; + }, + + setHoverStyle: function(element) { + var dataset = this.chart.data.datasets[element._datasetIndex]; + var index = element._index; + var custom = element.custom || {}; + var model = element._model; + var getHoverColor = helpers$1.getHoverColor; + + element.$previousStyle = { + backgroundColor: model.backgroundColor, + borderColor: model.borderColor, + borderWidth: model.borderWidth + }; + + model.backgroundColor = resolve([custom.hoverBackgroundColor, dataset.hoverBackgroundColor, getHoverColor(model.backgroundColor)], undefined, index); + model.borderColor = resolve([custom.hoverBorderColor, dataset.hoverBorderColor, getHoverColor(model.borderColor)], undefined, index); + model.borderWidth = resolve([custom.hoverBorderWidth, dataset.hoverBorderWidth, model.borderWidth], undefined, index); + }, + + /** + * @private + */ + _removeDatasetHoverStyle: function() { + var element = this.getMeta().dataset; + + if (element) { + this.removeHoverStyle(element); + } + }, + + /** + * @private + */ + _setDatasetHoverStyle: function() { + var element = this.getMeta().dataset; + var prev = {}; + var i, ilen, key, keys, hoverOptions, model; + + if (!element) { + return; + } + + model = element._model; + hoverOptions = this._resolveDatasetElementOptions(element, true); + + keys = Object.keys(hoverOptions); + for (i = 0, ilen = keys.length; i < ilen; ++i) { + key = keys[i]; + prev[key] = model[key]; + model[key] = hoverOptions[key]; + } + + element.$previousStyle = prev; + }, + + /** + * @private + */ + resyncElements: function() { + var me = this; + var meta = me.getMeta(); + var data = me.getDataset().data; + var numMeta = meta.data.length; + var numData = data.length; + + if (numData < numMeta) { + meta.data.splice(numData, numMeta - numData); + } else if (numData > numMeta) { + me.insertElements(numMeta, numData - numMeta); + } + }, + + /** + * @private + */ + insertElements: function(start, count) { + for (var i = 0; i < count; ++i) { + this.addElementAndReset(start + i); + } + }, + + /** + * @private + */ + onDataPush: function() { + var count = arguments.length; + this.insertElements(this.getDataset().data.length - count, count); + }, + + /** + * @private + */ + onDataPop: function() { + this.getMeta().data.pop(); + }, + + /** + * @private + */ + onDataShift: function() { + this.getMeta().data.shift(); + }, + + /** + * @private + */ + onDataSplice: function(start, count) { + this.getMeta().data.splice(start, count); + this.insertElements(start, arguments.length - 2); + }, + + /** + * @private + */ + onDataUnshift: function() { + this.insertElements(0, arguments.length); + } +}); + +DatasetController.extend = helpers$1.inherits; + +var core_datasetController = DatasetController; + +var TAU = Math.PI * 2; + +core_defaults._set('global', { + elements: { + arc: { + backgroundColor: core_defaults.global.defaultColor, + borderColor: '#fff', + borderWidth: 2, + borderAlign: 'center' + } + } +}); + +function clipArc(ctx, arc) { + var startAngle = arc.startAngle; + var endAngle = arc.endAngle; + var pixelMargin = arc.pixelMargin; + var angleMargin = pixelMargin / arc.outerRadius; + var x = arc.x; + var y = arc.y; + + // Draw an inner border by cliping the arc and drawing a double-width border + // Enlarge the clipping arc by 0.33 pixels to eliminate glitches between borders + ctx.beginPath(); + ctx.arc(x, y, arc.outerRadius, startAngle - angleMargin, endAngle + angleMargin); + if (arc.innerRadius > pixelMargin) { + angleMargin = pixelMargin / arc.innerRadius; + ctx.arc(x, y, arc.innerRadius - pixelMargin, endAngle + angleMargin, startAngle - angleMargin, true); + } else { + ctx.arc(x, y, pixelMargin, endAngle + Math.PI / 2, startAngle - Math.PI / 2); + } + ctx.closePath(); + ctx.clip(); +} + +function drawFullCircleBorders(ctx, vm, arc, inner) { + var endAngle = arc.endAngle; + var i; + + if (inner) { + arc.endAngle = arc.startAngle + TAU; + clipArc(ctx, arc); + arc.endAngle = endAngle; + if (arc.endAngle === arc.startAngle && arc.fullCircles) { + arc.endAngle += TAU; + arc.fullCircles--; + } + } + + ctx.beginPath(); + ctx.arc(arc.x, arc.y, arc.innerRadius, arc.startAngle + TAU, arc.startAngle, true); + for (i = 0; i < arc.fullCircles; ++i) { + ctx.stroke(); + } + + ctx.beginPath(); + ctx.arc(arc.x, arc.y, vm.outerRadius, arc.startAngle, arc.startAngle + TAU); + for (i = 0; i < arc.fullCircles; ++i) { + ctx.stroke(); + } +} + +function drawBorder(ctx, vm, arc) { + var inner = vm.borderAlign === 'inner'; + + if (inner) { + ctx.lineWidth = vm.borderWidth * 2; + ctx.lineJoin = 'round'; + } else { + ctx.lineWidth = vm.borderWidth; + ctx.lineJoin = 'bevel'; + } + + if (arc.fullCircles) { + drawFullCircleBorders(ctx, vm, arc, inner); + } + + if (inner) { + clipArc(ctx, arc); + } + + ctx.beginPath(); + ctx.arc(arc.x, arc.y, vm.outerRadius, arc.startAngle, arc.endAngle); + ctx.arc(arc.x, arc.y, arc.innerRadius, arc.endAngle, arc.startAngle, true); + ctx.closePath(); + ctx.stroke(); +} + +var element_arc = core_element.extend({ + _type: 'arc', + + inLabelRange: function(mouseX) { + var vm = this._view; + + if (vm) { + return (Math.pow(mouseX - vm.x, 2) < Math.pow(vm.radius + vm.hoverRadius, 2)); + } + return false; + }, + + inRange: function(chartX, chartY) { + var vm = this._view; + + if (vm) { + var pointRelativePosition = helpers$1.getAngleFromPoint(vm, {x: chartX, y: chartY}); + var angle = pointRelativePosition.angle; + var distance = pointRelativePosition.distance; + + // Sanitise angle range + var startAngle = vm.startAngle; + var endAngle = vm.endAngle; + while (endAngle < startAngle) { + endAngle += TAU; + } + while (angle > endAngle) { + angle -= TAU; + } + while (angle < startAngle) { + angle += TAU; + } + + // Check if within the range of the open/close angle + var betweenAngles = (angle >= startAngle && angle <= endAngle); + var withinRadius = (distance >= vm.innerRadius && distance <= vm.outerRadius); + + return (betweenAngles && withinRadius); + } + return false; + }, + + getCenterPoint: function() { + var vm = this._view; + var halfAngle = (vm.startAngle + vm.endAngle) / 2; + var halfRadius = (vm.innerRadius + vm.outerRadius) / 2; + return { + x: vm.x + Math.cos(halfAngle) * halfRadius, + y: vm.y + Math.sin(halfAngle) * halfRadius + }; + }, + + getArea: function() { + var vm = this._view; + return Math.PI * ((vm.endAngle - vm.startAngle) / (2 * Math.PI)) * (Math.pow(vm.outerRadius, 2) - Math.pow(vm.innerRadius, 2)); + }, + + tooltipPosition: function() { + var vm = this._view; + var centreAngle = vm.startAngle + ((vm.endAngle - vm.startAngle) / 2); + var rangeFromCentre = (vm.outerRadius - vm.innerRadius) / 2 + vm.innerRadius; + + return { + x: vm.x + (Math.cos(centreAngle) * rangeFromCentre), + y: vm.y + (Math.sin(centreAngle) * rangeFromCentre) + }; + }, + + draw: function() { + var ctx = this._chart.ctx; + var vm = this._view; + var pixelMargin = (vm.borderAlign === 'inner') ? 0.33 : 0; + var arc = { + x: vm.x, + y: vm.y, + innerRadius: vm.innerRadius, + outerRadius: Math.max(vm.outerRadius - pixelMargin, 0), + pixelMargin: pixelMargin, + startAngle: vm.startAngle, + endAngle: vm.endAngle, + fullCircles: Math.floor(vm.circumference / TAU) + }; + var i; + + ctx.save(); + + ctx.fillStyle = vm.backgroundColor; + ctx.strokeStyle = vm.borderColor; + + if (arc.fullCircles) { + arc.endAngle = arc.startAngle + TAU; + ctx.beginPath(); + ctx.arc(arc.x, arc.y, arc.outerRadius, arc.startAngle, arc.endAngle); + ctx.arc(arc.x, arc.y, arc.innerRadius, arc.endAngle, arc.startAngle, true); + ctx.closePath(); + for (i = 0; i < arc.fullCircles; ++i) { + ctx.fill(); + } + arc.endAngle = arc.startAngle + vm.circumference % TAU; + } + + ctx.beginPath(); + ctx.arc(arc.x, arc.y, arc.outerRadius, arc.startAngle, arc.endAngle); + ctx.arc(arc.x, arc.y, arc.innerRadius, arc.endAngle, arc.startAngle, true); + ctx.closePath(); + ctx.fill(); + + if (vm.borderWidth) { + drawBorder(ctx, vm, arc); + } + + ctx.restore(); + } +}); + +var valueOrDefault$1 = helpers$1.valueOrDefault; + +var defaultColor = core_defaults.global.defaultColor; + +core_defaults._set('global', { + elements: { + line: { + tension: 0.4, + backgroundColor: defaultColor, + borderWidth: 3, + borderColor: defaultColor, + borderCapStyle: 'butt', + borderDash: [], + borderDashOffset: 0.0, + borderJoinStyle: 'miter', + capBezierPoints: true, + fill: true, // do we fill in the area between the line and its base axis + } + } +}); + +var element_line = core_element.extend({ + _type: 'line', + + draw: function() { + var me = this; + var vm = me._view; + var ctx = me._chart.ctx; + var spanGaps = vm.spanGaps; + var points = me._children.slice(); // clone array + var globalDefaults = core_defaults.global; + var globalOptionLineElements = globalDefaults.elements.line; + var lastDrawnIndex = -1; + var closePath = me._loop; + var index, previous, currentVM; + + if (!points.length) { + return; + } + + if (me._loop) { + for (index = 0; index < points.length; ++index) { + previous = helpers$1.previousItem(points, index); + // If the line has an open path, shift the point array + if (!points[index]._view.skip && previous._view.skip) { + points = points.slice(index).concat(points.slice(0, index)); + closePath = spanGaps; + break; + } + } + // If the line has a close path, add the first point again + if (closePath) { + points.push(points[0]); + } + } + + ctx.save(); + + // Stroke Line Options + ctx.lineCap = vm.borderCapStyle || globalOptionLineElements.borderCapStyle; + + // IE 9 and 10 do not support line dash + if (ctx.setLineDash) { + ctx.setLineDash(vm.borderDash || globalOptionLineElements.borderDash); + } + + ctx.lineDashOffset = valueOrDefault$1(vm.borderDashOffset, globalOptionLineElements.borderDashOffset); + ctx.lineJoin = vm.borderJoinStyle || globalOptionLineElements.borderJoinStyle; + ctx.lineWidth = valueOrDefault$1(vm.borderWidth, globalOptionLineElements.borderWidth); + ctx.strokeStyle = vm.borderColor || globalDefaults.defaultColor; + + // Stroke Line + ctx.beginPath(); + + // First point moves to it's starting position no matter what + currentVM = points[0]._view; + if (!currentVM.skip) { + ctx.moveTo(currentVM.x, currentVM.y); + lastDrawnIndex = 0; + } + + for (index = 1; index < points.length; ++index) { + currentVM = points[index]._view; + previous = lastDrawnIndex === -1 ? helpers$1.previousItem(points, index) : points[lastDrawnIndex]; + + if (!currentVM.skip) { + if ((lastDrawnIndex !== (index - 1) && !spanGaps) || lastDrawnIndex === -1) { + // There was a gap and this is the first point after the gap + ctx.moveTo(currentVM.x, currentVM.y); + } else { + // Line to next point + helpers$1.canvas.lineTo(ctx, previous._view, currentVM); + } + lastDrawnIndex = index; + } + } + + if (closePath) { + ctx.closePath(); + } + + ctx.stroke(); + ctx.restore(); + } +}); + +var valueOrDefault$2 = helpers$1.valueOrDefault; + +var defaultColor$1 = core_defaults.global.defaultColor; + +core_defaults._set('global', { + elements: { + point: { + radius: 3, + pointStyle: 'circle', + backgroundColor: defaultColor$1, + borderColor: defaultColor$1, + borderWidth: 1, + // Hover + hitRadius: 1, + hoverRadius: 4, + hoverBorderWidth: 1 + } + } +}); + +function xRange(mouseX) { + var vm = this._view; + return vm ? (Math.abs(mouseX - vm.x) < vm.radius + vm.hitRadius) : false; +} + +function yRange(mouseY) { + var vm = this._view; + return vm ? (Math.abs(mouseY - vm.y) < vm.radius + vm.hitRadius) : false; +} + +var element_point = core_element.extend({ + _type: 'point', + + inRange: function(mouseX, mouseY) { + var vm = this._view; + return vm ? ((Math.pow(mouseX - vm.x, 2) + Math.pow(mouseY - vm.y, 2)) < Math.pow(vm.hitRadius + vm.radius, 2)) : false; + }, + + inLabelRange: xRange, + inXRange: xRange, + inYRange: yRange, + + getCenterPoint: function() { + var vm = this._view; + return { + x: vm.x, + y: vm.y + }; + }, + + getArea: function() { + return Math.PI * Math.pow(this._view.radius, 2); + }, + + tooltipPosition: function() { + var vm = this._view; + return { + x: vm.x, + y: vm.y, + padding: vm.radius + vm.borderWidth + }; + }, + + draw: function(chartArea) { + var vm = this._view; + var ctx = this._chart.ctx; + var pointStyle = vm.pointStyle; + var rotation = vm.rotation; + var radius = vm.radius; + var x = vm.x; + var y = vm.y; + var globalDefaults = core_defaults.global; + var defaultColor = globalDefaults.defaultColor; // eslint-disable-line no-shadow + + if (vm.skip) { + return; + } + + // Clipping for Points. + if (chartArea === undefined || helpers$1.canvas._isPointInArea(vm, chartArea)) { + ctx.strokeStyle = vm.borderColor || defaultColor; + ctx.lineWidth = valueOrDefault$2(vm.borderWidth, globalDefaults.elements.point.borderWidth); + ctx.fillStyle = vm.backgroundColor || defaultColor; + helpers$1.canvas.drawPoint(ctx, pointStyle, radius, x, y, rotation); + } + } +}); + +var defaultColor$2 = core_defaults.global.defaultColor; + +core_defaults._set('global', { + elements: { + rectangle: { + backgroundColor: defaultColor$2, + borderColor: defaultColor$2, + borderSkipped: 'bottom', + borderWidth: 0 + } + } +}); + +function isVertical(vm) { + return vm && vm.width !== undefined; +} + +/** + * Helper function to get the bounds of the bar regardless of the orientation + * @param bar {Chart.Element.Rectangle} the bar + * @return {Bounds} bounds of the bar + * @private + */ +function getBarBounds(vm) { + var x1, x2, y1, y2, half; + + if (isVertical(vm)) { + half = vm.width / 2; + x1 = vm.x - half; + x2 = vm.x + half; + y1 = Math.min(vm.y, vm.base); + y2 = Math.max(vm.y, vm.base); + } else { + half = vm.height / 2; + x1 = Math.min(vm.x, vm.base); + x2 = Math.max(vm.x, vm.base); + y1 = vm.y - half; + y2 = vm.y + half; + } + + return { + left: x1, + top: y1, + right: x2, + bottom: y2 + }; +} + +function swap(orig, v1, v2) { + return orig === v1 ? v2 : orig === v2 ? v1 : orig; +} + +function parseBorderSkipped(vm) { + var edge = vm.borderSkipped; + var res = {}; + + if (!edge) { + return res; + } + + if (vm.horizontal) { + if (vm.base > vm.x) { + edge = swap(edge, 'left', 'right'); + } + } else if (vm.base < vm.y) { + edge = swap(edge, 'bottom', 'top'); + } + + res[edge] = true; + return res; +} + +function parseBorderWidth(vm, maxW, maxH) { + var value = vm.borderWidth; + var skip = parseBorderSkipped(vm); + var t, r, b, l; + + if (helpers$1.isObject(value)) { + t = +value.top || 0; + r = +value.right || 0; + b = +value.bottom || 0; + l = +value.left || 0; + } else { + t = r = b = l = +value || 0; + } + + return { + t: skip.top || (t < 0) ? 0 : t > maxH ? maxH : t, + r: skip.right || (r < 0) ? 0 : r > maxW ? maxW : r, + b: skip.bottom || (b < 0) ? 0 : b > maxH ? maxH : b, + l: skip.left || (l < 0) ? 0 : l > maxW ? maxW : l + }; +} + +function boundingRects(vm) { + var bounds = getBarBounds(vm); + var width = bounds.right - bounds.left; + var height = bounds.bottom - bounds.top; + var border = parseBorderWidth(vm, width / 2, height / 2); + + return { + outer: { + x: bounds.left, + y: bounds.top, + w: width, + h: height + }, + inner: { + x: bounds.left + border.l, + y: bounds.top + border.t, + w: width - border.l - border.r, + h: height - border.t - border.b + } + }; +} + +function inRange(vm, x, y) { + var skipX = x === null; + var skipY = y === null; + var bounds = !vm || (skipX && skipY) ? false : getBarBounds(vm); + + return bounds + && (skipX || x >= bounds.left && x <= bounds.right) + && (skipY || y >= bounds.top && y <= bounds.bottom); +} + +var element_rectangle = core_element.extend({ + _type: 'rectangle', + + draw: function() { + var ctx = this._chart.ctx; + var vm = this._view; + var rects = boundingRects(vm); + var outer = rects.outer; + var inner = rects.inner; + + ctx.fillStyle = vm.backgroundColor; + ctx.fillRect(outer.x, outer.y, outer.w, outer.h); + + if (outer.w === inner.w && outer.h === inner.h) { + return; + } + + ctx.save(); + ctx.beginPath(); + ctx.rect(outer.x, outer.y, outer.w, outer.h); + ctx.clip(); + ctx.fillStyle = vm.borderColor; + ctx.rect(inner.x, inner.y, inner.w, inner.h); + ctx.fill('evenodd'); + ctx.restore(); + }, + + height: function() { + var vm = this._view; + return vm.base - vm.y; + }, + + inRange: function(mouseX, mouseY) { + return inRange(this._view, mouseX, mouseY); + }, + + inLabelRange: function(mouseX, mouseY) { + var vm = this._view; + return isVertical(vm) + ? inRange(vm, mouseX, null) + : inRange(vm, null, mouseY); + }, + + inXRange: function(mouseX) { + return inRange(this._view, mouseX, null); + }, + + inYRange: function(mouseY) { + return inRange(this._view, null, mouseY); + }, + + getCenterPoint: function() { + var vm = this._view; + var x, y; + if (isVertical(vm)) { + x = vm.x; + y = (vm.y + vm.base) / 2; + } else { + x = (vm.x + vm.base) / 2; + y = vm.y; + } + + return {x: x, y: y}; + }, + + getArea: function() { + var vm = this._view; + + return isVertical(vm) + ? vm.width * Math.abs(vm.y - vm.base) + : vm.height * Math.abs(vm.x - vm.base); + }, + + tooltipPosition: function() { + var vm = this._view; + return { + x: vm.x, + y: vm.y + }; + } +}); + +var elements = {}; +var Arc = element_arc; +var Line = element_line; +var Point = element_point; +var Rectangle = element_rectangle; +elements.Arc = Arc; +elements.Line = Line; +elements.Point = Point; +elements.Rectangle = Rectangle; + +var deprecated = helpers$1._deprecated; +var valueOrDefault$3 = helpers$1.valueOrDefault; + +core_defaults._set('bar', { + hover: { + mode: 'label' + }, + + scales: { + xAxes: [{ + type: 'category', + offset: true, + gridLines: { + offsetGridLines: true + } + }], + + yAxes: [{ + type: 'linear' + }] + } +}); + +core_defaults._set('global', { + datasets: { + bar: { + categoryPercentage: 0.8, + barPercentage: 0.9 + } + } +}); + +/** + * Computes the "optimal" sample size to maintain bars equally sized while preventing overlap. + * @private + */ +function computeMinSampleSize(scale, pixels) { + var min = scale._length; + var prev, curr, i, ilen; + + for (i = 1, ilen = pixels.length; i < ilen; ++i) { + min = Math.min(min, Math.abs(pixels[i] - pixels[i - 1])); + } + + for (i = 0, ilen = scale.getTicks().length; i < ilen; ++i) { + curr = scale.getPixelForTick(i); + min = i > 0 ? Math.min(min, Math.abs(curr - prev)) : min; + prev = curr; + } + + return min; +} + +/** + * Computes an "ideal" category based on the absolute bar thickness or, if undefined or null, + * uses the smallest interval (see computeMinSampleSize) that prevents bar overlapping. This + * mode currently always generates bars equally sized (until we introduce scriptable options?). + * @private + */ +function computeFitCategoryTraits(index, ruler, options) { + var thickness = options.barThickness; + var count = ruler.stackCount; + var curr = ruler.pixels[index]; + var min = helpers$1.isNullOrUndef(thickness) + ? computeMinSampleSize(ruler.scale, ruler.pixels) + : -1; + var size, ratio; + + if (helpers$1.isNullOrUndef(thickness)) { + size = min * options.categoryPercentage; + ratio = options.barPercentage; + } else { + // When bar thickness is enforced, category and bar percentages are ignored. + // Note(SB): we could add support for relative bar thickness (e.g. barThickness: '50%') + // and deprecate barPercentage since this value is ignored when thickness is absolute. + size = thickness * count; + ratio = 1; + } + + return { + chunk: size / count, + ratio: ratio, + start: curr - (size / 2) + }; +} + +/** + * Computes an "optimal" category that globally arranges bars side by side (no gap when + * percentage options are 1), based on the previous and following categories. This mode + * generates bars with different widths when data are not evenly spaced. + * @private + */ +function computeFlexCategoryTraits(index, ruler, options) { + var pixels = ruler.pixels; + var curr = pixels[index]; + var prev = index > 0 ? pixels[index - 1] : null; + var next = index < pixels.length - 1 ? pixels[index + 1] : null; + var percent = options.categoryPercentage; + var start, size; + + if (prev === null) { + // first data: its size is double based on the next point or, + // if it's also the last data, we use the scale size. + prev = curr - (next === null ? ruler.end - ruler.start : next - curr); + } + + if (next === null) { + // last data: its size is also double based on the previous point. + next = curr + curr - prev; + } + + start = curr - (curr - Math.min(prev, next)) / 2 * percent; + size = Math.abs(next - prev) / 2 * percent; + + return { + chunk: size / ruler.stackCount, + ratio: options.barPercentage, + start: start + }; +} + +var controller_bar = core_datasetController.extend({ + + dataElementType: elements.Rectangle, + + /** + * @private + */ + _dataElementOptions: [ + 'backgroundColor', + 'borderColor', + 'borderSkipped', + 'borderWidth', + 'barPercentage', + 'barThickness', + 'categoryPercentage', + 'maxBarThickness', + 'minBarLength' + ], + + initialize: function() { + var me = this; + var meta, scaleOpts; + + core_datasetController.prototype.initialize.apply(me, arguments); + + meta = me.getMeta(); + meta.stack = me.getDataset().stack; + meta.bar = true; + + scaleOpts = me._getIndexScale().options; + deprecated('bar chart', scaleOpts.barPercentage, 'scales.[x/y]Axes.barPercentage', 'dataset.barPercentage'); + deprecated('bar chart', scaleOpts.barThickness, 'scales.[x/y]Axes.barThickness', 'dataset.barThickness'); + deprecated('bar chart', scaleOpts.categoryPercentage, 'scales.[x/y]Axes.categoryPercentage', 'dataset.categoryPercentage'); + deprecated('bar chart', me._getValueScale().options.minBarLength, 'scales.[x/y]Axes.minBarLength', 'dataset.minBarLength'); + deprecated('bar chart', scaleOpts.maxBarThickness, 'scales.[x/y]Axes.maxBarThickness', 'dataset.maxBarThickness'); + }, + + update: function(reset) { + var me = this; + var rects = me.getMeta().data; + var i, ilen; + + me._ruler = me.getRuler(); + + for (i = 0, ilen = rects.length; i < ilen; ++i) { + me.updateElement(rects[i], i, reset); + } + }, + + updateElement: function(rectangle, index, reset) { + var me = this; + var meta = me.getMeta(); + var dataset = me.getDataset(); + var options = me._resolveDataElementOptions(rectangle, index); + + rectangle._xScale = me.getScaleForId(meta.xAxisID); + rectangle._yScale = me.getScaleForId(meta.yAxisID); + rectangle._datasetIndex = me.index; + rectangle._index = index; + rectangle._model = { + backgroundColor: options.backgroundColor, + borderColor: options.borderColor, + borderSkipped: options.borderSkipped, + borderWidth: options.borderWidth, + datasetLabel: dataset.label, + label: me.chart.data.labels[index] + }; + + if (helpers$1.isArray(dataset.data[index])) { + rectangle._model.borderSkipped = null; + } + + me._updateElementGeometry(rectangle, index, reset, options); + + rectangle.pivot(); + }, + + /** + * @private + */ + _updateElementGeometry: function(rectangle, index, reset, options) { + var me = this; + var model = rectangle._model; + var vscale = me._getValueScale(); + var base = vscale.getBasePixel(); + var horizontal = vscale.isHorizontal(); + var ruler = me._ruler || me.getRuler(); + var vpixels = me.calculateBarValuePixels(me.index, index, options); + var ipixels = me.calculateBarIndexPixels(me.index, index, ruler, options); + + model.horizontal = horizontal; + model.base = reset ? base : vpixels.base; + model.x = horizontal ? reset ? base : vpixels.head : ipixels.center; + model.y = horizontal ? ipixels.center : reset ? base : vpixels.head; + model.height = horizontal ? ipixels.size : undefined; + model.width = horizontal ? undefined : ipixels.size; + }, + + /** + * Returns the stacks based on groups and bar visibility. + * @param {number} [last] - The dataset index + * @returns {string[]} The list of stack IDs + * @private + */ + _getStacks: function(last) { + var me = this; + var scale = me._getIndexScale(); + var metasets = scale._getMatchingVisibleMetas(me._type); + var stacked = scale.options.stacked; + var ilen = metasets.length; + var stacks = []; + var i, meta; + + for (i = 0; i < ilen; ++i) { + meta = metasets[i]; + // stacked | meta.stack + // | found | not found | undefined + // false | x | x | x + // true | | x | + // undefined | | x | x + if (stacked === false || stacks.indexOf(meta.stack) === -1 || + (stacked === undefined && meta.stack === undefined)) { + stacks.push(meta.stack); + } + if (meta.index === last) { + break; + } + } + + return stacks; + }, + + /** + * Returns the effective number of stacks based on groups and bar visibility. + * @private + */ + getStackCount: function() { + return this._getStacks().length; + }, + + /** + * Returns the stack index for the given dataset based on groups and bar visibility. + * @param {number} [datasetIndex] - The dataset index + * @param {string} [name] - The stack name to find + * @returns {number} The stack index + * @private + */ + getStackIndex: function(datasetIndex, name) { + var stacks = this._getStacks(datasetIndex); + var index = (name !== undefined) + ? stacks.indexOf(name) + : -1; // indexOf returns -1 if element is not present + + return (index === -1) + ? stacks.length - 1 + : index; + }, + + /** + * @private + */ + getRuler: function() { + var me = this; + var scale = me._getIndexScale(); + var pixels = []; + var i, ilen; + + for (i = 0, ilen = me.getMeta().data.length; i < ilen; ++i) { + pixels.push(scale.getPixelForValue(null, i, me.index)); + } + + return { + pixels: pixels, + start: scale._startPixel, + end: scale._endPixel, + stackCount: me.getStackCount(), + scale: scale + }; + }, + + /** + * Note: pixel values are not clamped to the scale area. + * @private + */ + calculateBarValuePixels: function(datasetIndex, index, options) { + var me = this; + var chart = me.chart; + var scale = me._getValueScale(); + var isHorizontal = scale.isHorizontal(); + var datasets = chart.data.datasets; + var metasets = scale._getMatchingVisibleMetas(me._type); + var value = scale._parseValue(datasets[datasetIndex].data[index]); + var minBarLength = options.minBarLength; + var stacked = scale.options.stacked; + var stack = me.getMeta().stack; + var start = value.start === undefined ? 0 : value.max >= 0 && value.min >= 0 ? value.min : value.max; + var length = value.start === undefined ? value.end : value.max >= 0 && value.min >= 0 ? value.max - value.min : value.min - value.max; + var ilen = metasets.length; + var i, imeta, ivalue, base, head, size, stackLength; + + if (stacked || (stacked === undefined && stack !== undefined)) { + for (i = 0; i < ilen; ++i) { + imeta = metasets[i]; + + if (imeta.index === datasetIndex) { + break; + } + + if (imeta.stack === stack) { + stackLength = scale._parseValue(datasets[imeta.index].data[index]); + ivalue = stackLength.start === undefined ? stackLength.end : stackLength.min >= 0 && stackLength.max >= 0 ? stackLength.max : stackLength.min; + + if ((value.min < 0 && ivalue < 0) || (value.max >= 0 && ivalue > 0)) { + start += ivalue; + } + } + } + } + + base = scale.getPixelForValue(start); + head = scale.getPixelForValue(start + length); + size = head - base; + + if (minBarLength !== undefined && Math.abs(size) < minBarLength) { + size = minBarLength; + if (length >= 0 && !isHorizontal || length < 0 && isHorizontal) { + head = base - minBarLength; + } else { + head = base + minBarLength; + } + } + + return { + size: size, + base: base, + head: head, + center: head + size / 2 + }; + }, + + /** + * @private + */ + calculateBarIndexPixels: function(datasetIndex, index, ruler, options) { + var me = this; + var range = options.barThickness === 'flex' + ? computeFlexCategoryTraits(index, ruler, options) + : computeFitCategoryTraits(index, ruler, options); + + var stackIndex = me.getStackIndex(datasetIndex, me.getMeta().stack); + var center = range.start + (range.chunk * stackIndex) + (range.chunk / 2); + var size = Math.min( + valueOrDefault$3(options.maxBarThickness, Infinity), + range.chunk * range.ratio); + + return { + base: center - size / 2, + head: center + size / 2, + center: center, + size: size + }; + }, + + draw: function() { + var me = this; + var chart = me.chart; + var scale = me._getValueScale(); + var rects = me.getMeta().data; + var dataset = me.getDataset(); + var ilen = rects.length; + var i = 0; + + helpers$1.canvas.clipArea(chart.ctx, chart.chartArea); + + for (; i < ilen; ++i) { + var val = scale._parseValue(dataset.data[i]); + if (!isNaN(val.min) && !isNaN(val.max)) { + rects[i].draw(); + } + } + + helpers$1.canvas.unclipArea(chart.ctx); + }, + + /** + * @private + */ + _resolveDataElementOptions: function() { + var me = this; + var values = helpers$1.extend({}, core_datasetController.prototype._resolveDataElementOptions.apply(me, arguments)); + var indexOpts = me._getIndexScale().options; + var valueOpts = me._getValueScale().options; + + values.barPercentage = valueOrDefault$3(indexOpts.barPercentage, values.barPercentage); + values.barThickness = valueOrDefault$3(indexOpts.barThickness, values.barThickness); + values.categoryPercentage = valueOrDefault$3(indexOpts.categoryPercentage, values.categoryPercentage); + values.maxBarThickness = valueOrDefault$3(indexOpts.maxBarThickness, values.maxBarThickness); + values.minBarLength = valueOrDefault$3(valueOpts.minBarLength, values.minBarLength); + + return values; + } + +}); + +var valueOrDefault$4 = helpers$1.valueOrDefault; +var resolve$1 = helpers$1.options.resolve; + +core_defaults._set('bubble', { + hover: { + mode: 'single' + }, + + scales: { + xAxes: [{ + type: 'linear', // bubble should probably use a linear scale by default + position: 'bottom', + id: 'x-axis-0' // need an ID so datasets can reference the scale + }], + yAxes: [{ + type: 'linear', + position: 'left', + id: 'y-axis-0' + }] + }, + + tooltips: { + callbacks: { + title: function() { + // Title doesn't make sense for scatter since we format the data as a point + return ''; + }, + label: function(item, data) { + var datasetLabel = data.datasets[item.datasetIndex].label || ''; + var dataPoint = data.datasets[item.datasetIndex].data[item.index]; + return datasetLabel + ': (' + item.xLabel + ', ' + item.yLabel + ', ' + dataPoint.r + ')'; + } + } + } +}); + +var controller_bubble = core_datasetController.extend({ + /** + * @protected + */ + dataElementType: elements.Point, + + /** + * @private + */ + _dataElementOptions: [ + 'backgroundColor', + 'borderColor', + 'borderWidth', + 'hoverBackgroundColor', + 'hoverBorderColor', + 'hoverBorderWidth', + 'hoverRadius', + 'hitRadius', + 'pointStyle', + 'rotation' + ], + + /** + * @protected + */ + update: function(reset) { + var me = this; + var meta = me.getMeta(); + var points = meta.data; + + // Update Points + helpers$1.each(points, function(point, index) { + me.updateElement(point, index, reset); + }); + }, + + /** + * @protected + */ + updateElement: function(point, index, reset) { + var me = this; + var meta = me.getMeta(); + var custom = point.custom || {}; + var xScale = me.getScaleForId(meta.xAxisID); + var yScale = me.getScaleForId(meta.yAxisID); + var options = me._resolveDataElementOptions(point, index); + var data = me.getDataset().data[index]; + var dsIndex = me.index; + + var x = reset ? xScale.getPixelForDecimal(0.5) : xScale.getPixelForValue(typeof data === 'object' ? data : NaN, index, dsIndex); + var y = reset ? yScale.getBasePixel() : yScale.getPixelForValue(data, index, dsIndex); + + point._xScale = xScale; + point._yScale = yScale; + point._options = options; + point._datasetIndex = dsIndex; + point._index = index; + point._model = { + backgroundColor: options.backgroundColor, + borderColor: options.borderColor, + borderWidth: options.borderWidth, + hitRadius: options.hitRadius, + pointStyle: options.pointStyle, + rotation: options.rotation, + radius: reset ? 0 : options.radius, + skip: custom.skip || isNaN(x) || isNaN(y), + x: x, + y: y, + }; + + point.pivot(); + }, + + /** + * @protected + */ + setHoverStyle: function(point) { + var model = point._model; + var options = point._options; + var getHoverColor = helpers$1.getHoverColor; + + point.$previousStyle = { + backgroundColor: model.backgroundColor, + borderColor: model.borderColor, + borderWidth: model.borderWidth, + radius: model.radius + }; + + model.backgroundColor = valueOrDefault$4(options.hoverBackgroundColor, getHoverColor(options.backgroundColor)); + model.borderColor = valueOrDefault$4(options.hoverBorderColor, getHoverColor(options.borderColor)); + model.borderWidth = valueOrDefault$4(options.hoverBorderWidth, options.borderWidth); + model.radius = options.radius + options.hoverRadius; + }, + + /** + * @private + */ + _resolveDataElementOptions: function(point, index) { + var me = this; + var chart = me.chart; + var dataset = me.getDataset(); + var custom = point.custom || {}; + var data = dataset.data[index] || {}; + var values = core_datasetController.prototype._resolveDataElementOptions.apply(me, arguments); + + // Scriptable options + var context = { + chart: chart, + dataIndex: index, + dataset: dataset, + datasetIndex: me.index + }; + + // In case values were cached (and thus frozen), we need to clone the values + if (me._cachedDataOpts === values) { + values = helpers$1.extend({}, values); + } + + // Custom radius resolution + values.radius = resolve$1([ + custom.radius, + data.r, + me._config.radius, + chart.options.elements.point.radius + ], context, index); + + return values; + } +}); + +var valueOrDefault$5 = helpers$1.valueOrDefault; + +var PI$1 = Math.PI; +var DOUBLE_PI$1 = PI$1 * 2; +var HALF_PI$1 = PI$1 / 2; + +core_defaults._set('doughnut', { + animation: { + // Boolean - Whether we animate the rotation of the Doughnut + animateRotate: true, + // Boolean - Whether we animate scaling the Doughnut from the centre + animateScale: false + }, + hover: { + mode: 'single' + }, + legendCallback: function(chart) { + var list = document.createElement('ul'); + var data = chart.data; + var datasets = data.datasets; + var labels = data.labels; + var i, ilen, listItem, listItemSpan; + + list.setAttribute('class', chart.id + '-legend'); + if (datasets.length) { + for (i = 0, ilen = datasets[0].data.length; i < ilen; ++i) { + listItem = list.appendChild(document.createElement('li')); + listItemSpan = listItem.appendChild(document.createElement('span')); + listItemSpan.style.backgroundColor = datasets[0].backgroundColor[i]; + if (labels[i]) { + listItem.appendChild(document.createTextNode(labels[i])); + } + } + } + + return list.outerHTML; + }, + legend: { + labels: { + generateLabels: function(chart) { + var data = chart.data; + if (data.labels.length && data.datasets.length) { + return data.labels.map(function(label, i) { + var meta = chart.getDatasetMeta(0); + var style = meta.controller.getStyle(i); + + return { + text: label, + fillStyle: style.backgroundColor, + strokeStyle: style.borderColor, + lineWidth: style.borderWidth, + hidden: isNaN(data.datasets[0].data[i]) || meta.data[i].hidden, + + // Extra data used for toggling the correct item + index: i + }; + }); + } + return []; + } + }, + + onClick: function(e, legendItem) { + var index = legendItem.index; + var chart = this.chart; + var i, ilen, meta; + + for (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) { + meta = chart.getDatasetMeta(i); + // toggle visibility of index if exists + if (meta.data[index]) { + meta.data[index].hidden = !meta.data[index].hidden; + } + } + + chart.update(); + } + }, + + // The percentage of the chart that we cut out of the middle. + cutoutPercentage: 50, + + // The rotation of the chart, where the first data arc begins. + rotation: -HALF_PI$1, + + // The total circumference of the chart. + circumference: DOUBLE_PI$1, + + // Need to override these to give a nice default + tooltips: { + callbacks: { + title: function() { + return ''; + }, + label: function(tooltipItem, data) { + var dataLabel = data.labels[tooltipItem.index]; + var value = ': ' + data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index]; + + if (helpers$1.isArray(dataLabel)) { + // show value on first line of multiline label + // need to clone because we are changing the value + dataLabel = dataLabel.slice(); + dataLabel[0] += value; + } else { + dataLabel += value; + } + + return dataLabel; + } + } + } +}); + +var controller_doughnut = core_datasetController.extend({ + + dataElementType: elements.Arc, + + linkScales: helpers$1.noop, + + /** + * @private + */ + _dataElementOptions: [ + 'backgroundColor', + 'borderColor', + 'borderWidth', + 'borderAlign', + 'hoverBackgroundColor', + 'hoverBorderColor', + 'hoverBorderWidth', + ], + + // Get index of the dataset in relation to the visible datasets. This allows determining the inner and outer radius correctly + getRingIndex: function(datasetIndex) { + var ringIndex = 0; + + for (var j = 0; j < datasetIndex; ++j) { + if (this.chart.isDatasetVisible(j)) { + ++ringIndex; + } + } + + return ringIndex; + }, + + update: function(reset) { + var me = this; + var chart = me.chart; + var chartArea = chart.chartArea; + var opts = chart.options; + var ratioX = 1; + var ratioY = 1; + var offsetX = 0; + var offsetY = 0; + var meta = me.getMeta(); + var arcs = meta.data; + var cutout = opts.cutoutPercentage / 100 || 0; + var circumference = opts.circumference; + var chartWeight = me._getRingWeight(me.index); + var maxWidth, maxHeight, i, ilen; + + // If the chart's circumference isn't a full circle, calculate size as a ratio of the width/height of the arc + if (circumference < DOUBLE_PI$1) { + var startAngle = opts.rotation % DOUBLE_PI$1; + startAngle += startAngle >= PI$1 ? -DOUBLE_PI$1 : startAngle < -PI$1 ? DOUBLE_PI$1 : 0; + var endAngle = startAngle + circumference; + var startX = Math.cos(startAngle); + var startY = Math.sin(startAngle); + var endX = Math.cos(endAngle); + var endY = Math.sin(endAngle); + var contains0 = (startAngle <= 0 && endAngle >= 0) || endAngle >= DOUBLE_PI$1; + var contains90 = (startAngle <= HALF_PI$1 && endAngle >= HALF_PI$1) || endAngle >= DOUBLE_PI$1 + HALF_PI$1; + var contains180 = startAngle === -PI$1 || endAngle >= PI$1; + var contains270 = (startAngle <= -HALF_PI$1 && endAngle >= -HALF_PI$1) || endAngle >= PI$1 + HALF_PI$1; + var minX = contains180 ? -1 : Math.min(startX, startX * cutout, endX, endX * cutout); + var minY = contains270 ? -1 : Math.min(startY, startY * cutout, endY, endY * cutout); + var maxX = contains0 ? 1 : Math.max(startX, startX * cutout, endX, endX * cutout); + var maxY = contains90 ? 1 : Math.max(startY, startY * cutout, endY, endY * cutout); + ratioX = (maxX - minX) / 2; + ratioY = (maxY - minY) / 2; + offsetX = -(maxX + minX) / 2; + offsetY = -(maxY + minY) / 2; + } + + for (i = 0, ilen = arcs.length; i < ilen; ++i) { + arcs[i]._options = me._resolveDataElementOptions(arcs[i], i); + } + + chart.borderWidth = me.getMaxBorderWidth(); + maxWidth = (chartArea.right - chartArea.left - chart.borderWidth) / ratioX; + maxHeight = (chartArea.bottom - chartArea.top - chart.borderWidth) / ratioY; + chart.outerRadius = Math.max(Math.min(maxWidth, maxHeight) / 2, 0); + chart.innerRadius = Math.max(chart.outerRadius * cutout, 0); + chart.radiusLength = (chart.outerRadius - chart.innerRadius) / (me._getVisibleDatasetWeightTotal() || 1); + chart.offsetX = offsetX * chart.outerRadius; + chart.offsetY = offsetY * chart.outerRadius; + + meta.total = me.calculateTotal(); + + me.outerRadius = chart.outerRadius - chart.radiusLength * me._getRingWeightOffset(me.index); + me.innerRadius = Math.max(me.outerRadius - chart.radiusLength * chartWeight, 0); + + for (i = 0, ilen = arcs.length; i < ilen; ++i) { + me.updateElement(arcs[i], i, reset); + } + }, + + updateElement: function(arc, index, reset) { + var me = this; + var chart = me.chart; + var chartArea = chart.chartArea; + var opts = chart.options; + var animationOpts = opts.animation; + var centerX = (chartArea.left + chartArea.right) / 2; + var centerY = (chartArea.top + chartArea.bottom) / 2; + var startAngle = opts.rotation; // non reset case handled later + var endAngle = opts.rotation; // non reset case handled later + var dataset = me.getDataset(); + var circumference = reset && animationOpts.animateRotate ? 0 : arc.hidden ? 0 : me.calculateCircumference(dataset.data[index]) * (opts.circumference / DOUBLE_PI$1); + var innerRadius = reset && animationOpts.animateScale ? 0 : me.innerRadius; + var outerRadius = reset && animationOpts.animateScale ? 0 : me.outerRadius; + var options = arc._options || {}; + + helpers$1.extend(arc, { + // Utility + _datasetIndex: me.index, + _index: index, + + // Desired view properties + _model: { + backgroundColor: options.backgroundColor, + borderColor: options.borderColor, + borderWidth: options.borderWidth, + borderAlign: options.borderAlign, + x: centerX + chart.offsetX, + y: centerY + chart.offsetY, + startAngle: startAngle, + endAngle: endAngle, + circumference: circumference, + outerRadius: outerRadius, + innerRadius: innerRadius, + label: helpers$1.valueAtIndexOrDefault(dataset.label, index, chart.data.labels[index]) + } + }); + + var model = arc._model; + + // Set correct angles if not resetting + if (!reset || !animationOpts.animateRotate) { + if (index === 0) { + model.startAngle = opts.rotation; + } else { + model.startAngle = me.getMeta().data[index - 1]._model.endAngle; + } + + model.endAngle = model.startAngle + model.circumference; + } + + arc.pivot(); + }, + + calculateTotal: function() { + var dataset = this.getDataset(); + var meta = this.getMeta(); + var total = 0; + var value; + + helpers$1.each(meta.data, function(element, index) { + value = dataset.data[index]; + if (!isNaN(value) && !element.hidden) { + total += Math.abs(value); + } + }); + + /* if (total === 0) { + total = NaN; + }*/ + + return total; + }, + + calculateCircumference: function(value) { + var total = this.getMeta().total; + if (total > 0 && !isNaN(value)) { + return DOUBLE_PI$1 * (Math.abs(value) / total); + } + return 0; + }, + + // gets the max border or hover width to properly scale pie charts + getMaxBorderWidth: function(arcs) { + var me = this; + var max = 0; + var chart = me.chart; + var i, ilen, meta, arc, controller, options, borderWidth, hoverWidth; + + if (!arcs) { + // Find the outmost visible dataset + for (i = 0, ilen = chart.data.datasets.length; i < ilen; ++i) { + if (chart.isDatasetVisible(i)) { + meta = chart.getDatasetMeta(i); + arcs = meta.data; + if (i !== me.index) { + controller = meta.controller; + } + break; + } + } + } + + if (!arcs) { + return 0; + } + + for (i = 0, ilen = arcs.length; i < ilen; ++i) { + arc = arcs[i]; + if (controller) { + controller._configure(); + options = controller._resolveDataElementOptions(arc, i); + } else { + options = arc._options; + } + if (options.borderAlign !== 'inner') { + borderWidth = options.borderWidth; + hoverWidth = options.hoverBorderWidth; + + max = borderWidth > max ? borderWidth : max; + max = hoverWidth > max ? hoverWidth : max; + } + } + return max; + }, + + /** + * @protected + */ + setHoverStyle: function(arc) { + var model = arc._model; + var options = arc._options; + var getHoverColor = helpers$1.getHoverColor; + + arc.$previousStyle = { + backgroundColor: model.backgroundColor, + borderColor: model.borderColor, + borderWidth: model.borderWidth, + }; + + model.backgroundColor = valueOrDefault$5(options.hoverBackgroundColor, getHoverColor(options.backgroundColor)); + model.borderColor = valueOrDefault$5(options.hoverBorderColor, getHoverColor(options.borderColor)); + model.borderWidth = valueOrDefault$5(options.hoverBorderWidth, options.borderWidth); + }, + + /** + * Get radius length offset of the dataset in relation to the visible datasets weights. This allows determining the inner and outer radius correctly + * @private + */ + _getRingWeightOffset: function(datasetIndex) { + var ringWeightOffset = 0; + + for (var i = 0; i < datasetIndex; ++i) { + if (this.chart.isDatasetVisible(i)) { + ringWeightOffset += this._getRingWeight(i); + } + } + + return ringWeightOffset; + }, + + /** + * @private + */ + _getRingWeight: function(dataSetIndex) { + return Math.max(valueOrDefault$5(this.chart.data.datasets[dataSetIndex].weight, 1), 0); + }, + + /** + * Returns the sum of all visibile data set weights. This value can be 0. + * @private + */ + _getVisibleDatasetWeightTotal: function() { + return this._getRingWeightOffset(this.chart.data.datasets.length); + } +}); + +core_defaults._set('horizontalBar', { + hover: { + mode: 'index', + axis: 'y' + }, + + scales: { + xAxes: [{ + type: 'linear', + position: 'bottom' + }], + + yAxes: [{ + type: 'category', + position: 'left', + offset: true, + gridLines: { + offsetGridLines: true + } + }] + }, + + elements: { + rectangle: { + borderSkipped: 'left' + } + }, + + tooltips: { + mode: 'index', + axis: 'y' + } +}); + +core_defaults._set('global', { + datasets: { + horizontalBar: { + categoryPercentage: 0.8, + barPercentage: 0.9 + } + } +}); + +var controller_horizontalBar = controller_bar.extend({ + /** + * @private + */ + _getValueScaleId: function() { + return this.getMeta().xAxisID; + }, + + /** + * @private + */ + _getIndexScaleId: function() { + return this.getMeta().yAxisID; + } +}); + +var valueOrDefault$6 = helpers$1.valueOrDefault; +var resolve$2 = helpers$1.options.resolve; +var isPointInArea = helpers$1.canvas._isPointInArea; + +core_defaults._set('line', { + showLines: true, + spanGaps: false, + + hover: { + mode: 'label' + }, + + scales: { + xAxes: [{ + type: 'category', + id: 'x-axis-0' + }], + yAxes: [{ + type: 'linear', + id: 'y-axis-0' + }] + } +}); + +function scaleClip(scale, halfBorderWidth) { + var tickOpts = scale && scale.options.ticks || {}; + var reverse = tickOpts.reverse; + var min = tickOpts.min === undefined ? halfBorderWidth : 0; + var max = tickOpts.max === undefined ? halfBorderWidth : 0; + return { + start: reverse ? max : min, + end: reverse ? min : max + }; +} + +function defaultClip(xScale, yScale, borderWidth) { + var halfBorderWidth = borderWidth / 2; + var x = scaleClip(xScale, halfBorderWidth); + var y = scaleClip(yScale, halfBorderWidth); + + return { + top: y.end, + right: x.end, + bottom: y.start, + left: x.start + }; +} + +function toClip(value) { + var t, r, b, l; + + if (helpers$1.isObject(value)) { + t = value.top; + r = value.right; + b = value.bottom; + l = value.left; + } else { + t = r = b = l = value; + } + + return { + top: t, + right: r, + bottom: b, + left: l + }; +} + + +var controller_line = core_datasetController.extend({ + + datasetElementType: elements.Line, + + dataElementType: elements.Point, + + /** + * @private + */ + _datasetElementOptions: [ + 'backgroundColor', + 'borderCapStyle', + 'borderColor', + 'borderDash', + 'borderDashOffset', + 'borderJoinStyle', + 'borderWidth', + 'cubicInterpolationMode', + 'fill' + ], + + /** + * @private + */ + _dataElementOptions: { + backgroundColor: 'pointBackgroundColor', + borderColor: 'pointBorderColor', + borderWidth: 'pointBorderWidth', + hitRadius: 'pointHitRadius', + hoverBackgroundColor: 'pointHoverBackgroundColor', + hoverBorderColor: 'pointHoverBorderColor', + hoverBorderWidth: 'pointHoverBorderWidth', + hoverRadius: 'pointHoverRadius', + pointStyle: 'pointStyle', + radius: 'pointRadius', + rotation: 'pointRotation' + }, + + update: function(reset) { + var me = this; + var meta = me.getMeta(); + var line = meta.dataset; + var points = meta.data || []; + var options = me.chart.options; + var config = me._config; + var showLine = me._showLine = valueOrDefault$6(config.showLine, options.showLines); + var i, ilen; + + me._xScale = me.getScaleForId(meta.xAxisID); + me._yScale = me.getScaleForId(meta.yAxisID); + + // Update Line + if (showLine) { + // Compatibility: If the properties are defined with only the old name, use those values + if (config.tension !== undefined && config.lineTension === undefined) { + config.lineTension = config.tension; + } + + // Utility + line._scale = me._yScale; + line._datasetIndex = me.index; + // Data + line._children = points; + // Model + line._model = me._resolveDatasetElementOptions(line); + + line.pivot(); + } + + // Update Points + for (i = 0, ilen = points.length; i < ilen; ++i) { + me.updateElement(points[i], i, reset); + } + + if (showLine && line._model.tension !== 0) { + me.updateBezierControlPoints(); + } + + // Now pivot the point for animation + for (i = 0, ilen = points.length; i < ilen; ++i) { + points[i].pivot(); + } + }, + + updateElement: function(point, index, reset) { + var me = this; + var meta = me.getMeta(); + var custom = point.custom || {}; + var dataset = me.getDataset(); + var datasetIndex = me.index; + var value = dataset.data[index]; + var xScale = me._xScale; + var yScale = me._yScale; + var lineModel = meta.dataset._model; + var x, y; + + var options = me._resolveDataElementOptions(point, index); + + x = xScale.getPixelForValue(typeof value === 'object' ? value : NaN, index, datasetIndex); + y = reset ? yScale.getBasePixel() : me.calculatePointY(value, index, datasetIndex); + + // Utility + point._xScale = xScale; + point._yScale = yScale; + point._options = options; + point._datasetIndex = datasetIndex; + point._index = index; + + // Desired view properties + point._model = { + x: x, + y: y, + skip: custom.skip || isNaN(x) || isNaN(y), + // Appearance + radius: options.radius, + pointStyle: options.pointStyle, + rotation: options.rotation, + backgroundColor: options.backgroundColor, + borderColor: options.borderColor, + borderWidth: options.borderWidth, + tension: valueOrDefault$6(custom.tension, lineModel ? lineModel.tension : 0), + steppedLine: lineModel ? lineModel.steppedLine : false, + // Tooltip + hitRadius: options.hitRadius + }; + }, + + /** + * @private + */ + _resolveDatasetElementOptions: function(element) { + var me = this; + var config = me._config; + var custom = element.custom || {}; + var options = me.chart.options; + var lineOptions = options.elements.line; + var values = core_datasetController.prototype._resolveDatasetElementOptions.apply(me, arguments); + + // The default behavior of lines is to break at null values, according + // to https://github.com/chartjs/Chart.js/issues/2435#issuecomment-216718158 + // This option gives lines the ability to span gaps + values.spanGaps = valueOrDefault$6(config.spanGaps, options.spanGaps); + values.tension = valueOrDefault$6(config.lineTension, lineOptions.tension); + values.steppedLine = resolve$2([custom.steppedLine, config.steppedLine, lineOptions.stepped]); + values.clip = toClip(valueOrDefault$6(config.clip, defaultClip(me._xScale, me._yScale, values.borderWidth))); + + return values; + }, + + calculatePointY: function(value, index, datasetIndex) { + var me = this; + var chart = me.chart; + var yScale = me._yScale; + var sumPos = 0; + var sumNeg = 0; + var i, ds, dsMeta, stackedRightValue, rightValue, metasets, ilen; + + if (yScale.options.stacked) { + rightValue = +yScale.getRightValue(value); + metasets = chart._getSortedVisibleDatasetMetas(); + ilen = metasets.length; + + for (i = 0; i < ilen; ++i) { + dsMeta = metasets[i]; + if (dsMeta.index === datasetIndex) { + break; + } + + ds = chart.data.datasets[dsMeta.index]; + if (dsMeta.type === 'line' && dsMeta.yAxisID === yScale.id) { + stackedRightValue = +yScale.getRightValue(ds.data[index]); + if (stackedRightValue < 0) { + sumNeg += stackedRightValue || 0; + } else { + sumPos += stackedRightValue || 0; + } + } + } + + if (rightValue < 0) { + return yScale.getPixelForValue(sumNeg + rightValue); + } + return yScale.getPixelForValue(sumPos + rightValue); + } + return yScale.getPixelForValue(value); + }, + + updateBezierControlPoints: function() { + var me = this; + var chart = me.chart; + var meta = me.getMeta(); + var lineModel = meta.dataset._model; + var area = chart.chartArea; + var points = meta.data || []; + var i, ilen, model, controlPoints; + + // Only consider points that are drawn in case the spanGaps option is used + if (lineModel.spanGaps) { + points = points.filter(function(pt) { + return !pt._model.skip; + }); + } + + function capControlPoint(pt, min, max) { + return Math.max(Math.min(pt, max), min); + } + + if (lineModel.cubicInterpolationMode === 'monotone') { + helpers$1.splineCurveMonotone(points); + } else { + for (i = 0, ilen = points.length; i < ilen; ++i) { + model = points[i]._model; + controlPoints = helpers$1.splineCurve( + helpers$1.previousItem(points, i)._model, + model, + helpers$1.nextItem(points, i)._model, + lineModel.tension + ); + model.controlPointPreviousX = controlPoints.previous.x; + model.controlPointPreviousY = controlPoints.previous.y; + model.controlPointNextX = controlPoints.next.x; + model.controlPointNextY = controlPoints.next.y; + } + } + + if (chart.options.elements.line.capBezierPoints) { + for (i = 0, ilen = points.length; i < ilen; ++i) { + model = points[i]._model; + if (isPointInArea(model, area)) { + if (i > 0 && isPointInArea(points[i - 1]._model, area)) { + model.controlPointPreviousX = capControlPoint(model.controlPointPreviousX, area.left, area.right); + model.controlPointPreviousY = capControlPoint(model.controlPointPreviousY, area.top, area.bottom); + } + if (i < points.length - 1 && isPointInArea(points[i + 1]._model, area)) { + model.controlPointNextX = capControlPoint(model.controlPointNextX, area.left, area.right); + model.controlPointNextY = capControlPoint(model.controlPointNextY, area.top, area.bottom); + } + } + } + } + }, + + draw: function() { + var me = this; + var chart = me.chart; + var meta = me.getMeta(); + var points = meta.data || []; + var area = chart.chartArea; + var canvas = chart.canvas; + var i = 0; + var ilen = points.length; + var clip; + + if (me._showLine) { + clip = meta.dataset._model.clip; + + helpers$1.canvas.clipArea(chart.ctx, { + left: clip.left === false ? 0 : area.left - clip.left, + right: clip.right === false ? canvas.width : area.right + clip.right, + top: clip.top === false ? 0 : area.top - clip.top, + bottom: clip.bottom === false ? canvas.height : area.bottom + clip.bottom + }); + + meta.dataset.draw(); + + helpers$1.canvas.unclipArea(chart.ctx); + } + + // Draw the points + for (; i < ilen; ++i) { + points[i].draw(area); + } + }, + + /** + * @protected + */ + setHoverStyle: function(point) { + var model = point._model; + var options = point._options; + var getHoverColor = helpers$1.getHoverColor; + + point.$previousStyle = { + backgroundColor: model.backgroundColor, + borderColor: model.borderColor, + borderWidth: model.borderWidth, + radius: model.radius + }; + + model.backgroundColor = valueOrDefault$6(options.hoverBackgroundColor, getHoverColor(options.backgroundColor)); + model.borderColor = valueOrDefault$6(options.hoverBorderColor, getHoverColor(options.borderColor)); + model.borderWidth = valueOrDefault$6(options.hoverBorderWidth, options.borderWidth); + model.radius = valueOrDefault$6(options.hoverRadius, options.radius); + }, +}); + +var resolve$3 = helpers$1.options.resolve; + +core_defaults._set('polarArea', { + scale: { + type: 'radialLinear', + angleLines: { + display: false + }, + gridLines: { + circular: true + }, + pointLabels: { + display: false + }, + ticks: { + beginAtZero: true + } + }, + + // Boolean - Whether to animate the rotation of the chart + animation: { + animateRotate: true, + animateScale: true + }, + + startAngle: -0.5 * Math.PI, + legendCallback: function(chart) { + var list = document.createElement('ul'); + var data = chart.data; + var datasets = data.datasets; + var labels = data.labels; + var i, ilen, listItem, listItemSpan; + + list.setAttribute('class', chart.id + '-legend'); + if (datasets.length) { + for (i = 0, ilen = datasets[0].data.length; i < ilen; ++i) { + listItem = list.appendChild(document.createElement('li')); + listItemSpan = listItem.appendChild(document.createElement('span')); + listItemSpan.style.backgroundColor = datasets[0].backgroundColor[i]; + if (labels[i]) { + listItem.appendChild(document.createTextNode(labels[i])); + } + } + } + + return list.outerHTML; + }, + legend: { + labels: { + generateLabels: function(chart) { + var data = chart.data; + if (data.labels.length && data.datasets.length) { + return data.labels.map(function(label, i) { + var meta = chart.getDatasetMeta(0); + var style = meta.controller.getStyle(i); + + return { + text: label, + fillStyle: style.backgroundColor, + strokeStyle: style.borderColor, + lineWidth: style.borderWidth, + hidden: isNaN(data.datasets[0].data[i]) || meta.data[i].hidden, + + // Extra data used for toggling the correct item + index: i + }; + }); + } + return []; + } + }, + + onClick: function(e, legendItem) { + var index = legendItem.index; + var chart = this.chart; + var i, ilen, meta; + + for (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) { + meta = chart.getDatasetMeta(i); + meta.data[index].hidden = !meta.data[index].hidden; + } + + chart.update(); + } + }, + + // Need to override these to give a nice default + tooltips: { + callbacks: { + title: function() { + return ''; + }, + label: function(item, data) { + return data.labels[item.index] + ': ' + item.yLabel; + } + } + } +}); + +var controller_polarArea = core_datasetController.extend({ + + dataElementType: elements.Arc, + + linkScales: helpers$1.noop, + + /** + * @private + */ + _dataElementOptions: [ + 'backgroundColor', + 'borderColor', + 'borderWidth', + 'borderAlign', + 'hoverBackgroundColor', + 'hoverBorderColor', + 'hoverBorderWidth', + ], + + /** + * @private + */ + _getIndexScaleId: function() { + return this.chart.scale.id; + }, + + /** + * @private + */ + _getValueScaleId: function() { + return this.chart.scale.id; + }, + + update: function(reset) { + var me = this; + var dataset = me.getDataset(); + var meta = me.getMeta(); + var start = me.chart.options.startAngle || 0; + var starts = me._starts = []; + var angles = me._angles = []; + var arcs = meta.data; + var i, ilen, angle; + + me._updateRadius(); + + meta.count = me.countVisibleElements(); + + for (i = 0, ilen = dataset.data.length; i < ilen; i++) { + starts[i] = start; + angle = me._computeAngle(i); + angles[i] = angle; + start += angle; + } + + for (i = 0, ilen = arcs.length; i < ilen; ++i) { + arcs[i]._options = me._resolveDataElementOptions(arcs[i], i); + me.updateElement(arcs[i], i, reset); + } + }, + + /** + * @private + */ + _updateRadius: function() { + var me = this; + var chart = me.chart; + var chartArea = chart.chartArea; + var opts = chart.options; + var minSize = Math.min(chartArea.right - chartArea.left, chartArea.bottom - chartArea.top); + + chart.outerRadius = Math.max(minSize / 2, 0); + chart.innerRadius = Math.max(opts.cutoutPercentage ? (chart.outerRadius / 100) * (opts.cutoutPercentage) : 1, 0); + chart.radiusLength = (chart.outerRadius - chart.innerRadius) / chart.getVisibleDatasetCount(); + + me.outerRadius = chart.outerRadius - (chart.radiusLength * me.index); + me.innerRadius = me.outerRadius - chart.radiusLength; + }, + + updateElement: function(arc, index, reset) { + var me = this; + var chart = me.chart; + var dataset = me.getDataset(); + var opts = chart.options; + var animationOpts = opts.animation; + var scale = chart.scale; + var labels = chart.data.labels; + + var centerX = scale.xCenter; + var centerY = scale.yCenter; + + // var negHalfPI = -0.5 * Math.PI; + var datasetStartAngle = opts.startAngle; + var distance = arc.hidden ? 0 : scale.getDistanceFromCenterForValue(dataset.data[index]); + var startAngle = me._starts[index]; + var endAngle = startAngle + (arc.hidden ? 0 : me._angles[index]); + + var resetRadius = animationOpts.animateScale ? 0 : scale.getDistanceFromCenterForValue(dataset.data[index]); + var options = arc._options || {}; + + helpers$1.extend(arc, { + // Utility + _datasetIndex: me.index, + _index: index, + _scale: scale, + + // Desired view properties + _model: { + backgroundColor: options.backgroundColor, + borderColor: options.borderColor, + borderWidth: options.borderWidth, + borderAlign: options.borderAlign, + x: centerX, + y: centerY, + innerRadius: 0, + outerRadius: reset ? resetRadius : distance, + startAngle: reset && animationOpts.animateRotate ? datasetStartAngle : startAngle, + endAngle: reset && animationOpts.animateRotate ? datasetStartAngle : endAngle, + label: helpers$1.valueAtIndexOrDefault(labels, index, labels[index]) + } + }); + + arc.pivot(); + }, + + countVisibleElements: function() { + var dataset = this.getDataset(); + var meta = this.getMeta(); + var count = 0; + + helpers$1.each(meta.data, function(element, index) { + if (!isNaN(dataset.data[index]) && !element.hidden) { + count++; + } + }); + + return count; + }, + + /** + * @protected + */ + setHoverStyle: function(arc) { + var model = arc._model; + var options = arc._options; + var getHoverColor = helpers$1.getHoverColor; + var valueOrDefault = helpers$1.valueOrDefault; + + arc.$previousStyle = { + backgroundColor: model.backgroundColor, + borderColor: model.borderColor, + borderWidth: model.borderWidth, + }; + + model.backgroundColor = valueOrDefault(options.hoverBackgroundColor, getHoverColor(options.backgroundColor)); + model.borderColor = valueOrDefault(options.hoverBorderColor, getHoverColor(options.borderColor)); + model.borderWidth = valueOrDefault(options.hoverBorderWidth, options.borderWidth); + }, + + /** + * @private + */ + _computeAngle: function(index) { + var me = this; + var count = this.getMeta().count; + var dataset = me.getDataset(); + var meta = me.getMeta(); + + if (isNaN(dataset.data[index]) || meta.data[index].hidden) { + return 0; + } + + // Scriptable options + var context = { + chart: me.chart, + dataIndex: index, + dataset: dataset, + datasetIndex: me.index + }; + + return resolve$3([ + me.chart.options.elements.arc.angle, + (2 * Math.PI) / count + ], context, index); + } +}); + +core_defaults._set('pie', helpers$1.clone(core_defaults.doughnut)); +core_defaults._set('pie', { + cutoutPercentage: 0 +}); + +// Pie charts are Doughnut chart with different defaults +var controller_pie = controller_doughnut; + +var valueOrDefault$7 = helpers$1.valueOrDefault; + +core_defaults._set('radar', { + spanGaps: false, + scale: { + type: 'radialLinear' + }, + elements: { + line: { + fill: 'start', + tension: 0 // no bezier in radar + } + } +}); + +var controller_radar = core_datasetController.extend({ + datasetElementType: elements.Line, + + dataElementType: elements.Point, + + linkScales: helpers$1.noop, + + /** + * @private + */ + _datasetElementOptions: [ + 'backgroundColor', + 'borderWidth', + 'borderColor', + 'borderCapStyle', + 'borderDash', + 'borderDashOffset', + 'borderJoinStyle', + 'fill' + ], + + /** + * @private + */ + _dataElementOptions: { + backgroundColor: 'pointBackgroundColor', + borderColor: 'pointBorderColor', + borderWidth: 'pointBorderWidth', + hitRadius: 'pointHitRadius', + hoverBackgroundColor: 'pointHoverBackgroundColor', + hoverBorderColor: 'pointHoverBorderColor', + hoverBorderWidth: 'pointHoverBorderWidth', + hoverRadius: 'pointHoverRadius', + pointStyle: 'pointStyle', + radius: 'pointRadius', + rotation: 'pointRotation' + }, + + /** + * @private + */ + _getIndexScaleId: function() { + return this.chart.scale.id; + }, + + /** + * @private + */ + _getValueScaleId: function() { + return this.chart.scale.id; + }, + + update: function(reset) { + var me = this; + var meta = me.getMeta(); + var line = meta.dataset; + var points = meta.data || []; + var scale = me.chart.scale; + var config = me._config; + var i, ilen; + + // Compatibility: If the properties are defined with only the old name, use those values + if (config.tension !== undefined && config.lineTension === undefined) { + config.lineTension = config.tension; + } + + // Utility + line._scale = scale; + line._datasetIndex = me.index; + // Data + line._children = points; + line._loop = true; + // Model + line._model = me._resolveDatasetElementOptions(line); + + line.pivot(); + + // Update Points + for (i = 0, ilen = points.length; i < ilen; ++i) { + me.updateElement(points[i], i, reset); + } + + // Update bezier control points + me.updateBezierControlPoints(); + + // Now pivot the point for animation + for (i = 0, ilen = points.length; i < ilen; ++i) { + points[i].pivot(); + } + }, + + updateElement: function(point, index, reset) { + var me = this; + var custom = point.custom || {}; + var dataset = me.getDataset(); + var scale = me.chart.scale; + var pointPosition = scale.getPointPositionForValue(index, dataset.data[index]); + var options = me._resolveDataElementOptions(point, index); + var lineModel = me.getMeta().dataset._model; + var x = reset ? scale.xCenter : pointPosition.x; + var y = reset ? scale.yCenter : pointPosition.y; + + // Utility + point._scale = scale; + point._options = options; + point._datasetIndex = me.index; + point._index = index; + + // Desired view properties + point._model = { + x: x, // value not used in dataset scale, but we want a consistent API between scales + y: y, + skip: custom.skip || isNaN(x) || isNaN(y), + // Appearance + radius: options.radius, + pointStyle: options.pointStyle, + rotation: options.rotation, + backgroundColor: options.backgroundColor, + borderColor: options.borderColor, + borderWidth: options.borderWidth, + tension: valueOrDefault$7(custom.tension, lineModel ? lineModel.tension : 0), + + // Tooltip + hitRadius: options.hitRadius + }; + }, + + /** + * @private + */ + _resolveDatasetElementOptions: function() { + var me = this; + var config = me._config; + var options = me.chart.options; + var values = core_datasetController.prototype._resolveDatasetElementOptions.apply(me, arguments); + + values.spanGaps = valueOrDefault$7(config.spanGaps, options.spanGaps); + values.tension = valueOrDefault$7(config.lineTension, options.elements.line.tension); + + return values; + }, + + updateBezierControlPoints: function() { + var me = this; + var meta = me.getMeta(); + var area = me.chart.chartArea; + var points = meta.data || []; + var i, ilen, model, controlPoints; + + // Only consider points that are drawn in case the spanGaps option is used + if (meta.dataset._model.spanGaps) { + points = points.filter(function(pt) { + return !pt._model.skip; + }); + } + + function capControlPoint(pt, min, max) { + return Math.max(Math.min(pt, max), min); + } + + for (i = 0, ilen = points.length; i < ilen; ++i) { + model = points[i]._model; + controlPoints = helpers$1.splineCurve( + helpers$1.previousItem(points, i, true)._model, + model, + helpers$1.nextItem(points, i, true)._model, + model.tension + ); + + // Prevent the bezier going outside of the bounds of the graph + model.controlPointPreviousX = capControlPoint(controlPoints.previous.x, area.left, area.right); + model.controlPointPreviousY = capControlPoint(controlPoints.previous.y, area.top, area.bottom); + model.controlPointNextX = capControlPoint(controlPoints.next.x, area.left, area.right); + model.controlPointNextY = capControlPoint(controlPoints.next.y, area.top, area.bottom); + } + }, + + setHoverStyle: function(point) { + var model = point._model; + var options = point._options; + var getHoverColor = helpers$1.getHoverColor; + + point.$previousStyle = { + backgroundColor: model.backgroundColor, + borderColor: model.borderColor, + borderWidth: model.borderWidth, + radius: model.radius + }; + + model.backgroundColor = valueOrDefault$7(options.hoverBackgroundColor, getHoverColor(options.backgroundColor)); + model.borderColor = valueOrDefault$7(options.hoverBorderColor, getHoverColor(options.borderColor)); + model.borderWidth = valueOrDefault$7(options.hoverBorderWidth, options.borderWidth); + model.radius = valueOrDefault$7(options.hoverRadius, options.radius); + } +}); + +core_defaults._set('scatter', { + hover: { + mode: 'single' + }, + + scales: { + xAxes: [{ + id: 'x-axis-1', // need an ID so datasets can reference the scale + type: 'linear', // scatter should not use a category axis + position: 'bottom' + }], + yAxes: [{ + id: 'y-axis-1', + type: 'linear', + position: 'left' + }] + }, + + tooltips: { + callbacks: { + title: function() { + return ''; // doesn't make sense for scatter since data are formatted as a point + }, + label: function(item) { + return '(' + item.xLabel + ', ' + item.yLabel + ')'; + } + } + } +}); + +core_defaults._set('global', { + datasets: { + scatter: { + showLine: false + } + } +}); + +// Scatter charts use line controllers +var controller_scatter = controller_line; + +// NOTE export a map in which the key represents the controller type, not +// the class, and so must be CamelCase in order to be correctly retrieved +// by the controller in core.controller.js (`controllers[meta.type]`). + +var controllers = { + bar: controller_bar, + bubble: controller_bubble, + doughnut: controller_doughnut, + horizontalBar: controller_horizontalBar, + line: controller_line, + polarArea: controller_polarArea, + pie: controller_pie, + radar: controller_radar, + scatter: controller_scatter +}; + +/** + * Helper function to get relative position for an event + * @param {Event|IEvent} event - The event to get the position for + * @param {Chart} chart - The chart + * @returns {object} the event position + */ +function getRelativePosition(e, chart) { + if (e.native) { + return { + x: e.x, + y: e.y + }; + } + + return helpers$1.getRelativePosition(e, chart); +} + +/** + * Helper function to traverse all of the visible elements in the chart + * @param {Chart} chart - the chart + * @param {function} handler - the callback to execute for each visible item + */ +function parseVisibleItems(chart, handler) { + var metasets = chart._getSortedVisibleDatasetMetas(); + var metadata, i, j, ilen, jlen, element; + + for (i = 0, ilen = metasets.length; i < ilen; ++i) { + metadata = metasets[i].data; + for (j = 0, jlen = metadata.length; j < jlen; ++j) { + element = metadata[j]; + if (!element._view.skip) { + handler(element); + } + } + } +} + +/** + * Helper function to get the items that intersect the event position + * @param {ChartElement[]} items - elements to filter + * @param {object} position - the point to be nearest to + * @return {ChartElement[]} the nearest items + */ +function getIntersectItems(chart, position) { + var elements = []; + + parseVisibleItems(chart, function(element) { + if (element.inRange(position.x, position.y)) { + elements.push(element); + } + }); + + return elements; +} + +/** + * Helper function to get the items nearest to the event position considering all visible items in teh chart + * @param {Chart} chart - the chart to look at elements from + * @param {object} position - the point to be nearest to + * @param {boolean} intersect - if true, only consider items that intersect the position + * @param {function} distanceMetric - function to provide the distance between points + * @return {ChartElement[]} the nearest items + */ +function getNearestItems(chart, position, intersect, distanceMetric) { + var minDistance = Number.POSITIVE_INFINITY; + var nearestItems = []; + + parseVisibleItems(chart, function(element) { + if (intersect && !element.inRange(position.x, position.y)) { + return; + } + + var center = element.getCenterPoint(); + var distance = distanceMetric(position, center); + if (distance < minDistance) { + nearestItems = [element]; + minDistance = distance; + } else if (distance === minDistance) { + // Can have multiple items at the same distance in which case we sort by size + nearestItems.push(element); + } + }); + + return nearestItems; +} + +/** + * Get a distance metric function for two points based on the + * axis mode setting + * @param {string} axis - the axis mode. x|y|xy + */ +function getDistanceMetricForAxis(axis) { + var useX = axis.indexOf('x') !== -1; + var useY = axis.indexOf('y') !== -1; + + return function(pt1, pt2) { + var deltaX = useX ? Math.abs(pt1.x - pt2.x) : 0; + var deltaY = useY ? Math.abs(pt1.y - pt2.y) : 0; + return Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2)); + }; +} + +function indexMode(chart, e, options) { + var position = getRelativePosition(e, chart); + // Default axis for index mode is 'x' to match old behaviour + options.axis = options.axis || 'x'; + var distanceMetric = getDistanceMetricForAxis(options.axis); + var items = options.intersect ? getIntersectItems(chart, position) : getNearestItems(chart, position, false, distanceMetric); + var elements = []; + + if (!items.length) { + return []; + } + + chart._getSortedVisibleDatasetMetas().forEach(function(meta) { + var element = meta.data[items[0]._index]; + + // don't count items that are skipped (null data) + if (element && !element._view.skip) { + elements.push(element); + } + }); + + return elements; +} + +/** + * @interface IInteractionOptions + */ +/** + * If true, only consider items that intersect the point + * @name IInterfaceOptions#boolean + * @type Boolean + */ + +/** + * Contains interaction related functions + * @namespace Chart.Interaction + */ +var core_interaction = { + // Helper function for different modes + modes: { + single: function(chart, e) { + var position = getRelativePosition(e, chart); + var elements = []; + + parseVisibleItems(chart, function(element) { + if (element.inRange(position.x, position.y)) { + elements.push(element); + return elements; + } + }); + + return elements.slice(0, 1); + }, + + /** + * @function Chart.Interaction.modes.label + * @deprecated since version 2.4.0 + * @todo remove at version 3 + * @private + */ + label: indexMode, + + /** + * Returns items at the same index. If the options.intersect parameter is true, we only return items if we intersect something + * If the options.intersect mode is false, we find the nearest item and return the items at the same index as that item + * @function Chart.Interaction.modes.index + * @since v2.4.0 + * @param {Chart} chart - the chart we are returning items from + * @param {Event} e - the event we are find things at + * @param {IInteractionOptions} options - options to use during interaction + * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned + */ + index: indexMode, + + /** + * Returns items in the same dataset. If the options.intersect parameter is true, we only return items if we intersect something + * If the options.intersect is false, we find the nearest item and return the items in that dataset + * @function Chart.Interaction.modes.dataset + * @param {Chart} chart - the chart we are returning items from + * @param {Event} e - the event we are find things at + * @param {IInteractionOptions} options - options to use during interaction + * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned + */ + dataset: function(chart, e, options) { + var position = getRelativePosition(e, chart); + options.axis = options.axis || 'xy'; + var distanceMetric = getDistanceMetricForAxis(options.axis); + var items = options.intersect ? getIntersectItems(chart, position) : getNearestItems(chart, position, false, distanceMetric); + + if (items.length > 0) { + items = chart.getDatasetMeta(items[0]._datasetIndex).data; + } + + return items; + }, + + /** + * @function Chart.Interaction.modes.x-axis + * @deprecated since version 2.4.0. Use index mode and intersect == true + * @todo remove at version 3 + * @private + */ + 'x-axis': function(chart, e) { + return indexMode(chart, e, {intersect: false}); + }, + + /** + * Point mode returns all elements that hit test based on the event position + * of the event + * @function Chart.Interaction.modes.intersect + * @param {Chart} chart - the chart we are returning items from + * @param {Event} e - the event we are find things at + * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned + */ + point: function(chart, e) { + var position = getRelativePosition(e, chart); + return getIntersectItems(chart, position); + }, + + /** + * nearest mode returns the element closest to the point + * @function Chart.Interaction.modes.intersect + * @param {Chart} chart - the chart we are returning items from + * @param {Event} e - the event we are find things at + * @param {IInteractionOptions} options - options to use + * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned + */ + nearest: function(chart, e, options) { + var position = getRelativePosition(e, chart); + options.axis = options.axis || 'xy'; + var distanceMetric = getDistanceMetricForAxis(options.axis); + return getNearestItems(chart, position, options.intersect, distanceMetric); + }, + + /** + * x mode returns the elements that hit-test at the current x coordinate + * @function Chart.Interaction.modes.x + * @param {Chart} chart - the chart we are returning items from + * @param {Event} e - the event we are find things at + * @param {IInteractionOptions} options - options to use + * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned + */ + x: function(chart, e, options) { + var position = getRelativePosition(e, chart); + var items = []; + var intersectsItem = false; + + parseVisibleItems(chart, function(element) { + if (element.inXRange(position.x)) { + items.push(element); + } + + if (element.inRange(position.x, position.y)) { + intersectsItem = true; + } + }); + + // If we want to trigger on an intersect and we don't have any items + // that intersect the position, return nothing + if (options.intersect && !intersectsItem) { + items = []; + } + return items; + }, + + /** + * y mode returns the elements that hit-test at the current y coordinate + * @function Chart.Interaction.modes.y + * @param {Chart} chart - the chart we are returning items from + * @param {Event} e - the event we are find things at + * @param {IInteractionOptions} options - options to use + * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned + */ + y: function(chart, e, options) { + var position = getRelativePosition(e, chart); + var items = []; + var intersectsItem = false; + + parseVisibleItems(chart, function(element) { + if (element.inYRange(position.y)) { + items.push(element); + } + + if (element.inRange(position.x, position.y)) { + intersectsItem = true; + } + }); + + // If we want to trigger on an intersect and we don't have any items + // that intersect the position, return nothing + if (options.intersect && !intersectsItem) { + items = []; + } + return items; + } + } +}; + +var extend = helpers$1.extend; + +function filterByPosition(array, position) { + return helpers$1.where(array, function(v) { + return v.pos === position; + }); +} + +function sortByWeight(array, reverse) { + return array.sort(function(a, b) { + var v0 = reverse ? b : a; + var v1 = reverse ? a : b; + return v0.weight === v1.weight ? + v0.index - v1.index : + v0.weight - v1.weight; + }); +} + +function wrapBoxes(boxes) { + var layoutBoxes = []; + var i, ilen, box; + + for (i = 0, ilen = (boxes || []).length; i < ilen; ++i) { + box = boxes[i]; + layoutBoxes.push({ + index: i, + box: box, + pos: box.position, + horizontal: box.isHorizontal(), + weight: box.weight + }); + } + return layoutBoxes; +} + +function setLayoutDims(layouts, params) { + var i, ilen, layout; + for (i = 0, ilen = layouts.length; i < ilen; ++i) { + layout = layouts[i]; + // store width used instead of chartArea.w in fitBoxes + layout.width = layout.horizontal + ? layout.box.fullWidth && params.availableWidth + : params.vBoxMaxWidth; + // store height used instead of chartArea.h in fitBoxes + layout.height = layout.horizontal && params.hBoxMaxHeight; + } +} + +function buildLayoutBoxes(boxes) { + var layoutBoxes = wrapBoxes(boxes); + var left = sortByWeight(filterByPosition(layoutBoxes, 'left'), true); + var right = sortByWeight(filterByPosition(layoutBoxes, 'right')); + var top = sortByWeight(filterByPosition(layoutBoxes, 'top'), true); + var bottom = sortByWeight(filterByPosition(layoutBoxes, 'bottom')); + + return { + leftAndTop: left.concat(top), + rightAndBottom: right.concat(bottom), + chartArea: filterByPosition(layoutBoxes, 'chartArea'), + vertical: left.concat(right), + horizontal: top.concat(bottom) + }; +} + +function getCombinedMax(maxPadding, chartArea, a, b) { + return Math.max(maxPadding[a], chartArea[a]) + Math.max(maxPadding[b], chartArea[b]); +} + +function updateDims(chartArea, params, layout) { + var box = layout.box; + var maxPadding = chartArea.maxPadding; + var newWidth, newHeight; + + if (layout.size) { + // this layout was already counted for, lets first reduce old size + chartArea[layout.pos] -= layout.size; + } + layout.size = layout.horizontal ? box.height : box.width; + chartArea[layout.pos] += layout.size; + + if (box.getPadding) { + var boxPadding = box.getPadding(); + maxPadding.top = Math.max(maxPadding.top, boxPadding.top); + maxPadding.left = Math.max(maxPadding.left, boxPadding.left); + maxPadding.bottom = Math.max(maxPadding.bottom, boxPadding.bottom); + maxPadding.right = Math.max(maxPadding.right, boxPadding.right); + } + + newWidth = params.outerWidth - getCombinedMax(maxPadding, chartArea, 'left', 'right'); + newHeight = params.outerHeight - getCombinedMax(maxPadding, chartArea, 'top', 'bottom'); + + if (newWidth !== chartArea.w || newHeight !== chartArea.h) { + chartArea.w = newWidth; + chartArea.h = newHeight; + + // return true if chart area changed in layout's direction + return layout.horizontal ? newWidth !== chartArea.w : newHeight !== chartArea.h; + } +} + +function handleMaxPadding(chartArea) { + var maxPadding = chartArea.maxPadding; + + function updatePos(pos) { + var change = Math.max(maxPadding[pos] - chartArea[pos], 0); + chartArea[pos] += change; + return change; + } + chartArea.y += updatePos('top'); + chartArea.x += updatePos('left'); + updatePos('right'); + updatePos('bottom'); +} + +function getMargins(horizontal, chartArea) { + var maxPadding = chartArea.maxPadding; + + function marginForPositions(positions) { + var margin = {left: 0, top: 0, right: 0, bottom: 0}; + positions.forEach(function(pos) { + margin[pos] = Math.max(chartArea[pos], maxPadding[pos]); + }); + return margin; + } + + return horizontal + ? marginForPositions(['left', 'right']) + : marginForPositions(['top', 'bottom']); +} + +function fitBoxes(boxes, chartArea, params) { + var refitBoxes = []; + var i, ilen, layout, box, refit, changed; + + for (i = 0, ilen = boxes.length; i < ilen; ++i) { + layout = boxes[i]; + box = layout.box; + + box.update( + layout.width || chartArea.w, + layout.height || chartArea.h, + getMargins(layout.horizontal, chartArea) + ); + if (updateDims(chartArea, params, layout)) { + changed = true; + if (refitBoxes.length) { + // Dimensions changed and there were non full width boxes before this + // -> we have to refit those + refit = true; + } + } + if (!box.fullWidth) { // fullWidth boxes don't need to be re-fitted in any case + refitBoxes.push(layout); + } + } + + return refit ? fitBoxes(refitBoxes, chartArea, params) || changed : changed; +} + +function placeBoxes(boxes, chartArea, params) { + var userPadding = params.padding; + var x = chartArea.x; + var y = chartArea.y; + var i, ilen, layout, box; + + for (i = 0, ilen = boxes.length; i < ilen; ++i) { + layout = boxes[i]; + box = layout.box; + if (layout.horizontal) { + box.left = box.fullWidth ? userPadding.left : chartArea.left; + box.right = box.fullWidth ? params.outerWidth - userPadding.right : chartArea.left + chartArea.w; + box.top = y; + box.bottom = y + box.height; + box.width = box.right - box.left; + y = box.bottom; + } else { + box.left = x; + box.right = x + box.width; + box.top = chartArea.top; + box.bottom = chartArea.top + chartArea.h; + box.height = box.bottom - box.top; + x = box.right; + } + } + + chartArea.x = x; + chartArea.y = y; +} + +core_defaults._set('global', { + layout: { + padding: { + top: 0, + right: 0, + bottom: 0, + left: 0 + } + } +}); + +/** + * @interface ILayoutItem + * @prop {string} position - The position of the item in the chart layout. Possible values are + * 'left', 'top', 'right', 'bottom', and 'chartArea' + * @prop {number} weight - The weight used to sort the item. Higher weights are further away from the chart area + * @prop {boolean} fullWidth - if true, and the item is horizontal, then push vertical boxes down + * @prop {function} isHorizontal - returns true if the layout item is horizontal (ie. top or bottom) + * @prop {function} update - Takes two parameters: width and height. Returns size of item + * @prop {function} getPadding - Returns an object with padding on the edges + * @prop {number} width - Width of item. Must be valid after update() + * @prop {number} height - Height of item. Must be valid after update() + * @prop {number} left - Left edge of the item. Set by layout system and cannot be used in update + * @prop {number} top - Top edge of the item. Set by layout system and cannot be used in update + * @prop {number} right - Right edge of the item. Set by layout system and cannot be used in update + * @prop {number} bottom - Bottom edge of the item. Set by layout system and cannot be used in update + */ + +// The layout service is very self explanatory. It's responsible for the layout within a chart. +// Scales, Legends and Plugins all rely on the layout service and can easily register to be placed anywhere they need +// It is this service's responsibility of carrying out that layout. +var core_layouts = { + defaults: {}, + + /** + * Register a box to a chart. + * A box is simply a reference to an object that requires layout. eg. Scales, Legend, Title. + * @param {Chart} chart - the chart to use + * @param {ILayoutItem} item - the item to add to be layed out + */ + addBox: function(chart, item) { + if (!chart.boxes) { + chart.boxes = []; + } + + // initialize item with default values + item.fullWidth = item.fullWidth || false; + item.position = item.position || 'top'; + item.weight = item.weight || 0; + item._layers = item._layers || function() { + return [{ + z: 0, + draw: function() { + item.draw.apply(item, arguments); + } + }]; + }; + + chart.boxes.push(item); + }, + + /** + * Remove a layoutItem from a chart + * @param {Chart} chart - the chart to remove the box from + * @param {ILayoutItem} layoutItem - the item to remove from the layout + */ + removeBox: function(chart, layoutItem) { + var index = chart.boxes ? chart.boxes.indexOf(layoutItem) : -1; + if (index !== -1) { + chart.boxes.splice(index, 1); + } + }, + + /** + * Sets (or updates) options on the given `item`. + * @param {Chart} chart - the chart in which the item lives (or will be added to) + * @param {ILayoutItem} item - the item to configure with the given options + * @param {object} options - the new item options. + */ + configure: function(chart, item, options) { + var props = ['fullWidth', 'position', 'weight']; + var ilen = props.length; + var i = 0; + var prop; + + for (; i < ilen; ++i) { + prop = props[i]; + if (options.hasOwnProperty(prop)) { + item[prop] = options[prop]; + } + } + }, + + /** + * Fits boxes of the given chart into the given size by having each box measure itself + * then running a fitting algorithm + * @param {Chart} chart - the chart + * @param {number} width - the width to fit into + * @param {number} height - the height to fit into + */ + update: function(chart, width, height) { + if (!chart) { + return; + } + + var layoutOptions = chart.options.layout || {}; + var padding = helpers$1.options.toPadding(layoutOptions.padding); + + var availableWidth = width - padding.width; + var availableHeight = height - padding.height; + var boxes = buildLayoutBoxes(chart.boxes); + var verticalBoxes = boxes.vertical; + var horizontalBoxes = boxes.horizontal; + + // Essentially we now have any number of boxes on each of the 4 sides. + // Our canvas looks like the following. + // The areas L1 and L2 are the left axes. R1 is the right axis, T1 is the top axis and + // B1 is the bottom axis + // There are also 4 quadrant-like locations (left to right instead of clockwise) reserved for chart overlays + // These locations are single-box locations only, when trying to register a chartArea location that is already taken, + // an error will be thrown. + // + // |----------------------------------------------------| + // | T1 (Full Width) | + // |----------------------------------------------------| + // | | | T2 | | + // | |----|-------------------------------------|----| + // | | | C1 | | C2 | | + // | | |----| |----| | + // | | | | | + // | L1 | L2 | ChartArea (C0) | R1 | + // | | | | | + // | | |----| |----| | + // | | | C3 | | C4 | | + // | |----|-------------------------------------|----| + // | | | B1 | | + // |----------------------------------------------------| + // | B2 (Full Width) | + // |----------------------------------------------------| + // + + var params = Object.freeze({ + outerWidth: width, + outerHeight: height, + padding: padding, + availableWidth: availableWidth, + vBoxMaxWidth: availableWidth / 2 / verticalBoxes.length, + hBoxMaxHeight: availableHeight / 2 + }); + var chartArea = extend({ + maxPadding: extend({}, padding), + w: availableWidth, + h: availableHeight, + x: padding.left, + y: padding.top + }, padding); + + setLayoutDims(verticalBoxes.concat(horizontalBoxes), params); + + // First fit vertical boxes + fitBoxes(verticalBoxes, chartArea, params); + + // Then fit horizontal boxes + if (fitBoxes(horizontalBoxes, chartArea, params)) { + // if the area changed, re-fit vertical boxes + fitBoxes(verticalBoxes, chartArea, params); + } + + handleMaxPadding(chartArea); + + // Finally place the boxes to correct coordinates + placeBoxes(boxes.leftAndTop, chartArea, params); + + // Move to opposite side of chart + chartArea.x += chartArea.w; + chartArea.y += chartArea.h; + + placeBoxes(boxes.rightAndBottom, chartArea, params); + + chart.chartArea = { + left: chartArea.left, + top: chartArea.top, + right: chartArea.left + chartArea.w, + bottom: chartArea.top + chartArea.h + }; + + // Finally update boxes in chartArea (radial scale for example) + helpers$1.each(boxes.chartArea, function(layout) { + var box = layout.box; + extend(box, chart.chartArea); + box.update(chartArea.w, chartArea.h); + }); + } +}; + +/** + * Platform fallback implementation (minimal). + * @see https://github.com/chartjs/Chart.js/pull/4591#issuecomment-319575939 + */ + +var platform_basic = { + acquireContext: function(item) { + if (item && item.canvas) { + // Support for any object associated to a canvas (including a context2d) + item = item.canvas; + } + + return item && item.getContext('2d') || null; + } +}; + +var platform_dom = "/*\n * DOM element rendering detection\n * https://davidwalsh.name/detect-node-insertion\n */\n@keyframes chartjs-render-animation {\n\tfrom { opacity: 0.99; }\n\tto { opacity: 1; }\n}\n\n.chartjs-render-monitor {\n\tanimation: chartjs-render-animation 0.001s;\n}\n\n/*\n * DOM element resizing detection\n * https://github.com/marcj/css-element-queries\n */\n.chartjs-size-monitor,\n.chartjs-size-monitor-expand,\n.chartjs-size-monitor-shrink {\n\tposition: absolute;\n\tdirection: ltr;\n\tleft: 0;\n\ttop: 0;\n\tright: 0;\n\tbottom: 0;\n\toverflow: hidden;\n\tpointer-events: none;\n\tvisibility: hidden;\n\tz-index: -1;\n}\n\n.chartjs-size-monitor-expand > div {\n\tposition: absolute;\n\twidth: 1000000px;\n\theight: 1000000px;\n\tleft: 0;\n\ttop: 0;\n}\n\n.chartjs-size-monitor-shrink > div {\n\tposition: absolute;\n\twidth: 200%;\n\theight: 200%;\n\tleft: 0;\n\ttop: 0;\n}\n"; + +var platform_dom$1 = /*#__PURE__*/Object.freeze({ +__proto__: null, +'default': platform_dom +}); + +var stylesheet = getCjsExportFromNamespace(platform_dom$1); + +var EXPANDO_KEY = '$chartjs'; +var CSS_PREFIX = 'chartjs-'; +var CSS_SIZE_MONITOR = CSS_PREFIX + 'size-monitor'; +var CSS_RENDER_MONITOR = CSS_PREFIX + 'render-monitor'; +var CSS_RENDER_ANIMATION = CSS_PREFIX + 'render-animation'; +var ANIMATION_START_EVENTS = ['animationstart', 'webkitAnimationStart']; + +/** + * DOM event types -> Chart.js event types. + * Note: only events with different types are mapped. + * @see https://developer.mozilla.org/en-US/docs/Web/Events + */ +var EVENT_TYPES = { + touchstart: 'mousedown', + touchmove: 'mousemove', + touchend: 'mouseup', + pointerenter: 'mouseenter', + pointerdown: 'mousedown', + pointermove: 'mousemove', + pointerup: 'mouseup', + pointerleave: 'mouseout', + pointerout: 'mouseout' +}; + +/** + * The "used" size is the final value of a dimension property after all calculations have + * been performed. This method uses the computed style of `element` but returns undefined + * if the computed style is not expressed in pixels. That can happen in some cases where + * `element` has a size relative to its parent and this last one is not yet displayed, + * for example because of `display: none` on a parent node. + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/used_value + * @returns {number} Size in pixels or undefined if unknown. + */ +function readUsedSize(element, property) { + var value = helpers$1.getStyle(element, property); + var matches = value && value.match(/^(\d+)(\.\d+)?px$/); + return matches ? Number(matches[1]) : undefined; +} + +/** + * Initializes the canvas style and render size without modifying the canvas display size, + * since responsiveness is handled by the controller.resize() method. The config is used + * to determine the aspect ratio to apply in case no explicit height has been specified. + */ +function initCanvas(canvas, config) { + var style = canvas.style; + + // NOTE(SB) canvas.getAttribute('width') !== canvas.width: in the first case it + // returns null or '' if no explicit value has been set to the canvas attribute. + var renderHeight = canvas.getAttribute('height'); + var renderWidth = canvas.getAttribute('width'); + + // Chart.js modifies some canvas values that we want to restore on destroy + canvas[EXPANDO_KEY] = { + initial: { + height: renderHeight, + width: renderWidth, + style: { + display: style.display, + height: style.height, + width: style.width + } + } + }; + + // Force canvas to display as block to avoid extra space caused by inline + // elements, which would interfere with the responsive resize process. + // https://github.com/chartjs/Chart.js/issues/2538 + style.display = style.display || 'block'; + + if (renderWidth === null || renderWidth === '') { + var displayWidth = readUsedSize(canvas, 'width'); + if (displayWidth !== undefined) { + canvas.width = displayWidth; + } + } + + if (renderHeight === null || renderHeight === '') { + if (canvas.style.height === '') { + // If no explicit render height and style height, let's apply the aspect ratio, + // which one can be specified by the user but also by charts as default option + // (i.e. options.aspectRatio). If not specified, use canvas aspect ratio of 2. + canvas.height = canvas.width / (config.options.aspectRatio || 2); + } else { + var displayHeight = readUsedSize(canvas, 'height'); + if (displayWidth !== undefined) { + canvas.height = displayHeight; + } + } + } + + return canvas; +} + +/** + * Detects support for options object argument in addEventListener. + * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support + * @private + */ +var supportsEventListenerOptions = (function() { + var supports = false; + try { + var options = Object.defineProperty({}, 'passive', { + // eslint-disable-next-line getter-return + get: function() { + supports = true; + } + }); + window.addEventListener('e', null, options); + } catch (e) { + // continue regardless of error + } + return supports; +}()); + +// Default passive to true as expected by Chrome for 'touchstart' and 'touchend' events. +// https://github.com/chartjs/Chart.js/issues/4287 +var eventListenerOptions = supportsEventListenerOptions ? {passive: true} : false; + +function addListener(node, type, listener) { + node.addEventListener(type, listener, eventListenerOptions); +} + +function removeListener(node, type, listener) { + node.removeEventListener(type, listener, eventListenerOptions); +} + +function createEvent(type, chart, x, y, nativeEvent) { + return { + type: type, + chart: chart, + native: nativeEvent || null, + x: x !== undefined ? x : null, + y: y !== undefined ? y : null, + }; +} + +function fromNativeEvent(event, chart) { + var type = EVENT_TYPES[event.type] || event.type; + var pos = helpers$1.getRelativePosition(event, chart); + return createEvent(type, chart, pos.x, pos.y, event); +} + +function throttled(fn, thisArg) { + var ticking = false; + var args = []; + + return function() { + args = Array.prototype.slice.call(arguments); + thisArg = thisArg || this; + + if (!ticking) { + ticking = true; + helpers$1.requestAnimFrame.call(window, function() { + ticking = false; + fn.apply(thisArg, args); + }); + } + }; +} + +function createDiv(cls) { + var el = document.createElement('div'); + el.className = cls || ''; + return el; +} + +// Implementation based on https://github.com/marcj/css-element-queries +function createResizer(handler) { + var maxSize = 1000000; + + // NOTE(SB) Don't use innerHTML because it could be considered unsafe. + // https://github.com/chartjs/Chart.js/issues/5902 + var resizer = createDiv(CSS_SIZE_MONITOR); + var expand = createDiv(CSS_SIZE_MONITOR + '-expand'); + var shrink = createDiv(CSS_SIZE_MONITOR + '-shrink'); + + expand.appendChild(createDiv()); + shrink.appendChild(createDiv()); + + resizer.appendChild(expand); + resizer.appendChild(shrink); + resizer._reset = function() { + expand.scrollLeft = maxSize; + expand.scrollTop = maxSize; + shrink.scrollLeft = maxSize; + shrink.scrollTop = maxSize; + }; + + var onScroll = function() { + resizer._reset(); + handler(); + }; + + addListener(expand, 'scroll', onScroll.bind(expand, 'expand')); + addListener(shrink, 'scroll', onScroll.bind(shrink, 'shrink')); + + return resizer; +} + +// https://davidwalsh.name/detect-node-insertion +function watchForRender(node, handler) { + var expando = node[EXPANDO_KEY] || (node[EXPANDO_KEY] = {}); + var proxy = expando.renderProxy = function(e) { + if (e.animationName === CSS_RENDER_ANIMATION) { + handler(); + } + }; + + helpers$1.each(ANIMATION_START_EVENTS, function(type) { + addListener(node, type, proxy); + }); + + // #4737: Chrome might skip the CSS animation when the CSS_RENDER_MONITOR class + // is removed then added back immediately (same animation frame?). Accessing the + // `offsetParent` property will force a reflow and re-evaluate the CSS animation. + // https://gist.github.com/paulirish/5d52fb081b3570c81e3a#box-metrics + // https://github.com/chartjs/Chart.js/issues/4737 + expando.reflow = !!node.offsetParent; + + node.classList.add(CSS_RENDER_MONITOR); +} + +function unwatchForRender(node) { + var expando = node[EXPANDO_KEY] || {}; + var proxy = expando.renderProxy; + + if (proxy) { + helpers$1.each(ANIMATION_START_EVENTS, function(type) { + removeListener(node, type, proxy); + }); + + delete expando.renderProxy; + } + + node.classList.remove(CSS_RENDER_MONITOR); +} + +function addResizeListener(node, listener, chart) { + var expando = node[EXPANDO_KEY] || (node[EXPANDO_KEY] = {}); + + // Let's keep track of this added resizer and thus avoid DOM query when removing it. + var resizer = expando.resizer = createResizer(throttled(function() { + if (expando.resizer) { + var container = chart.options.maintainAspectRatio && node.parentNode; + var w = container ? container.clientWidth : 0; + listener(createEvent('resize', chart)); + if (container && container.clientWidth < w && chart.canvas) { + // If the container size shrank during chart resize, let's assume + // scrollbar appeared. So we resize again with the scrollbar visible - + // effectively making chart smaller and the scrollbar hidden again. + // Because we are inside `throttled`, and currently `ticking`, scroll + // events are ignored during this whole 2 resize process. + // If we assumed wrong and something else happened, we are resizing + // twice in a frame (potential performance issue) + listener(createEvent('resize', chart)); + } + } + })); + + // The resizer needs to be attached to the node parent, so we first need to be + // sure that `node` is attached to the DOM before injecting the resizer element. + watchForRender(node, function() { + if (expando.resizer) { + var container = node.parentNode; + if (container && container !== resizer.parentNode) { + container.insertBefore(resizer, container.firstChild); + } + + // The container size might have changed, let's reset the resizer state. + resizer._reset(); + } + }); +} + +function removeResizeListener(node) { + var expando = node[EXPANDO_KEY] || {}; + var resizer = expando.resizer; + + delete expando.resizer; + unwatchForRender(node); + + if (resizer && resizer.parentNode) { + resizer.parentNode.removeChild(resizer); + } +} + +/** + * Injects CSS styles inline if the styles are not already present. + * @param {HTMLDocument|ShadowRoot} rootNode - the node to contain the
'; print ''; print ''; print ''; print ''; - $searchpicto=$form->showFilterAndCheckAddButtons(0); + $searchpicto = $form->showFilterAndCheckAddButtons(0); print $searchpicto; print '
".$donationstatic->getNomUrl(1)."".$company->getNomUrl(1)."".$objp->societe."