17 require_once SQ_INCLUDE_PATH.
'/package_manager.inc';
41 $this->_full_path = SQ_PACKAGES_PATH.
'/sharepoint';
57 $system_assets = Array(
58 'cron_job_update_sharepoint_record',
59 'cron_job_sync_cmis_bridges',
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 $cron_manager = $GLOBALS[
'SQ_SYSTEM']->am->getSystemAsset(
'cron_manager');
83 if (is_null($cron_manager)) {
84 trigger_error(
'Couldn\'t get cron manager, couldn\'t create Update Trim Record cron job', E_USER_WARNING);
89 $GLOBALS[
'SQ_SYSTEM']->am->includeAsset(
'cron_job_update_sharepoint_record');
92 $root_user = $GLOBALS[
'SQ_SYSTEM']->am->getSystemAsset(
'root_user');
93 if (!$cron_manager->addJob($cron_job, $root_user, SQ_LINK_TYPE_2)) {
94 trigger_error(
'Update Trim Record Cron Job NOT CREATED', E_USER_ERROR);
96 pre_echo(
'Update Trim Record Cron Job Id: '.$cron_job->id);
98 $GLOBALS[
'SQ_SYSTEM']->am->registerSystemAsset(
'cron_job_update_sharepoint_record', $cron_job->id);
113 $cron_manager = $GLOBALS[
'SQ_SYSTEM']->am->getSystemAsset(
'cron_manager');
114 if (is_null($cron_manager)) {
115 trigger_error(
'Couldn\'t get cron manager, couldn\'t create Sync CMIS Bridges Cron Job', E_USER_WARNING);
120 $GLOBALS[
'SQ_SYSTEM']->am->includeAsset(
'cron_job_sync_cmis_bridges');
123 $root_user = $GLOBALS[
'SQ_SYSTEM']->am->getSystemAsset(
'root_user');
124 if (!$cron_manager->addJob($cron_job, $root_user, SQ_LINK_TYPE_2)) {
125 trigger_error(
'Sync CMIS Bridges Cron Job NOT CREATED', E_USER_ERROR);
127 pre_echo(
'Sync CMIS Bridges Cron Job Id: '.$cron_job->id);
129 $GLOBALS[
'SQ_SYSTEM']->am->registerSystemAsset(
'cron_job_sync_cmis_bridges', $cron_job->id);