diff options
author | Egor <egor.26.93@gmail.com> | 2015-06-18 16:02:50 +0300 |
---|---|---|
committer | Egor <egor.26.93@gmail.com> | 2015-06-18 16:02:50 +0300 |
commit | a0dc94dd471be520a280db2a9807ab7d40b7bbee (patch) | |
tree | 7696b369662853fba5979531928ce75831ce7a52 /codebase/Dhtmlx/Connector/GanttConnector.php | |
parent | 4545f686b060fff791bca679f9fcc6512a666e60 (diff) | |
download | connector-php-a0dc94dd471be520a280db2a9807ab7d40b7bbee.zip connector-php-a0dc94dd471be520a280db2a9807ab7d40b7bbee.tar.gz connector-php-a0dc94dd471be520a280db2a9807ab7d40b7bbee.tar.bz2 |
Fixed bug with xml processing in gantt.
Diffstat (limited to 'codebase/Dhtmlx/Connector/GanttConnector.php')
-rwxr-xr-x | codebase/Dhtmlx/Connector/GanttConnector.php | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/codebase/Dhtmlx/Connector/GanttConnector.php b/codebase/Dhtmlx/Connector/GanttConnector.php index 84246cd..6017522 100755 --- a/codebase/Dhtmlx/Connector/GanttConnector.php +++ b/codebase/Dhtmlx/Connector/GanttConnector.php @@ -1,5 +1,12 @@ <?php namespace Dhtmlx\Connector; +use Dhtmlx\Connector\Tools\LogMaster; +use Dhtmlx\Connector\Tools\EventMaster; +use Dhtmlx\Connector\Event\SortInterface; +use Dhtmlx\Connector\Event\FilterInterface; +use Dhtmlx\Connector\DataStorage\ArrayDBDataWrapper; +use Dhtmlx\Connector\DataStorage\ArrayQueryWrapper; + /*! Connector class for dhtmlxGantt **/ @@ -93,4 +100,58 @@ class GanttConnector extends Connector { $links->render_table($table,$id,$fields,$extra); $this->set_options("links", $links); } + + /*! render self + process commands, output requested data as XML +*/ + public function render(){ + $this->event->trigger("onInit", $this); + EventMaster::trigger_static("connectorInit",$this); + + if (!$this->as_string) + $this->parse_request(); + $this->set_relation(); + + if ($this->live_update !== false && $this->updating!==false) { + $this->live_update->get_updates(); + } else { + if ($this->editing){ + if ($this->links_mode && isset($this->options["links"])) { + $this->options["links"]->save(); + } else { + $dp = new $this->names["data_class"]($this,$this->config,$this->request); + $dp->process($this->config,$this->request); + } + } else { + if (!$this->access->check("read")){ + LogMaster::log("Access control: read operation blocked"); + echo "Access denied"; + die(); + } + $wrap = new SortInterface($this->request); + $this->apply_sorts($wrap); + $this->event->trigger("beforeSort",$wrap); + $wrap->store(); + + $wrap = new FilterInterface($this->request); + $this->apply_filters($wrap); + $this->event->trigger("beforeFilter",$wrap); + $wrap->store(); + + if ($this->model && method_exists($this->model, "get")){ + $this->sql = new ArrayDBDataWrapper(); + $result = new ArrayQueryWrapper(call_user_func(array($this->model, "get"), $this->request)); + $out = $this->output_as_xml($result); + } else { + $out = $this->output_as_xml($this->get_resource()); + + if ($out !== null) return $out; + } + + } + } + $this->end_run(); + } + + }
\ No newline at end of file |