/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/resolution.php

  • Committer: Suren A. Chilingaryan
  • Date: 2018-07-15 01:53:01 UTC
  • Revision ID: csa@suren.me-20180715015301-s17qbq19snb3wlr5
Adding generalized data functions to VIEW

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
    else    
77
77
        throw new ADEIException(translate("Internal Error in module RESOLUTION"));
78
78
 }
 
79
 
 
80
 function GetByWindowSize($size) {
 
81
    for ($res = 0; isset($this->cfg[$res]);$res++) {
 
82
        if ($this->cfg[$res]["res"] == $size)
 
83
            return $res;
 
84
    }
 
85
    throw new ADEIException(translate("Invalid aggregation window %s is specified", $size));
 
86
 }
79
87
 
80
88
 function GetWindowSize($res) {
81
89
    return $this->cfg[$res]["res"];