18 require_once SQ_CORE_PACKAGE_PATH.
'/system/cron/cron_job/cron_job.inc';
19 require_once SQ_FUDGE_PATH.
'/db_extras/db_extras.inc';
44 parent::__construct($assetid);
62 require_once SQ_CORE_PACKAGE_PATH.
'/system/system_asset_fns.inc';
64 $GLOBALS[
'SQ_SYSTEM']->changeDatabaseConnection(
'db2');
65 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'BEGIN');
67 if ($linkid = parent::create($link)) {
68 if (!system_asset_fns_create_cleanup($this)) {
74 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'COMMIT');
76 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'ROLLBACK');
79 $GLOBALS[
'SQ_SYSTEM']->restoreDatabaseConnection();
96 return $GLOBALS[
'SQ_SYSTEM']->am->getTypeInfo($this->
type(),
'name');
127 trigger_localised_error(
'CRON0024', E_USER_WARNING, $GLOBALS[
'SQ_SYSTEM']->am->getTypeInfo($this->type(),
'name'));
165 $old_mask = umask(0002);
167 require_once SQ_PACKAGES_PATH.
'/sharepoint/lib/sharepoint_common.inc';
169 $sql =
'SELECT assetid FROM sq_ast WHERE type_code like \'sharepoint_saved_search\'';
172 if (!empty($assetids)) {
173 foreach ($assetids as $assetid => $info) {
174 $trash_link = $GLOBALS[
'SQ_SYSTEM']->am->getParents($assetid,
'trash_folder', TRUE);
175 if (empty($trash_link)) {
176 $ss = $GLOBALS[
'SQ_SYSTEM']->am->getAsset($assetid);
177 $connection = $ss->getConnection();
179 if ($test_connection) {
180 $ss->updateCachedResult();
188 return SQ_CRON_JOB_COMPLETED;