protected function _set_archive_to_use() { $this->_db_publish_path = $this->_use_private_db ? XMLDB_DBCTL_TMP : XMLDB_DBCTL_PUB; $this->_fs_publish_path = $this->_use_private_db ? DCTL_DBCTL_TMP : DCTL_DBCTL_PUB; $this->_web_publish_path = WWW_HOST . ($this->_use_private_db ? WEB_DBCTL_TMP : WEB_DBCTL_PUB); // | initialize if ($this->_db = dctl_xmldb_connect('admin', true)) { try { $chk = $this->_db->getCollectionDesc($this->_db_publish_path); } catch (SoapFault $e) { $chk = NULL; } if ($chk->name . DB_PATH_SEP != $this->_db_publish_path) { $this->_db->createCollection($this->_db_publish_path); $this->_db->setPermissions($this->_db_publish_path, DCTL_XMLDB_USER_ADMIN, DCTL_XMLDB_GROUP_ADMIN, DCTL_XMLDB_PERMISSIONS_ADMIN); } } $this->_db = dctl_xmldb_connect('query', true); if (!$this->_db) { $this->__destruct(); unset($this); return false; } else { return true; } // if (is_file($this->_fs_publish_path.DCTL_TEXTCLASS)) $this->_classification = loadXML($this->_fs_publish_path.DCTL_TEXTCLASS); }
} catch (Exception $e) { die('<span class="error">! doc not found...</span>'); } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * try { if (!isset($_SESSION['dctl_block'])) { $block_prev = ''; $_SESSION['dctl_block'] = $block; } else { $block_prev = $_SESSION['dctl_block']; } } catch (Exception $e) { die('<span class="error">! block not found...</span>'); } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * try { if (!isset($_SESSION['dctl_exist'])) { $exist = dctl_xmldb_connect('query', true); $_SESSION['dctl_exist'] = $exist; } else { $exist = $_SESSION['dctl_exist']; } } catch (Exception $e) { die('<span class="error">! db not found...</span>'); } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * require_once str_replace(SYS_PATH_SEP_DOUBLE, SYS_PATH_SEP, dirname(__FILE__) . SYS_PATH_SEP) . 'functions.inc.php'; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /* NO ?> IN FILE .INC */
hardFlush(&$resultMsg); switch ($action) { case 'publish': $doPublish = TRUE; break; case 'update': $doUpdate = TRUE; break; case 'unpublish': $doUnpublish = TRUE; break; } $doAdmin = $doPublish || $doUnpublish || $doUpdate; if ($doAdmin) { try { $existAdmin = dctl_xmldb_connect('admin', $persistentConnection); } catch (Exception $e) { die('<span class="wctl_error">[49] ' . $e . '</span>'); } } if ($doPublish) { if (publish_SendToXDB($existAdmin, $collection_id, $package_id, $part_id, &$resultMsg)) { //OK } } if ($doUpdate) { $dbPackageList = ''; if ($collection_id != '') { if ($package_id == '') { $path2load = XMLDB_DBCTL_PUB . $collection_id . DB_PATH_SEP . $collection_id . DCTL_RESERVED_INFIX . $collection_id . '.xml'; $xquery = '';