From ad305efc21f8f99bbc0dd0ff6989e6585594c565 Mon Sep 17 00:00:00 2001 From: qixinzhi Date: Mon, 1 Jul 2024 02:49:23 +0000 Subject: [PATCH] + [story#54148,doing,0.5h,2h] add isQueryFilter. --- lib/pivotstate/pivotstate.class.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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. *