Dieser Commit ist enthalten in:
Oldperl 2019-08-19 12:02:29 +00:00
Ursprung df6e4388ac
Commit b995b2d2a2
2 geänderte Dateien mit 16 neuen und 25 gelöschten Zeilen

Datei anzeigen

@ -273,35 +273,26 @@ class Version {
* @return string returns content of xml file * @return string returns content of xml file
*/ */
public function createNewXml() { public function createNewXml() {
$oXW = new cXmlWriter(); $oWriter = new cXmlWriter();
$oXW->openMemory(); $oRootElement = $oWriter->addElement('version', '', NULL, array(
$oXW->setIndent(true); 'xml:lang' => 'de'
$oXW->startDocument('1.0', 'UTF-8'); ));
$oHeadElement = $oWriter->addElement('head', '', $oRootElement);
$oXW->startElement('version'); $oWriter->addElement('version_id', $this->iIdentity . '_' . $this->iVersion, $oHeadElement);
$oXW->writeAttribute('xml:lang', 'de'); $oWriter->addElement('type', $this->sType, $oHeadElement);
$oWriter->addElement('date', date('Y-m-d H:i:s'), $oHeadElement);
$oXW->startElement('head'); $oWriter->addElement('author', $this->sAuthor, $oHeadElement);
$oXW->writeElement('version_id', $this->iIdentity . '_' . $this->iVersion); $oWriter->addElement('client', $this->iClient, $oHeadElement);
$oXW->writeElement('type', $this->sType); $oWriter->addElement('created', $this->dCreated, $oHeadElement);
$oXW->writeElement('date', date("Y-m-d H:i:s")); $oWriter->addElement('lastmodified', $this->dLastModified, $oHeadElement);
$oXW->writeElement('author', $this->sAuthor);
$oXW->writeElement('client', $this->iClient);
$oXW->writeElement('created', $this->dCreated);
$oXW->writeElement('lastmodified', $this->dLastModified);
$oXW->endElement();
$oXW->startElement('body');
$oBodyElement = $oWriter->addElement('body', '', $oRootElement);
foreach ($this->aBodyData as $sKey => $sValue) { foreach ($this->aBodyData as $sKey => $sValue) {
$oXW->writeElement($sKey, clHtmlEntities($sValue)); $oWriter->addElement($sKey, $sValue, $oBodyElement, array(), true);
} }
$oXW->endElement(); return $oWriter->saveToString();
$oXW->endElement();
return $oXW->outputMemory(true);
} }
/** /**

Datei anzeigen

@ -147,7 +147,7 @@ class VersionImport extends Version {
$this->sTableName = $this->aCfg['sql']['sqlprefix'] . "_mod_history"; $this->sTableName = $this->aCfg['sql']['sqlprefix'] . "_mod_history";
} }
// init class member // init class member
$this->aCreateVesion = array(); $this->aCreateVersion = array();
// Init class members with table con_history // Init class members with table con_history
$this->getModuleHistoryTable(); $this->getModuleHistoryTable();