public function guides() { $objectTypes = umiObjectTypesCollection::getInstance(); if(isset($_REQUEST['search-all-text'][0])) { $searchAllText = array_extract_values($_REQUEST['search-all-text']); foreach($searchAllText as $i => $v) { $searchAllText[$i] = wa_strtolower($v); } } else { $searchAllText = false; } $rel = umiObjectTypesCollection::getInstance()->getTypeIdByGUID('root-guides-type'); if(($rels = getRequest('rel')) && sizeof($rels)) { $rel = getArrayKey($rels, 0); } $per_page = getRequest('per_page_limit'); $curr_page = (int) getRequest('p'); $types = umiObjectTypesCollection::getInstance(); $guides_list = $types->getGuidesList(true, $rel); $tmp = Array(); foreach($guides_list as $typeId => $name) { if($searchAllText) { $match = false; foreach($searchAllText as $searchString) { if(strstr(wa_strtolower($name), $searchString) !== false) { $match = true; } } if(!$match) { continue; } } $tmp[$typeId] = $name; } if(isset($_REQUEST['order_filter']['name'])) { natsort($tmp); if($_REQUEST['order_filter']['name'] == "desc") { $tmp = array_reverse($tmp, true); } } $guides_list = array_keys($tmp); unset($tmp); $guides_list = $this->excludeNestedTypes($guides_list); $total = sizeof($guides_list); $guides = array_slice($guides_list, $per_page * $curr_page, $per_page); $this->setDataType("list"); $this->setActionType("view"); $this->setDataRange($per_page, $curr_page * $per_page); $data = $this->prepareData($guides, "types"); $this->setData($data, $total); return $this->doData(); }
public function view_comments() { $this->setDataType("list"); $this->setActionType("view"); if ($this->ifNotXmlMode()) { return $this->doData(); } //Получение id родительской страницы. Если передан неверный id, будет выброшен exception $parent_id = $this->expectElementId('param0'); $limit = getRequest('per_page_limit'); $curr_page = (int) getRequest('p'); $offset = $limit * $curr_page; if (!is_null($rel = getRequest('rel'))) { $rel = array_extract_values($rel); if (empty($rel)) { unset($_REQUEST['rel']); } } $sel = new selector('pages'); $sel->types('hierarchy-type')->name('comments', 'comment'); $sel->order('publish_time')->desc(); $sel->limit($offset, $limit); selectorHelper::detectFilters($sel); $this->setDataRange($limit, $offset); $data = $this->prepareData($sel->result, "pages"); $this->setData($data, $sel->length); return $this->doData(); }
public function types() { $per_page = getRequest('per_page_limit'); $curr_page = (int) getRequest('p'); if(isset($_REQUEST['rel'][0])) { $parent_type_id = $this->expectObjectTypeId($_REQUEST['rel'][0], false, true); } else { $parent_type_id = $this->expectObjectTypeId('param0'); } if(isset($_REQUEST['search-all-text'][0])) { $searchAllText = array_extract_values($_REQUEST['search-all-text']); foreach($searchAllText as $i => $v) { $searchAllText[$i] = wa_strtolower($v); } } else { $searchAllText = false; } $params = Array(); $types = umiObjectTypesCollection::getInstance(); if($searchAllText && !$parent_type_id) { $sub_types = $types->getChildClasses(0); } else { $sub_types = $types->getSubTypesList($parent_type_id); } $tmp = Array(); foreach($sub_types as $typeId) { $type = $types->getType($typeId); if($type instanceof umiObjectType) { $name = $type->getName(); if($searchAllText) { $match = false; foreach($searchAllText as $searchString) { if(strstr(wa_strtolower($name), $searchString) !== false) { $match = true; } } if(!$match) { continue; } } $tmp[$typeId] = $name; } } if(isset($_REQUEST['order_filter']['name'])) { natsort($tmp); if($_REQUEST['order_filter']['name'] == "desc") { $tmp = array_reverse($tmp, true); } } $sub_types = array_keys($tmp); unset($tmp); $sub_types = $this->excludeNestedTypes($sub_types); $total = sizeof($sub_types); $sub_types = array_slice($sub_types, $curr_page * $per_page, $per_page, false); $this->setDataType("list"); $this->setActionType("view"); $this->setDataRange($per_page, $curr_page * $per_page); $data = $this->prepareData($sub_types, "types"); $this->setData($data, $total); return $this->doData(); }
public function forms() { $curr_page = (int) getRequest('p'); $per_page = getRequest('per_page_limit'); $oTypes = umiObjectTypesCollection::getInstance(); $iBaseTID = $oTypes->getBaseType("webforms", "form"); if ($iBaseTID === false) { throw new publicAdminException('No form base type was found'); } if (isset($_REQUEST['search-all-text'][0])) { $searchAllText = array_extract_values($_REQUEST['search-all-text']); foreach ($searchAllText as $i => $v) { $searchAllText[$i] = wa_strtolower($v); } } else { $searchAllText = false; } $types = $oTypes; $sub_types = $types->getSubTypesList($iBaseTID); $tmp = array(); foreach ($sub_types as $typeId) { $type = $types->getType($typeId); if ($type instanceof umiObjectType) { $name = $type->getName(); if ($searchAllText) { $match = false; foreach ($searchAllText as $searchString) { if (strstr(wa_strtolower($name), $searchString) !== false) { $match = true; } } if (!$match) { continue; } } $tmp[$typeId] = $name; } } if (isset($_REQUEST['order_filter']['name'])) { natsort($tmp); if ($_REQUEST['order_filter']['name'] == "desc") { $tmp = array_reverse($tmp, true); } } $sub_types = array_keys($tmp); unset($tmp); $sub_types = $this->excludeNestedTypes($sub_types); $total = sizeof($sub_types); $aTypes = array_slice($sub_types, $curr_page * $per_page, $per_page, false); $this->setDataType("list"); $this->setActionType("view"); $this->setDataRange($per_page, $per_page * $curr_page); $data = $this->prepareData($aTypes, "types"); $data['nodes:basetype'] = array(array('attribute:id' => $iBaseTID)); $this->setData($data, $total); return $this->doData(); }
protected static function chooseContentTableName(umiSelection $vef5714e0519bfaa645cdff7d28843b70, $v945100186b119048837b9859c2c46410) { $v6942e8fa62b3cc9d93881a58210e2fd7 = $vef5714e0519bfaa645cdff7d28843b70->getElementTypeConds(); $v0e8133eb006c0f85ed9444ae07a60842 = $vef5714e0519bfaa645cdff7d28843b70->getObjectTypeConds(); if (!is_array($v6942e8fa62b3cc9d93881a58210e2fd7)) { $v6942e8fa62b3cc9d93881a58210e2fd7 = array(); } else { $v6942e8fa62b3cc9d93881a58210e2fd7 = array_extract_values($v6942e8fa62b3cc9d93881a58210e2fd7); } if (!is_array($v0e8133eb006c0f85ed9444ae07a60842)) { $v0e8133eb006c0f85ed9444ae07a60842 = array(); } else { $v0e8133eb006c0f85ed9444ae07a60842 = array_extract_values($v0e8133eb006c0f85ed9444ae07a60842); } if (sizeof($v6942e8fa62b3cc9d93881a58210e2fd7) == 1) { reset($v6942e8fa62b3cc9d93881a58210e2fd7); $vacf567c9c3d6cf7c6e2cc0ce108e0631 = current($v6942e8fa62b3cc9d93881a58210e2fd7); $v4aa3988e15afb9618423a0c2961a469f = umiBranch::checkIfBranchedByHierarchyTypeId($vacf567c9c3d6cf7c6e2cc0ce108e0631); return $v4aa3988e15afb9618423a0c2961a469f ? "cms3_object_content_{$vacf567c9c3d6cf7c6e2cc0ce108e0631}" : "cms3_object_content"; } if (sizeof($v6942e8fa62b3cc9d93881a58210e2fd7) > 1) { $v6301cee35ea764a1e241978f93f01069 = self::getObjectTypeByFieldId($v945100186b119048837b9859c2c46410); return umiBranch::getBranchedTableByTypeId($v6301cee35ea764a1e241978f93f01069); } if (sizeof($v6942e8fa62b3cc9d93881a58210e2fd7) == 0) { if (sizeof($v0e8133eb006c0f85ed9444ae07a60842) == 1) { reset($v0e8133eb006c0f85ed9444ae07a60842); $v6301cee35ea764a1e241978f93f01069 = current($v0e8133eb006c0f85ed9444ae07a60842); } else { $v6301cee35ea764a1e241978f93f01069 = self::getObjectTypeByFieldId($v945100186b119048837b9859c2c46410); } return umiBranch::getBranchedTableByTypeId($v6301cee35ea764a1e241978f93f01069); } return "cms3_object_content"; }
function array_extract_values($vf1f713c9e000f5d3f280adbd124df4f5, &$result = NULL, $v19358374f34dd2c9d2dc34952227664a = false) { if (is_array($vf1f713c9e000f5d3f280adbd124df4f5) == false) { return array(); } if (is_array($result) == false) { $result = array(); } foreach ($vf1f713c9e000f5d3f280adbd124df4f5 as $v2063c1608d6e0baf80249c42e2be5804) { if (is_array($v2063c1608d6e0baf80249c42e2be5804) == false) { if ($v2063c1608d6e0baf80249c42e2be5804 || $v19358374f34dd2c9d2dc34952227664a == true) { $result[] = $v2063c1608d6e0baf80249c42e2be5804; } } else { array_extract_values($v2063c1608d6e0baf80249c42e2be5804, $result, $v19358374f34dd2c9d2dc34952227664a); } } return $result; }
public function applyFilterFloat(umiSelection $sel, umiField $field, $value) { if (empty($value)) { return false; } if ($this->applyKeyedFilters($sel, $field, $value)) { return; } $tmp = array_extract_values($value); if (empty($tmp)) { return false; } if (!empty($value[1])) { $sel->addPropertyFilterBetween($field->getId(), $value[0], $value[1]); } else { if (!empty($value[0])) { $sel->addPropertyFilterMore($field->getId(), $value[0]); } } }
public function autoDetectFilters(umiSelection $sel, $object_type_id) { if (is_null(getRequest('search-all-text')) == false) { $searchStrings = getRequest('search-all-text'); if (is_array($searchStrings)) { foreach ($searchStrings as $searchString) { if ($searchString) { $sel->searchText($searchString); } } } } if (array_key_exists("fields_filter", $_REQUEST)) { $cmsController = cmsController::getInstance(); $data_module = $cmsController->getModule("data"); if (!$data_module) { throw new publicException("Need data module installed to use dynamic filters"); } $sel->setPropertyFilter(); $type = umiObjectTypesCollection::getInstance()->getType($object_type_id); $order_filter = getRequest('fields_filter'); if (!is_array($order_filter)) { return false; } foreach ($order_filter as $field_name => $value) { if ($field_name == "name") { $data_module->applyFilterName($sel, $value); continue; } if ($field_id = $type->getFieldId($field_name)) { $this->isSelectionFiltered = true; $field = umiFieldsCollection::getInstance()->getField($field_id); $field_type_id = $field->getFieldTypeId(); $field_type = umiFieldTypesCollection::getInstance()->getFieldType($field_type_id); $data_type = $field_type->getDataType(); switch ($data_type) { case "text": $data_module->applyFilterText($sel, $field, $value); break; case "wysiwyg": $data_module->applyFilterText($sel, $field, $value); break; case "string": $data_module->applyFilterText($sel, $field, $value); break; case "tags": $tmp = array_extract_values($value); if (empty($tmp)) { break; } case "boolean": $data_module->applyFilterBoolean($sel, $field, $value); break; case "int": $data_module->applyFilterInt($sel, $field, $value); break; case "symlink": case "relation": $data_module->applyFilterRelation($sel, $field, $value); break; case "float": $data_module->applyFilterFloat($sel, $field, $value); break; case "price": $emarket = $cmsController->getModule('emarket'); if ($emarket instanceof def_module) { $defaultCurrency = $emarket->getDefaultCurrency(); $currentCurrency = $emarket->getCurrentCurrency(); $prices = $emarket->formatCurrencyPrice($value, $defaultCurrency, $currentCurrency); foreach ($value as $index => $void) { $value[$index] = getArrayKey($prices, $index); } } $data_module->applyFilterPrice($sel, $field, $value); break; case "file": case "img_file": case "swf_file": case "boolean": $data_module->applyFilterInt($sel, $field, $value); break; case "date": $data_module->applyFilterDate($sel, $field, $value); break; default: break; } } else { continue; } } } else { return false; } }
public function buildQueries($v89759e1284e2479b991d2669de104942, $vb934cdf74d9a078a5654bd8b129741d9 = NULL, $v06eba0c81e2c853a3850d7d920570edb = NULL, $vae1d6a6518a73b480c52bcf30553f9f8 = false) { $v78e6dd7a49f5b0cb2106a3a434dd5c86 = cmsController::getInstance()->getCurrentLang()->getId(); $v662cbf1253ac7d8750ed9190c52163e5 = cmsController::getInstance()->getCurrentDomain()->getId(); $vf363554fffcbe5ed0107628b8a7452ba = mainConfiguration::getInstance()->get('system', 'search-morph-disabled'); $v721023118cca90897209b50c681b3160 = array(); foreach ($v89759e1284e2479b991d2669de104942 as $v865c0c0b4ab0e063e5caa3387c1a8741 => $vc47d187067c6cf953245f128b5fde62a) { if (wa_strlen($vc47d187067c6cf953245f128b5fde62a) < 3) { unset($v89759e1284e2479b991d2669de104942[$v865c0c0b4ab0e063e5caa3387c1a8741]); continue; } $vc47d187067c6cf953245f128b5fde62a = l_mysql_real_escape_string($vc47d187067c6cf953245f128b5fde62a); $vc47d187067c6cf953245f128b5fde62a = str_replace(array("%", "_"), array("\\%", "\\_"), $vc47d187067c6cf953245f128b5fde62a); $v1c8b3a3ca57a0beda8c7653fd724183d = "siw.word LIKE '{$vc47d187067c6cf953245f128b5fde62a}%' "; if (!$vf363554fffcbe5ed0107628b8a7452ba) { $v1c8b3a3ca57a0beda8c7653fd724183d .= ' OR '; $v76f3c2687c1bc668f07f87b8e760cad7 = language_morph::get_word_base($vc47d187067c6cf953245f128b5fde62a); if (wa_strlen($v76f3c2687c1bc668f07f87b8e760cad7) >= 3) { $v76f3c2687c1bc668f07f87b8e760cad7 = l_mysql_real_escape_string($v76f3c2687c1bc668f07f87b8e760cad7); $v1c8b3a3ca57a0beda8c7653fd724183d .= "siw.word LIKE '{$v76f3c2687c1bc668f07f87b8e760cad7}%'"; } else { $v1c8b3a3ca57a0beda8c7653fd724183d = trim($v1c8b3a3ca57a0beda8c7653fd724183d, " OR "); } } $v721023118cca90897209b50c681b3160[] = "(" . $v1c8b3a3ca57a0beda8c7653fd724183d . ")"; } $v03ed04426fc17f79e0b77603ce6c81d3 = implode(" OR ", $v721023118cca90897209b50c681b3160); $v538df8a817542c341fb29adc5c5b165d = ""; $v7b3d2a2630466b55db035bc4adc620b4 = ""; if (!permissionsCollection::getInstance()->isSv()) { $v9bc65c2abec141778ffaa729489f3e87 = cmsController::getInstance()->getModule("users"); $ve8701ad48ba05a91604e480dd60899a3 = $v9bc65c2abec141778ffaa729489f3e87->user_id; $vee11cbb19052e40b07aac0ca060c23ee = umiObjectsCollection::getInstance()->getObject($ve8701ad48ba05a91604e480dd60899a3); $v1471e4e05a4db95d353cc867fe317314 = $vee11cbb19052e40b07aac0ca060c23ee->getValue("groups"); $v1471e4e05a4db95d353cc867fe317314[] = $ve8701ad48ba05a91604e480dd60899a3; $v1471e4e05a4db95d353cc867fe317314[] = regedit::getInstance()->getVal("//modules/users/guest_id"); $v1471e4e05a4db95d353cc867fe317314 = array_extract_values($v1471e4e05a4db95d353cc867fe317314); $v1471e4e05a4db95d353cc867fe317314 = implode(', ', $v1471e4e05a4db95d353cc867fe317314); $v538df8a817542c341fb29adc5c5b165d = " AND c3p.level >= 1 AND c3p.owner_id IN({$v1471e4e05a4db95d353cc867fe317314})"; $v7b3d2a2630466b55db035bc4adc620b4 = "INNER JOIN cms3_permissions as `c3p` ON c3p.rel_id = s.rel_id"; } $v6c666917ae648d1e7ec45408bf54efc6 = ""; if (is_array($vb934cdf74d9a078a5654bd8b129741d9)) { if (sizeof($vb934cdf74d9a078a5654bd8b129741d9)) { if ($vb934cdf74d9a078a5654bd8b129741d9 && $vb934cdf74d9a078a5654bd8b129741d9[0]) { $v6c666917ae648d1e7ec45408bf54efc6 = " AND s.type_id IN (" . l_mysql_real_escape_string(implode(", ", $vb934cdf74d9a078a5654bd8b129741d9)) . ")"; } } } $va9e49c488dc6a07200de31dbd512d69a = ""; if (is_array($v06eba0c81e2c853a3850d7d920570edb) && count($v06eba0c81e2c853a3850d7d920570edb)) { $va9e49c488dc6a07200de31dbd512d69a = " AND h.rel IN (" . l_mysql_real_escape_string(implode(", ", $v06eba0c81e2c853a3850d7d920570edb)) . ")"; } if ($v03ed04426fc17f79e0b77603ce6c81d3 == false) { return array(); } l_mysql_query("CREATE TEMPORARY TABLE temp_search (rel_id int unsigned, tf float, word varchar(64))"); $vac5c74b64b4b8352ef2f181affb5ac2a = <<<EOF \t\t\t\tINSERT INTO temp_search SELECT SQL_SMALL_RESULT HIGH_PRIORITY s.rel_id, si.weight, siw.word \t\t\t\tFROM cms3_search_index_words as `siw` \t\t\t\t \tINNER JOIN cms3_search_index as `si` ON si.word_id = siw.id \t\t\t\t \tINNER JOIN cms3_search as `s` ON s.rel_id = si.rel_id \t\t\t\t \tINNER JOIN cms3_hierarchy as `h` ON h.id = s.rel_id \t\t\t\t \t{$v7b3d2a2630466b55db035bc4adc620b4} \t\t\t\t WHERE \t\t\t\t \t({$v03ed04426fc17f79e0b77603ce6c81d3}) AND \t\t\t\t \ts.domain_id = '{$v662cbf1253ac7d8750ed9190c52163e5}' AND \t\t\t\t \ts.lang_id = '{$v78e6dd7a49f5b0cb2106a3a434dd5c86}' AND \t\t\t\t\th.is_deleted = '0' AND \t\t\t\t\th.is_active = '1' \t\t\t\t\t{$v6c666917ae648d1e7ec45408bf54efc6} \t\t\t\t\t{$va9e49c488dc6a07200de31dbd512d69a} \t\t\t\t\t{$v538df8a817542c341fb29adc5c5b165d} \t\t\t\t GROUP BY s.rel_id, si.weight, siw.word EOF; $v9b207167e5381c47682c6b4f58a623fb = array(); l_mysql_query($vac5c74b64b4b8352ef2f181affb5ac2a); if ($vae1d6a6518a73b480c52bcf30553f9f8) { $vac5c74b64b4b8352ef2f181affb5ac2a = <<<SQL SELECT rel_id, SUM(tf) AS x \tFROM temp_search \t\tGROUP BY rel_id \t\t\tORDER BY x DESC SQL; } else { $vdb9d5968645f90092f4b913cf77a9af7 = sizeof($v89759e1284e2479b991d2669de104942); $vac5c74b64b4b8352ef2f181affb5ac2a = <<<SQL SELECT rel_id, SUM(tf) AS x, COUNT(word) AS wc \tFROM temp_search \t\tGROUP BY rel_id \t\t\tHAVING wc >= '{$vdb9d5968645f90092f4b913cf77a9af7}' \t\t\t\tORDER BY x DESC SQL; } $result = l_mysql_query($vac5c74b64b4b8352ef2f181affb5ac2a); while (list($v7057e8409c7c531a1a6e9ac3df4ed549) = mysql_fetch_row($result)) { $v9b207167e5381c47682c6b4f58a623fb[] = $v7057e8409c7c531a1a6e9ac3df4ed549; } l_mysql_query("DROP TEMPORARY TABLE IF EXISTS temp_search"); return $v9b207167e5381c47682c6b4f58a623fb; }
public function buildRelationNewNodes($v7057e8409c7c531a1a6e9ac3df4ed549) { $v7057e8409c7c531a1a6e9ac3df4ed549 = (int) $v7057e8409c7c531a1a6e9ac3df4ed549; $this->earseRelationNodes($v7057e8409c7c531a1a6e9ac3df4ed549); $vac5c74b64b4b8352ef2f181affb5ac2a = "SELECT rel FROM cms3_hierarchy WHERE id = '{$v7057e8409c7c531a1a6e9ac3df4ed549}'"; $result = l_mysql_query($vac5c74b64b4b8352ef2f181affb5ac2a, true); if (mysql_num_rows($result)) { list($v6be379826b20cc58475f636e33f4606b) = mysql_fetch_row($result); $v8eeb1538ad4ac95142835550d08f1212 = $v6be379826b20cc58475f636e33f4606b > 0 ? " = '{$v6be379826b20cc58475f636e33f4606b}'" : " IS NULL"; $vac5c74b64b4b8352ef2f181affb5ac2a = <<<SQL INSERT INTO cms3_hierarchy_relations (rel_id, child_id, level) SELECT rel_id, '{$v7057e8409c7c531a1a6e9ac3df4ed549}', (level + 1) FROM cms3_hierarchy_relations WHERE child_id {$v8eeb1538ad4ac95142835550d08f1212} SQL; l_mysql_query($vac5c74b64b4b8352ef2f181affb5ac2a); $vc68ad910ed49ac65f21f1bf2c5dbf912 = $this->getAllParents($v6be379826b20cc58475f636e33f4606b, true, true); $vc68ad910ed49ac65f21f1bf2c5dbf912 = array_extract_values($vc68ad910ed49ac65f21f1bf2c5dbf912); $vc9e9a848920877e76685b2e4e76de38d = sizeof($vc68ad910ed49ac65f21f1bf2c5dbf912); $v59a040d8f146c76cb91c7f341268d909 = $v6be379826b20cc58475f636e33f4606b > 0 ? "'{$v6be379826b20cc58475f636e33f4606b}'" : "NULL"; $vac5c74b64b4b8352ef2f181affb5ac2a = <<<SQL INSERT INTO cms3_hierarchy_relations (rel_id, child_id, level) VALUES ({$v59a040d8f146c76cb91c7f341268d909}, '{$v7057e8409c7c531a1a6e9ac3df4ed549}', '{$vc9e9a848920877e76685b2e4e76de38d}') SQL; l_mysql_query($vac5c74b64b4b8352ef2f181affb5ac2a); return true; } else { return false; } }
public function autoDetectAllFilters(umiSelection $v8be74552df93e31bbdd6b36ed74bdb6a, $v38bceec7c944e9431e65bb5bb50cc5fa = false) { $v6a8e3fc043747ec4b0e60aed6b7023ed = getRequest('rel'); $vf99eaf9123d0eb944e4a40f8c8b73404 = (int) getRequest('depth'); $v8ef57923ab3049b18fb75541ff476ff7 = getRequest('domain_id'); $v99deeeb03d58e86bd63af257b5b74888 = getRequest('lang_id'); if (!$vf99eaf9123d0eb944e4a40f8c8b73404) { $vf99eaf9123d0eb944e4a40f8c8b73404 = 0; } $vb81ca7c0ccaa77e7aa91936ab0070695 = umiHierarchy::getInstance(); $v9b81909fd0da3add2602a8d0ede0e4e7 = umiObjectTypesCollection::getInstance(); $v1723bdd4ee51910267a625cae41ced8a = umiHierarchyTypesCollection::getInstance(); if (is_null(getRequest('or-mode')) == false) { $v8be74552df93e31bbdd6b36ed74bdb6a->setConditionModeOr(); } if (isset($v8ef57923ab3049b18fb75541ff476ff7[0])) { $v8be74552df93e31bbdd6b36ed74bdb6a->setDomainId($v8ef57923ab3049b18fb75541ff476ff7[0]); } if (isset($v99deeeb03d58e86bd63af257b5b74888[0])) { $v8be74552df93e31bbdd6b36ed74bdb6a->setLangId($v99deeeb03d58e86bd63af257b5b74888[0]); } if (is_array($v6a8e3fc043747ec4b0e60aed6b7023ed) && count($v6a8e3fc043747ec4b0e60aed6b7023ed)) { foreach ($v6a8e3fc043747ec4b0e60aed6b7023ed as $vc600dd3e8efd757e388daedf1a383638) { $v558363dde110ad2b3af09518966e0197 = intval($vc600dd3e8efd757e388daedf1a383638); if (is_numeric($v558363dde110ad2b3af09518966e0197)) { $v8be74552df93e31bbdd6b36ed74bdb6a->addHierarchyFilter(intval($vc600dd3e8efd757e388daedf1a383638), $vf99eaf9123d0eb944e4a40f8c8b73404, true); } } } $v0e8133eb006c0f85ed9444ae07a60842 = array_extract_values($v8be74552df93e31bbdd6b36ed74bdb6a->getObjectTypeConds()); $vdad8db09124c43be9156ca0e7596fc04 = array_extract_values($v8be74552df93e31bbdd6b36ed74bdb6a->getElementTypeConds()); $vc4feb6f9b5b1aa42ea49f74ecab346f9 = array_extract_values($v8be74552df93e31bbdd6b36ed74bdb6a->getHierarchyConds(), $vacbd18db4cc2f85cedef654fccc4a4d8, true); $v0132bb0bf9821bce1103f4db6ced0a5f = getRequest('search-all-text'); $v0132bb0bf9821bce1103f4db6ced0a5f = array_extract_values($v0132bb0bf9821bce1103f4db6ced0a5f); $v00ef6e359e66ade0706b8305550f7ea2 = getRequest('fields_filter'); $v00ef6e359e66ade0706b8305550f7ea2 = array_extract_values($v00ef6e359e66ade0706b8305550f7ea2, $vacbd18db4cc2f85cedef654fccc4a4d8, true); if (sizeof($vdad8db09124c43be9156ca0e7596fc04)) { $vd663178671639336ce153c008ff6acef = $vdad8db09124c43be9156ca0e7596fc04[sizeof($vdad8db09124c43be9156ca0e7596fc04) - 1]; } else { $vd663178671639336ce153c008ff6acef = false; } if (sizeof($v0e8133eb006c0f85ed9444ae07a60842)) { reset($v0e8133eb006c0f85ed9444ae07a60842); $v5f694956811487225d15e973ca38fbab = current($v0e8133eb006c0f85ed9444ae07a60842); } else { if (sizeof($vc4feb6f9b5b1aa42ea49f74ecab346f9)) { reset($vc4feb6f9b5b1aa42ea49f74ecab346f9); $v5f694956811487225d15e973ca38fbab = $vb81ca7c0ccaa77e7aa91936ab0070695->getDominantTypeId(current($vc4feb6f9b5b1aa42ea49f74ecab346f9)); } else { if (sizeof($vdad8db09124c43be9156ca0e7596fc04) && (!empty($v0132bb0bf9821bce1103f4db6ced0a5f) || sizeof($vdad8db09124c43be9156ca0e7596fc04) == 1)) { reset($vdad8db09124c43be9156ca0e7596fc04); $v5f694956811487225d15e973ca38fbab = $v9b81909fd0da3add2602a8d0ede0e4e7->getTypeByHierarchyTypeId(array_pop($vdad8db09124c43be9156ca0e7596fc04)); } else { $v5f694956811487225d15e973ca38fbab = $v9b81909fd0da3add2602a8d0ede0e4e7->getTypeIdByGUID('root-pages-type'); } } } if (empty($vc4feb6f9b5b1aa42ea49f74ecab346f9) && !empty($vdad8db09124c43be9156ca0e7596fc04) && empty($v0132bb0bf9821bce1103f4db6ced0a5f) && empty($v00ef6e359e66ade0706b8305550f7ea2)) { $v8be74552df93e31bbdd6b36ed74bdb6a->optimize_root_search_query = true; } else { if (!empty($v00ef6e359e66ade0706b8305550f7ea2)) { if ($vd663178671639336ce153c008ff6acef) { $v5f694956811487225d15e973ca38fbab = $v9b81909fd0da3add2602a8d0ede0e4e7->getTypeByHierarchyTypeId($vd663178671639336ce153c008ff6acef); } } } if ($v5f694956811487225d15e973ca38fbab) { $this->autoDetectFilters($v8be74552df93e31bbdd6b36ed74bdb6a, $v5f694956811487225d15e973ca38fbab); $this->autoDetectOrders($v8be74552df93e31bbdd6b36ed74bdb6a, $v5f694956811487225d15e973ca38fbab); } if (!$v38bceec7c944e9431e65bb5bb50cc5fa) { $v8be74552df93e31bbdd6b36ed74bdb6a->excludeNestedPages = true; } if (sizeof($vc4feb6f9b5b1aa42ea49f74ecab346f9) && sizeof($vdad8db09124c43be9156ca0e7596fc04)) { $v0715f6d9497f93911417c9c324265771 = $v1723bdd4ee51910267a625cae41ced8a->getTypeByName("comments", "comment")->getId(); $v8be74552df93e31bbdd6b36ed74bdb6a->addElementType($v0715f6d9497f93911417c9c324265771); } if (getRequest('import')) { quickCsvImporter::autoImport($v8be74552df93e31bbdd6b36ed74bdb6a, $v38bceec7c944e9431e65bb5bb50cc5fa, (bool) getRequest('force-hierarchy')); } if (getRequest('export')) { quickCsvExporter::autoExport($v8be74552df93e31bbdd6b36ed74bdb6a, (bool) getRequest('force-hierarchy')); } return true; }