diff options
author | dmitry-radyno <dmitry.radyno@gmail.com> | 2012-11-20 11:10:28 +0200 |
---|---|---|
committer | dmitry-radyno <dmitry.radyno@gmail.com> | 2012-11-20 11:10:28 +0200 |
commit | d0fee66569c8dbebb895aaa4d4becc6aa587775f (patch) | |
tree | ea23b7e164709ce8630b974415eeac5909e278cf | |
parent | b1e405f48bd388b373a05aa29521098fc5171f34 (diff) | |
parent | 189b1e09f2b23f10fccdca15bf74fdb36c229e1d (diff) | |
download | connector-php-d0fee66569c8dbebb895aaa4d4becc6aa587775f.zip connector-php-d0fee66569c8dbebb895aaa4d4becc6aa587775f.tar.gz connector-php-d0fee66569c8dbebb895aaa4d4becc6aa587775f.tar.bz2 |
Merge branch 'master' of 192.168.1.251:connector-php
-rw-r--r-- | codebase/base_connector.php | 6 | ||||
-rw-r--r-- | codebase/connector.js | 9 | ||||
-rw-r--r-- | codebase/data_connector.php | 2 | ||||
-rw-r--r-- | codebase/grid_connector.php | 2 | ||||
-rw-r--r-- | codebase/scheduler_connector.php | 2 | ||||
-rw-r--r-- | codebase/xss_filter.php | 2 |
6 files changed, 14 insertions, 9 deletions
diff --git a/codebase/base_connector.php b/codebase/base_connector.php index fcb76c8..5b4534f 100644 --- a/codebase/base_connector.php +++ b/codebase/base_connector.php @@ -256,7 +256,7 @@ class DataItem{ for ($i=0; $i < sizeof($this->config->data); $i++){ $name=$this->config->data[$i]["name"]; $db_name=$this->config->data[$i]["db_name"]; - $str.=" ".$name."='".$this->xmlentities($this->data[$db_name])."'"; + $str.=" ".$name."='".$this->xmlentities($this->data[$name])."'"; } //output custom data if ($this->userdata !== false) @@ -733,7 +733,7 @@ class Connector { return $this->extra_output."</data>"; } - protected function fill_collections(){ + protected function fill_collections($list=""){ foreach ($this->options as $k=>$v) { $name = $k; $this->extra_output.="<coll_options for='{$name}'>"; @@ -825,7 +825,7 @@ class Connector { public function filter($name, $value = false, $operation = '=') { $this->filters[] = array('name' => $name, 'value' => $value, 'operation' => $operation); } - + public function clear_filter() { $this->filters = array(); $this->request->set_filters(array()); diff --git a/codebase/connector.js b/codebase/connector.js index 6192db6..69c5a02 100644 --- a/codebase/connector.js +++ b/codebase/connector.js @@ -21,9 +21,10 @@ if (window.dhtmlXGridObject && !dhtmlXGridObject.prototype._init_point_connector return combine_urls.call(this,url); }; var filtering_url=function(url,inds,vals){ + var chunks = []; for (var i=0; i<inds.length; i++) - inds[i]="dhx_filter["+inds[i]+"]="+encodeURIComponent(vals[i]); - this._connector_filter="&"+inds.join("&"); + chunks[i]="dhx_filter["+inds[i]+"]="+encodeURIComponent(vals[i]); + this._connector_filter="&"+chunks.join("&"); return combine_urls.call(this,url); }; this.attachEvent("onCollectValues",function(ind){ @@ -50,8 +51,12 @@ if (window.dhtmlXGridObject && !dhtmlXGridObject.prototype._init_point_connector return true; }); this.attachEvent("onFilterStart",function(a,b){ + var ss = this.getSortingState(); if (this._con_f_used.length){ + var self=this; this.clearAndLoad(filtering_url.call(this,this.xmlFileUrl,a,b)); + if (ss.length) + self.setSortImgState(true,ss[0],ss[1]); return false; } return true; diff --git a/codebase/data_connector.php b/codebase/data_connector.php index dc02551..826374d 100644 --- a/codebase/data_connector.php +++ b/codebase/data_connector.php @@ -192,7 +192,7 @@ class JSONDataConnector extends DataConnector{ @param list comma separated list of column names, for which options need to be generated */ - protected function fill_collections(){ + protected function fill_collections($list=""){ $options = array(); foreach ($this->options as $k=>$v) { $name = $k; diff --git a/codebase/grid_connector.php b/codebase/grid_connector.php index 857e629..1244e0b 100644 --- a/codebase/grid_connector.php +++ b/codebase/grid_connector.php @@ -187,7 +187,7 @@ class GridConnector extends Connector{ @param list comma separated list of column names, for which options need to be generated */ - protected function fill_collections($list){ + protected function fill_collections($list=""){ $names=explode(",",$list); for ($i=0; $i < sizeof($names); $i++) { $name = $this->resolve_parameter($names[$i]); diff --git a/codebase/scheduler_connector.php b/codebase/scheduler_connector.php index e2a9773..924feaa 100644 --- a/codebase/scheduler_connector.php +++ b/codebase/scheduler_connector.php @@ -192,7 +192,7 @@ class JSONSchedulerConnector extends SchedulerConnector { @param list comma separated list of column names, for which options need to be generated */ - protected function fill_collections(){ + protected function fill_collections($list=""){ $options = array(); foreach ($this->options as $k=>$v) { $name = $k; diff --git a/codebase/xss_filter.php b/codebase/xss_filter.php index 51bea56..b02d878 100644 --- a/codebase/xss_filter.php +++ b/codebase/xss_filter.php @@ -170,7 +170,7 @@ class ConnectorSecurity{ die(); } static function checkCSRF($edit){ - if(isset($_SESSION)) @session_start(); + if(!isset($_SESSION)) @session_start(); if (ConnectorSecurity::$security_key){ if ($edit=== true){ |