4 include_once
'Services/Object/classes/class.ilObjectAccess.php';
5 include_once
'Modules/Forum/classes/class.ilObjForum.php';
38 'permission'=>
'read',
39 'cmd' =>
'showThreads',
44 'permission'=>
'write',
46 'lang_var' =>
'settings'
66 $t_arr = explode(
'_', $a_target);
68 if($t_arr[0] !=
'frm' || ((
int)$t_arr[1]) <= 0)
73 if($ilAccess->checkAccess(
'read',
'', $t_arr[1]))
87 public static function _getThreadForPosting($a_pos_id)
95 'SELECT pos_thr_fk FROM frm_posts WHERE pos_pk = %s',
102 return $row[
'pos_thr_fk'];
111 public static function _lookupDiskUsage($a_obj_id)
118 require_once
'Modules/Forum/classes/class.ilFileDataForum.php';
120 $res = $ilDB->queryf(
121 'SELECT top_frm_fk, pos_pk FROM frm_posts p
122 JOIN frm_data d ON d.top_pk = p.pos_top_fk
123 WHERE top_frm_fk = %s',
129 while(
$row = $ilDB->fetchAssoc(
$res))
132 $filesOfPost = $fileDataForum->getFilesOfPost();
133 foreach($filesOfPost as $attachment)
135 $size += $attachment[
'size'];
137 unset($fileDataForum);
152 include_once
'Services/Utilities/classes/class.ilStr.php';
154 $text = strip_tags($text);
155 $text = preg_replace(
'/\[(\/)?quote\]/',
'', $text);
174 ilObjForum::preloadForumIdsByRefIds((array)$ref_ids);
184 return ilObjForum::lookupLastPostByRefId(
$ref_id);
194 return ilObjForum::lookupStatisticsByRefId(
$ref_id);
204 if(!isset(self::$userInstanceCache[
$usr_id]))
209 return self::$userInstanceCache[
$usr_id];