14 parent::__construct($aSystem);
15 $this->_aTables = array(
16 'ch_files_cmts' =>
'`cmt_author_id` = {profile_id}',
17 'ch_files_cmts_albums' =>
'`cmt_author_id` = {profile_id}',
18 'ch_files_favorites' =>
'`Profile` = {profile_id}',
19 'ch_files_main' =>
'`Owner` = {profile_id}',
20 'ch_files_rating' => array(
21 'query' =>
"SELECT `r`.* FROM `ch_files_rating` AS `r` INNER JOIN `ch_files_main` AS `m` ON (`m`.`ID` = `r`.`gal_id`) WHERE `m`.`Owner` = {profile_id}"),
22 'ch_files_views_track' => array(
23 'query' =>
"SELECT `t`.`id`, IF(`t`.`viewer` = {profile_id}, `t`.`viewer`, 0), IF(`t`.`viewer` = {profile_id}, `t`.`ip`, 0), `t`.`ts` FROM `ch_files_views_track` AS `t` INNER JOIN `ch_files_main` AS `m` ON (`m`.`ID` = `t`.`id`) WHERE `m`.`Owner` = {profile_id} OR `t`.`viewer` = {profile_id}"),
24 'ch_files_voting_track' => array(
25 'query' =>
"SELECT `t`.`gal_id`, 0, `t`.`gal_date` FROM `ch_files_voting_track` AS `t` INNER JOIN `ch_files_main` AS `m` ON (`m`.`ID` = `t`.`gal_id`) WHERE `m`.`Owner` = {profile_id}"),
28 $this->_sFilesBaseDir =
'modules/cheetah/files/data/files/';
29 $this->_aTablesWithFiles = array(
39 $sFile = $this->_sBaseDir . $aRow[
'ID'] .
'_' . sha1($aRow[
'Date']);