5 include_once
"./Services/Xml/classes/class.ilXmlWriter.php";
6 include_once
"./Modules/Forum/classes/class.ilFileDataForum.php";
41 $this->forum_id = $id;
53 $this->target_dir_relative = $a_rel;
54 $this->target_dir_absolute = $a_abs;
61 $query_frm =
'SELECT * FROM frm_settings fs '.
62 'JOIN object_data od ON fs.obj_id = od.obj_id '.
63 'JOIN frm_data ON top_frm_fk = od.obj_id '.
64 'WHERE fs.obj_id = '.$ilDB->quote($this->forum_id,
'integer');
66 $res = $ilDB->query($query_frm);
81 $this->
xmlElement(
"Statistics", null, (
int)
$row->statistics_enabled);
82 $this->
xmlElement(
"PostingActivation", null, (
int)
$row->post_activation);
83 $this->
xmlElement(
"PresetSubject", null, (
int)
$row->preset_subject);
85 $this->
xmlElement(
"NotificationType", null,
$row->notification_type);
86 $this->
xmlElement(
"ForceNotification", null, (
int)
$row->admin_force_noti);
87 $this->
xmlElement(
"ToggleNotification", null, (
int)
$row->user_toggle_noti);
95 $query_thr =
"SELECT frm_threads.* ".
97 " INNER JOIN frm_data ON top_pk = thr_top_fk ".
98 'WHERE top_frm_fk = '.$ilDB->quote($this->forum_id,
'integer');
100 $res = $ilDB->query($query_thr);
102 while(
$row = $ilDB->fetchObject(
$res) )
117 $query =
'SELECT frm_posts.*, frm_posts_tree.*
120 ON top_pk = pos_top_fk
121 INNER JOIN frm_posts_tree
123 WHERE pos_thr_fk = '.$ilDB->quote(
$row->thr_pk,
'integer').
' ';
124 $query .=
" ORDER BY frm_posts_tree.lft ASC";
125 $resPosts = $ilDB->query(
$query);
128 while( $rowPost = $ilDB->fetchObject($resPosts) )
141 $this->
xmlElement(
"Id", null, (
int)$rowPost->pos_pk);
142 $this->
xmlElement(
"UserId", null, (
int)$rowPost->pos_usr_id);
143 $this->
xmlElement(
"Alias", null, $rowPost->pos_usr_alias);
144 $this->
xmlElement(
"Subject", null, $rowPost->pos_subject);
145 $this->
xmlElement(
"CreateDate", null, $rowPost->pos_date);
146 $this->
xmlElement(
"UpdateDate", null, $rowPost->pos_update);
147 $this->
xmlElement(
"UpdateUserId", null, (
int)$rowPost->update_user);
148 $this->
xmlElement(
"Censorship", null, (
int)$rowPost->pos_cens);
149 $this->
xmlElement(
"CensorshipMessage", null, $rowPost->pos_cens_com);
150 $this->
xmlElement(
"Notification", null, $rowPost->notify);
151 $this->
xmlElement(
"ImportName", null, $rowPost->import_name);
152 $this->
xmlElement(
"Status", null, (
int)$rowPost->pos_status);
153 $this->
xmlElement(
"Message", null, $rowPost->pos_message);
154 $this->
xmlElement(
"Lft", null, (
int)$rowPost->lft);
155 $this->
xmlElement(
"Rgt", null, (
int)$rowPost->rgt);
156 $this->
xmlElement(
"Depth", null, (
int)$rowPost->depth);
157 $this->
xmlElement(
"ParentId", null, (
int)$rowPost->parent_pos);
160 $this->forum_id, $rowPost->pos_pk
164 if ( count($tmp_file_obj->getFilesOfPost()) )
166 foreach ($tmp_file_obj->getFilesOfPost() as
$file)
170 copy(
$file[
'path'], $this->target_dir_absolute.
"/".basename(
$file[
'path']));
171 $content = $this->target_dir_relative.
"/".basename(
$file[
'path']);
213 return str_replace(
'',
'', $this->
xmlDumpMem(
false));