diff options
author | Stanislau Wolski <stanislau.wolski@gmail.com> | 2013-09-04 13:07:43 +0300 |
---|---|---|
committer | Stanislau Wolski <stanislau.wolski@gmail.com> | 2013-09-04 13:07:43 +0300 |
commit | 394f114ab531f4a89555a3bd347a8cd3591364e6 (patch) | |
tree | 0dc788b72471d24e6fbade229853553ea5d2e525 /codebase/base_connector.php | |
parent | 3aa4511823e830d895c56ae1ca002d20ff9eb1bf (diff) | |
download | connector-php-394f114ab531f4a89555a3bd347a8cd3591364e6.zip connector-php-394f114ab531f4a89555a3bd347a8cd3591364e6.tar.gz connector-php-394f114ab531f4a89555a3bd347a8cd3591364e6.tar.bz2 |
[add] reordering for the gantt connector
Diffstat (limited to 'codebase/base_connector.php')
-rw-r--r-- | codebase/base_connector.php | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/codebase/base_connector.php b/codebase/base_connector.php index ac25b00..39ac6eb 100644 --- a/codebase/base_connector.php +++ b/codebase/base_connector.php @@ -312,7 +312,8 @@ class Connector { protected $filters; protected $sorts; protected $mix; - + protected $order = false; + /*! constructor Here initilization of all Masters occurs, execution timer initialized @@ -605,10 +606,13 @@ class Connector { $this->request->set_filter($this->resolve_parameter($k),$v); } + $this->check_csrf(); + } + + protected function check_csrf(){ $key = ConnectorSecurity::checkCSRF($this->editing); if ($key !== "") $this->add_top_attribute(ConnectorSecurity::$security_var, $key); - } /*! convert incoming request name to the actual DB name @@ -704,7 +708,23 @@ class Connector { */ public function dynamic_loading($count){ $this->dload=$count; - } + } + + /*! enable or disable data reordering + + @param name + name of field, which will be used for order storing, optional + by default 'sortorder' field will be used + */ + public function enable_order($name = true){ + if ($name === true) + $name = "sortorder"; + + $this->sort($name); + $this->access->allow("order"); + $this->request->set_order($name); + $this->order = $name; + } /*! enable logging |