Try to fix false positive
This commit is contained in:
parent
9314859ead
commit
e467d63a94
@ -79,7 +79,8 @@ before_script:
|
|||||||
#script: phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/WebservicesOtherTest.php
|
#script: phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/WebservicesOtherTest.php
|
||||||
#script: phpcs -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ .
|
#script: phpcs -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ .
|
||||||
script:
|
script:
|
||||||
- phpcs -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ .
|
- phpcs -s --report-checkstyle --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ htdocs/core/class/dolgraph.class.php
|
||||||
|
# - phpcs -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ .
|
||||||
- phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/AllTests.php
|
- phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/AllTests.php
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
|
|||||||
@ -23,8 +23,8 @@
|
|||||||
*
|
*
|
||||||
* Usage:
|
* Usage:
|
||||||
* $graph_data = array(array('labelxA',yA),array('labelxB',yB));
|
* $graph_data = array(array('labelxA',yA),array('labelxB',yB));
|
||||||
* $graph_data = array(array('labelxA',yA1,...,yAn),array('labelxB',yB1,...yBn)); // when there is n value to show for each x
|
* $graph_data = array(array('labelxA',yA1,...,yAn),array('labelxB',yB1,...yBn)); when there is n value to show for each x
|
||||||
* $legend = array("Val1",...,"Valn"); // list of n series name
|
* $legend = array("Val1",...,"Valn"); list of n series name
|
||||||
* $px = new DolGraph();
|
* $px = new DolGraph();
|
||||||
* $px->SetData($graph_data);
|
* $px->SetData($graph_data);
|
||||||
* $px->SetMaxValue($px->GetCeilMaxValue());
|
* $px->SetMaxValue($px->GetCeilMaxValue());
|
||||||
@ -123,7 +123,6 @@ class DolGraph
|
|||||||
if (isset($theme_bgcolor)) $this->bgcolor = $theme_bgcolor;
|
if (isset($theme_bgcolor)) $this->bgcolor = $theme_bgcolor;
|
||||||
}
|
}
|
||||||
//print 'bgcolor: '.join(',',$this->bgcolor).'<br>';
|
//print 'bgcolor: '.join(',',$this->bgcolor).'<br>';
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -847,11 +846,15 @@ class DolGraph
|
|||||||
// TODO Avoid push by adding generated long array...
|
// TODO Avoid push by adding generated long array...
|
||||||
if (isset($this->type[$firstlot]) && $this->type[$firstlot] == 'pie')
|
if (isset($this->type[$firstlot]) && $this->type[$firstlot] == 'pie')
|
||||||
{
|
{
|
||||||
foreach($values as $x => $y) { if (isset($y)) $serie[$i].='d'.$i.'.push({"label":"'.dol_escape_js($legends[$x]).'", "data":'.$y.'});'."\n"; }
|
foreach($values as $x => $y) {
|
||||||
|
if (isset($y)) $serie[$i].='d'.$i.'.push({"label":"'.dol_escape_js($legends[$x]).'", "data":'.$y.'});'."\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
foreach($values as $x => $y) { if (isset($y)) $serie[$i].='d'.$i.'.push(['.$x.', '.$y.']);'."\n"; }
|
foreach($values as $x => $y) {
|
||||||
|
if (isset($y)) $serie[$i].='d'.$i.'.push(['.$x.', '.$y.']);'."\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unset($values);
|
unset($values);
|
||||||
|
|||||||
@ -922,7 +922,20 @@ elseif ($action == 'builddoc')
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Make calculation according to calculationrule
|
||||||
|
elseif ($action == 'calculate')
|
||||||
|
{
|
||||||
|
$calculationrule=GETPOST('calculationrule');
|
||||||
|
|
||||||
|
$object->fetch($id);
|
||||||
|
$object->fetch_thirdparty();
|
||||||
|
$result=$object->update_price(0,($calculationrule=='totalofround'?0:1));
|
||||||
|
if ($result <= 0)
|
||||||
|
{
|
||||||
|
dol_print_error($db,$result);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
// Delete file in doc form
|
// Delete file in doc form
|
||||||
elseif ($action == 'remove_file')
|
elseif ($action == 'remove_file')
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user