14 parent::__construct($aSystem);
15 $this->_aTables = array(
16 'ch_photos_cmts' =>
'`cmt_author_id` = {profile_id}',
17 'ch_photos_cmts_albums' =>
'`cmt_author_id` = {profile_id}',
18 'ch_photos_favorites' =>
'`Profile` = {profile_id}',
19 'ch_photos_main' =>
'`Owner` = {profile_id}',
20 'ch_photos_rating' => array(
21 'query' =>
"SELECT `r`.* FROM `ch_photos_rating` AS `r` INNER JOIN `ch_photos_main` AS `m` ON (`m`.`ID` = `r`.`gal_id`) WHERE `m`.`Owner` = {profile_id}"),
22 'ch_photos_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_photos_views_track` AS `t` INNER JOIN `ch_photos_main` AS `m` ON (`m`.`ID` = `t`.`id`) WHERE `m`.`Owner` = {profile_id} OR `t`.`viewer` = {profile_id}"),
24 'ch_photos_voting_track' => array(
25 'query' =>
"SELECT `t`.`gal_id`, 0, `t`.`gal_date` FROM `ch_photos_voting_track` AS `t` INNER JOIN `ch_photos_main` AS `m` ON (`m`.`ID` = `t`.`gal_id`) WHERE `m`.`Owner` = {profile_id}"),
28 $this->_sFilesBaseDir =
'modules/cheetah/photos/data/files/';
29 $this->_aTablesWithFiles = array(
41 parent::__construct($sBaseDir);
43 $this->_aPostfixes = array(
'',
'_m',
'_ri',
'_rt',
'_t',
'_t_2x');
48 foreach($this->_aPostfixes
as $sPostfix) {
49 $sFile = $this->_sBaseDir . $aRow[
'ID'] . $sPostfix .
'.' . $aRow[
'Ext'];