Ejemplo n.º 1
0
 public function stream_open($vd6fe1d0be6347b8ef2427fa629c04485, $v15d61712450a686a7f365adf4fef581f, $v93da65a9fd0004d9477aeac024e08e15, $v6385a5865e0b96f09e4142ab2d9e3736)
 {
     $vb99eb979e6f6efabc396f777b503f7e7 = cacheFrontend::getInstance();
     if ($v8d777f385d3dfec8815d20f7496026dc = $vb99eb979e6f6efabc396f777b503f7e7->loadData($vd6fe1d0be6347b8ef2427fa629c04485)) {
         return $this->setData($v8d777f385d3dfec8815d20f7496026dc);
     }
     $vaf31437ce61345f416579830a98c91e5 = $this->parsePath($vd6fe1d0be6347b8ef2427fa629c04485);
     $va8cfde6331bd59eb2ac96f8911c4b666 = umiObjectsCollection::getInstance()->getObject($vaf31437ce61345f416579830a98c91e5);
     if ($va8cfde6331bd59eb2ac96f8911c4b666 instanceof iUmiObject) {
         if (is_null($this->prop_name)) {
             $v164d124aa1de584618cde85506eb8cd4 = translatorWrapper::$showEmptyFields;
             if (!is_null(getArrayKey($this->params, 'show-empty'))) {
                 translatorWrapper::$showEmptyFields = true;
             }
             $v8d777f385d3dfec8815d20f7496026dc = $this->translateToXml($va8cfde6331bd59eb2ac96f8911c4b666);
             translatorWrapper::$showEmptyFields = $v164d124aa1de584618cde85506eb8cd4;
         } else {
             $v23a5b8ab834cb5140fa6665622eb6417 = $va8cfde6331bd59eb2ac96f8911c4b666->getPropByName($this->prop_name);
             if ($v23a5b8ab834cb5140fa6665622eb6417 instanceof iUmiObjectProperty) {
                 $v8d777f385d3dfec8815d20f7496026dc = $this->translateToXml($va8cfde6331bd59eb2ac96f8911c4b666, $v23a5b8ab834cb5140fa6665622eb6417);
             } else {
                 return $this->setDataError('not-found');
             }
         }
         if ($this->expire) {
             $vb99eb979e6f6efabc396f777b503f7e7->saveObject($vd6fe1d0be6347b8ef2427fa629c04485, $v8d777f385d3dfec8815d20f7496026dc, $this->expire);
         }
         return $this->setData($v8d777f385d3dfec8815d20f7496026dc);
     } else {
         return $this->setDataError('not-found');
     }
 }
Ejemplo n.º 2
0
 public function stream_open($vd6fe1d0be6347b8ef2427fa629c04485, $v15d61712450a686a7f365adf4fef581f, $v93da65a9fd0004d9477aeac024e08e15, $v6385a5865e0b96f09e4142ab2d9e3736)
 {
     $vb99eb979e6f6efabc396f777b503f7e7 = cacheFrontend::getInstance();
     if ($v8d777f385d3dfec8815d20f7496026dc = $vb99eb979e6f6efabc396f777b503f7e7->loadData($vd6fe1d0be6347b8ef2427fa629c04485)) {
         return $this->setData($v8d777f385d3dfec8815d20f7496026dc);
     }
     $v7057e8409c7c531a1a6e9ac3df4ed549 = $this->parsePath($vd6fe1d0be6347b8ef2427fa629c04485);
     $v8e2dcfd7e7e24b1ca76c1193f645902b = umiHierarchy::getInstance()->getElement($v7057e8409c7c531a1a6e9ac3df4ed549);
     if ($v8e2dcfd7e7e24b1ca76c1193f645902b instanceof iUmiHierarchyElement) {
         if (is_null($this->prop_name)) {
             $v164d124aa1de584618cde85506eb8cd4 = translatorWrapper::$showEmptyFields;
             if (!is_null(getArrayKey($this->params, 'show-empty'))) {
                 translatorWrapper::$showEmptyFields = true;
             }
             $v8d777f385d3dfec8815d20f7496026dc = $this->translateToXml($v8e2dcfd7e7e24b1ca76c1193f645902b);
             translatorWrapper::$showEmptyFields = $v164d124aa1de584618cde85506eb8cd4;
         } else {
             $v23a5b8ab834cb5140fa6665622eb6417 = $v8e2dcfd7e7e24b1ca76c1193f645902b->getObject()->getPropByName($this->prop_name);
             if ($v23a5b8ab834cb5140fa6665622eb6417 instanceof iUmiObjectProperty) {
                 $v8d777f385d3dfec8815d20f7496026dc = $this->translateToXml($v8e2dcfd7e7e24b1ca76c1193f645902b, $v23a5b8ab834cb5140fa6665622eb6417);
             } else {
                 return $this->setDataError('not-found');
             }
         }
         if ($this->expire) {
             $vb99eb979e6f6efabc396f777b503f7e7->saveData($vd6fe1d0be6347b8ef2427fa629c04485, $v8d777f385d3dfec8815d20f7496026dc, $this->expire);
         }
         return $this->setData($v8d777f385d3dfec8815d20f7496026dc);
     } else {
         return $this->setDataError('not-found');
     }
 }
 private function loadTypes()
 {
     $vb99eb979e6f6efabc396f777b503f7e7 = cacheFrontend::getInstance();
     $vda80b9ab86c2d00b85de0cf003cb3e6e = $vb99eb979e6f6efabc396f777b503f7e7->loadData('hierarchy_types');
     if (!is_array($vda80b9ab86c2d00b85de0cf003cb3e6e)) {
         $vac5c74b64b4b8352ef2f181affb5ac2a = "SELECT  `id`, `name`, `title`, `ext` FROM `cms3_hierarchy_types` ORDER BY `name`, `ext`";
         $result = l_mysql_query($vac5c74b64b4b8352ef2f181affb5ac2a);
         $vda80b9ab86c2d00b85de0cf003cb3e6e = array();
         while (list($vb80bb7740288fda1f201890375a60c8f) = $vf1965a857bc285d26fe22023aa5ab50d = mysql_fetch_row($result)) {
             $vda80b9ab86c2d00b85de0cf003cb3e6e[$vb80bb7740288fda1f201890375a60c8f] = $vf1965a857bc285d26fe22023aa5ab50d;
         }
         $vb99eb979e6f6efabc396f777b503f7e7->saveData('hierarchy_types', $vda80b9ab86c2d00b85de0cf003cb3e6e, 3600);
     }
     foreach ($vda80b9ab86c2d00b85de0cf003cb3e6e as $vb80bb7740288fda1f201890375a60c8f => $vf1965a857bc285d26fe22023aa5ab50d) {
         $v599dcce2998a6b40b1e38e8c6006cb0a = $vb99eb979e6f6efabc396f777b503f7e7->load($vb80bb7740288fda1f201890375a60c8f, 'element_type');
         if ($v599dcce2998a6b40b1e38e8c6006cb0a instanceof iUmiHierarchyType == false) {
             try {
                 $v599dcce2998a6b40b1e38e8c6006cb0a = new umiHierarchyType($vb80bb7740288fda1f201890375a60c8f, $vf1965a857bc285d26fe22023aa5ab50d);
             } catch (privateException $ve1671797c52e15f763380b45e841ec32) {
                 continue;
             }
             $vb99eb979e6f6efabc396f777b503f7e7->save($v599dcce2998a6b40b1e38e8c6006cb0a, 'element_type');
         }
         $this->types[$vb80bb7740288fda1f201890375a60c8f] = $v599dcce2998a6b40b1e38e8c6006cb0a;
     }
     return true;
 }
Ejemplo n.º 4
0
 public function stream_open($vd6fe1d0be6347b8ef2427fa629c04485, $v15d61712450a686a7f365adf4fef581f, $v93da65a9fd0004d9477aeac024e08e15, $v6385a5865e0b96f09e4142ab2d9e3736)
 {
     $vb99eb979e6f6efabc396f777b503f7e7 = cacheFrontend::getInstance();
     if ($v8d777f385d3dfec8815d20f7496026dc = $vb99eb979e6f6efabc396f777b503f7e7->loadData($vd6fe1d0be6347b8ef2427fa629c04485)) {
         return $this->setData($v8d777f385d3dfec8815d20f7496026dc);
     }
     $v264a818e305e0550c3ee63761dd3d911 = $this->parsePath($vd6fe1d0be6347b8ef2427fa629c04485);
     try {
         if (!is_array($v8d777f385d3dfec8815d20f7496026dc)) {
             $v8d777f385d3dfec8815d20f7496026dc = $this->executeMacros($v264a818e305e0550c3ee63761dd3d911);
             if ($v8d777f385d3dfec8815d20f7496026dc === false) {
                 $v8d777f385d3dfec8815d20f7496026dc = array('error' => array('attribute:code' => 'require-more-permissions', 'node:message' => getLabel('error-require-more-permissions')));
             }
         }
     } catch (publicException $ve1671797c52e15f763380b45e841ec32) {
         $vcb5e100e5a9a3e7f6d1fd97512215282 = array();
         if ($v8e95bd427d65fbeeedb980f640074ea2 = $ve1671797c52e15f763380b45e841ec32->getCode()) {
             $vcb5e100e5a9a3e7f6d1fd97512215282['attribute:code'] = $v8e95bd427d65fbeeedb980f640074ea2;
         }
         if ($v1634f20805d929bd08a1f418a78c0615 = $ve1671797c52e15f763380b45e841ec32->getStrCode()) {
             $vcb5e100e5a9a3e7f6d1fd97512215282['attribute:str-code'] = $v1634f20805d929bd08a1f418a78c0615;
         }
         $vcb5e100e5a9a3e7f6d1fd97512215282['node:message'] = $ve1671797c52e15f763380b45e841ec32->getMessage();
         $v8d777f385d3dfec8815d20f7496026dc = array("error" => $vcb5e100e5a9a3e7f6d1fd97512215282);
     }
     if ($v8d777f385d3dfec8815d20f7496026dc === false) {
         return true;
     } else {
         $v8d777f385d3dfec8815d20f7496026dc = $this->translateToXml(getArrayKey($v264a818e305e0550c3ee63761dd3d911, 'module'), getArrayKey($v264a818e305e0550c3ee63761dd3d911, 'method'), $v8d777f385d3dfec8815d20f7496026dc);
         if ($this->expire) {
             $vb99eb979e6f6efabc396f777b503f7e7->saveData($vd6fe1d0be6347b8ef2427fa629c04485, $v8d777f385d3dfec8815d20f7496026dc, $this->expire);
         }
         return $this->setData($v8d777f385d3dfec8815d20f7496026dc);
     }
 }
Ejemplo n.º 5
0
 public function stream_open($vd6fe1d0be6347b8ef2427fa629c04485, $v15d61712450a686a7f365adf4fef581f, $v93da65a9fd0004d9477aeac024e08e15, $v6385a5865e0b96f09e4142ab2d9e3736)
 {
     $vb99eb979e6f6efabc396f777b503f7e7 = cacheFrontend::getInstance();
     if ($v8d777f385d3dfec8815d20f7496026dc = $vb99eb979e6f6efabc396f777b503f7e7->loadData($vd6fe1d0be6347b8ef2427fa629c04485)) {
         return $this->setData($v8d777f385d3dfec8815d20f7496026dc);
     }
     $v94757cae63fd3e398c0811a976dd6bbe = $this->parsePath($vd6fe1d0be6347b8ef2427fa629c04485);
     $vdb6d9b451b818ccc9a449383f2f0c450 = umiObjectTypesCollection::getInstance();
     if (is_array($v94757cae63fd3e398c0811a976dd6bbe)) {
         $vd14a8022b085f9ef19d479cbdd581127 = array();
         foreach ($v94757cae63fd3e398c0811a976dd6bbe as $vb80bb7740288fda1f201890375a60c8f) {
             $vd14a8022b085f9ef19d479cbdd581127[] = $vdb6d9b451b818ccc9a449383f2f0c450->getType($vb80bb7740288fda1f201890375a60c8f);
         }
     } else {
         $vd14a8022b085f9ef19d479cbdd581127 = $vdb6d9b451b818ccc9a449383f2f0c450->getType($v94757cae63fd3e398c0811a976dd6bbe);
     }
     if ($vd14a8022b085f9ef19d479cbdd581127 instanceof iUmiObjectType || is_array($vd14a8022b085f9ef19d479cbdd581127)) {
         $v8d777f385d3dfec8815d20f7496026dc = $this->translateToXml($vd14a8022b085f9ef19d479cbdd581127);
         if ($this->expire) {
             $vb99eb979e6f6efabc396f777b503f7e7->saveData($vd6fe1d0be6347b8ef2427fa629c04485, $v8d777f385d3dfec8815d20f7496026dc, $this->expire);
         }
         return $this->setData($v8d777f385d3dfec8815d20f7496026dc);
     } else {
         return $this->setDataError('not-found');
     }
 }
Ejemplo n.º 6
0
 public function stream_open($vd6fe1d0be6347b8ef2427fa629c04485, $v15d61712450a686a7f365adf4fef581f, $v93da65a9fd0004d9477aeac024e08e15, $v6385a5865e0b96f09e4142ab2d9e3736)
 {
     $vb99eb979e6f6efabc396f777b503f7e7 = cacheFrontend::getInstance();
     if ($v8d777f385d3dfec8815d20f7496026dc = $vb99eb979e6f6efabc396f777b503f7e7->loadData($vd6fe1d0be6347b8ef2427fa629c04485)) {
         return $this->setData($v8d777f385d3dfec8815d20f7496026dc);
     }
     try {
         $v8be74552df93e31bbdd6b36ed74bdb6a = $this->parsePath($vd6fe1d0be6347b8ef2427fa629c04485);
     } catch (Exception $ve1671797c52e15f763380b45e841ec32) {
         $result = array('error' => $ve1671797c52e15f763380b45e841ec32->getMessage());
         $v8d777f385d3dfec8815d20f7496026dc = parent::translateToXml($result);
         return $this->setData($v8d777f385d3dfec8815d20f7496026dc);
     }
     if ($v8be74552df93e31bbdd6b36ed74bdb6a instanceof selector) {
         if ($this->mode !== "count") {
             $v9b207167e5381c47682c6b4f58a623fb = $v8be74552df93e31bbdd6b36ed74bdb6a->result;
             if ($this->forceCounts) {
                 $v9b207167e5381c47682c6b4f58a623fb['total'] = $v8be74552df93e31bbdd6b36ed74bdb6a->length;
             }
         } else {
             $v9b207167e5381c47682c6b4f58a623fb = $v8be74552df93e31bbdd6b36ed74bdb6a->length;
         }
         $v8d777f385d3dfec8815d20f7496026dc = $this->translateToXml($v9b207167e5381c47682c6b4f58a623fb);
         if ($this->expire) {
             $vb99eb979e6f6efabc396f777b503f7e7->saveData($vd6fe1d0be6347b8ef2427fa629c04485, $v8d777f385d3dfec8815d20f7496026dc, $this->expire);
         }
         return $this->setData($v8d777f385d3dfec8815d20f7496026dc);
     } else {
         return $this->setDataError('not-found');
     }
 }
 public function delLang($v78e6dd7a49f5b0cb2106a3a434dd5c86)
 {
     $this->disableCache();
     cacheFrontend::getInstance()->flush();
     $v78e6dd7a49f5b0cb2106a3a434dd5c86 = (int) $v78e6dd7a49f5b0cb2106a3a434dd5c86;
     if (!$this->isExists($v78e6dd7a49f5b0cb2106a3a434dd5c86)) {
         return false;
     }
     $vac5c74b64b4b8352ef2f181affb5ac2a = "DELETE FROM cms3_langs WHERE id = '{$v78e6dd7a49f5b0cb2106a3a434dd5c86}'";
     l_mysql_query($vac5c74b64b4b8352ef2f181affb5ac2a);
     unset($this->langs[$v78e6dd7a49f5b0cb2106a3a434dd5c86]);
 }
 protected function loadKeys()
 {
     $v0fea6a13c52b4d4725368f24b045ca84 = cacheFrontend::getInstance();
     $vd515995b533ca9885d38f38535debc73 = (int) $this->getNodeId();
     $vac5c74b64b4b8352ef2f181affb5ac2a = "SELECT DISTINCT `key` FROM `cms3_cluster_nodes_cache_keys` WHERE `node_id` = '{$vd515995b533ca9885d38f38535debc73}'";
     $result = mysql_unbuffered_query($vac5c74b64b4b8352ef2f181affb5ac2a);
     $v14f802e1fba977727845e8872c1743a7 = array();
     while (list($v3c6e0b8a9c15224a8228b9a98ca1531d) = mysql_fetch_row($result)) {
         $v0fea6a13c52b4d4725368f24b045ca84->deleteKey($v3c6e0b8a9c15224a8228b9a98ca1531d, true);
         $v14f802e1fba977727845e8872c1743a7[] = $v3c6e0b8a9c15224a8228b9a98ca1531d;
     }
     mysql_free_result($result);
     $vc693ebc80e2b73b0d3bbece47c529399 = (int) $this->getNodeId();
     $vac5c74b64b4b8352ef2f181affb5ac2a = "DELETE FROM `cms3_cluster_nodes_cache_keys` WHERE `node_id` = '{$vd515995b533ca9885d38f38535debc73}' AND `key` IN ('" . implode("', '", $v14f802e1fba977727845e8872c1743a7) . "')";
     l_mysql_query($vac5c74b64b4b8352ef2f181affb5ac2a);
 }
 private function loadField($v3aabf39f2d943fa886d86dcbbee4d910, $vf1965a857bc285d26fe22023aa5ab50d)
 {
     $v06e3d36fa30cea095545139854ad1fb9 = cacheFrontend::getInstance()->load($v3aabf39f2d943fa886d86dcbbee4d910, "field");
     if ($v06e3d36fa30cea095545139854ad1fb9 instanceof umiField == false) {
         try {
             $v06e3d36fa30cea095545139854ad1fb9 = new umiField($v3aabf39f2d943fa886d86dcbbee4d910, $vf1965a857bc285d26fe22023aa5ab50d);
         } catch (privateException $ve1671797c52e15f763380b45e841ec32) {
             return false;
         }
         cacheFrontend::getInstance()->save($v06e3d36fa30cea095545139854ad1fb9, "field");
     }
     if ($v06e3d36fa30cea095545139854ad1fb9 instanceof umiField) {
         $this->fields[$v3aabf39f2d943fa886d86dcbbee4d910] = $v06e3d36fa30cea095545139854ad1fb9;
         return $this->fields[$v3aabf39f2d943fa886d86dcbbee4d910];
     } else {
         return false;
     }
 }
Ejemplo n.º 10
0
 public function stream_open($vd6fe1d0be6347b8ef2427fa629c04485, $v15d61712450a686a7f365adf4fef581f, $v93da65a9fd0004d9477aeac024e08e15, $v6385a5865e0b96f09e4142ab2d9e3736)
 {
     $vb99eb979e6f6efabc396f777b503f7e7 = cacheFrontend::getInstance();
     $vd6fe1d0be6347b8ef2427fa629c04485 = $this->parsePath($vd6fe1d0be6347b8ef2427fa629c04485);
     if ($vd6fe1d0be6347b8ef2427fa629c04485) {
         if ($v8d777f385d3dfec8815d20f7496026dc = $vb99eb979e6f6efabc396f777b503f7e7->loadData($vd6fe1d0be6347b8ef2427fa629c04485)) {
             return $this->setData($v8d777f385d3dfec8815d20f7496026dc);
         }
         $v8d777f385d3dfec8815d20f7496026dc = umiRemoteFileGetter::get($vd6fe1d0be6347b8ef2427fa629c04485);
         if ($this->sourceCharset != "UTF-8") {
             $v8d777f385d3dfec8815d20f7496026dc = iconv($this->sourceCharset, "UTF-8//IGNORE", $v8d777f385d3dfec8815d20f7496026dc);
         }
         if ($this->expire) {
             $vb99eb979e6f6efabc396f777b503f7e7->saveData($vd6fe1d0be6347b8ef2427fa629c04485, $v8d777f385d3dfec8815d20f7496026dc, $this->expire);
         }
         return $this->setData($v8d777f385d3dfec8815d20f7496026dc);
     }
     return true;
 }
Ejemplo n.º 11
0
 public function stream_open($vd6fe1d0be6347b8ef2427fa629c04485, $v15d61712450a686a7f365adf4fef581f, $v93da65a9fd0004d9477aeac024e08e15, $v6385a5865e0b96f09e4142ab2d9e3736)
 {
     $vb99eb979e6f6efabc396f777b503f7e7 = cacheFrontend::getInstance();
     $vd6fe1d0be6347b8ef2427fa629c04485 = $this->parsePath($vd6fe1d0be6347b8ef2427fa629c04485);
     if ($v8d777f385d3dfec8815d20f7496026dc = $vb99eb979e6f6efabc396f777b503f7e7->loadData($vd6fe1d0be6347b8ef2427fa629c04485)) {
         return $this->setData($v8d777f385d3dfec8815d20f7496026dc);
     }
     if ($vd6fe1d0be6347b8ef2427fa629c04485) {
         try {
             $v9c28d32df234037773be184dbdafc274 = new matches("sitemap.xml");
             $v9c28d32df234037773be184dbdafc274->setCurrentURI($vd6fe1d0be6347b8ef2427fa629c04485);
             $v8d777f385d3dfec8815d20f7496026dc = $v9c28d32df234037773be184dbdafc274->execute(false);
         } catch (Exception $ve1671797c52e15f763380b45e841ec32) {
             traceException($ve1671797c52e15f763380b45e841ec32);
         }
         if ($this->expire) {
             $vb99eb979e6f6efabc396f777b503f7e7->saveObject($vd6fe1d0be6347b8ef2427fa629c04485, $v8d777f385d3dfec8815d20f7496026dc, $this->expire);
         }
         return $this->setData($v8d777f385d3dfec8815d20f7496026dc);
     } else {
         return $this->setDataNotFound();
     }
 }
 protected function save()
 {
     $va8cfde6331bd59eb2ac96f8911c4b666 = umiObjectsCollection::getInstance()->getObject($this->id);
     if ($va8cfde6331bd59eb2ac96f8911c4b666 instanceof umiObject) {
         if ($va8cfde6331bd59eb2ac96f8911c4b666->checkSelf() == false) {
             cacheFrontend::getInstance()->del($va8cfde6331bd59eb2ac96f8911c4b666->getId(), "object");
             return false;
         }
     }
     cacheFrontend::getInstance()->del($this->getId(), "property");
     if (self::$USE_TRANSACTIONS) {
         l_mysql_query("START TRANSACTION /* Saving property for object {$this->id} */");
     }
     $result = $this->saveValue();
     if (self::$USE_TRANSACTIONS) {
         l_mysql_query("COMMIT");
     }
     if (isset(umiObjectProperty::$dataCache[$this->object_id])) {
         unset(umiObjectProperty::$dataCache[$this->object_id]);
     }
     $this->loadInfo();
     return $result;
 }
Ejemplo n.º 13
0
<?php

require CURRENT_WORKING_DIR . '/libs/config.php';
if (defined("CLUSTER_CACHE_CORRECTION") && CLUSTER_CACHE_CORRECTION) {
    cacheFrontend::getInstance();
    clusterCacheSync::getInstance();
}
function run_standalone($module_name)
{
    return cmsController::getInstance()->getModule($module_name);
}
Ejemplo n.º 14
0
 public function setFieldGroupOrd($v0e939a4ffd3aacd724dd3b50147b4353, $vf2400bf3c8b70283e04af07d6d67fe6a, $v3f84b203eef48e9862ac1ffbe344dffe)
 {
     $vf2400bf3c8b70283e04af07d6d67fe6a = (int) $vf2400bf3c8b70283e04af07d6d67fe6a;
     $v0e939a4ffd3aacd724dd3b50147b4353 = (int) $v0e939a4ffd3aacd724dd3b50147b4353;
     if (!$v3f84b203eef48e9862ac1ffbe344dffe) {
         $vac5c74b64b4b8352ef2f181affb5ac2a = "SELECT type_id FROM cms3_object_field_groups WHERE id = '{$v0e939a4ffd3aacd724dd3b50147b4353}'";
         $result = l_mysql_query($vac5c74b64b4b8352ef2f181affb5ac2a);
         if ($v56bd7107802ebe56c6918992f0608ec6 = l_mysql_error()) {
             throw new coreException($v56bd7107802ebe56c6918992f0608ec6);
         }
         if (!(list($v94757cae63fd3e398c0811a976dd6bbe) = mysql_fetch_row($result))) {
             return false;
         }
         $vac5c74b64b4b8352ef2f181affb5ac2a = "UPDATE cms3_object_field_groups SET ord = (ord + 1) WHERE type_id = '{$v94757cae63fd3e398c0811a976dd6bbe}' AND ord >= '{$vf2400bf3c8b70283e04af07d6d67fe6a}'";
         l_mysql_query($vac5c74b64b4b8352ef2f181affb5ac2a);
         if ($v56bd7107802ebe56c6918992f0608ec6 = l_mysql_error()) {
             throw new coreException($v56bd7107802ebe56c6918992f0608ec6);
         }
     }
     $vac5c74b64b4b8352ef2f181affb5ac2a = "UPDATE cms3_object_field_groups SET ord = '{$vf2400bf3c8b70283e04af07d6d67fe6a}' WHERE id = '{$v0e939a4ffd3aacd724dd3b50147b4353}'";
     l_mysql_query($vac5c74b64b4b8352ef2f181affb5ac2a);
     cacheFrontend::getInstance()->flush();
     if ($v56bd7107802ebe56c6918992f0608ec6 = l_mysql_error()) {
         throw new coreException($v56bd7107802ebe56c6918992f0608ec6);
     }
     return true;
 }
Ejemplo n.º 15
0
 protected function saveCache()
 {
     if (is_array($this->cache)) {
         if (is_dir(dirname($this->cacheFilePath))) {
             file_put_contents($this->cacheFilePath, serialize($this->cache));
         }
         if (cacheFrontend::getInstance()->getIsConnected()) {
             cacheFrontend::getInstance()->saveSql("registry", serialize($this->cache));
         }
     }
     $this->cacheSaved = true;
 }
Ejemplo n.º 16
0
 /**
  * Очистка системного кеша.
  *
  */
 private function clearCache()
 {
     if ($this->checkDone(__METHOD__)) {
         return true;
     }
     $this->flushLog("Очистка системного кеша...");
     $this->includeMicrocore();
     $downloader = $this->getDownloader();
     $modules = $downloader->query('get-modules-list');
     $xml = new DOMDocument();
     if ($xml->loadXML($modules)) {
         $xpath = new DOMXPath($xml);
         $no_active = $xpath->query("//module[not(@active)]");
         if ($no_active->length > 0) {
             $regedit = regedit::getInstance();
             foreach ($no_active as $module) {
                 $name = $module->getAttribute('name');
                 if ($regedit->getVal("//modules/{$name}")) {
                     $regedit->delVar("//modules/{$name}");
                 }
             }
         }
     }
     $cache = cacheFrontend::getInstance();
     $cache->flush();
     $this->flushLog("Завершено.");
     $this->cleanUpdateMode();
     $this->setDone(__METHOD__);
     return true;
 }
Ejemplo n.º 17
0
 protected function save()
 {
     $vb068931cc450442b63f5b3d276ea4297 = l_mysql_real_escape_string($this->name);
     $vd5d3db1765287eef77d7927cc956f50a = l_mysql_real_escape_string($this->title);
     $v1945c9a2a5e2ba6133f1db6757a35fcb = (int) $this->is_locked;
     $vd5752333adc3a004f826f2ea2a41273a = (int) $this->is_inheritable;
     $ve1c6c9ef2fcbe75f26f815c4ef2e60b4 = (int) $this->is_visible;
     $v1e3f04102267eaf5e8d0ca424fd5c561 = (int) $this->field_type_id;
     $v051369818a8073bba5feeb0e957eb308 = $this->guide_id ? (int) $this->guide_id : 'NULL';
     $v5fa2ecd1dc485ead330e65903d19650a = (int) $this->is_in_search;
     $ve4a2ed2dde6e8354ae6f321744843084 = (int) $this->is_in_filter;
     $v6a2139364f96787c8ce1bbb0070b898c = l_mysql_real_escape_string($this->tip);
     $v2a9d32d17ad47ac15c87d2e7c96d0e69 = (int) $this->isRequired;
     $v23aec26e2b521c0e5f1061b3d04983a5 = (int) $this->sortable;
     $v6b1a57fa235477758817df3c91158006 = (int) $this->restrictionId;
     $vc9409711ebff9250bd075037d3d18263 = (int) $this->is_system;
     $v2c4fe296b3cbdd86fd5aba8ebcad6d36 = $v6b1a57fa235477758817df3c91158006 ? ", restriction_id = '{$v6b1a57fa235477758817df3c91158006}'" : ", restriction_id = NULL";
     $vac5c74b64b4b8352ef2f181affb5ac2a = "UPDATE cms3_object_fields SET name = '{$vb068931cc450442b63f5b3d276ea4297}', title = '{$vd5d3db1765287eef77d7927cc956f50a}', is_locked = '{$v1945c9a2a5e2ba6133f1db6757a35fcb}', is_inheritable = '{$vd5752333adc3a004f826f2ea2a41273a}', is_visible = '{$ve1c6c9ef2fcbe75f26f815c4ef2e60b4}', field_type_id = '{$v1e3f04102267eaf5e8d0ca424fd5c561}', guide_id = {$v051369818a8073bba5feeb0e957eb308}, in_search = '{$v5fa2ecd1dc485ead330e65903d19650a}', in_filter = '{$ve4a2ed2dde6e8354ae6f321744843084}', tip = '{$v6a2139364f96787c8ce1bbb0070b898c}', is_required = '{$v2a9d32d17ad47ac15c87d2e7c96d0e69}', sortable = '{$v23aec26e2b521c0e5f1061b3d04983a5}', is_system = '{$vc9409711ebff9250bd075037d3d18263}' {$v2c4fe296b3cbdd86fd5aba8ebcad6d36} WHERE id = '{$this->id}'";
     l_mysql_query($vac5c74b64b4b8352ef2f181affb5ac2a);
     cacheFrontend::getInstance()->flush();
     return true;
 }
 private function loadType($v94757cae63fd3e398c0811a976dd6bbe)
 {
     if ($this->isLoaded($v94757cae63fd3e398c0811a976dd6bbe)) {
         return true;
     } else {
         $v599dcce2998a6b40b1e38e8c6006cb0a = cacheFrontend::getInstance()->load($v94757cae63fd3e398c0811a976dd6bbe, "object_type");
         if ($v599dcce2998a6b40b1e38e8c6006cb0a instanceof umiObjectType == false) {
             try {
                 $v599dcce2998a6b40b1e38e8c6006cb0a = new umiObjectType($v94757cae63fd3e398c0811a976dd6bbe);
             } catch (privateException $ve1671797c52e15f763380b45e841ec32) {
                 return false;
             }
             cacheFrontend::getInstance()->save($v599dcce2998a6b40b1e38e8c6006cb0a, "object_type");
         }
         if (is_object($v599dcce2998a6b40b1e38e8c6006cb0a)) {
             $this->types[$v94757cae63fd3e398c0811a976dd6bbe] = $v599dcce2998a6b40b1e38e8c6006cb0a;
             return true;
         } else {
             return false;
         }
     }
 }
Ejemplo n.º 19
0
 private function clearCache()
 {
     if ($this->checkDone(__METHOD__)) {
         return true;
     }
     $this->flushLog("Очистка системного кеша...");
     $this->includeMicrocore();
     $vd4721a6bab8c7dee78cc25f7fa154bfc = $this->getDownloader();
     $v0eb9b3af2e4a00837a1b1a854c9ea18c = $vd4721a6bab8c7dee78cc25f7fa154bfc->query('get-modules-list');
     $v0f635d0e0f3874fff8b581c132e6c7a7 = new DOMDocument();
     if ($v0f635d0e0f3874fff8b581c132e6c7a7->loadXML($v0eb9b3af2e4a00837a1b1a854c9ea18c)) {
         $v3d788fa62d7c185a1bee4c9147ee1091 = new DOMXPath($v0f635d0e0f3874fff8b581c132e6c7a7);
         $vf1f8971ed2a2bbc27b56c631013e9e85 = $v3d788fa62d7c185a1bee4c9147ee1091->query("//module[not(@active)]");
         if ($vf1f8971ed2a2bbc27b56c631013e9e85->length > 0) {
             $vb1444fb0c07653567ad325aa25d4e37a = regedit::getInstance();
             foreach ($vf1f8971ed2a2bbc27b56c631013e9e85 as $v22884db148f0ffb0d830ba431102b0b5) {
                 $vb068931cc450442b63f5b3d276ea4297 = $v22884db148f0ffb0d830ba431102b0b5->getAttribute('name');
                 if ($vb1444fb0c07653567ad325aa25d4e37a->getVal("//modules/{$vb068931cc450442b63f5b3d276ea4297}")) {
                     $vb1444fb0c07653567ad325aa25d4e37a->delVar("//modules/{$vb068931cc450442b63f5b3d276ea4297}");
                 }
             }
         }
     }
     $v0fea6a13c52b4d4725368f24b045ca84 = cacheFrontend::getInstance();
     $v0fea6a13c52b4d4725368f24b045ca84->flush();
     $this->flushLog("Завершено.");
     $this->cleanUpdateMode();
     $this->setDone(__METHOD__);
     return true;
 }
Ejemplo n.º 20
0
 public function cacheIsEnabled()
 {
     $vce09120550b0038f0f5fac99be54cbb5 = file_exists("./cache.config") ? "1" : "0";
     $vb6d9b5062199565f24ca0f91578c8e8b = cacheFrontend::getInstance()->getIsConnected();
     return (int) ($vce09120550b0038f0f5fac99be54cbb5 || $vb6d9b5062199565f24ca0f91578c8e8b);
 }
Ejemplo n.º 21
0
 public function checkSelf()
 {
     static $v9b207167e5381c47682c6b4f58a623fb;
     if ($v9b207167e5381c47682c6b4f58a623fb !== null) {
         return $v9b207167e5381c47682c6b4f58a623fb;
     }
     if (!cacheFrontend::getInstance()->getIsConnected()) {
         return $v9b207167e5381c47682c6b4f58a623fb = true;
     }
     $vac5c74b64b4b8352ef2f181affb5ac2a = "SELECT id FROM cms3_objects WHERE id = '{$this->id}'";
     $result = l_mysql_query($vac5c74b64b4b8352ef2f181affb5ac2a);
     if ($v56bd7107802ebe56c6918992f0608ec6 = l_mysql_error()) {
         throw new coreException($v56bd7107802ebe56c6918992f0608ec6);
     }
     $v9b207167e5381c47682c6b4f58a623fb = (bool) mysql_num_rows($result);
     if (!$v9b207167e5381c47682c6b4f58a623fb) {
         cacheFrontend::getInstance()->flush();
     }
     return $v9b207167e5381c47682c6b4f58a623fb;
 }
Ejemplo n.º 22
0
 protected function save()
 {
     $vb068931cc450442b63f5b3d276ea4297 = l_mysql_real_escape_string($this->name);
     $v17f71d965fe9589ddbd11caf7182243e = l_mysql_real_escape_string($this->data_type);
     $v96a76ec43956dac431b643cbd544dd08 = (int) $this->is_multiple;
     $vf089d93c2ef0d088edadddb0028d548d = (int) $this->is_unsigned;
     $vac5c74b64b4b8352ef2f181affb5ac2a = "UPDATE cms3_object_field_types SET name = '{$vb068931cc450442b63f5b3d276ea4297}', data_type = '{$v17f71d965fe9589ddbd11caf7182243e}', is_multiple = '{$v96a76ec43956dac431b643cbd544dd08}', is_unsigned = '{$vf089d93c2ef0d088edadddb0028d548d}' WHERE id = '{$this->id}'";
     l_mysql_query($vac5c74b64b4b8352ef2f181affb5ac2a);
     cacheFrontend::getInstance()->flush();
     if ($v56bd7107802ebe56c6918992f0608ec6 = l_mysql_error()) {
         throw new coreException($v56bd7107802ebe56c6918992f0608ec6);
         return false;
     } else {
         return true;
     }
 }
Ejemplo n.º 23
0
 public function setUsedPages($vb3b32a2d422265cd25c3323ed0157f81)
 {
     if (is_null($vb3b32a2d422265cd25c3323ed0157f81)) {
         return false;
     }
     $v3822e54d799ece2cf6bec7120d8a3a9f = templatesCollection::getInstance()->getDefaultTemplate($this->domain_id, $this->lang_id)->getId();
     $vac5c74b64b4b8352ef2f181affb5ac2a = "UPDATE cms3_hierarchy SET tpl_id = '{$v3822e54d799ece2cf6bec7120d8a3a9f}' WHERE tpl_id = '{$this->id}' AND is_deleted = '0' AND domain_id = '{$this->domain_id}'";
     l_mysql_query($vac5c74b64b4b8352ef2f181affb5ac2a);
     $vb99eb979e6f6efabc396f777b503f7e7 = cacheFrontend::getInstance();
     $vb99eb979e6f6efabc396f777b503f7e7->flush();
     $vb81ca7c0ccaa77e7aa91936ab0070695 = umiHierarchy::getInstance();
     if (!is_array($vb3b32a2d422265cd25c3323ed0157f81)) {
         return false;
     }
     if (is_array($vb3b32a2d422265cd25c3323ed0157f81) && !empty($vb3b32a2d422265cd25c3323ed0157f81)) {
         foreach ($vb3b32a2d422265cd25c3323ed0157f81 as $v7057e8409c7c531a1a6e9ac3df4ed549) {
             $v71860c77c6745379b0d44304d66b6a13 = $vb81ca7c0ccaa77e7aa91936ab0070695->getElement($v7057e8409c7c531a1a6e9ac3df4ed549);
             if ($v71860c77c6745379b0d44304d66b6a13 instanceof iUmiHierarchyElement) {
                 $v71860c77c6745379b0d44304d66b6a13->setTplId($this->id);
                 $v71860c77c6745379b0d44304d66b6a13->commit();
                 unset($v71860c77c6745379b0d44304d66b6a13);
                 $vb81ca7c0ccaa77e7aa91936ab0070695->unloadElement($v7057e8409c7c531a1a6e9ac3df4ed549);
             }
         }
     }
     return true;
 }
 public function commit()
 {
     $va8cfde6331bd59eb2ac96f8911c4b666 = $this->getObject();
     if ($va8cfde6331bd59eb2ac96f8911c4b666 instanceof umiObject) {
         $va8cfde6331bd59eb2ac96f8911c4b666->commit();
         $v16b2b26000987faccb260b9d39df1269 = $va8cfde6331bd59eb2ac96f8911c4b666->getId();
         $vb81ca7c0ccaa77e7aa91936ab0070695 = umiHierarchy::getInstance();
         cacheFrontend::getInstance()->del($v16b2b26000987faccb260b9d39df1269, "object");
         $va7f1f2c46c62415198e0884b827bd2d2 = $vb81ca7c0ccaa77e7aa91936ab0070695->getObjectInstances($v16b2b26000987faccb260b9d39df1269, true, true);
         foreach ($va7f1f2c46c62415198e0884b827bd2d2 as $va3e6bf52d6871a75cae73e5262de04af) {
             cacheFrontend::getInstance()->del($va3e6bf52d6871a75cae73e5262de04af, "element");
         }
     }
     parent::commit();
 }
<?php

require_once "../libs/config.php";
$vb1444fb0c07653567ad325aa25d4e37a = regedit::getInstance();
if ($vb1444fb0c07653567ad325aa25d4e37a->checkSelfKeycode()) {
    exit;
}
if (is_file(CURRENT_WORKING_DIR . "/sys-temp/runtime-cache/registry")) {
    unlink(CURRENT_WORKING_DIR . "/sys-temp/runtime-cache/registry");
}
if (is_file(CURRENT_WORKING_DIR . "/sys-temp/runtime-cache/trash")) {
    unlink(CURRENT_WORKING_DIR . "/sys-temp/runtime-cache/trash");
}
cacheFrontend::getInstance()->flush();
$v957b527bcfbad2e80f58d20683931435 = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : str_replace("\\", "", $_SERVER['DOCUMENT_ROOT']);
$vad5f82e879a9c5d6b5b442eb37e50551 = getServer('HTTP_HOST');
$v1a54c1036ccb10069e9c06281d52007a = getRequest('keycode');
$vd4579b2688d675235f402f6b4b43bcbf = getRequest('do');
$vebcb36c005e769a1576aa2a8d49539ec = getRequest('domain_keycode');
$v18415cf46dd0e74b620c558a691ce8ff = getRequest('license_codename');
if ($vd4579b2688d675235f402f6b4b43bcbf == 'load') {
    header("Content-type: text/xml; charset=utf-8");
    $v572d4e421e5e6b9bc11d815e8a027112 = 'aHR0cDovL2luc3RhbGwudW1pLWNtcy5ydS9maWxlcy90ZXN0aG9zdC5waHA=';
    $result = umiRemoteFileGetter::get(base64_decode($v572d4e421e5e6b9bc11d815e8a027112), dirname(__FILE__) . '/testhost.php');
    $v9a0364b9e99bb480dd25e1f0284c8555 = "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
    if ($result->getSize() == 0) {
        $v9a0364b9e99bb480dd25e1f0284c8555 .= "<result><error>Не удается загрузить тесты хостинга.</error></result>";
    } else {
        $v9a0364b9e99bb480dd25e1f0284c8555 .= "<result>ok</result>";
    }
    echo $v9a0364b9e99bb480dd25e1f0284c8555;
 /**
  * Сбросить все права на модули и методы для пользователя или группы $ownerId
  * @param Integer $ownerId id пользователя или группы пользователей
  * @param array $modules=NULL массив, который указывает модули, для которых сбросить права. По умолчанию, сбрасываются права на все модули
  */
 public function resetModulesPermissions($ownerId, $modules = NULL)
 {
     $ownerId = (int) $ownerId;
     $sql = "DELETE FROM cms_permissions WHERE owner_id = '{$ownerId}'";
     if (is_array($modules)) {
         if (sizeof($modules)) {
             $modules = array_map('l_mysql_real_escape_string', $modules);
             $sql = "DELETE FROM cms_permissions WHERE owner_id = '{$ownerId}' AND module IN ('" . implode("', '", $modules) . "')";
         }
     }
     l_mysql_query($sql);
     $cacheFrontend = cacheFrontend::getInstance();
     foreach ($modules as $module) {
         $cacheFrontend->deleteKey('module_perms_' . $ownerId . '_' . $module, true);
     }
     return true;
 }
Ejemplo n.º 27
0
 public function commit()
 {
     parent::commit();
     cacheFrontend::getInstance()->flush();
 }
    public static function getObjectTypeByFieldId($v945100186b119048837b9859c2c46410)
    {
        static $v0fea6a13c52b4d4725368f24b045ca84 = array();
        $v945100186b119048837b9859c2c46410 = (int) $v945100186b119048837b9859c2c46410;
        if (isset($v0fea6a13c52b4d4725368f24b045ca84[$v945100186b119048837b9859c2c46410])) {
            return $v0fea6a13c52b4d4725368f24b045ca84[$v945100186b119048837b9859c2c46410];
        }
        $vac5c74b64b4b8352ef2f181affb5ac2a = <<<SQL
SELECT  MIN(fg.type_id)
\tFROM cms3_fields_controller fc, cms3_object_field_groups fg
\tWHERE fc.field_id = {$v945100186b119048837b9859c2c46410} AND fg.id = fc.group_id
SQL;
        if ($v6301cee35ea764a1e241978f93f01069 = cacheFrontend::getInstance()->loadSql($vac5c74b64b4b8352ef2f181affb5ac2a)) {
            return $v0fea6a13c52b4d4725368f24b045ca84[$v945100186b119048837b9859c2c46410] = $v6301cee35ea764a1e241978f93f01069;
        }
        $result = l_mysql_query($vac5c74b64b4b8352ef2f181affb5ac2a);
        if (mysql_num_rows($result)) {
            list($v6301cee35ea764a1e241978f93f01069) = mysql_fetch_row($result);
        } else {
            $v6301cee35ea764a1e241978f93f01069 = false;
        }
        $v0fea6a13c52b4d4725368f24b045ca84[$v945100186b119048837b9859c2c46410] = $v6301cee35ea764a1e241978f93f01069;
        cacheFrontend::getInstance()->saveSql($vac5c74b64b4b8352ef2f181affb5ac2a, $v6301cee35ea764a1e241978f93f01069, 60);
        return $v6301cee35ea764a1e241978f93f01069;
    }
Ejemplo n.º 29
0
 public function cache()
 {
     $regedit = regedit::getInstance();
     $settings = self::getStaticCacheSettings();
     $streamsSettings = self::getStreamsCacheSettings();
     $enginesList = cacheFrontend::getPriorityEnginesList(true);
     $currentEngineName = cacheFrontend::getInstance()->getCurrentCacheEngineName();
     $engines = array(getLabel('cache-engine-none'));
     foreach ($enginesList as $engineName) {
         $engines[$engineName] = getLabel("cache-engine-" . $engineName);
     }
     $engines['value'] = $currentEngineName;
     $cacheEngineLabel = $currentEngineName ? getLabel("cache-engine-" . $currentEngineName) : getLabel('cache-engine-none');
     $params = array('engine' => array('status:current-engine' => $cacheEngineLabel, 'select:engines' => $engines), 'streamscache' => array('boolean:cache-enabled' => NULL, "int:cache-lifetime" => NULL), 'static' => array('boolean:enabled' => NULL, 'select:expire' => array('short' => getLabel('cache-static-short'), 'normal' => getLabel('cache-static-normal'), 'long' => getLabel('cache-static-long')), 'boolean:ignore-stat' => NULL), 'test' => array());
     /*if(!defined('DB_DRIVER') || DB_DRIVER == 'mysql') {
     			$dbReport = $this->getDatabaseReport();
     			if($dbReport) {
     				$params['branching']['status:branch'] = $this->getDatabaseReport();
     			}
     		}*/
     if ($settings['expire'] == false) {
         unset($params['static']['select:expire']);
         unset($params['static']['boolean:ignore-stat']);
     }
     if ($currentEngineName) {
         $params['engine']['status:reset'] = true;
     }
     if (!$streamsSettings['cache-enabled']) {
         unset($params['streamscache']['int:cache-lifetime']);
     }
     if (!$currentEngineName) {
         unset($params['streamscache']);
     }
     $mode = (string) getRequest('param0');
     $is_demo = defined('CURRENT_VERSION_LINE') && CURRENT_VERSION_LINE == 'demo';
     if ($mode == 'do' and !$is_demo) {
         $params = $this->expectParams($params);
         if (!isset($params['static']['select:expire'])) {
             $params['static']['select:expire'] = "normal";
             $params['static']['boolean:ignore-stat'] = false;
         }
         $settings = array('enabled' => $params['static']['boolean:enabled'], 'expire' => $params['static']['select:expire'], 'ignore-stat' => $params['static']['boolean:ignore-stat']);
         if (isset($params['streamscache']['boolean:cache-enabled'])) {
             $streamsSettings['cache-enabled'] = $params['streamscache']['boolean:cache-enabled'];
         }
         if (isset($params['streamscache']['int:cache-lifetime'])) {
             $streamsSettings['cache-lifetime'] = $params['streamscache']['int:cache-lifetime'];
         }
         self::setStaticCacheSettings($settings);
         self::setStreamsCacheSettings($streamsSettings);
         cacheFrontend::getInstance()->switchCacheEngine($params['engine']['select:engines']);
         $this->chooseRedirect($this->pre_lang . "/admin/config/cache/");
     } else {
         if ($mode == "reset") {
             if (!$is_demo) {
                 cacheFrontend::getInstance()->flush();
             }
             $this->chooseRedirect($this->pre_lang . "/admin/config/cache/");
         }
     }
     $settings = self::getStaticCacheSettings();
     $params['static']['boolean:enabled'] = $settings['enabled'];
     $params['static']['select:expire']['value'] = $settings['expire'];
     $params['static']['boolean:ignore-stat'] = $settings['ignore-stat'];
     if ($settings['expire'] == false) {
         unset($params['static']['select:expire']);
         unset($params['static']['boolean:ignore-stat']);
     }
     $streamsSettings = self::getStreamsCacheSettings();
     $params['streamscache']['boolean:cache-enabled'] = $streamsSettings['cache-enabled'];
     $params['streamscache']['int:cache-lifetime'] = $streamsSettings['cache-lifetime'];
     if (!$params['streamscache']['boolean:cache-enabled']) {
         unset($params['streamscache']['int:cache-lifetime']);
     }
     if (!$currentEngineName) {
         unset($params['streamscache']);
     }
     $this->setDataType("settings");
     $this->setActionType("modify");
     $data = $this->prepareData($params, "settings");
     $this->setData($data);
     return $this->doData();
 }
Ejemplo n.º 30
0
 public function eip_move_page()
 {
     $this->flushAsXml('eip_move_page');
     $permissions = permissionsCollection::getInstance();
     $hierarchy = umiHierarchy::getInstance();
     $userId = $permissions->getUserId();
     $elementId = (int) getRequest('param0');
     $nextElementId = (int) getRequest('param1');
     $parentElementId = getRequest('parent-id');
     if (is_null($parentElementId)) {
         if ($nextElementId) {
             $parentElementId = $hierarchy->getParent($nextElementId);
         } else {
             $parentElementId = $hierarchy->getParent($elementId);
         }
     }
     $parents = $hierarchy->getAllParents($parentElementId);
     if (in_array($elementId, $parents)) {
         throw new publicAdminException(getLabel('error-illegal-moving'));
     }
     $allow = $permissions->isAllowedObject($userId, $elementId);
     if ($allow[4]) {
         if (is_null(getRequest('check'))) {
             $event = new umiEventPoint('systemMoveElement');
             $event->setParam('parentElementId', $parentElementId);
             $event->setParam('elementId', $elementId);
             $event->setParam('beforeElementId', $nextElementId);
             $event->setMode('before');
             $event->call();
             $hierarchy->moveBefore($elementId, $parentElementId, $nextElementId ? $nextElementId : false);
             cacheFrontend::getInstance()->flush();
             $event2 = new umiEventPoint('systemMoveElement');
             $event2->setParam('parentElementId', $parentElementId);
             $event2->setParam('elementId', $elementId);
             $event2->setParam('beforeElementId', $nextElementId);
             $event2->setMode('after');
             $event2->call();
         }
         return array('status' => 'ok');
     } else {
         return array('error' => getLabel('error-require-move-permissions'));
     }
 }