Changes in src/webapp/webservice/index.php [9be4f3f:acea570]
- File:
-
- 1 edited
-
src/webapp/webservice/index.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/webapp/webservice/index.php
r9be4f3f racea570 16 16 along with this program. If not, see <http://www.gnu.org/licenses/>. 17 17 */ 18 19 xdebug_start_trace(); 18 20 19 21 require_once(__DIR__ ."/inc/Config.php"); … … 63 65 $lastTime = -1; 64 66 $keys = array_keys($data); 65 if(count($keys) < 0 ){ 67 $keyTimeframes = $keys[0]; 68 $itemCount = count($keys); 69 if($itemCount < 0 ){ 66 70 error_log("No keys in fetched rrd data from ". $dbFile); 67 71 echo json_encode(""); 68 72 exit; 69 73 } 74 $timeframesCount = count($data[$keyTimeframes]); 70 75 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"; 72 77 } 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]; 75 81 $allValid = true; 76 82 $tmp = array(); … … 175 181 } 176 182 183 xdebug_stop_trace(); 184 177 185 ?>
Note:
See TracChangeset
for help on using the changeset viewer.
