Merge pull request #9 from avindra/patch-2

Use json_encode to dump out booleans
This commit is contained in:
Andrew Collington 2016-01-25 10:10:39 +00:00
commit 0c9492f828

View file

@ -366,9 +366,9 @@ $opcache = OpCacheService::init($options);
<script type="text/javascript">
var realtime = false;
var opstate = <?php echo json_encode($opcache->getData()); ?>;
var canInvalidate = <?php echo ($opcache->canInvalidate() ? 'true' : 'false'); ?>;
var useCharts = <?php echo ($opcache->getOption('charts') ? 'true' : 'false'); ?>;
var allowFiles = <?php echo ($opcache->getOption('allow_filelist') ? 'true' : 'false'); ?>;
var canInvalidate = <?php echo json_encode($opcache->canInvalidate()); ?>;
var useCharts = <?php echo json_encode($opcache->getOption('charts')); ?>;
var allowFiles = <?php echo json_encode($opcache->getOption('allow_filelist')); ?>;
<?php if ($opcache->getOption('charts')): ?>
var Gauge = function(el, colour) {