17 require_once SQ_INCLUDE_PATH.
'/package_manager.inc';
41 $this->_full_path = SQ_PACKAGES_PATH.
'/funnelback';
57 $system_assets = Array(
59 'cron_job_funnelback_log_rotation',
61 $installed_assets = Array();
63 foreach ($system_assets as $type_code) {
64 if ($GLOBALS[
'SQ_SYSTEM']->am->installed($type_code)) {
65 $installed_assets[] = $type_code;
69 return $installed_assets;
82 $system_management_folder = $GLOBALS[
'SQ_SYSTEM']->am->getSystemAsset(
'system_management_folder');
84 $GLOBALS[
'SQ_SYSTEM']->am->includeAsset(
'funnelback_manager');
86 $funnelback_manager_link = Array(
'asset' => &$system_management_folder,
'link_type' => SQ_LINK_TYPE_1,
'is_exclusive' => 1);
87 if (!$funnelback_manager->create($funnelback_manager_link)) {
88 trigger_localised_error(
'FNB0010', E_USER_ERROR);
90 pre_echo(
'Funnelback Manager Asset Id : '.$funnelback_manager->id);
92 $GLOBALS[
'SQ_SYSTEM']->am->registerSystemAsset(
'funnelback_manager', $funnelback_manager->id);
94 return $funnelback_manager;
107 $cron_manager = $GLOBALS[
'SQ_SYSTEM']->am->getSystemAsset(
'cron_manager');
108 if (is_null($cron_manager)) {
109 trigger_error(
'Couldn\'t get cron manager, couldn\'t create Funnelback Log Rotation cron job', E_USER_WARNING);
114 $GLOBALS[
'SQ_SYSTEM']->am->includeAsset(
'cron_job_funnelback_log_rotation');
117 $root_user = $GLOBALS[
'SQ_SYSTEM']->am->getSystemAsset(
'root_user');
118 if (!$cron_manager->addJob($cron_job, $root_user, SQ_LINK_TYPE_2)) {
119 trigger_error(
'Funnelback Log Rotation Cron Job NOT CREATED', E_USER_ERROR);
121 pre_echo(
'Funnelback Log Rotation Cron Job Id: '.$cron_job->id);
123 $GLOBALS[
'SQ_SYSTEM']->am->registerSystemAsset(
'cron_job_funnelback_log_rotation', $cron_job->id);