diff --git a/lib/pivotstate/pivotstate.class.php b/lib/pivotstate/pivotstate.class.php index f5de7ffffd..7bb14c0b26 100644 --- a/lib/pivotstate/pivotstate.class.php +++ b/lib/pivotstate/pivotstate.class.php @@ -293,6 +293,20 @@ class pivotState $this->filters[] = array('field' => $firstField['name'], 'saveAs' => '', 'type' => 'input', 'name' => $firstField[$lang], 'defualt' => ''); } + /** + * Judge is query filter or not. + * + * @access public + * @return bool + */ + public function isQueryFilter() + { + if(empty($this->filters)) return false; + $filter = current($this->filters); + + return isset($filter['from']) && $filter['from'] == 'query'; + } + /** * Complete filters default. *