summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--codebase/scheduler_connector.php7
-rw-r--r--samples/scheduler/06_json_connector_options.php1
2 files changed, 4 insertions, 4 deletions
diff --git a/codebase/scheduler_connector.php b/codebase/scheduler_connector.php
index 924feaa..210d843 100644
--- a/codebase/scheduler_connector.php
+++ b/codebase/scheduler_connector.php
@@ -197,9 +197,10 @@ class JSONSchedulerConnector extends SchedulerConnector {
foreach ($this->options as $k=>$v) {
$name = $k;
$option="\"{$name}\":[";
- if (!is_string($this->options[$name]))
- $option.=substr($this->options[$name]->render(),0,-2);
- else
+ if (!is_string($this->options[$name])){
+ $data = json_encode($this->options[$name]->render());
+ $option.=substr($data,1,-1);
+ } else
$option.=$this->options[$name];
$option.="]";
$options[] = $option;
diff --git a/samples/scheduler/06_json_connector_options.php b/samples/scheduler/06_json_connector_options.php
index 40ff3c0..53cbbb9 100644
--- a/samples/scheduler/06_json_connector_options.php
+++ b/samples/scheduler/06_json_connector_options.php
@@ -8,7 +8,6 @@
$list->render_table("types","typeid","typeid(value),name(label)");
$scheduler = new JSONSchedulerConnector($res);
-// $scheduler->enable_log("log.txt",true);
$scheduler->set_options("type", $list);
$scheduler->render_table("tevents","event_id","start_date,end_date,event_name,type");