5 include_once
"./Services/Xml/classes/class.ilXmlWriter.php";
61 $this->file = &
$file;
72 $this->omit_header = $a_val;
93 $this->target_dir_relative = $a_rel;
94 $this->target_dir_absolute = $a_abs;
123 "obj_id" =>
"il_".IL_INST_ID.
"_file_".$this->file->getId(),
124 "version" => $this->file->getVersion(),
125 "size" => $this->file->getFileSize(),
126 "type" => $this->file->getFileType()
130 $this->
xmlElement(
"Filename",null,$this->file->getFileName());
132 $this->
xmlElement(
"Title", null,$this->file->getTitle());
133 $this->
xmlElement(
"Description", null,$this->file->getDescription());
136 if ($this->attachFileContents)
138 $filename = $this->file->getDirectory($this->file->getVersion()).
"/".$this->file->getFileName();
143 $attribs = array(
"mode" =>
"COPY");
144 copy(
$filename, $this->target_dir_absolute.
"/".$this->file->getFileName());
145 $content = $this->target_dir_relative.
"/".$this->file->getFileName();
146 $this->
xmlElement(
"Content",$attribs, $content);
150 $content = @file_get_contents(
$filename);
151 $attribs = array(
"mode" =>
"PLAIN");
154 $attribs [
"mode"] =
"ZLIB";
155 $content = @gzcompress($content, 9);
158 $attribs [
"mode"] =
"GZIP";
159 $content = @gzencode($content, 9);
161 $content = base64_encode($content);
162 $this->
xmlElement(
"Content",$attribs, $content);
168 include_once(
"classes/class.ilHistory.php");
172 if (count($versions)) {
175 $info_params = $version[
"info_params"];
176 list(
$filename,$history_id) = split(
",",$info_params);
180 "usr_id" =>
"il_".IL_INST_ID.
"_usr_".$version[
"user_id"]
205 $this->
xmlSetDtdDef(
"<!DOCTYPE File PUBLIC \"-//ILIAS//DTD FileAdministration//EN\" \"".ILIAS_HTTP_PATH.
"/xml/ilias_file_3_8.dtd\">");