Cheetah
ChNewsExport.php
Go to the documentation of this file.
1 <?php
2 
8 ch_import('ChWsbExport');
9 
11 {
12  protected function __construct($aSystem)
13  {
14  parent::__construct($aSystem);
15  $this->_aTables = array(
16  'ch_news_comments' => '`cmt_author_id` = {profile_id}',
17  'ch_news_comments_track' => '`cmt_rate_author_id` = {profile_id}',
18  'ch_news_entries' => '`author_id` = {profile_id}',
19  'ch_news_views_track' => array(
20  'query' => "SELECT `t`.`id`, IF(`t`.`viewer` = {profile_id}, `t`.`viewer`, 0), IF(`t`.`viewer` = {profile_id}, `t`.`ip`, 0), `t`.`ts` FROM `ch_news_views_track` AS `t` INNER JOIN `ch_news_entries` AS `m` ON (`m`.`id` = `t`.`id`) WHERE `m`.`author_id` = {profile_id} OR `t`.`viewer` = {profile_id}"), // anonymize some data
21  'ch_news_voting' => array(
22  'query' => "SELECT `v`.* FROM `ch_news_voting` AS `v` INNER JOIN `ch_news_entries` AS `m` ON (`m`.`id` = `v`.`news_id`) WHERE `m`.`author_id` = {profile_id}"),
23  'ch_news_voting_track' => array(
24  'query' => "SELECT `t`.`news_id`, 0, `t`.`news_date` FROM `ch_news_voting_track` AS `t` INNER JOIN `ch_news_entries` AS `m` ON (`m`.`id` = `t`.`news_id`) WHERE `m`.`author_id` = {profile_id}"), // anonymize some data
25  );
26  }
27 }
ch_import
ch_import($sClassName, $aModule=array())
Definition: utils.inc.php:1218
ChWsbExport
Definition: ChWsbExport.php:29
php
ChNewsExport
Definition: ChNewsExport.php:11
ChNewsExport\__construct
__construct($aSystem)
Definition: ChNewsExport.php:12