getFullName(), __FILE__, __LINE__, __METHOD__, 10 ); $user_id = $current_user->getId(); } else { $user_id = TTUUID::getZeroID(); } } if ( $table == '' ) { return false; } $lf = TTnew( 'LogFactory' ); /** @var LogFactory $lf */ $lf->setObject( $object_id ); $lf->setAction( $action_id ); $lf->setTableName( $table ); $lf->setUser( TTUUID::castUUID( $user_id ) ); $lf->setDescription( $description ); $lf->setDate( time() ); //Debug::text('Object ID: '. $object_id .' Action ID: '. $action_id .' Table: '. $table .' Description: '. $description, __FILE__, __LINE__, __METHOD__, 10); if ( $lf->isValid() === true ) { $insert_id = $lf->Save(); if ( ( !isset( $config_vars['other']['disable_audit_log_detail'] ) || ( isset( $config_vars['other']['disable_audit_log_detail'] ) && $config_vars['other']['disable_audit_log_detail'] != true ) ) && is_object( $object ) && $object->getEnableSystemLogDetail() == true ) { $ldf = TTnew( 'LogDetailFactory' ); /** @var LogDetailFactory $ldf */ $ldf->addLogDetail( $action_id, $insert_id, $object ); } else { Debug::text( 'LogDetail Disabled... Object ID: ' . $object_id . ' Action ID: ' . $action_id . ' Table: ' . $table . ' Description: ' . $description . ' User ID: ' . $user_id, __FILE__, __LINE__, __METHOD__, 10 ); //Debug::text('LogDetail Disabled... Config: '. (int)$config_vars['other']['disable_audit_log_detail'] .' Function: '. (int)$object->getEnableSystemLogDetail(), __FILE__, __LINE__, __METHOD__, 10); } return true; } return false; } } ?>