/**
  * Gets news with specified type. Uses paging.
  *
  * @param int $type Id of type (rubric)
  * @param int $limit Limit for output
  * @param int $page Current page for calculate offset
  * @return array
  */
 public function getList($type, $limit, $page = 1)
 {
     $config = parse_ini_file("./config/config.ini", true);
     $page -= 1;
     $hierarchyTypeId = umiHierarchyTypesCollection::getInstance()->getTypeByName("news", "item")->getId();
     $objectTypeId = umiObjectTypesCollection::getInstance()->getBaseType("news", "item");
     $objectType = umiObjectTypesCollection::getInstance()->getType($objectTypeId);
     $publishTimeFieldId = $objectType->getFieldId('publish_time');
     $publishToAppFieldId = $objectType->getFieldId('publish_to_app');
     $sel = new umiSelection();
     $sel->addElementType($hierarchyTypeId);
     $sel->addHierarchyFilter($type, 0, true);
     if ($config["umi"]["ignore-publish-flag"] != 1) {
         $sel->addPropertyFilterEqual($publishToAppFieldId, true);
     }
     $sel->setOrderByProperty($publishTimeFieldId, false);
     $sel->addLimit($limit, $page);
     $result = umiSelectionsParser::runSelection($sel);
     $items = array();
     $size = sizeof($result);
     for ($i = 0; $i < $size; $i++) {
         $elementId = $result[$i];
         $element = umiHierarchy::getInstance()->getElement($elementId);
         if (!$element) {
             continue;
         }
         $items[] = array("id" => $elementId, "header" => $element->getValue("h1"), "date" => $element->getValue("publish_time")->getFormattedDate("d.m.Y"), "image" => "http://" . $_SERVER['HTTP_HOST'] . $element->getValue("anons_pic"), "original_link" => "http://" . $_SERVER['HTTP_HOST'] . umiHierarchy::getInstance()->getPathById($elementId));
     }
     return $items;
 }
 public function onCloneElement(iUmiEventPoint $oEventPoint)
 {
     if ($oEventPoint->getMode() == 'after') {
         /**
          * @var umiHierarchy
          */
         $hierarchy = umiHierarchy::getInstance();
         $elementId = $oEventPoint->getParam('newElementId');
         /**
          * @var umiHierarchyElement
          */
         $element = $hierarchy->getElement($elementId);
         if ($element && $element->getTypeId() == umiHierarchyTypesCollection::getInstance()->getTypeByName('vote', 'poll')->getId()) {
             $collection = umiObjectsCollection::getInstance();
             $answersIDs = $element->getValue('answers');
             $newAnswers = array();
             foreach ($answersIDs as $answerId) {
                 if ($newAnswerId = $collection->cloneObject($answerId)) {
                     $newAnswers[] = $newAnswerId;
                     $answer = $collection->getObject($newAnswerId);
                     $answer->setValue('poll_rel', $elementId);
                     $answer->setValue('count', 0);
                     $answer->commit();
                 }
             }
             $element->setValue('answers', $newAnswers);
             $element->commit();
         }
     }
 }
 public function import_subscriber($email, $fname, $lname)
 {
     if (!$email) {
         return false;
     }
     $oSbsSelection = new umiSelection();
     $oSbsSelection->setObjectTypeFilter();
     $iSbsHierarchyTypeId = umiHierarchyTypesCollection::getInstance()->getTypeByName("dispatches", "subscriber")->getId();
     $iSbsTypeId = umiObjectTypesCollection::getInstance()->getTypeByHierarchyTypeId($iSbsHierarchyTypeId);
     $oSbsType = umiObjectTypesCollection::getInstance()->getType($iSbsTypeId);
     $oSbsSelection->addObjectType($iSbsTypeId);
     $oSbsSelection->setNamesFilter();
     $oSbsSelection->addNameFilterEquals($email);
     $arrSbsSelResults = umiSelectionsParser::runSelection($oSbsSelection);
     if (sizeof($arrSbsSelResults)) {
         list($object_id) = $arrSbsSelResults;
     } else {
         $object_id = umiObjectsCollection::getInstance()->addObject($email, $iSbsTypeId);
     }
     if ($oSubscriber = umiObjectsCollection::getInstance()->getObject($object_id)) {
         $oSubscriber->setName($email);
         $oSubscriber->setValue('fname', $fname);
         $oSubscriber->setValue('lname', $lname);
         $oCurrDate = new umiDate(time());
         $oSubscriber->setValue('subscribe_date', $oCurrDate);
         $oSubscriber->setValue('subscriber_dispatches', $this->getAllDispatches());
         $oSubscriber->commit();
     } else {
         return false;
     }
     return $object_id;
 }
Exemplo n.º 4
0
 public function profile($template = "default", $user_id = false)
 {
     if (!$template) {
         $template = "default";
     }
     list($template_block, $template_bad_user_block) = def_module::loadTemplates("users/profile/" . $template, "profile_block", "bad_user_block");
     $block_arr = array();
     if (!$user_id) {
         $user_id = (int) getRequest('param0');
     }
     if (!$user_id) {
         $permissions = permissionsCollection::getInstance();
         if ($permissions->isAuth()) {
             $user_id = $permissions->getUserId();
         }
     }
     if ($user = selector::get('object')->id($user_id)) {
         $this->validateEntityByTypes($user, array('module' => 'users', 'method' => 'user'));
         $block_arr['xlink:href'] = "uobject://" . $user_id;
         $userTypeId = $user->getTypeId();
         if ($userType = umiObjectTypesCollection::getInstance()->getType($userTypeId)) {
             $userHierarchyTypeId = $userType->getHierarchyTypeId();
             if ($userHierarchyType = umiHierarchyTypesCollection::getInstance()->getType($userHierarchyTypeId)) {
                 if ($userHierarchyType->getName() == "users" && $userHierarchyType->getExt() == "user") {
                     $block_arr['id'] = $user_id;
                     return def_module::parseTemplate($template_block, $block_arr, false, $user_id);
                 }
             }
         }
     } else {
         throw new publicException(getLabel('error-object-does-not-exist', null, $user_id));
     }
     return def_module::parseTemplate($template_bad_user_block, $block_arr);
 }
 public function shared_files()
 {
     $this->setDataType("list");
     $this->setActionType("view");
     if ($this->ifNotXmlMode()) {
         return $this->doData();
     }
     $per_page = 20;
     $curr_page = getRequest('p');
     $hierarchyTypes = umiHierarchyTypesCollection::getInstance();
     $hierarchy_type_id = $hierarchyTypes->getTypeByName("filemanager", "shared_file")->getId();
     $sel = new umiSelection();
     $sel->addLimit($per_page, $curr_page);
     $sel->addElementType($hierarchy_type_id);
     $this->autoDetectAllFilters($sel);
     $sel->addPermissions();
     $result = umiSelectionsParser::runSelection($sel);
     $total = umiSelectionsParser::runSelectionCounts($sel);
     $this->setDataType("list");
     $this->setActionType("view");
     $this->setDataRange($per_page, $curr_page * $per_page);
     $data = $this->prepareData($result, "pages");
     $this->setData($data, $total);
     return $this->doData();
 }
Exemplo n.º 6
0
 public function getBindedPage($formId = false)
 {
     if ($formId === false) {
         $formId = ($tmp = getRequest('param0')) ? $tmp : $formId;
     }
     if (!$formId) {
         return array('page' => array('attribute:id' => 0));
     }
     $hType = umiHierarchyTypesCollection::getInstance()->getTypeByName('webforms', 'page');
     $typeId = umiObjectTypesCollection::getInstance()->getTypeByHierarchyTypeId($hType->getId());
     $type = umiObjectTypesCollection::getInstance()->getType($typeId);
     $sel = new umiSelection();
     $sel->addElementType($hType->getId());
     $sel->addActiveFilter(true);
     $sel->addPropertyFilterEqual($type->getFieldId('form_id'), $formId);
     $result = umiSelectionsParser::runSelection($sel);
     if (!empty($result)) {
         return array('page' => array('attribute:id' => $result[0], 'attribute:href' => umiHierarchy::getInstance()->getPathById($result[0])));
     }
     $sel = new umiSelection();
     $sel->addElementType($hType->getId());
     $sel->addActiveFilter(false);
     $sel->addPropertyFilterEqual($type->getFieldId('form_id'), $formId);
     $result = umiSelectionsParser::runSelection($sel);
     if (!empty($result)) {
         return array('page' => array('attribute:id' => $result[0], 'attribute:href' => umiHierarchy::getInstance()->getPathById($result[0])));
     }
     return array('page' => array('attribute:id' => 0));
 }
Exemplo n.º 7
0
 public function onAddTopicToDispatch(iUmiEventPoint $oEvent)
 {
     $iDispatchId = regedit::getInstance()->getVal("//modules/forum/dispatch_id");
     if (!$iDispatchId) {
         return false;
     }
     $dispatches_module = cmsController::getInstance()->getModule('dispatches');
     if (!$dispatches_module) {
         return false;
     }
     $iTopicId = (int) $oEvent->getParam('topic_id');
     $oTopicElement = umiHierarchy::getInstance()->getElement($iTopicId);
     if ($oTopicElement instanceof umiHierarchyElement) {
         $sTitle = (string) getRequest('title');
         $sMessage = (string) getRequest('body');
         $iHierarchyTypeId = umiHierarchyTypesCollection::getInstance()->getTypeByName("dispatches", "message")->getId();
         $iMsgTypeId = umiObjectTypesCollection::getInstance()->getTypeByHierarchyTypeId($iHierarchyTypeId);
         $oMsgType = umiObjectTypesCollection::getInstance()->getType($iMsgTypeId);
         $iMsgObjId = umiObjectsCollection::getInstance()->addObject($sTitle, $iMsgTypeId);
         $oMsgObj = umiObjectsCollection::getInstance()->getObject($iMsgObjId);
         if ($oMsgObj instanceof umiObject) {
             $iReleaseId = $dispatches_module->getNewReleaseInstanceId($iDispatchId);
             $oMsgObj->setValue('release_reference', $iReleaseId);
             $oMsgObj->setValue('header', $sTitle);
             $oMsgObj->setValue('body', $sMessage);
             $oMsgObj->commit();
             return true;
         } else {
             return false;
         }
     } else {
         return false;
     }
 }
Exemplo n.º 8
0
 public function isHierarchyAllowed($element_id)
 {
     $element = umiHierarchy::getInstance()->getElement($element_id);
     if (!$element) {
         return true;
     }
     if ($element->getIsDefault()) {
         return true;
     }
     $allowed_pages = array('emarket', 'webforms', 'users', 'catalog');
     $type = umiHierarchyTypesCollection::getInstance()->getType($element->getTypeId());
     if (in_array($type->getName(), $allowed_pages)) {
         return true;
     }
     $allowed_hierarchy_elements = $this->getValue('iframe_pages');
     if (empty($allowed_hierarchy_elements)) {
         return false;
     }
     foreach ($allowed_hierarchy_elements as $hierarchy_element) {
         if ($hierarchy_element->getId() == $element_id) {
             return true;
         }
     }
     foreach ($allowed_hierarchy_elements as $hierarchy_element) {
         if (umiHierarchy::getInstance()->hasParent($element_id, $hierarchy_element)) {
             return true;
         }
     }
     return false;
 }
Exemplo n.º 9
0
 public function systemEventsNotify(iUmiEventPoint $event)
 {
     $eventId = $event->getEventId();
     $titleLabel = $titleLabel = 'event-' . $eventId . '-title';
     $contentLabel = 'event-' . $eventId . '-content';
     $title = getLabel($titleLabel, 'common/content/config');
     $content = getLabel($contentLabel, 'common/content/config');
     if ($titleLabel == $title) {
         return;
     }
     if ($element = $event->getRef('element')) {
         $hierarchy = umiHierarchy::getInstance();
         $oldbForce = $hierarchy->forceAbsolutePath(true);
         $params = array('%page-name%' => $element->name, '%page-link%' => $element->link);
         $hierarchy->forceAbsolutePath($oldbForce);
     } else {
         $params = array();
     }
     if ($object = $event->getRef('object')) {
         $params['%object-name%'] = $object->name;
         $objectTypes = umiObjectTypesCollection::getInstance();
         $objectType = $objectTypes->getType($object->getTypeId());
         if ($hierarchyTypeId = $objectType->getHierarchyTypeId()) {
             $hierarchyTypes = umiHierarchyTypesCollection::getInstance();
             $hierarchyType = $hierarchyTypes->getType($hierarchyTypeId);
             $params['%object-type%'] = $hierarchyType->getTitle();
         }
     }
     $title = str_replace(array_keys($params), array_values($params), $title);
     $content = str_replace(array_keys($params), array_values($params), $content);
     $this->dispatchSystemEvent($title, $content);
 }
Exemplo n.º 10
0
		public function getReleaseMessages($iReleaseId = false) {
			$iHierarchyTypeId = umiHierarchyTypesCollection::getInstance()->getTypeByName("dispatches", "message")->getId();
			$iMsgTypeId =  umiObjectTypesCollection::getInstance()->getTypeByHierarchyTypeId($iHierarchyTypeId);
			$oMsgType = umiObjectTypesCollection::getInstance()->getType($iMsgTypeId);

			$sel = new selector('objects');
			$sel->types('object-type')->name('dispatches', 'message');
			if($iReleaseId) {
				$sel->where('release_reference')->equals($iReleaseId);
			}
			selectorHelper::detectFilters($sel);
			return $sel->result;
		}
Exemplo n.º 11
0
 public function config()
 {
     $mode = getRequest("param0");
     if ($mode == "do") {
         $this->saveEditedList("basetypes");
         $this->chooseRedirect();
     }
     $hierarchy_types = umiHierarchyTypesCollection::getInstance()->getTypesList();
     $this->setDataType("list");
     $this->setActionType("modify");
     $data = $this->prepareData($hierarchy_types, "hierarchy_types");
     $this->setData($data, sizeof($hierarchy_types));
     return $this->doData();
 }
 public function onChangeActivity(iUmiEventPoint $oEventPoint)
 {
     if ($oEventPoint->getMode() === "after") {
         $element = $oEventPoint->getRef("element");
         if (!$element->getIsActive()) {
             return true;
         }
         $type_id = $element->getTypeId();
         $type = umiHierarchyTypesCollection::getInstance()->getType($type_id);
         if ($type->getName() == "faq" && $type->getExt() == "question") {
             return $this->confirmUserAnswer($element);
         }
     }
 }
Exemplo n.º 13
0
 public static function getDatabaseStatus()
 {
     $result = array();
     $v1723bdd4ee51910267a625cae41ced8a = umiHierarchyTypesCollection::getInstance();
     $v9b81909fd0da3add2602a8d0ede0e4e7 = umiObjectTypesCollection::getInstance();
     $v3527525cd11a98e16f6c1d31fe7d89dd = $v1723bdd4ee51910267a625cae41ced8a->getTypesList();
     foreach ($v3527525cd11a98e16f6c1d31fe7d89dd as $v89b0b9deff65f8b9cd1f71bc74ce36ba) {
         $vacf567c9c3d6cf7c6e2cc0ce108e0631 = $v89b0b9deff65f8b9cd1f71bc74ce36ba->getId();
         $v4aa3988e15afb9618423a0c2961a469f = self::checkIfBranchedByHierarchyTypeId($vacf567c9c3d6cf7c6e2cc0ce108e0631);
         $v8be74552df93e31bbdd6b36ed74bdb6a = new umiSelection();
         $v8be74552df93e31bbdd6b36ed74bdb6a->addElementType($vacf567c9c3d6cf7c6e2cc0ce108e0631);
         $ve2942a04780e223b215eb8b663cf5353 = umiSelectionsParser::runSelectionCounts($v8be74552df93e31bbdd6b36ed74bdb6a);
         $result[] = array('id' => $vacf567c9c3d6cf7c6e2cc0ce108e0631, 'isBranched' => $v4aa3988e15afb9618423a0c2961a469f, 'count' => $ve2942a04780e223b215eb8b663cf5353);
     }
     return $result;
 }
Exemplo n.º 14
0
 public function id($vb80bb7740288fda1f201890375a60c8f)
 {
     if (is_array($vb80bb7740288fda1f201890375a60c8f)) {
         $result = null;
         foreach ($vb80bb7740288fda1f201890375a60c8f as $vb5210062221c584573e8e554dfcfd026) {
             $this->selector->types($this->typeClass)->id($vb5210062221c584573e8e554dfcfd026);
         }
         return $result;
     }
     switch ($this->typeClass) {
         case 'object-type':
             $v0e8133eb006c0f85ed9444ae07a60842 = umiObjectTypesCollection::getInstance();
             return $this->setObjectType($v0e8133eb006c0f85ed9444ae07a60842->getType($vb80bb7740288fda1f201890375a60c8f));
         case 'hierarchy-type':
             $v6942e8fa62b3cc9d93881a58210e2fd7 = umiHierarchyTypesCollection::getInstance();
             return $this->setHierarchyType($v6942e8fa62b3cc9d93881a58210e2fd7->getType($vb80bb7740288fda1f201890375a60c8f));
     }
 }
Exemplo n.º 15
0
 public function edit()
 {
     $element = $this->expectElement("param0");
     $mode = (string) getRequest('param1');
     $this->setHeaderLabel('header-blogs20-edit-' . $this->getObjectTypeMethod($element->getObject()));
     $inputData = array("element" => $element, "allowed-element-types" => array('post', 'blog', 'comment'));
     if ($mode == "do") {
         $this->saveEditedElementData($inputData);
         if ($element->getTypeId() == umiHierarchyTypesCollection::getInstance()->getTypeByName('blogs20', 'blog')->getId()) {
             permissionsCollection::getInstance()->setElementPermissions($element->getObject()->getOwnerId(), $element->getId(), 31);
         }
         $this->chooseRedirect();
     }
     $this->setDataType("form");
     $this->setActionType("modify");
     $data = $this->prepareData($inputData, "page");
     $this->setData($data);
     return $this->doData();
 }
 protected function translateData(iUmiObjectType $v599dcce2998a6b40b1e38e8c6006cb0a)
 {
     $v26b75b176d665f24a5fd22a2ad815763 = array();
     $v26b75b176d665f24a5fd22a2ad815763['attribute:id'] = $v599dcce2998a6b40b1e38e8c6006cb0a->getId();
     $v26b75b176d665f24a5fd22a2ad815763['attribute:guid'] = $v599dcce2998a6b40b1e38e8c6006cb0a->getGUID();
     $v26b75b176d665f24a5fd22a2ad815763['attribute:title'] = $v599dcce2998a6b40b1e38e8c6006cb0a->getName();
     $v26b75b176d665f24a5fd22a2ad815763['attribute:parent-id'] = $v599dcce2998a6b40b1e38e8c6006cb0a->getParentId();
     if (!is_null(getRequest('childs'))) {
         $v26b75b176d665f24a5fd22a2ad815763['attribute:parentId'] = $v599dcce2998a6b40b1e38e8c6006cb0a->getParentId();
     }
     if ($v599dcce2998a6b40b1e38e8c6006cb0a->getIsGuidable()) {
         $v26b75b176d665f24a5fd22a2ad815763['attribute:guide'] = "guide";
     }
     if ($v599dcce2998a6b40b1e38e8c6006cb0a->getIsPublic()) {
         $v26b75b176d665f24a5fd22a2ad815763['attribute:public'] = "public";
     }
     if ($v599dcce2998a6b40b1e38e8c6006cb0a->getIsLocked()) {
         $v26b75b176d665f24a5fd22a2ad815763['attribute:locked'] = "locked";
     }
     $vacf567c9c3d6cf7c6e2cc0ce108e0631 = $v599dcce2998a6b40b1e38e8c6006cb0a->getHierarchyTypeId();
     $v89b0b9deff65f8b9cd1f71bc74ce36ba = umiHierarchyTypesCollection::getInstance()->getType($vacf567c9c3d6cf7c6e2cc0ce108e0631);
     $v26b75b176d665f24a5fd22a2ad815763['base'] = $v89b0b9deff65f8b9cd1f71bc74ce36ba;
     if (!is_null(getRequest('childs'))) {
         $vadce578d04ed03c31f6ac59451fcf8e4 = umiObjectTypesCollection::getInstance()->getSubTypesList($v599dcce2998a6b40b1e38e8c6006cb0a->getId());
         $v26b75b176d665f24a5fd22a2ad815763['childs'] = sizeof($vadce578d04ed03c31f6ac59451fcf8e4);
     }
     if (!is_null(getRequest('links'))) {
         $v8b1dc169bf460ee884fceef66c6607d6 = cmsController::getInstance();
         $vd2541807149c8b40d74fc542ad179083 = $v8b1dc169bf460ee884fceef66c6607d6->getCurrentModule();
         $v22884db148f0ffb0d830ba431102b0b5 = $v8b1dc169bf460ee884fceef66c6607d6->getModule($vd2541807149c8b40d74fc542ad179083);
         if ($v22884db148f0ffb0d830ba431102b0b5 instanceof def_module) {
             $v807765384d9d5527da8848df14a4f02f = $v22884db148f0ffb0d830ba431102b0b5->getObjectTypeEditLink($v599dcce2998a6b40b1e38e8c6006cb0a->getId());
             $v26b75b176d665f24a5fd22a2ad815763['create-link'] = $v807765384d9d5527da8848df14a4f02f['create-link'];
             $v26b75b176d665f24a5fd22a2ad815763['edit-link'] = $v807765384d9d5527da8848df14a4f02f['edit-link'];
         }
     }
     if ($this->isFull) {
         $vea68f744cedffb995847405018cd8f7f = array();
         $vea68f744cedffb995847405018cd8f7f['nodes:group'] = $v599dcce2998a6b40b1e38e8c6006cb0a->getFieldsGroupsList(xmlTranslator::$showHiddenFieldGroups);
         $v26b75b176d665f24a5fd22a2ad815763['fieldgroups'] = $vea68f744cedffb995847405018cd8f7f;
     }
     return $v26b75b176d665f24a5fd22a2ad815763;
 }
Exemplo n.º 17
0
 public function import_old_blogs()
 {
     // Initializing collections
     $hierarchyTypesCollection = umiHierarchyTypesCollection::getInstance();
     $typesCollection = umiObjectTypesCollection::getInstance();
     $hierarchy = umiHierarchy::getInstance();
     $objects = umiObjectsCollection::getInstance();
     // Loading types info
     $blog20HType = $hierarchyTypesCollection->getTypeByName('blogs20', 'blog');
     $blog20Type = $typesCollection->getType($typesCollection->getTypeByHierarchyTypeId($blog20HType->getId()));
     $blog20PostHType = $hierarchyTypesCollection->getTypeByName('blogs20', 'post');
     $blog20PostType = $typesCollection->getType($typesCollection->getTypeByHierarchyTypeId($blog20PostHType->getId()));
     $blog20CommentHType = $hierarchyTypesCollection->getTypeByName('blogs20', 'comment');
     $blog20CommentType = $typesCollection->getType($typesCollection->getTypeByHierarchyTypeId($blog20CommentHType->getId()));
     $blogHType = $hierarchyTypesCollection->getTypeByName('blogs', 'blog');
     $blogType = $typesCollection->getType($typesCollection->getTypeByHierarchyTypeId($blogHType->getId()));
     $blogPostHType = $hierarchyTypesCollection->getTypeByName('blogs', 'blog_message');
     $blogPostType = $typesCollection->getType($typesCollection->getTypeByHierarchyTypeId($blogHType->getId()));
     $blogCommentHType = $hierarchyTypesCollection->getTypeByName('blogs', 'blog_comment');
     $blogCommentType = $typesCollection->getType($typesCollection->getTypeByHierarchyTypeId($blogHType->getId()));
     // Collecting all blogs
     $selection = new umiSelection();
     $selection->addElementType($blogHType->getId());
     $blogList = umiSelectionsParser::runSelection($selection);
     // Processing each blog
     foreach ($blogList as $blogId) {
         $blog = $hierarchy->getElement($blogId, true, false);
         $newBlogId = $this->makeElementFromExisting($blogId, $blog->getRel(), $blog20HType->getId(), array('content' => 'description', 'prvlist_friends' => 'friendlist'));
         $selection = new umiSelection();
         $selection->addElementType($blogPostHType->getId());
         $selection->addHierarchyFilter($blogId);
         $postList = umiSelectionsParser::runSelection($selection);
         foreach ($postList as $postId) {
             $newPostId = $this->makeElementFromExisting($postId, $newBlogId, $blog20PostHType->getId());
             $this->import_comments($postId, $newPostId, $blogCommentHType->getId(), $blog20CommentHType->getId());
         }
     }
     regedit::getInstance()->setVar("//modules/blogs20/import/old", 1);
     $this->chooseRedirect(getServer('HTTP_REFERER'));
     return null;
     // Never pass into here
 }
Exemplo n.º 18
0
 public static function getSubscriberByUserId($v7ad6e70c936a7223ff2f1663258f4a0a)
 {
     $va5a928b6b6b19de8a18398c7b29f47d7 = false;
     $vf7b7708e49b5e697e01291fdbb169c31 = umiHierarchyTypesCollection::getInstance()->getTypeByName("dispatches", "subscriber")->getId();
     $v3ec9f372b2dad35356b9884c89cf0ef2 = umiObjectTypesCollection::getInstance()->getTypeByHierarchyTypeId($vf7b7708e49b5e697e01291fdbb169c31);
     $vff500849b1c1163f66c899c7aec17813 = umiObjectTypesCollection::getInstance()->getType($v3ec9f372b2dad35356b9884c89cf0ef2);
     $v18ea1849dbf10a18b2dfd4ed0eb3a231 = new umiSelection();
     $v18ea1849dbf10a18b2dfd4ed0eb3a231->setObjectTypeFilter();
     $v18ea1849dbf10a18b2dfd4ed0eb3a231->addObjectType($v3ec9f372b2dad35356b9884c89cf0ef2);
     $v18ea1849dbf10a18b2dfd4ed0eb3a231->setPropertyFilter();
     $v18ea1849dbf10a18b2dfd4ed0eb3a231->addPropertyFilterEqual($vff500849b1c1163f66c899c7aec17813->getFieldId('uid'), $v7ad6e70c936a7223ff2f1663258f4a0a);
     $v2cf58721416a170aa34368186d661d4b = umiSelectionsParser::runSelection($v18ea1849dbf10a18b2dfd4ed0eb3a231);
     if (is_array($v2cf58721416a170aa34368186d661d4b) && count($v2cf58721416a170aa34368186d661d4b)) {
         $va5a928b6b6b19de8a18398c7b29f47d7 = $v2cf58721416a170aa34368186d661d4b[0];
     } else {
         $v5a459b4b428788e52383cf8fae051ef7 = umiObjectsCollection::getInstance()->getObject($v7ad6e70c936a7223ff2f1663258f4a0a);
         $vaddc9cff9d125716db26235ce1c09240 = $v5a459b4b428788e52383cf8fae051ef7->getValue("e-mail");
         $v2430d439812ab308abec75d804810a30 = $v5a459b4b428788e52383cf8fae051ef7->getValue("lname");
         $vd9c6a1a67112c4d88c9a572ac9cad3f5 = $v5a459b4b428788e52383cf8fae051ef7->getValue("fname");
         $vaa876bbb2f0018ef7348fccc805794af = $v5a459b4b428788e52383cf8fae051ef7->getValue("father_name");
         $vf572db796146381f0522cb8ba4a636e0 = $v5a459b4b428788e52383cf8fae051ef7->getValue("gender");
         $vf7b7708e49b5e697e01291fdbb169c31 = umiHierarchyTypesCollection::getInstance()->getTypeByName("dispatches", "subscriber")->getId();
         $v3ec9f372b2dad35356b9884c89cf0ef2 = umiObjectTypesCollection::getInstance()->getTypeByHierarchyTypeId($vf7b7708e49b5e697e01291fdbb169c31);
         $va5a928b6b6b19de8a18398c7b29f47d7 = umiObjectsCollection::getInstance()->addObject($vaddc9cff9d125716db26235ce1c09240, $v3ec9f372b2dad35356b9884c89cf0ef2);
         $vf674b89869b81fcedca2243c18bbcdd1 = umiObjectsCollection::getInstance()->getObject($va5a928b6b6b19de8a18398c7b29f47d7);
         if ($vf674b89869b81fcedca2243c18bbcdd1 instanceof umiObject) {
             $vf674b89869b81fcedca2243c18bbcdd1->setName($vaddc9cff9d125716db26235ce1c09240);
             $vf674b89869b81fcedca2243c18bbcdd1->setValue('lname', $v2430d439812ab308abec75d804810a30);
             $vf674b89869b81fcedca2243c18bbcdd1->setValue('fname', $vd9c6a1a67112c4d88c9a572ac9cad3f5);
             $vf674b89869b81fcedca2243c18bbcdd1->setValue('father_name', $vaa876bbb2f0018ef7348fccc805794af);
             $v61a9cd46c360819bab753cd29ccea4c4 = new umiDate(time());
             $vf674b89869b81fcedca2243c18bbcdd1->setValue('subscribe_date', $v61a9cd46c360819bab753cd29ccea4c4);
             $vf674b89869b81fcedca2243c18bbcdd1->setValue('gender', $vf572db796146381f0522cb8ba4a636e0);
             $vf674b89869b81fcedca2243c18bbcdd1->setValue('uid', $v7ad6e70c936a7223ff2f1663258f4a0a);
         }
         $vf674b89869b81fcedca2243c18bbcdd1->commit();
     }
     return $va5a928b6b6b19de8a18398c7b29f47d7;
 }
Exemplo n.º 19
0
 public function subscribers_list()
 {
     // input
     $iDispId = $_REQUEST['param0'];
     // set tab
     $this->sheets_set_active("subscribers_list");
     //input:
     $this->load_forms();
     $iCurrPage = (int) $_REQUEST['p'];
     $params = array();
     // gen banners list
     $params['rows'] = "";
     //
     $oSbsSelection = new umiSelection();
     $oSbsSelection->setObjectTypeFilter();
     $oSbsSelection->setLimitFilter();
     $oSbsSelection->addLimit($this->per_page, $iCurrPage);
     $iHierarchyTypeId = umiHierarchyTypesCollection::getInstance()->getTypeByName("dispatches", "subscriber")->getId();
     $iSbsTypeId = umiObjectTypesCollection::getInstance()->getTypeByHierarchyTypeId($iHierarchyTypeId);
     $oSbsType = umiObjectTypesCollection::getInstance()->getType($iSbsTypeId);
     $oSbsSelection->addObjectType($iSbsTypeId);
     // add curr dispatch filter
     if ($iDispId) {
         $oDispObj = umiObjectsCollection::getInstance()->getObject($iDispId);
         if ($oDispObj instanceof umiObject) {
             $oSbsSelection->setPropertyFilter();
             $oSbsSelection->addPropertyFilterEqual($oSbsType->getFieldId('subscriber_dispatches'), $iDispId);
         }
     }
     $arrSelResults = umiSelectionsParser::runSelection($oSbsSelection);
     $iCountResults = umiSelectionsParser::runSelectionCounts($oSbsSelection);
     $iSbsNum = $this->per_page * $iCurrPage;
     for ($iI = 0; $iI < count($arrSelResults); $iI++) {
         $params['rows'] .= self::renderSubscriber($arrSelResults[$iI], ++$iSbsNum);
     }
     $params['pages'] = $this->generateNumPage($iCountResults, $this->per_page, $iCurrPage);
     return $this->parse_form("subscribers_list", $params);
 }
Exemplo n.º 20
0
 public function getPagesByBaseTypeList($module, $method)
 {
     $hierarchyTypesCollection = umiHierarchyTypesCollection::getInstance();
     $hierarchy = umiHierarchy::getInstance();
     $type = $hierarchyTypesCollection->getTypeByName($module, $method);
     if ($type instanceof iUmiHierarchyType) {
         $type_id = $type->getId();
     } else {
         throw new publicException("Hierarchy type {$module}::{$method} doesn't exists");
     }
     $sel = new umiSelection();
     $sel->addElementType($type_id);
     $sel->addPermissions();
     $result = umiSelectionsParser::runSelection($sel);
     $pages = array();
     foreach ($result as $element_id) {
         $element = $hierarchy->getElement($element_id);
         if ($element instanceof umiHierarchyElement) {
             $pages[] = $element;
         }
     }
     return array("pages" => array("nodes:page" => $pages));
 }
 protected function translateData(iUmiObject $va8cfde6331bd59eb2ac96f8911c4b666)
 {
     $v16b2b26000987faccb260b9d39df1269 = $va8cfde6331bd59eb2ac96f8911c4b666->getId();
     $v26b75b176d665f24a5fd22a2ad815763 = array();
     $v26b75b176d665f24a5fd22a2ad815763['attribute:id'] = $v16b2b26000987faccb260b9d39df1269;
     $v26b75b176d665f24a5fd22a2ad815763['attribute:guid'] = $va8cfde6331bd59eb2ac96f8911c4b666->getGUID();
     $v26b75b176d665f24a5fd22a2ad815763['attribute:name'] = $va8cfde6331bd59eb2ac96f8911c4b666->getName();
     $v26b75b176d665f24a5fd22a2ad815763['attribute:type-id'] = $va8cfde6331bd59eb2ac96f8911c4b666->getTypeId();
     $v26b75b176d665f24a5fd22a2ad815763['attribute:type-guid'] = $va8cfde6331bd59eb2ac96f8911c4b666->getTypeGUID();
     $vb0ab4f7791b60b1e8ea01057b77873b0 = $va8cfde6331bd59eb2ac96f8911c4b666->getOwnerId();
     if ($vb0ab4f7791b60b1e8ea01057b77873b0) {
         $v26b75b176d665f24a5fd22a2ad815763['attribute:ownerId'] = $vb0ab4f7791b60b1e8ea01057b77873b0;
     }
     if ($this->isFull === false) {
         $v26b75b176d665f24a5fd22a2ad815763['xlink:href'] = "uobject://" . $v16b2b26000987faccb260b9d39df1269;
         return $v26b75b176d665f24a5fd22a2ad815763;
     }
     $v6301cee35ea764a1e241978f93f01069 = $va8cfde6331bd59eb2ac96f8911c4b666->getTypeId();
     $v726e8e4809d4c1b28a6549d86436a124 = umiObjectTypesCollection::getInstance()->getType($v6301cee35ea764a1e241978f93f01069);
     $v143fdbfa2afa490e521056bd5040d5fd = $v726e8e4809d4c1b28a6549d86436a124->getFieldsGroupsList();
     if (!is_null(getRequest('links'))) {
         $v8b1dc169bf460ee884fceef66c6607d6 = cmsController::getInstance();
         $vef8eea3357eeef6f5ddb3d707ff0e8e8 = umiHierarchyTypesCollection::getInstance();
         $v9b81909fd0da3add2602a8d0ede0e4e7 = umiObjectTypesCollection::getInstance();
         $v641ee90996ed9781bf72b559b9c90742 = $v726e8e4809d4c1b28a6549d86436a124;
         $v865c0c0b4ab0e063e5caa3387c1a8741 = 0;
         do {
             $vacf567c9c3d6cf7c6e2cc0ce108e0631 = $v641ee90996ed9781bf72b559b9c90742->getHierarchyTypeId();
             $v89b0b9deff65f8b9cd1f71bc74ce36ba = $vef8eea3357eeef6f5ddb3d707ff0e8e8->getType($vacf567c9c3d6cf7c6e2cc0ce108e0631);
             if ($v641ee90996ed9781bf72b559b9c90742->getParentId()) {
                 $v641ee90996ed9781bf72b559b9c90742 = $v9b81909fd0da3add2602a8d0ede0e4e7->getType($v641ee90996ed9781bf72b559b9c90742->getParentId());
                 break;
             }
             if ($v641ee90996ed9781bf72b559b9c90742->getParentId() == 0) {
                 break;
             }
         } while (!$v89b0b9deff65f8b9cd1f71bc74ce36ba && $v641ee90996ed9781bf72b559b9c90742);
         if ($v89b0b9deff65f8b9cd1f71bc74ce36ba instanceof iUmiHierarchyType) {
             $v52a43e48ec4649dee819dadabcab1bde = $v89b0b9deff65f8b9cd1f71bc74ce36ba->getName();
             $vddaa6e8c8c412299272e183087b8f7b6 = $v89b0b9deff65f8b9cd1f71bc74ce36ba->getExt();
             if ($ve52043002b9b5525cbc3f3bee69ff9b4 = $v8b1dc169bf460ee884fceef66c6607d6->getModule($v52a43e48ec4649dee819dadabcab1bde)) {
                 $v2a304a1348456ccd2234cd71a81bd338 = $ve52043002b9b5525cbc3f3bee69ff9b4->getObjectEditLink($v16b2b26000987faccb260b9d39df1269, $vddaa6e8c8c412299272e183087b8f7b6);
                 if ($v2a304a1348456ccd2234cd71a81bd338 !== false) {
                     $v26b75b176d665f24a5fd22a2ad815763['edit-link'] = $v2a304a1348456ccd2234cd71a81bd338;
                 }
             }
         }
         if (!isset($v26b75b176d665f24a5fd22a2ad815763['edit-link']) && $v8b1dc169bf460ee884fceef66c6607d6->getCurrentModule() == 'data' && $v8b1dc169bf460ee884fceef66c6607d6->getCurrentMethod() == 'guide_items') {
             $v764b2484f7ecf6b627a89fd3f7fe9f3d = $v8b1dc169bf460ee884fceef66c6607d6->getModule('data');
             $v26b75b176d665f24a5fd22a2ad815763['edit-link'] = $v764b2484f7ecf6b627a89fd3f7fe9f3d->getObjectEditLink($v16b2b26000987faccb260b9d39df1269);
         }
     }
     $v26b75b176d665f24a5fd22a2ad815763['properties'] = array();
     $v26b75b176d665f24a5fd22a2ad815763['properties']['nodes:group'] = array();
     $v865c0c0b4ab0e063e5caa3387c1a8741 = 0;
     foreach ($v143fdbfa2afa490e521056bd5040d5fd as $vdb0f6f37ebeb6ea09489124345af2a45) {
         $v71ea3b11aebda17ad80b6499a6ab6fb0 = array();
         $v03f2ce8694aef1464a97f254c78a26ae = translatorWrapper::get($vdb0f6f37ebeb6ea09489124345af2a45);
         $v71ea3b11aebda17ad80b6499a6ab6fb0 = $v03f2ce8694aef1464a97f254c78a26ae->translateProperties($vdb0f6f37ebeb6ea09489124345af2a45, $va8cfde6331bd59eb2ac96f8911c4b666);
         if (!empty($v71ea3b11aebda17ad80b6499a6ab6fb0)) {
             $v26b75b176d665f24a5fd22a2ad815763['properties']['nodes:group'][getRequest('jsonMode') == "force" ? $v865c0c0b4ab0e063e5caa3387c1a8741++ : ++$v865c0c0b4ab0e063e5caa3387c1a8741] = $v71ea3b11aebda17ad80b6499a6ab6fb0;
         }
     }
     if (sizeof($v26b75b176d665f24a5fd22a2ad815763['properties']['nodes:group']) == 0) {
         unset($v26b75b176d665f24a5fd22a2ad815763['properties']);
     }
     return $v26b75b176d665f24a5fd22a2ad815763;
 }
Exemplo n.º 22
0
 protected function collection()
 {
     switch ($this->requestedType) {
         case 'object':
             return umiObjectsCollection::getInstance();
         case 'page':
             return umiHierarchy::getInstance();
         case 'object-type':
             return umiObjectTypesCollection::getInstance();
         case 'hierarchy-type':
             return umiHierarchyTypesCollection::getInstance();
         case 'field':
             return umiFieldsCollection::getInstance();
         case 'field-type':
             return umiFieldTypesCollection::getInstance();
         case 'domain':
             return domainsCollection::getInstance();
         case 'lang':
             return langsCollection::getInstance();
     }
 }
Exemplo n.º 23
0
 public function edit()
 {
     $object = $this->expectObject("param0");
     $mode = (string) getRequest('param1');
     $this->setHeaderLabel("header-dispatches-edit-" . $this->getObjectTypeMethod($object));
     if ($mode == "do") {
         $this->saveEditedObjectData($object);
         $this->chooseRedirect();
     }
     $this->setDataType("form");
     $this->setActionType("modify");
     $data = $this->prepareData($object, "object");
     $iTypeId = $object->getTypeId();
     $iHTypeId = umiObjectTypesCollection::getInstance()->getType($iTypeId)->getHierarchyTypeId();
     $oHType = umiHierarchyTypesCollection::getInstance()->getType($iHTypeId);
     if ($oHType->getExt() == 'dispatch') {
         $iReleaseId = $this->getNewReleaseInstanceId($object->getId());
         $arrMess = $this->getReleaseMessages($iReleaseId);
         $data['object']['release'] = array();
         $data['object']['release']['nodes:message'] = $arrMess;
     }
     $this->setData($data);
     return $this->doData();
 }
Exemplo n.º 24
0
 public function addNewPicasaPhotoalbum($title, $body)
 {
     $hierarchy = umiHierarchy::getInstance();
     $hierarchyTypes = umiHierarchyTypesCollection::getInstance();
     $cmsController = cmsController::getInstance();
     $hierarchy_type_id = $hierarchyTypes->getTypeByName("photoalbum", "album")->getId();
     $element_id = $hierarchy->addElement(0, $hierarchy_type_id, $title, $title);
     permissionsCollection::getInstance()->setDefaultPermissions($element_id);
     $element = $hierarchy->getElement($element_id, true);
     $element->setIsActive(true);
     $element->setIsVisible(false);
     $element->setName($title);
     $element->setValue("h1", $title);
     $element->setValue("descr", $body);
     $element->setValue("create_time", time());
     $element->commit();
     return $element_id;
 }
Exemplo n.º 25
0
 public function getMethod()
 {
     $vacf567c9c3d6cf7c6e2cc0ce108e0631 = $this->getHierarchyTypeId();
     $v89b0b9deff65f8b9cd1f71bc74ce36ba = umiHierarchyTypesCollection::getInstance()->getType($vacf567c9c3d6cf7c6e2cc0ce108e0631);
     if ($v89b0b9deff65f8b9cd1f71bc74ce36ba instanceof umiHierarchyType) {
         return $v89b0b9deff65f8b9cd1f71bc74ce36ba->getExt();
     } else {
         return false;
     }
 }
Exemplo n.º 26
0
 public function addNewsItem()
 {
     $hierarchy = umiHierarchy::getInstance();
     $hierarchyTypes = umiHierarchyTypesCollection::getInstance();
     $objectTypes = umiObjectTypesCollection::getInstance();
     $cmsController = cmsController::getInstance();
     $parent_id = (int) getRequest('param0');
     $object_type_id = (int) getRequest('param1');
     $title = htmlspecialchars(trim(getRequest('title')));
     $parentElement = $hierarchy->getElement($parent_id);
     $tpl_id = $parentElement->getTplId();
     $domain_id = $parentElement->getDomainId();
     $lang_id = $parentElement->getLangId();
     $hierarchy_type_id = $hierarchyTypes->getTypeByName("news", "item")->getId();
     if (!$object_type_id) {
         $object_type_id = $objectTypes->getBaseType("news", "item");
     }
     $object_type = $objectTypes->getType($object_type_id);
     if ($object_type->getHierarchyTypeId() != $hierarchy_type_id) {
         $this->errorNewMessage("Object type and hierarchy type doesn't match");
         $this->errorPanic();
     }
     $element_id = $hierarchy->addElement($parent_id, $hierarchy_type_id, $title, $title, $object_type_id, $domain_id, $lang_id, $tpl_id);
     $users = $cmsController->getModule("users");
     if ($users instanceof def_module) {
         $users->setDefaultPermissions($element_id);
     }
     $element = $hierarchy->getElement($element_id, true);
     $element->setIsActive(true);
     $element->setIsVisible(false);
     $element->setName($title);
     $element->commit();
     $parentElement->setUpdateTime(time());
     $parentElement->commit();
     if ($is_xslt) {
         return array("node:result" => "ok");
     } else {
         $this->redirect($referer_url);
     }
 }
Exemplo n.º 27
0
 public function placeOnPage()
 {
     $formId = getRequest('param0');
     if (!$formId) {
         $this->chooseRedirect(getServer('HTTP_REFERER'));
     }
     $form = umiObjectTypesCollection::getInstance()->getType($formId);
     $typeid = umiHierarchyTypesCollection::getInstance()->getTypeByName('webforms', 'page')->getId();
     $formName = $form->getName();
     $hierarchy = umiHierarchy::getInstance();
     $pageId = $hierarchy->addElement(0, $typeid, $formName, $formName);
     permissionsCollection::getInstance()->setDefaultPermissions($pageId);
     $page = $hierarchy->getElement($pageId);
     $page->setIsActive(true);
     $page->setValue('form_id', $formId);
     $page->setValue('title', $formName);
     $page->setValue('h1', $formName);
     $page->setValue('content', '%webforms add(' . $formId . ')%');
     $page->commit();
     $this->chooseRedirect('/admin/content/edit/' . $pageId . '/');
 }
Exemplo n.º 28
0
 public function checkAllowedColumn(iUmiObject $object, $propName)
 {
     $userTypeId = umiHierarchyTypesCollection::getInstance()->getTypeByName('users', 'user')->getId();
     $isSv = permissionsCollection::getInstance()->isSv();
     $isObjectCustomer = $object->getTypeGUID() == 'emarket-customer';
     $isObjectUser = umiObjectTypesCollection::getInstance()->getType($object->getTypeId())->getHierarchyTypeId() == $userTypeId;
     $notAllowedProps = array('bonus', 'spent_bonus', 'filemanager_directory', 'groups');
     if (!$isSv && ($isObjectCustomer || $isObjectUser)) {
         if (in_array($propName, $notAllowedProps)) {
             return false;
         }
     }
     return true;
 }
 public function onCommentAdd(iUmiEventPoint $oEventPoint)
 {
     $regedit = regedit::getInstance();
     if (!$regedit->getVal("//modules/blogs20/notifications/on_comment_add")) {
         return;
     }
     $template = ($tmp = $oEventPoint->getParam('template')) ? $tmp : 'default';
     $commentId = $oEventPoint->getParam('id');
     $hierarchy = umiHierarchy::getInstance();
     $collection = umiObjectsCollection::getInstance();
     $parentId = $hierarchy->getElement($commentId, true)->getRel();
     $element = $hierarchy->getElement($parentId);
     $postHtypeId = umiHierarchyTypesCollection::getInstance()->getTypeByName('blogs20', 'post')->getId();
     $post = $element;
     if ($post instanceof umiHierarchyElement == false) {
         return false;
     }
     while ($post->getTypeId() != $postHtypeId) {
         $post = $hierarchy->getElement($post->getRel(), true);
     }
     if ($element->getTypeId() == $postHtypeId) {
         $parentOwner = $collection->getObject($element->getObject()->getOwnerId());
         if (!$parentOwner instanceof umiObject) {
             return false;
         }
         $email = $parentOwner->getValue('e-mail');
         $nick = $parentOwner->getValue('login');
         $fname = $parentOwner->getValue('fname');
         $lname = $parentOwner->getValue('lname');
         $patr = $parentOwner->getValue('father_name');
         $name = strlen($fname) ? $fname . ' ' . $patr . ' ' . $lname : $nick;
         list($tplSubject, $tplBody) = def_module::loadTemplatesForMail('blogs20/mail/' . $template, 'comment_for_post_subj', 'comment_for_post_body');
     } else {
         $parentOwner = $collection->getObject($element->getValue('author_id'));
         if ($parentOwner->getValue('is_registrated')) {
             $user = $collection->getObject($parentOwner->getValue('user_id'));
             $email = $user->getValue('e-mail');
             $nick = $user->getValue('login');
             $fname = $user->getValue('fname');
             $lname = $user->getValue('lname');
             $patr = $user->getValue('father_name');
             $name = strlen($fname) ? $fname . ' ' . $patr . ' ' . $lname : $nick;
         } else {
             $email = $parentOwner->getValue('email');
             $name = $parentOwner->getValue('nickname');
         }
         list($tplSubject, $tplBody) = def_module::loadTemplatesForMail('blogs20/mail/' . $template, 'comment_for_comment_subj', 'comment_for_comment_body');
     }
     $aParams = array();
     $aParams['name'] = $name;
     $aParams['link'] = 'http://' . cmsController::getInstance()->getCurrentDomain()->getHost() . $hierarchy->getPathById($post->getId()) . '#comment_' . $commentId;
     $subject = def_module::parseTemplateForMail($tplSubject, $aParams);
     $body = def_module::parseTemplateForMail($tplBody, $aParams);
     $fromEmail = $regedit->getVal("//settings/email_from");
     $fromName = $regedit->getVal("//settings/fio_from");
     $oMail = new umiMail();
     $oMail->addRecipient($email, $name);
     $oMail->setFrom($fromEmail, $fromName);
     $oMail->setSubject($subject);
     $oMail->setContent($body);
     $oMail->commit();
     $oMail->send();
 }
Exemplo n.º 30
0
 protected function getTargets(DOMElement $v8d33e0fd532b847a73062a9f30dccada)
 {
     $v3d788fa62d7c185a1bee4c9147ee1091 = new DOMXPath($this->dom);
     $vca15fd43dfaeb80eb8c125735e0479b0 = $v3d788fa62d7c185a1bee4c9147ee1091->evaluate("target", $v8d33e0fd532b847a73062a9f30dccada);
     $v8e65decc3598d3ebebcb735b16acf53f = $vca15fd43dfaeb80eb8c125735e0479b0->item(0);
     if ($v8e65decc3598d3ebebcb735b16acf53f) {
         $v93b57534feb532c2db47a4613b99506d = (string) $v8e65decc3598d3ebebcb735b16acf53f->getAttribute("result");
         if (!$v93b57534feb532c2db47a4613b99506d) {
             $v93b57534feb532c2db47a4613b99506d = (string) $v8e65decc3598d3ebebcb735b16acf53f->getAttribute("expected-result");
         }
         $vb8c8ec69026adfe891bf5e618eabb17b = (string) $v8e65decc3598d3ebebcb735b16acf53f->getAttribute("force-hierarchy");
         if (isset($this->modes[$v93b57534feb532c2db47a4613b99506d])) {
             if (strpos($v93b57534feb532c2db47a4613b99506d, " ") !== false) {
                 $this->forceCounts = true;
                 $this->forceCounts = true;
             }
             $v93b57534feb532c2db47a4613b99506d = $this->modes[$v93b57534feb532c2db47a4613b99506d];
             $this->mode = $v93b57534feb532c2db47a4613b99506d;
             $v737704c3c45329f589b09345a41dd3de = $this->mode != 'count' ? $this->mode : ($vb8c8ec69026adfe891bf5e618eabb17b ? 'pages' : 'objects');
             $this->sel = new selector($this->mode);
             $v52f1e208e3cee17087c7c698eee42fcd = $this->sel;
             if ($this->mode == 'pages') {
                 $vcaa44eb065cddfc7ede1950adcea56a5 = $v3d788fa62d7c185a1bee4c9147ee1091->evaluate("domain", $v8e65decc3598d3ebebcb735b16acf53f);
                 if ($vcaa44eb065cddfc7ede1950adcea56a5->length > 0) {
                     $v204aadf644884156d194b4fccb7a101a = $vcaa44eb065cddfc7ede1950adcea56a5->item(0);
                     $vad5f82e879a9c5d6b5b442eb37e50551 = $v204aadf644884156d194b4fccb7a101a->nodeValue;
                     if (!is_numeric($vad5f82e879a9c5d6b5b442eb37e50551)) {
                         $vad5f82e879a9c5d6b5b442eb37e50551 = domainsCollection::getInstance()->getDomainId($vad5f82e879a9c5d6b5b442eb37e50551);
                     }
                     if ($vad5f82e879a9c5d6b5b442eb37e50551 && domainsCollection::getInstance()->isExists($vad5f82e879a9c5d6b5b442eb37e50551)) {
                         $v52f1e208e3cee17087c7c698eee42fcd->where('domain')->equals($vad5f82e879a9c5d6b5b442eb37e50551);
                     }
                 }
             }
         } else {
             return false;
         }
     } else {
         return false;
     }
     $vca15fd43dfaeb80eb8c125735e0479b0 = $v3d788fa62d7c185a1bee4c9147ee1091->evaluate("target/type");
     foreach ($vca15fd43dfaeb80eb8c125735e0479b0 as $v8d90d57cd5d62bf377f6f8bc0cffc325) {
         $v5f694956811487225d15e973ca38fbab = $v8d90d57cd5d62bf377f6f8bc0cffc325->getAttribute("id");
         $v34fcf34df8c8ba155d0eaed678a799d7 = $v8d90d57cd5d62bf377f6f8bc0cffc325->getAttribute("module");
         $ve0ffc5711775f5b9d18ed1235050612f = $v8d90d57cd5d62bf377f6f8bc0cffc325->getAttribute("method");
         $v5f694956811487225d15e973ca38fbab = $this->parseInputParams($v5f694956811487225d15e973ca38fbab);
         $v34fcf34df8c8ba155d0eaed678a799d7 = $this->parseInputParams($v34fcf34df8c8ba155d0eaed678a799d7);
         $ve0ffc5711775f5b9d18ed1235050612f = $this->parseInputParams($ve0ffc5711775f5b9d18ed1235050612f);
         if ($v5f694956811487225d15e973ca38fbab) {
             $this->lastTypeId = $v5f694956811487225d15e973ca38fbab;
             $v52f1e208e3cee17087c7c698eee42fcd->types('object-type')->id((int) $v5f694956811487225d15e973ca38fbab);
             continue;
         }
         if ($v34fcf34df8c8ba155d0eaed678a799d7 && $ve0ffc5711775f5b9d18ed1235050612f) {
             $v89b0b9deff65f8b9cd1f71bc74ce36ba = umiHierarchyTypesCollection::getInstance()->getTypeByName($v34fcf34df8c8ba155d0eaed678a799d7, $ve0ffc5711775f5b9d18ed1235050612f);
             if ($v89b0b9deff65f8b9cd1f71bc74ce36ba instanceof iUmiHierarchyType) {
                 $v5f694956811487225d15e973ca38fbab = umiObjectTypesCollection::getInstance()->getTypeByHierarchyTypeId($v89b0b9deff65f8b9cd1f71bc74ce36ba->getId());
                 $this->lastTypeId = $v5f694956811487225d15e973ca38fbab;
                 if ($this->mode == "pages") {
                     $v52f1e208e3cee17087c7c698eee42fcd->types('hierarchy-type')->id($v89b0b9deff65f8b9cd1f71bc74ce36ba->getId());
                     continue;
                 }
                 if ($this->mode == "objects") {
                     $v52f1e208e3cee17087c7c698eee42fcd->types('object-type')->id((int) $v5f694956811487225d15e973ca38fbab);
                 }
             } else {
                 continue;
             }
         }
     }
 }