14 parent::__construct($aSystem);
15 $this->_aTables = array(
16 'ch_forum_actions_log' => array(
17 'query' =>
"SELECT `f`.* FROM `ch_forum_actions_log` AS `f` INNER JOIN `Profiles` AS `p` ON (`p`.`NickName` = `f`.`user_name`) WHERE `p`.`ID` = {profile_id}"),
18 'ch_forum_attachments' => array(
19 'query' =>
"SELECT `f`.* FROM `ch_forum_attachments` AS `f` INNER JOIN `ch_forum_post` AS `m` ON (`m`.`post_id` = `f`.`post_id`) INNER JOIN `Profiles` AS `p` ON (`p`.`NickName` = `m`.`user`) WHERE `p`.`ID` = {profile_id}"),
20 'ch_forum_flag' => array(
21 'query' =>
"SELECT `f`.* FROM `ch_forum_flag` AS `f` INNER JOIN `Profiles` AS `p` ON (`p`.`NickName` = `f`.`user`) WHERE `p`.`ID` = {profile_id}"),
22 'ch_forum_post' => array(
23 'query' =>
"SELECT `f`.* FROM `ch_forum_post` AS `f` INNER JOIN `Profiles` AS `p` ON (`p`.`NickName` = `f`.`user`) WHERE `p`.`ID` = {profile_id}"),
24 'ch_forum_signatures' => array(
25 'query' =>
"SELECT `f`.* FROM `ch_forum_signatures` AS `f` INNER JOIN `Profiles` AS `p` ON (`p`.`NickName` = `f`.`user`) WHERE `p`.`ID` = {profile_id}"),
26 'ch_forum_topic' => array(
27 'query' =>
"SELECT `f`.* FROM `ch_forum_topic` AS `f` INNER JOIN `Profiles` AS `p` ON (`p`.`NickName` = `f`.`first_post_user`) WHERE `p`.`ID` = {profile_id}"),
28 'ch_forum_user_activity' => array(
29 'query' =>
"SELECT `f`.* FROM `ch_forum_user_activity` AS `f` INNER JOIN `Profiles` AS `p` ON (`p`.`NickName` = `f`.`user`) WHERE `p`.`ID` = {profile_id}"),
30 'ch_forum_user_stat' => array(
31 'query' =>
"SELECT `f`.* FROM `ch_forum_user_stat` AS `f` INNER JOIN `Profiles` AS `p` ON (`p`.`NickName` = `f`.`user`) WHERE `p`.`ID` = {profile_id}"),
32 'ch_forum_vote' => array(
33 'query' =>
"SELECT `f`.* FROM `ch_forum_vote` AS `f` INNER JOIN `Profiles` AS `p` ON (`p`.`NickName` = `f`.`user_name`) WHERE `p`.`ID` = {profile_id}"),
35 $this->_sFilesBaseDir =
'modules/cheetah/forum/data/attachments/';
36 $this->_aTablesWithFiles = array(
37 'ch_forum_attachments' => array(
48 return $this->_sFilesBaseDir . substr(
$s, 0, 1) .
'/' . substr(
$s, 0, 2) .
'/' . substr(
$s, 0, 3) .
'/' .
$s;