Ignore:
Timestamp:
Apr 23, 2017, 5:41:30 PM (10 years ago)
Author:
Joachim Langenbach <joachim.langenbach@…>
Branches:
debian/bullseye, debian/jessie
Children:
12afe34
Parents:
e9ed726 (diff), 19ac332 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Joachim Langenbach <joachim.langenbach@…> (04/23/17 17:40:44)
git-committer:
Joachim Langenbach <joachim.langenbach@…> (04/23/17 17:41:30)
Message:

Merge branch 'master' into debian/jessie

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/webapp/webservice/index.php

    re9ed726 r7b68139  
    1616    along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1717*/
     18
     19xdebug_start_trace();
    1820
    1921require_once(__DIR__ ."/inc/Config.php");
    … …  
    6365        $lastTime = -1;
    6466        $keys = array_keys($data);
    65         if(count($keys) < 0 ){
     67        $keyTimeframes = $keys[0];
     68        $itemCount = count($keys);
     69        if($itemCount < 0 ){
    6670                error_log("No keys in fetched rrd data from ". $dbFile);
    6771                echo json_encode("");
    6872                exit;
    6973        }
     74        $timeframesCount = count($data[$keyTimeframes]);
    7075        if($debug > 0){
    71                 echo "<p>Variables: ". count($keys) ."; Timeframes: ". count($data[$keys[0]]) ."</p>\n";
     76                echo "<p>Variables: ". $itemCount ."; Timeframes: ". $timeframesCount ."</p>\n";
    7277        }
    73         for($i = 0; $i < count($data[$keys[0]]); $i++){
    74                 $time = array_keys($data[$keys[0]])[$i];
     78        $keysTimeframes = array_keys($data[$keyTimeframes]);
     79        for($i = 0; $i < $timeframesCount; $i++){
     80                $time = $keysTimeframes[$i];
    7581                $allValid = true;
    7682                $tmp = array();
    … …  
    175181}
    176182
     183xdebug_stop_trace();
     184
    177185?>
Note: See TracChangeset for help on using the changeset viewer.