17 require_once SQ_INCLUDE_PATH.
'/package_manager.inc';
40 $this->_full_path = SQ_PACKAGES_PATH.
'/cms';
56 $system_assets = Array(
57 'cron_job_manage_pending_accounts',
58 'cron_job_manage_incomplete_submissions',
60 $installed_assets = Array();
62 foreach ($system_assets as $type_code) {
63 if ($GLOBALS[
'SQ_SYSTEM']->am->installed($type_code)) {
64 $installed_assets[] = $type_code;
68 return $installed_assets;
81 $cron_manager = $GLOBALS[
'SQ_SYSTEM']->am->getSystemAsset(
'cron_manager');
82 if (is_null($cron_manager)) {
83 trigger_error(
'Couldn\'t get cron manager, couldn\'t create Manage Pending Accounts cron job', E_USER_WARNING);
88 $GLOBALS[
'SQ_SYSTEM']->am->includeAsset(
'cron_job_manage_pending_accounts');
91 $root_user = $GLOBALS[
'SQ_SYSTEM']->am->getSystemAsset(
'root_user');
92 if (!$cron_manager->addJob($cron_job, $root_user, SQ_LINK_TYPE_2)) {
93 trigger_error(
'Manage Pending Accounts Cron Job NOT CREATED', E_USER_ERROR);
95 pre_echo(
'Manage Pending Accounts Cron Job Id: '.$cron_job->id);
97 $GLOBALS[
'SQ_SYSTEM']->am->registerSystemAsset(
'cron_job_manage_pending_accounts', $cron_job->id);
112 $cron_manager = $GLOBALS[
'SQ_SYSTEM']->am->getSystemAsset(
'cron_manager');
113 if (is_null($cron_manager)) {
114 trigger_error(
'Couldn\'t get cron manager, couldn\'t create Manage Pending Accounts cron job', E_USER_WARNING);
119 $GLOBALS[
'SQ_SYSTEM']->am->includeAsset(
'cron_job_manage_incomplete_submissions');
122 $root_user = $GLOBALS[
'SQ_SYSTEM']->am->getSystemAsset(
'root_user');
123 if (!$cron_manager->addJob($cron_job, $root_user, SQ_LINK_TYPE_2)) {
124 trigger_error(
'Manage Incomplete Submissions Cron Job NOT CREATED', E_USER_ERROR);
126 pre_echo(
'Manage Incomplete Submissions Cron Job Id: '.$cron_job->id);
128 $GLOBALS[
'SQ_SYSTEM']->am->registerSystemAsset(
'cron_job_manage_incomplete_submissions', $cron_job->id);