40 include_once
"./classes/class.ilXmlWriter.php";
79 $this->file = &
$file;
110 "obj_id" =>
"il_".IL_INST_ID.
"_file_".$this->file->getId(),
111 "version" => $this->file->getVersion(),
112 "size" => $this->file->getFileSize(),
113 "type" => $this->file->getFileType()
117 $this->
xmlElement(
"Filename",null,$this->file->getFileName());
119 $this->
xmlElement(
"Title", null,$this->file->getTitle());
120 $this->
xmlElement(
"Description", null,$this->file->getDescription());
123 if ($this->attachFileContents)
125 $filename = $this->file->getDirectory($this->file->getVersion()).
"/".$this->file->getFileName();
128 $content = @file_get_contents(
$filename);
129 $attribs = array(
"mode" =>
"PLAIN");
132 $attribs [
"mode"] =
"ZLIB";
133 $content = @gzcompress($content, 9);
136 $attribs [
"mode"] =
"GZIP";
137 $content = @gzencode($content, 9);
139 $content = base64_encode($content);
140 $this->
xmlElement(
"Content",$attribs, $content);
145 include_once(
"classes/class.ilHistory.php");
149 if (count($versions)) {
152 $info_params = $version[
"info_params"];
153 list(
$filename,$history_id) = split(
",",$info_params);
157 "usr_id" =>
"il_".IL_INST_ID.
"_usr_".$version[
"user_id"]
180 $this->
xmlSetDtdDef(
"<!DOCTYPE File PUBLIC \"-//ILIAS//DTD FileAdministration//EN\" \"".ILIAS_HTTP_PATH.
"/xml/ilias_file_3_8.dtd\">");