enable(); } else { $AT->disable(); } // and remove old file unlink('user_privileges/audit_trail.php'); } $VP = VTEProperties::getInstance(); $VP->setProperty('security.audit.log_retention_time', 3); // keep logs for 3 months if (!is_dir('logs/AuditTrail')) { mkdir('logs/AuditTrail', 0755); } $table = $table_prefix . '_audit_trial'; if ($adb->isMysql()) { $cols = $adb->getColumnNames($table); if (!in_array('source', $cols)) { $adb->query( "ALTER TABLE $table ADD COLUMN source VARCHAR(31) NULL, ADD COLUMN subaction VARCHAR(63) NULL, ADD COLUMN request_id VARCHAR(63) NULL, ADD COLUMN ip_address VARCHAR(31) NULL, ADD COLUMN extra VARCHAR(1000) NULL " ); } } else { $adb->addColumnToTable($table, 'source', 'C(31)'); $adb->addColumnToTable($table, 'subaction', 'C(63)'); $adb->addColumnToTable($table, 'request_id', 'C(63)'); $adb->addColumnToTable($table, 'ip_address', 'C(31)'); $adb->addColumnToTable($table, 'extra', 'C(1000)'); } $adb->addColumnToTable($table_prefix.'_loginhistory', 'request_id', 'C(63)'); // and set the source to web now $adb->pquery("UPDATE $table SET source = ? WHERE source IS NULL", array('web')); $trans = array( 'APP_STRINGS' => array( 'en_us' => array( 'LBL_IP_ADDRESS' => 'Indirizzo IP', ), 'it_it' => array( 'LBL_IP_ADDRESS' => 'Indirizzo IP', ), ), ); foreach ($trans as $module=>$modlang) { foreach ($modlang as $lang=>$translist) { foreach ($translist as $label=>$translabel) { SDK::setLanguageEntry($module, $lang, $label, $translabel); } } } // crmv@200009 crmv@204673 $schema = ' ENGINE=InnoDB status
'; if (!Vtiger_Utils::CheckTable($table_prefix . '_load_relations')) { $schema_obj = new adoSchema($adb->database); $schema_obj->ExecuteSchema($schema_obj->ParseSchemaString($schema)); } $schema = ' ENGINE=InnoDB massid status
'; if (!Vtiger_Utils::CheckTable($table_prefix . '_load_relations_queue')) { $schema_obj = new adoSchema($adb->database); $schema_obj->ExecuteSchema($schema_obj->ParseSchemaString($schema)); } $VTEP = VTEProperties::getInstance(); $VTEP->setProperty('modules.import.immediate_import_limit', 1000); $VTEP->setProperty('modules.import.import_batch_Limit', 250); $VTEP->setProperty('loadrelations.limit', 100); require_once('include/utils/CronUtils.php'); $CU = CronUtils::getInstance(); $cronname = 'LoadRelations'; $cj = CronJob::getByName($cronname); if (empty($cj)) { $cj = new CronJob(); $cj->name = $cronname; $cj->active = 1; $cj->singleRun = false; $cj->fileName = 'cron/modules/LoadRelations/LoadRelations.service.php'; $cj->timeout = 1800; // 30 min $cj->repeat = 120; // 2 min $CU->insertCronJob($cj); } require_once 'include/events/include.inc'; $em = new VTEventsManager($adb); $em->registerHandler('vtiger.entity.relate','modules/Settings/ProcessMaker/ProcessMakerHandler.php','ProcessMakerHandler'); $trans = array( 'APP_STRINGS' => array( 'en_us' => array( 'LBL_LOAD_RELATIONS_OK' => 'Loading relations completed correctly.', 'LBL_LOAD_RELATIONS_ERROR' => 'Some errors occurred during Loading relations. Please check the logfiles for details.', 'LBL_LOAD_RELATIONS_OK_SUBJECT' => '[VTECRM] LoadRelations completed', 'LBL_LOAD_RELATIONS_OK_DESC' => "Loading relations for the module {module} has been completed correctly.
{num_records} records have been modified.", 'LBL_LOAD_RELATIONS_ERROR_SUBJECT' => '[VTECRM] LoadRelations error', 'LBL_LOAD_RELATIONS_ERROR_DESC' => "Some errors occurred during LoadRelations for the module {module}.
{num_fail_records} records have not been saved correctly, on a total of {num_records} records. Please check the logfiles for details.", ), ), 'ALERT_ARR' => array( 'en_us' => array( 'LBL_LOAD_RELATIONS_ENQUEUE' => 'You selected more than {max_records} items. The process will continue in background and you\'ll be notified at the end.', ), ), 'Settings' => array( // language 'en_us' => array( // translations 'LBL_ON_MODULE_RELATION'=>'on relation with:', ), 'it_it' => array( // translations 'LBL_ON_MODULE_RELATION'=>'in relazione con:', ), ), ); foreach ($trans as $module=>$modlang) { foreach ($modlang as $lang=>$translist) { foreach ($translist as $label=>$translabel) { SDK::setLanguageEntry($module, $lang, $label, $translabel); } } }