Dieser Commit ist enthalten in:
o.pinke 2023-04-26 15:46:27 +02:00
Ursprung 95444fed6a
Commit 7dbcb40790
1 geänderte Dateien mit 20 neuen und 20 gelöschten Zeilen

Datei anzeigen

@ -146,7 +146,7 @@ class cApiModule extends Item {
public function createModuleFolder() { public function createModuleFolder() {
//echo $this->_aModFileEditConf['modPath']; //echo $this->_aModFileEditConf['modPath'];
$sPathErrorLog = cRegistry::getConfigValue('path', 'logs').'errorlog.txt'; $sPathErrorLog = cRegistry::getConfigValue('path', 'logs') . 'errorlog.txt';
if (is_writable($this->_aModFileEditConf['clientPath']) && !file_exists($this->_aModFileEditConf['modPath'])) { if (is_writable($this->_aModFileEditConf['clientPath']) && !file_exists($this->_aModFileEditConf['modPath'])) {
try { try {
@ -629,8 +629,8 @@ class cApiModule extends Item {
/** /**
* Imports a module package from a XML file Uses xmlparser and callbacks * Imports a module package from a XML file Uses xmlparser and callbacks
* *
* @param string $sFile Filename of data file (including path) * @param string $sFile Filename of data file (including path)
* @param array $aOptions Optional. An array of arrays specifying, how the items * @param array $aOptions Optional. An array of arrays specifying, how the items
* of the xml file will be imported. If specified, has to * of the xml file will be imported. If specified, has to
* contain an array of this structure: * contain an array of this structure:
* *
@ -751,8 +751,8 @@ class cApiModule extends Item {
/** /**
* Exports the specified module and attached files to a file * Exports the specified module and attached files to a file
* *
* @param string $sPackageFileName Filename to return * @param string $sPackageFileName Filename to return
* @param bool $bReturn if false, the result is immediately sent to the browser * @param bool $bReturn if false, the result is immediately sent to the browser
*/ */
public function exportPackage($sPackageFileName, $bReturn = false) { public function exportPackage($sPackageFileName, $bReturn = false) {
global $cfgClient, $client; global $cfgClient, $client;
@ -777,7 +777,7 @@ class cApiModule extends Item {
} }
// Export basic module // Export basic module
$oNodeModule = & $oRoot->appendChild("module"); $oNodeModule = &$oRoot->appendChild("module");
$oNodeModule->appendChild("name", clHtmlSpecialChars($this->get("name"))); $oNodeModule->appendChild("name", clHtmlSpecialChars($this->get("name")));
$oNodeModule->appendChild("description", clHtmlSpecialChars($this->get("description"))); $oNodeModule->appendChild("description", clHtmlSpecialChars($this->get("description")));
$oNodeModule->appendChild("type", clHtmlSpecialChars($this->get("type"))); $oNodeModule->appendChild("type", clHtmlSpecialChars($this->get("type")));
@ -799,7 +799,7 @@ class cApiModule extends Item {
unset($sContent); unset($sContent);
// Export layouts // Export layouts
$oNodeLayouts = & $oRoot->appendChild("layouts"); $oNodeLayouts = &$oRoot->appendChild("layouts");
$cApiLayoutCollection = new cApiLayoutCollection; $cApiLayoutCollection = new cApiLayoutCollection;
$cApiLayoutCollection->setWhere("idclient", $client); $cApiLayoutCollection->setWhere("idclient", $client);
@ -827,7 +827,7 @@ class cApiModule extends Item {
$iID = $oLang->get($oLang->primaryKey); $iID = $oLang->get($oLang->primaryKey);
if (in_array($iID, $aData["translations"])) { if (in_array($iID, $aData["translations"])) {
$oNodeTrans = & $oRoot->appendChild("translations"); $oNodeTrans = &$oRoot->appendChild("translations");
// This is nice, but it doesn't help so much, // This is nice, but it doesn't help so much,
// as this data is available too late on import ... // as this data is available too late on import ...
$oNodeTrans->setNodeAttribs(["origin-language-id" => $iID, "origin-language-name" => clHtmlSpecialChars($oLang->get("name"))]); $oNodeTrans->setNodeAttribs(["origin-language-id" => $iID, "origin-language-name" => clHtmlSpecialChars($oLang->get("name"))]);
@ -840,7 +840,7 @@ class cApiModule extends Item {
$oTranslations->query(); $oTranslations->query();
while ($oTranslation = $oTranslations->next()) { while ($oTranslation = $oTranslations->next()) {
$oNodeString = & $oNodeTrans->appendChild("string"); $oNodeString = &$oNodeTrans->appendChild("string");
$oNodeString->appendChild("original", clHtmlSpecialChars($oTranslation->get("original"))); $oNodeString->appendChild("original", clHtmlSpecialChars($oTranslation->get("original")));
$oNodeString->appendChild("translation", clHtmlSpecialChars($oTranslation->get("translation"))); $oNodeString->appendChild("translation", clHtmlSpecialChars($oTranslation->get("translation")));
} }
@ -1145,9 +1145,9 @@ class cApiModuleTranslationCollection extends ItemCollection {
$cApiModuleTranslationCollection->select("idmod = '$idmod' AND idlang='$idlang'"); $cApiModuleTranslationCollection->select("idmod = '$idmod' AND idlang='$idlang'");
$xmlTree = new XmlTree('1.0', 'ISO-8859-1'); $xmlTree = new XmlTree('1.0', 'ISO-8859-1');
$root = & $xmlTree->addRoot('module'); $root = &$xmlTree->addRoot('module');
$translation = & $root->appendChild('translation'); $translation = &$root->appendChild('translation');
$translation->setNodeAttribs(["origin-language-id" => $idlang, "origin-language-name" => $cApiLanguage->get("name")]); $translation->setNodeAttribs(["origin-language-id" => $idlang, "origin-language-name" => $cApiLanguage->get("name")]);
while ($otranslation = $cApiModuleTranslationCollection->next()) { while ($otranslation = $cApiModuleTranslationCollection->next()) {