/adei/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/adei/trunk

« back to all changes in this revision

Viewing changes to classes/views/countview.php

  • Committer: Suren A. Chilingaryan
  • Date: 2018-07-13 01:41:49 UTC
  • Revision ID: csa@suren.me-20180713014149-c6jp7swcrqd34k05
Fixes in COUNTView

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
        array("input" => array("label" => _("y"), "id" => "y_mult", "type" => "text", "size" => "3", "value" => "1")),
48
48
        array("select" => array("label" => _("*"), "id" => "y", "options" => $result2)),
49
49
        array("xml"=>"<br/>"),
50
 
        array("input" => array("label" => _("From"), "id" => "count_min", "type" => "text", size => "8", "value" => "0")),
51
 
        array("input" => array("label" => _("To"), "id" => "count_max", "type" => "text", size => "8", "value" => "0"))
 
50
        array("input" => array("label" => _("From"), "id" => "count_min", "type" => "text", size => "8", "value" => "")),
 
51
        array("input" => array("label" => _("To"), "id" => "count_max", "type" => "text", size => "8", "value" => ""))
52
52
    );
53
53
 }
54
54
 
93
93
        foreach($points as $t => $v) {
94
94
                $total++;
95
95
 
96
 
                $vx = $v['mean'.$x_id];
97
 
                if ($y) $vy = $v['mean'.$y_id];
 
96
                $vx = $v[$x_id];
 
97
                if ($y) $vy = $v[$y_id];
98
98
                else $vy = 0;
99
99
                
100
100
                $sum = $x_mult * $vx + $y_mult * $vy;
101
101
                
102
 
                if ($min !== false) {
 
102
                if (is_numeric($min)) {
103
103
                    if ($sum < $min) continue;
104
104
                }
105
105
 
106
 
                if ($max !== false) {
 
106
                if (is_numeric($max)) {
107
107
                    if ($sum > $max) continue;
108
108
                }
109
109