From 70d52ad19093456abf045b1b98553356a6437e4b Mon Sep 17 00:00:00 2001 From: yambenari24 Date: Thu, 5 Mar 2026 14:35:25 +0200 Subject: [PATCH 01/22] Moving fileProcessingGracePeriod configuration from a global server setting to a per-drop-folder setting --- ..._ZoomDropFolderConfigureExtend_SubForm.php | 8 +++++- .../batch/KZoomDropFolderEngine.php | 2 +- .../lib/api/KalturaZoomDropFolder.php | 10 +++++-- .../lib/model/ZoomDropFolder.php | 28 +++++++++++++++++-- 4 files changed, 41 insertions(+), 7 deletions(-) diff --git a/plugins/vendor/zoom/ZoomDropFolderPlugin/admin/forms/Form_ZoomDropFolderConfigureExtend_SubForm.php b/plugins/vendor/zoom/ZoomDropFolderPlugin/admin/forms/Form_ZoomDropFolderConfigureExtend_SubForm.php index a1c133f6f16..25570b12b54 100644 --- a/plugins/vendor/zoom/ZoomDropFolderPlugin/admin/forms/Form_ZoomDropFolderConfigureExtend_SubForm.php +++ b/plugins/vendor/zoom/ZoomDropFolderPlugin/admin/forms/Form_ZoomDropFolderConfigureExtend_SubForm.php @@ -22,6 +22,12 @@ public function init() 'label' => 'Last Handled Meeting Time:', 'filters' => array('StringTrim'), )); + + $this->addElement('text', 'fileProcessingGracePeriod', array( + 'label' => 'File Processing Grace Period (seconds):', + 'filters' => array('StringTrim'), + 'description' => 'Time to wait for recordings to complete processing before skipping them (e.g., 10800 for 3 hours, 21600 for 6 hours)', + )); } - + } diff --git a/plugins/vendor/zoom/ZoomDropFolderPlugin/batch/KZoomDropFolderEngine.php b/plugins/vendor/zoom/ZoomDropFolderPlugin/batch/KZoomDropFolderEngine.php index a444bbcc46b..cb0052e4b31 100644 --- a/plugins/vendor/zoom/ZoomDropFolderPlugin/batch/KZoomDropFolderEngine.php +++ b/plugins/vendor/zoom/ZoomDropFolderPlugin/batch/KZoomDropFolderEngine.php @@ -82,7 +82,7 @@ protected function shouldAdvanceByDay($startRunTime, $fileInStatusProcessingExis if($fileInStatusProcessingExists) { - $fileProcessingGracePeriod = $this->getZoomParam('fileProcessingGracePeriod'); + $fileProcessingGracePeriod = $this->dropFolder->fileProcessingGracePeriod; if($secondsFromMidnight <= $fileProcessingGracePeriod) { KalturaLog::info("DropFolderId {$this->dropFolder->id}: A new day is here, but found files in status Processing. Waiting for status completed"); diff --git a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php index 8c4f6a880bd..d26bf34698d 100644 --- a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php +++ b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php @@ -65,13 +65,19 @@ class KalturaZoomDropFolder extends KalturaDropFolder * @var time */ public $lastHandledMeetingTime; - + + /** + * @var int + */ + public $fileProcessingGracePeriod; + /* * mapping between the field on this object (on the left) and the setter/getter on the entry object (on the right) */ private static $map_between_objects = array( 'zoomVendorIntegrationId', - 'lastHandledMeetingTime' + 'lastHandledMeetingTime', + 'fileProcessingGracePeriod' ); public function getMapBetweenObjects() diff --git a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php index f0d0294cabe..7140fa58477 100644 --- a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php +++ b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php @@ -9,16 +9,22 @@ class ZoomDropFolder extends RemoteDropFolder const ZOOM_VENDOR_INTEGRATION_ID = 'zoom_vendor_integration_id'; const LAST_HANDLED_MEETING_TIME = 'last_handled_meeting_time'; - + const FILE_PROCESSING_GRACE_PERIOD = 'file_processing_grace_period'; + /** * @var string */ protected $zoomVendorIntegrationId; - + /** * @var time */ protected $lastHandledMeetingTime; + + /** + * @var int + */ + protected $fileProcessingGracePeriod; /** * return string @@ -51,7 +57,23 @@ public function setLastHandledMeetingTime($v) { $this->putInCustomData(self::LAST_HANDLED_MEETING_TIME, $v); } - + + /** + * return int + */ + public function getFileProcessingGracePeriod() + { + return $this->getFromCustomData(self::FILE_PROCESSING_GRACE_PERIOD); + } + + /** + * @param int $v + */ + public function setFileProcessingGracePeriod($v) + { + $this->putInCustomData(self::FILE_PROCESSING_GRACE_PERIOD, $v); + } + public function getImportJobData() { return new kDropFolderImportJobData(); From d5eaf3bf987b66583a4713384bf98f4fd7e69d09 Mon Sep 17 00:00:00 2001 From: yambenari24 Date: Thu, 5 Mar 2026 14:46:07 +0200 Subject: [PATCH 02/22] update the custom data --- .../forms/Form_ZoomDropFolderConfigureExtend_SubForm.php | 3 +-- .../ZoomDropFolderPlugin/lib/kZoomDropFolderFlowManager.php | 1 + .../zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/vendor/zoom/ZoomDropFolderPlugin/admin/forms/Form_ZoomDropFolderConfigureExtend_SubForm.php b/plugins/vendor/zoom/ZoomDropFolderPlugin/admin/forms/Form_ZoomDropFolderConfigureExtend_SubForm.php index 25570b12b54..5b282454b22 100644 --- a/plugins/vendor/zoom/ZoomDropFolderPlugin/admin/forms/Form_ZoomDropFolderConfigureExtend_SubForm.php +++ b/plugins/vendor/zoom/ZoomDropFolderPlugin/admin/forms/Form_ZoomDropFolderConfigureExtend_SubForm.php @@ -24,9 +24,8 @@ public function init() )); $this->addElement('text', 'fileProcessingGracePeriod', array( - 'label' => 'File Processing Grace Period (seconds):', + 'label' => 'File Processing Grace Period:', 'filters' => array('StringTrim'), - 'description' => 'Time to wait for recordings to complete processing before skipping them (e.g., 10800 for 3 hours, 21600 for 6 hours)', )); } diff --git a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/kZoomDropFolderFlowManager.php b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/kZoomDropFolderFlowManager.php index 66945d0edb0..89b717d98c8 100644 --- a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/kZoomDropFolderFlowManager.php +++ b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/kZoomDropFolderFlowManager.php @@ -239,6 +239,7 @@ protected static function createNewZoomDropFolder($zoomVendorIntegrationObject) $newZoomDropFolder->setLastFileTimestamp(0); $newZoomDropFolder->setMetadataProfileId(0); $newZoomDropFolder->setLastHandledMeetingTime(time()); + $newZoomDropFolder->setFileProcessingGracePeriod(10800); $newZoomDropFolder->setFileNamePatterns('*'); $newZoomDropFolder->save(); } diff --git a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php index 7140fa58477..9275a69eb7b 100644 --- a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php +++ b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php @@ -61,9 +61,9 @@ public function setLastHandledMeetingTime($v) /** * return int */ - public function getFileProcessingGracePeriod() + public function getFileProcessingGracePeriod($v) { - return $this->getFromCustomData(self::FILE_PROCESSING_GRACE_PERIOD); + return $this->getFromCustomData(self::FILE_PROCESSING_GRACE_PERIOD, $v); } /** @@ -90,4 +90,4 @@ protected function getRemoteFileTransferMgrType() { return kFileTransferMgrType::ZOOM; /// TODO } -} \ No newline at end of file +} From 143ef6c64823286d79c49fd24d83eaac3e4d93ac Mon Sep 17 00:00:00 2001 From: yambenari24 Date: Thu, 5 Mar 2026 15:07:08 +0200 Subject: [PATCH 03/22] Update ZoomDropFolder.php --- .../zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php index 9275a69eb7b..213ea469e89 100644 --- a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php +++ b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php @@ -61,9 +61,9 @@ public function setLastHandledMeetingTime($v) /** * return int */ - public function getFileProcessingGracePeriod($v) + public function getFileProcessingGracePeriod() { - return $this->getFromCustomData(self::FILE_PROCESSING_GRACE_PERIOD, $v); + return $this->getFromCustomData(self::FILE_PROCESSING_GRACE_PERIOD); } /** From 61ba3d3de314e3c3cf732262913b58eed14d1d7e Mon Sep 17 00:00:00 2001 From: yambenari24 Date: Tue, 10 Mar 2026 17:30:33 +0200 Subject: [PATCH 04/22] add new field in the drop folder configuration --- .../admin/DropFolderConfigureAction.php | 21 +++++- .../admin/forms/DropFolderConfigure.php | 17 +++++ .../lib/api/types/KalturaDropFolder.php | 60 +++++++++++++++-- plugins/drop_folder/lib/model/DropFolder.php | 32 ++++++++- .../services/DropFolderService.php | 66 ++++++++++++++----- .../lib/api/KalturaZoomDropFolder.php | 8 +-- .../lib/model/ZoomDropFolder.php | 22 ------- 7 files changed, 170 insertions(+), 56 deletions(-) diff --git a/plugins/drop_folder/admin/DropFolderConfigureAction.php b/plugins/drop_folder/admin/DropFolderConfigureAction.php index 2da7f9cfafe..16c13fd6d22 100644 --- a/plugins/drop_folder/admin/DropFolderConfigureAction.php +++ b/plugins/drop_folder/admin/DropFolderConfigureAction.php @@ -34,8 +34,14 @@ public function doAction(Zend_Controller_Action $action) { $partnerId = $this->_getParam('partnerId'); $dropFolderType = $this->_getParam('type'); + $postData = $request->getPost(); + + // DEBUG: Log what's being posted + error_log("DROP FOLDER ACTION DEBUG: POST data fileProcessingGracePeriod = " . + (isset($postData['fileProcessingGracePeriod']) ? $postData['fileProcessingGracePeriod'] : 'NOT SET')); + $dropFolderForm = $this->getDropFolderConfigure($dropFolderType, $partnerId, $dropFolderType); - $action->view->formValid = $this->processForm($dropFolderForm, $request->getPost(), $partnerId, $dropFolderId); + $action->view->formValid = $this->processForm($dropFolderForm, $postData, $partnerId, $dropFolderId); if(!is_null($dropFolderId)) { $dropFolder = $dropFolderForm->getObject("Kaltura_Client_DropFolder_Type_DropFolder", $request->getPost(), false, true); @@ -103,13 +109,22 @@ private function processForm(Form_DropFolderConfigure $form, $formData, $partner $dropFolder = $form->getObject("Kaltura_Client_DropFolder_Type_DropFolder", $formData, false, true); $this->validateConversionProfileId($dropFolder->conversionProfileId, $partnerId); - + + // DEBUG: Log what's on the object before API call + error_log("DROP FOLDER ACTION DEBUG: After getObject, fileProcessingGracePeriod = " . + var_export($dropFolder->fileProcessingGracePeriod, true)); + unset($dropFolder->id); - + if($dropFolder->fileHandlerType === Kaltura_Client_DropFolder_Enum_DropFolderFileHandlerType::CONTENT) $dropFolder->fileNamePatterns = '*'; if (is_null($dropFolderId)) { $dropFolder->status = Kaltura_Client_DropFolder_Enum_DropFolderStatus::ENABLED; + + // DEBUG: Log what's being sent to API + error_log("DROP FOLDER ACTION DEBUG: About to call API add with fileProcessingGracePeriod = " . + var_export($dropFolder->fileProcessingGracePeriod, true)); + $responseDropFolder = $dropFolderPluginClient->dropFolder->add($dropFolder); } else { diff --git a/plugins/drop_folder/admin/forms/DropFolderConfigure.php b/plugins/drop_folder/admin/forms/DropFolderConfigure.php index a686ea5fb1f..2d546552010 100644 --- a/plugins/drop_folder/admin/forms/DropFolderConfigure.php +++ b/plugins/drop_folder/admin/forms/DropFolderConfigure.php @@ -188,6 +188,13 @@ public function init() 'filters' => array('StringTrim'), )); + $this->addElement('text', 'fileProcessingGracePeriod', array( + 'label' => 'File processing grace period (seconds):', + 'description' => 'Time to wait before processing a file. Leave empty for default: 10800 (3 hours). Maximum: 21600 (6 hours).', + 'required' => false, + 'filters' => array('StringTrim'), + )); + $fileDeletePolicies = new Kaltura_Form_Element_EnumSelect('fileDeletePolicy', array('enum' => 'Kaltura_Client_DropFolder_Enum_DropFolderFileDeletePolicy')); $fileDeletePolicies->setLabel('File Deletion Policy:'); $fileDeletePolicies->setRequired(true); @@ -282,6 +289,12 @@ public function getObject($objectType, array $properties, $add_underscore = true $properties = array_merge($properties[self::EXTENSION_SUBFORM_NAME], $properties); } + // DEBUG: Log what value is coming from the form + error_log("DROP FOLDER FORM DEBUG: fileProcessingGracePeriod from form = " . + (isset($properties['fileProcessingGracePeriod']) ? $properties['fileProcessingGracePeriod'] : 'NOT SET')); + error_log("DROP FOLDER FORM DEBUG: file_processing_grace_period from form = " . + (isset($properties['file_processing_grace_period']) ? $properties['file_processing_grace_period'] : 'NOT SET')); + $object = KalturaPluginManager::loadObject('Kaltura_Client_DropFolder_Type_DropFolder', $properties['type']); $fileHandlerType = $properties['fileHandlerType']; @@ -303,6 +316,10 @@ public function getObject($objectType, array $properties, $add_underscore = true } $object = parent::loadObject($object, $properties, $add_underscore, $include_empty_fields); + // DEBUG: Log what was set on the object after loadObject + error_log("DROP FOLDER FORM DEBUG: After loadObject, fileProcessingGracePeriod = " . + (isset($object->fileProcessingGracePeriod) ? $object->fileProcessingGracePeriod : 'NOT SET')); + $extendTypeSubForm = $this->getSubForm(self::EXTENSION_SUBFORM_NAME); if ($extendTypeSubForm) { $object = $extendTypeSubForm->getObject($object, $objectType, $properties, $add_underscore, $include_empty_fields); diff --git a/plugins/drop_folder/lib/api/types/KalturaDropFolder.php b/plugins/drop_folder/lib/api/types/KalturaDropFolder.php index bd3fb58e840..ca93b117f73 100644 --- a/plugins/drop_folder/lib/api/types/KalturaDropFolder.php +++ b/plugins/drop_folder/lib/api/types/KalturaDropFolder.php @@ -65,7 +65,13 @@ class KalturaDropFolder extends KalturaObject implements IFilterable * @var int */ public $fileSizeCheckInterval; - + + /** + * The amount of time, in seconds, to wait before processing a drop folder file + * @var int + */ + public $fileProcessingGracePeriod; + /** * @var KalturaDropFolderFileDeletePolicy */ @@ -184,6 +190,7 @@ class KalturaDropFolder extends KalturaObject implements IFilterable 'dc', 'path', 'fileSizeCheckInterval', + 'fileProcessingGracePeriod', 'fileDeletePolicy', 'fileDeleteRegex', 'autoFileDeleteDays', @@ -213,21 +220,66 @@ public function toObject($dbObject = null, $skip = array()) { if (is_null($dbObject)) $dbObject = new DropFolder(); - $this->trimStringProperties(array ('path')); + $this->trimStringProperties(array ('path')); + + // DEBUG: Log all property values to see what's coming in + KalturaLog::debug("DROP FOLDER TOOBJECT DEBUG: === ENTRY POINT === Class: " . get_class($this)); + KalturaLog::debug("DROP FOLDER TOOBJECT DEBUG: fileSizeCheckInterval = " . var_export($this->fileSizeCheckInterval, true)); + KalturaLog::debug("DROP FOLDER TOOBJECT DEBUG: fileProcessingGracePeriod = " . var_export($this->fileProcessingGracePeriod, true)); + KalturaLog::debug("DROP FOLDER TOOBJECT DEBUG: autoFileDeleteDays = " . var_export($this->autoFileDeleteDays, true)); + + // Set fileProcessingGracePeriod BEFORE calling parent to preserve user value + // (parent may not recognize this property due to reflection cache) + $fileProcessingGracePeriodValue = $this->fileProcessingGracePeriod; + KalturaLog::debug("DROP FOLDER TOOBJECT DEBUG: fileProcessingGracePeriod stored in variable = " . var_export($fileProcessingGracePeriodValue, true) . " (type: " . gettype($fileProcessingGracePeriodValue) . ")"); + + // Convert to integer if it's a numeric string + if (is_string($fileProcessingGracePeriodValue) && is_numeric($fileProcessingGracePeriodValue)) { + $fileProcessingGracePeriodValue = (int)$fileProcessingGracePeriodValue; + KalturaLog::debug("DROP FOLDER TOOBJECT DEBUG: Converted string to int: " . $fileProcessingGracePeriodValue); + } + + // Set default if empty + if (is_null($fileProcessingGracePeriodValue) || $fileProcessingGracePeriodValue === '' || $fileProcessingGracePeriodValue === 0) { + $fileProcessingGracePeriodValue = DropFolder::FILE_PROCESSING_GRACE_PERIOD_DEFAULT_VALUE; + KalturaLog::debug("DROP FOLDER TOOBJECT DEBUG: Value was empty, set to default: " . $fileProcessingGracePeriodValue); + } + + // Validate maximum value + if ($fileProcessingGracePeriodValue > DropFolder::FILE_PROCESSING_GRACE_PERIOD_MAX_VALUE) { + KalturaLog::debug("DROP FOLDER TOOBJECT DEBUG: Value " . $fileProcessingGracePeriodValue . " exceeds maximum " . DropFolder::FILE_PROCESSING_GRACE_PERIOD_MAX_VALUE . ", throwing exception"); + throw new KalturaAPIException(KalturaErrors::INVALID_FIELD_VALUE, 'fileProcessingGracePeriod'); + } + parent::toObject($dbObject, $skip); + + // Explicitly set fileProcessingGracePeriod to ensure it's saved + if (!is_null($fileProcessingGracePeriodValue) && !in_array('fileProcessingGracePeriod', $skip)) + { + KalturaLog::debug("DROP FOLDER TOOBJECT DEBUG: Calling setFileProcessingGracePeriod with " . $fileProcessingGracePeriodValue); + $dbObject->setFileProcessingGracePeriod($fileProcessingGracePeriodValue); + } + if ($this->fileHandlerConfig) { $dbFileHandlerConfig = $this->fileHandlerConfig->toObject(); $dbObject->setFileHandlerConfig($dbFileHandlerConfig); } - + return $dbObject; } public function doFromObject($source_object, KalturaDetachedResponseProfile $responseProfile = null) { parent::doFromObject($source_object, $responseProfile); - + + // Explicitly load fileProcessingGracePeriod from database object + // (parent may not recognize this property due to reflection cache) + if ($this->shouldGet('fileProcessingGracePeriod', $responseProfile)) + { + $this->fileProcessingGracePeriod = $source_object->getFileProcessingGracePeriod(); + } + if($this->shouldGet('fileHandlerConfig', $responseProfile)) { $dbFileHandlerConfig = $source_object->getFileHandlerConfig(); diff --git a/plugins/drop_folder/lib/model/DropFolder.php b/plugins/drop_folder/lib/model/DropFolder.php index b47c161bedb..8b9ae54185d 100644 --- a/plugins/drop_folder/lib/model/DropFolder.php +++ b/plugins/drop_folder/lib/model/DropFolder.php @@ -19,6 +19,8 @@ class DropFolder extends BaseDropFolder implements IBaseObject const AUTO_FILE_DELETE_DAYS_DEFAULT_VALUE = 0; const FILE_SIZE_CHECK_INTERVAL_DEFAULT_VALUE = '600'; // 600 seconds = 10 minutes const FILE_NAME_PATTERNS_DEFAULT_VALUE = '*'; + const FILE_PROCESSING_GRACE_PERIOD_DEFAULT_VALUE = 10800; // 10800 seconds = 3 hours + const FILE_PROCESSING_GRACE_PERIOD_MAX_VALUE = 21600; // 21600 seconds = 6 hours const INCREMENTAL = 'incremental'; const LAST_FILE_TIMESTAMP = 'last_file_timestamp'; const METADATA_PROFILE_ID = 'metadata_profile_id'; @@ -52,8 +54,17 @@ public function preInsert(PropelPDO $con = null) if (is_null($this->getAutoFileDeleteDays())) { $this->setAutoFileDeleteDays(DropFolder::AUTO_FILE_DELETE_DAYS_DEFAULT_VALUE); - } - + } + + $currentValue = $this->getFileProcessingGracePeriod(); + KalturaLog::debug("DROP FOLDER PREINSERT DEBUG: fileProcessingGracePeriod before preInsert = " . var_export($currentValue, true)); + if (is_null($currentValue)) { + KalturaLog::debug("DROP FOLDER PREINSERT DEBUG: Value is null, setting default"); + $this->setFileProcessingGracePeriod(DropFolder::FILE_PROCESSING_GRACE_PERIOD_DEFAULT_VALUE); + } else { + KalturaLog::debug("DROP FOLDER PREINSERT DEBUG: Value already set, keeping it as: " . $currentValue); + } + return $ret; } @@ -135,6 +146,7 @@ public function setFileHandlerConfig($fileHandlerConfig) const CUSTOM_DATA_IGNORE_FILE_NAME_PATTERNS = 'ignore_file_name_patterns'; const CUSTOM_DATA_LAST_ACCESSED_AT = 'last_accessed_at'; const CUSTOM_DATA_FILE_DELETE_REGEX = 'file_delete_regex'; + const CUSTOM_DATA_FILE_PROCESSING_GRACE_PERIOD = 'file_processing_grace_period'; // File size check interval - value in seconds @@ -169,6 +181,22 @@ public function setFileDeleteRegex($fileDeleteRegex) $this->putInCustomData(self::CUSTOM_DATA_FILE_DELETE_REGEX, $fileDeleteRegex); } + // File processing grace period + + /** + * @return int + */ + public function getFileProcessingGracePeriod() + { + return $this->getFromCustomData(self::CUSTOM_DATA_FILE_PROCESSING_GRACE_PERIOD); + } + + public function setFileProcessingGracePeriod($seconds) + { + KalturaLog::debug("DROP FOLDER MODEL DEBUG: setFileProcessingGracePeriod called with value = " . var_export($seconds, true)); + $this->putInCustomData(self::CUSTOM_DATA_FILE_PROCESSING_GRACE_PERIOD, $seconds); + } + // Automatic file delete days /** diff --git a/plugins/drop_folder/services/DropFolderService.php b/plugins/drop_folder/services/DropFolderService.php index 2722f810b1c..9dd65851303 100644 --- a/plugins/drop_folder/services/DropFolderService.php +++ b/plugins/drop_folder/services/DropFolderService.php @@ -23,11 +23,11 @@ public function initService($serviceId, $serviceName, $actionName) /** * Allows you to add a new KalturaDropFolder object - * + * * @action add * @param KalturaDropFolder $dropFolder * @return KalturaDropFolder - * + * * @throws KalturaErrors::PROPERTY_VALIDATION_CANNOT_BE_NULL * @throws KalturaErrors::INGESTION_PROFILE_ID_NOT_FOUND * @throws KalturaDropFolderErrors::DROP_FOLDER_ALREADY_EXISTS @@ -43,28 +43,52 @@ public function addAction(KalturaDropFolder $dropFolder) $dropFolder->validatePropertyNotNull('path'); $dropFolder->validatePropertyNotNull('partnerId'); $dropFolder->validatePropertyMinValue('fileSizeCheckInterval', 0, true); + $dropFolder->validatePropertyMinValue('fileProcessingGracePeriod', 0, true); $dropFolder->validatePropertyMinValue('autoFileDeleteDays', 0, true); $dropFolder->validatePropertyNotNull('fileHandlerType'); $dropFolder->validatePropertyNotNull('fileHandlerConfig'); - + // validate values - + if (is_null($dropFolder->fileSizeCheckInterval)) { $dropFolder->fileSizeCheckInterval = DropFolder::FILE_SIZE_CHECK_INTERVAL_DEFAULT_VALUE; } - + + // Handle empty string or null for fileProcessingGracePeriod + KalturaLog::debug("DROP FOLDER SERVICE DEBUG: fileProcessingGracePeriod received = " . var_export($dropFolder->fileProcessingGracePeriod, true) . " (type: " . gettype($dropFolder->fileProcessingGracePeriod) . ")"); + + // Convert to integer if it's a numeric string + if (is_string($dropFolder->fileProcessingGracePeriod) && is_numeric($dropFolder->fileProcessingGracePeriod)) { + $dropFolder->fileProcessingGracePeriod = (int)$dropFolder->fileProcessingGracePeriod; + KalturaLog::debug("DROP FOLDER SERVICE DEBUG: Converted string to int: " . $dropFolder->fileProcessingGracePeriod); + } + + if (is_null($dropFolder->fileProcessingGracePeriod) || $dropFolder->fileProcessingGracePeriod === '' || $dropFolder->fileProcessingGracePeriod === 0) { + KalturaLog::debug("DROP FOLDER SERVICE DEBUG: Setting default value"); + $dropFolder->fileProcessingGracePeriod = DropFolder::FILE_PROCESSING_GRACE_PERIOD_DEFAULT_VALUE; + } else { + KalturaLog::debug("DROP FOLDER SERVICE DEBUG: Using user-provided value: " . $dropFolder->fileProcessingGracePeriod); + } + + // Validate fileProcessingGracePeriod does not exceed maximum value + KalturaLog::debug("DROP FOLDER SERVICE DEBUG: Validating: " . $dropFolder->fileProcessingGracePeriod . " > " . DropFolder::FILE_PROCESSING_GRACE_PERIOD_MAX_VALUE . " ?"); + if ($dropFolder->fileProcessingGracePeriod > DropFolder::FILE_PROCESSING_GRACE_PERIOD_MAX_VALUE) { + KalturaLog::debug("DROP FOLDER SERVICE DEBUG: THROWING EXCEPTION - value too large!"); + throw new KalturaAPIException(KalturaErrors::INVALID_FIELD_VALUE, 'fileProcessingGracePeriod'); + } + if (is_null($dropFolder->fileNamePatterns)) { $dropFolder->fileNamePatterns = DropFolder::FILE_NAME_PATTERNS_DEFAULT_VALUE; } - + if (!kDataCenterMgr::dcExists($dropFolder->dc)) { throw new KalturaAPIException(KalturaErrors::DATA_CENTER_ID_NOT_FOUND, $dropFolder->dc); } - + if (!PartnerPeer::retrieveByPK($dropFolder->partnerId)) { throw new KalturaAPIException(KalturaErrors::INVALID_PARTNER_ID, $dropFolder->partnerId); } - + if (!DropFolderPlugin::isAllowedPartner($dropFolder->partnerId)) { throw new KalturaAPIException(KalturaErrors::PLUGIN_NOT_AVAILABLE_FOR_PARTNER, DropFolderPlugin::getPluginName(), $dropFolder->partnerId); @@ -77,34 +101,34 @@ public function addAction(KalturaDropFolder $dropFolder) throw new KalturaAPIException(KalturaDropFolderErrors::DROP_FOLDER_ALREADY_EXISTS, $dropFolder->path); } } - + if (!is_null($dropFolder->conversionProfileId)) { $conversionProfileDb = conversionProfile2Peer::retrieveByPK($dropFolder->conversionProfileId); if (!$conversionProfileDb) { throw new KalturaAPIException(KalturaErrors::INGESTION_PROFILE_ID_NOT_FOUND, $dropFolder->conversionProfileId); } } - + // save in database $dbDropFolder = $dropFolder->toInsertableObject(); $dbDropFolder->save(); - + // return the saved object $dropFolder = KalturaDropFolder::getInstanceByType($dbDropFolder->getType()); $dropFolder->fromObject($dbDropFolder, $this->getResponseProfile()); return $dropFolder; - + } - + /** * Retrieve a KalturaDropFolder object by ID - * + * * @action get - * @param int $dropFolderId + * @param int $dropFolderId * @return KalturaDropFolder - * + * * @throws KalturaErrors::INVALID_OBJECT_ID - */ + */ public function getAction($dropFolderId) { $dbDropFolder = DropFolderPeer::retrieveByPK($dropFolderId); @@ -141,8 +165,14 @@ public function updateAction($dropFolderId, KalturaDropFolder $dropFolder) } $dropFolder->validatePropertyMinValue('fileSizeCheckInterval', 0, true); + $dropFolder->validatePropertyMinValue('fileProcessingGracePeriod', 0, true); $dropFolder->validatePropertyMinValue('autoFileDeleteDays', 0, true); - + + // Validate fileProcessingGracePeriod does not exceed maximum value + if (!is_null($dropFolder->fileProcessingGracePeriod) && $dropFolder->fileProcessingGracePeriod > DropFolder::FILE_PROCESSING_GRACE_PERIOD_MAX_VALUE) { + throw new KalturaAPIException(KalturaErrors::INVALID_FIELD_VALUE, 'fileProcessingGracePeriod'); + } + if (!is_null($dropFolder->path) && $dropFolder->path != $dbDropFolder->getPath() && $dropFolder->type == KalturaDropFolderType::LOCAL) { $existingDropFolder = DropFolderPeer::retrieveByPathDefaultFilter($dropFolder->path); diff --git a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php index d26bf34698d..b356036a049 100644 --- a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php +++ b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php @@ -66,18 +66,12 @@ class KalturaZoomDropFolder extends KalturaDropFolder */ public $lastHandledMeetingTime; - /** - * @var int - */ - public $fileProcessingGracePeriod; - /* * mapping between the field on this object (on the left) and the setter/getter on the entry object (on the right) */ private static $map_between_objects = array( 'zoomVendorIntegrationId', - 'lastHandledMeetingTime', - 'fileProcessingGracePeriod' + 'lastHandledMeetingTime' ); public function getMapBetweenObjects() diff --git a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php index 213ea469e89..288aa198c11 100644 --- a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php +++ b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php @@ -9,7 +9,6 @@ class ZoomDropFolder extends RemoteDropFolder const ZOOM_VENDOR_INTEGRATION_ID = 'zoom_vendor_integration_id'; const LAST_HANDLED_MEETING_TIME = 'last_handled_meeting_time'; - const FILE_PROCESSING_GRACE_PERIOD = 'file_processing_grace_period'; /** * @var string @@ -20,11 +19,6 @@ class ZoomDropFolder extends RemoteDropFolder * @var time */ protected $lastHandledMeetingTime; - - /** - * @var int - */ - protected $fileProcessingGracePeriod; /** * return string @@ -58,22 +52,6 @@ public function setLastHandledMeetingTime($v) $this->putInCustomData(self::LAST_HANDLED_MEETING_TIME, $v); } - /** - * return int - */ - public function getFileProcessingGracePeriod() - { - return $this->getFromCustomData(self::FILE_PROCESSING_GRACE_PERIOD); - } - - /** - * @param int $v - */ - public function setFileProcessingGracePeriod($v) - { - $this->putInCustomData(self::FILE_PROCESSING_GRACE_PERIOD, $v); - } - public function getImportJobData() { return new kDropFolderImportJobData(); From dd988efd41d3c981f790582d44290d1e379616fd Mon Sep 17 00:00:00 2001 From: yambenari24 Date: Tue, 10 Mar 2026 17:42:50 +0200 Subject: [PATCH 05/22] Update DropFolderService.php --- plugins/drop_folder/services/DropFolderService.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/plugins/drop_folder/services/DropFolderService.php b/plugins/drop_folder/services/DropFolderService.php index 9dd65851303..5941b34afdf 100644 --- a/plugins/drop_folder/services/DropFolderService.php +++ b/plugins/drop_folder/services/DropFolderService.php @@ -54,26 +54,17 @@ public function addAction(KalturaDropFolder $dropFolder) $dropFolder->fileSizeCheckInterval = DropFolder::FILE_SIZE_CHECK_INTERVAL_DEFAULT_VALUE; } - // Handle empty string or null for fileProcessingGracePeriod - KalturaLog::debug("DROP FOLDER SERVICE DEBUG: fileProcessingGracePeriod received = " . var_export($dropFolder->fileProcessingGracePeriod, true) . " (type: " . gettype($dropFolder->fileProcessingGracePeriod) . ")"); // Convert to integer if it's a numeric string if (is_string($dropFolder->fileProcessingGracePeriod) && is_numeric($dropFolder->fileProcessingGracePeriod)) { $dropFolder->fileProcessingGracePeriod = (int)$dropFolder->fileProcessingGracePeriod; - KalturaLog::debug("DROP FOLDER SERVICE DEBUG: Converted string to int: " . $dropFolder->fileProcessingGracePeriod); } if (is_null($dropFolder->fileProcessingGracePeriod) || $dropFolder->fileProcessingGracePeriod === '' || $dropFolder->fileProcessingGracePeriod === 0) { - KalturaLog::debug("DROP FOLDER SERVICE DEBUG: Setting default value"); $dropFolder->fileProcessingGracePeriod = DropFolder::FILE_PROCESSING_GRACE_PERIOD_DEFAULT_VALUE; - } else { - KalturaLog::debug("DROP FOLDER SERVICE DEBUG: Using user-provided value: " . $dropFolder->fileProcessingGracePeriod); } - // Validate fileProcessingGracePeriod does not exceed maximum value - KalturaLog::debug("DROP FOLDER SERVICE DEBUG: Validating: " . $dropFolder->fileProcessingGracePeriod . " > " . DropFolder::FILE_PROCESSING_GRACE_PERIOD_MAX_VALUE . " ?"); if ($dropFolder->fileProcessingGracePeriod > DropFolder::FILE_PROCESSING_GRACE_PERIOD_MAX_VALUE) { - KalturaLog::debug("DROP FOLDER SERVICE DEBUG: THROWING EXCEPTION - value too large!"); throw new KalturaAPIException(KalturaErrors::INVALID_FIELD_VALUE, 'fileProcessingGracePeriod'); } From 79eddacddbbb8d1299c83db916a584d6a08d298f Mon Sep 17 00:00:00 2001 From: yambenari24 Date: Tue, 10 Mar 2026 17:46:17 +0200 Subject: [PATCH 06/22] delete debugs error --- .../drop_folder/admin/DropFolderConfigureAction.php | 13 ------------- .../drop_folder/lib/api/types/KalturaDropFolder.php | 11 ----------- 2 files changed, 24 deletions(-) diff --git a/plugins/drop_folder/admin/DropFolderConfigureAction.php b/plugins/drop_folder/admin/DropFolderConfigureAction.php index 16c13fd6d22..88a4b815f9b 100644 --- a/plugins/drop_folder/admin/DropFolderConfigureAction.php +++ b/plugins/drop_folder/admin/DropFolderConfigureAction.php @@ -35,11 +35,6 @@ public function doAction(Zend_Controller_Action $action) $partnerId = $this->_getParam('partnerId'); $dropFolderType = $this->_getParam('type'); $postData = $request->getPost(); - - // DEBUG: Log what's being posted - error_log("DROP FOLDER ACTION DEBUG: POST data fileProcessingGracePeriod = " . - (isset($postData['fileProcessingGracePeriod']) ? $postData['fileProcessingGracePeriod'] : 'NOT SET')); - $dropFolderForm = $this->getDropFolderConfigure($dropFolderType, $partnerId, $dropFolderType); $action->view->formValid = $this->processForm($dropFolderForm, $postData, $partnerId, $dropFolderId); if(!is_null($dropFolderId)) @@ -110,10 +105,6 @@ private function processForm(Form_DropFolderConfigure $form, $formData, $partner $dropFolder = $form->getObject("Kaltura_Client_DropFolder_Type_DropFolder", $formData, false, true); $this->validateConversionProfileId($dropFolder->conversionProfileId, $partnerId); - // DEBUG: Log what's on the object before API call - error_log("DROP FOLDER ACTION DEBUG: After getObject, fileProcessingGracePeriod = " . - var_export($dropFolder->fileProcessingGracePeriod, true)); - unset($dropFolder->id); if($dropFolder->fileHandlerType === Kaltura_Client_DropFolder_Enum_DropFolderFileHandlerType::CONTENT) @@ -121,10 +112,6 @@ private function processForm(Form_DropFolderConfigure $form, $formData, $partner if (is_null($dropFolderId)) { $dropFolder->status = Kaltura_Client_DropFolder_Enum_DropFolderStatus::ENABLED; - // DEBUG: Log what's being sent to API - error_log("DROP FOLDER ACTION DEBUG: About to call API add with fileProcessingGracePeriod = " . - var_export($dropFolder->fileProcessingGracePeriod, true)); - $responseDropFolder = $dropFolderPluginClient->dropFolder->add($dropFolder); } else { diff --git a/plugins/drop_folder/lib/api/types/KalturaDropFolder.php b/plugins/drop_folder/lib/api/types/KalturaDropFolder.php index ca93b117f73..4ac5ec28a8f 100644 --- a/plugins/drop_folder/lib/api/types/KalturaDropFolder.php +++ b/plugins/drop_folder/lib/api/types/KalturaDropFolder.php @@ -222,32 +222,22 @@ public function toObject($dbObject = null, $skip = array()) $dbObject = new DropFolder(); $this->trimStringProperties(array ('path')); - // DEBUG: Log all property values to see what's coming in - KalturaLog::debug("DROP FOLDER TOOBJECT DEBUG: === ENTRY POINT === Class: " . get_class($this)); - KalturaLog::debug("DROP FOLDER TOOBJECT DEBUG: fileSizeCheckInterval = " . var_export($this->fileSizeCheckInterval, true)); - KalturaLog::debug("DROP FOLDER TOOBJECT DEBUG: fileProcessingGracePeriod = " . var_export($this->fileProcessingGracePeriod, true)); - KalturaLog::debug("DROP FOLDER TOOBJECT DEBUG: autoFileDeleteDays = " . var_export($this->autoFileDeleteDays, true)); - // Set fileProcessingGracePeriod BEFORE calling parent to preserve user value // (parent may not recognize this property due to reflection cache) $fileProcessingGracePeriodValue = $this->fileProcessingGracePeriod; - KalturaLog::debug("DROP FOLDER TOOBJECT DEBUG: fileProcessingGracePeriod stored in variable = " . var_export($fileProcessingGracePeriodValue, true) . " (type: " . gettype($fileProcessingGracePeriodValue) . ")"); // Convert to integer if it's a numeric string if (is_string($fileProcessingGracePeriodValue) && is_numeric($fileProcessingGracePeriodValue)) { $fileProcessingGracePeriodValue = (int)$fileProcessingGracePeriodValue; - KalturaLog::debug("DROP FOLDER TOOBJECT DEBUG: Converted string to int: " . $fileProcessingGracePeriodValue); } // Set default if empty if (is_null($fileProcessingGracePeriodValue) || $fileProcessingGracePeriodValue === '' || $fileProcessingGracePeriodValue === 0) { $fileProcessingGracePeriodValue = DropFolder::FILE_PROCESSING_GRACE_PERIOD_DEFAULT_VALUE; - KalturaLog::debug("DROP FOLDER TOOBJECT DEBUG: Value was empty, set to default: " . $fileProcessingGracePeriodValue); } // Validate maximum value if ($fileProcessingGracePeriodValue > DropFolder::FILE_PROCESSING_GRACE_PERIOD_MAX_VALUE) { - KalturaLog::debug("DROP FOLDER TOOBJECT DEBUG: Value " . $fileProcessingGracePeriodValue . " exceeds maximum " . DropFolder::FILE_PROCESSING_GRACE_PERIOD_MAX_VALUE . ", throwing exception"); throw new KalturaAPIException(KalturaErrors::INVALID_FIELD_VALUE, 'fileProcessingGracePeriod'); } @@ -256,7 +246,6 @@ public function toObject($dbObject = null, $skip = array()) // Explicitly set fileProcessingGracePeriod to ensure it's saved if (!is_null($fileProcessingGracePeriodValue) && !in_array('fileProcessingGracePeriod', $skip)) { - KalturaLog::debug("DROP FOLDER TOOBJECT DEBUG: Calling setFileProcessingGracePeriod with " . $fileProcessingGracePeriodValue); $dbObject->setFileProcessingGracePeriod($fileProcessingGracePeriodValue); } From 96f01b69e613576957c2d0002303cab2077b25d0 Mon Sep 17 00:00:00 2001 From: yambenari24 Date: Tue, 10 Mar 2026 17:48:22 +0200 Subject: [PATCH 07/22] Update DropFolder.php --- plugins/drop_folder/lib/model/DropFolder.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/plugins/drop_folder/lib/model/DropFolder.php b/plugins/drop_folder/lib/model/DropFolder.php index 8b9ae54185d..4cfaa7c2fc8 100644 --- a/plugins/drop_folder/lib/model/DropFolder.php +++ b/plugins/drop_folder/lib/model/DropFolder.php @@ -57,12 +57,8 @@ public function preInsert(PropelPDO $con = null) } $currentValue = $this->getFileProcessingGracePeriod(); - KalturaLog::debug("DROP FOLDER PREINSERT DEBUG: fileProcessingGracePeriod before preInsert = " . var_export($currentValue, true)); if (is_null($currentValue)) { - KalturaLog::debug("DROP FOLDER PREINSERT DEBUG: Value is null, setting default"); $this->setFileProcessingGracePeriod(DropFolder::FILE_PROCESSING_GRACE_PERIOD_DEFAULT_VALUE); - } else { - KalturaLog::debug("DROP FOLDER PREINSERT DEBUG: Value already set, keeping it as: " . $currentValue); } return $ret; @@ -193,7 +189,6 @@ public function getFileProcessingGracePeriod() public function setFileProcessingGracePeriod($seconds) { - KalturaLog::debug("DROP FOLDER MODEL DEBUG: setFileProcessingGracePeriod called with value = " . var_export($seconds, true)); $this->putInCustomData(self::CUSTOM_DATA_FILE_PROCESSING_GRACE_PERIOD, $seconds); } From 9fce4e92d2115a16d32bf10a24a881703a32a3a8 Mon Sep 17 00:00:00 2001 From: yambenari24 Date: Tue, 10 Mar 2026 18:03:26 +0200 Subject: [PATCH 08/22] Update kZoomDropFolderFlowManager.php --- .../zoom/ZoomDropFolderPlugin/lib/kZoomDropFolderFlowManager.php | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/kZoomDropFolderFlowManager.php b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/kZoomDropFolderFlowManager.php index 89b717d98c8..66945d0edb0 100644 --- a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/kZoomDropFolderFlowManager.php +++ b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/kZoomDropFolderFlowManager.php @@ -239,7 +239,6 @@ protected static function createNewZoomDropFolder($zoomVendorIntegrationObject) $newZoomDropFolder->setLastFileTimestamp(0); $newZoomDropFolder->setMetadataProfileId(0); $newZoomDropFolder->setLastHandledMeetingTime(time()); - $newZoomDropFolder->setFileProcessingGracePeriod(10800); $newZoomDropFolder->setFileNamePatterns('*'); $newZoomDropFolder->save(); } From 21f7fef7aaf671435476a98963cfcef871329bac Mon Sep 17 00:00:00 2001 From: yambenari24 Date: Tue, 10 Mar 2026 18:20:33 +0200 Subject: [PATCH 09/22] Update DropFolderConfigure.php --- plugins/drop_folder/admin/forms/DropFolderConfigure.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/plugins/drop_folder/admin/forms/DropFolderConfigure.php b/plugins/drop_folder/admin/forms/DropFolderConfigure.php index 2d546552010..e9ba3fb6692 100644 --- a/plugins/drop_folder/admin/forms/DropFolderConfigure.php +++ b/plugins/drop_folder/admin/forms/DropFolderConfigure.php @@ -289,12 +289,6 @@ public function getObject($objectType, array $properties, $add_underscore = true $properties = array_merge($properties[self::EXTENSION_SUBFORM_NAME], $properties); } - // DEBUG: Log what value is coming from the form - error_log("DROP FOLDER FORM DEBUG: fileProcessingGracePeriod from form = " . - (isset($properties['fileProcessingGracePeriod']) ? $properties['fileProcessingGracePeriod'] : 'NOT SET')); - error_log("DROP FOLDER FORM DEBUG: file_processing_grace_period from form = " . - (isset($properties['file_processing_grace_period']) ? $properties['file_processing_grace_period'] : 'NOT SET')); - $object = KalturaPluginManager::loadObject('Kaltura_Client_DropFolder_Type_DropFolder', $properties['type']); $fileHandlerType = $properties['fileHandlerType']; From 19d2d68430713583b65f0954f5f109876a4de7de Mon Sep 17 00:00:00 2001 From: yambenari24 Date: Tue, 10 Mar 2026 18:25:47 +0200 Subject: [PATCH 10/22] Update DropFolderConfigure.php --- plugins/drop_folder/admin/forms/DropFolderConfigure.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/plugins/drop_folder/admin/forms/DropFolderConfigure.php b/plugins/drop_folder/admin/forms/DropFolderConfigure.php index e9ba3fb6692..6aa08fbe558 100644 --- a/plugins/drop_folder/admin/forms/DropFolderConfigure.php +++ b/plugins/drop_folder/admin/forms/DropFolderConfigure.php @@ -310,10 +310,6 @@ public function getObject($objectType, array $properties, $add_underscore = true } $object = parent::loadObject($object, $properties, $add_underscore, $include_empty_fields); - // DEBUG: Log what was set on the object after loadObject - error_log("DROP FOLDER FORM DEBUG: After loadObject, fileProcessingGracePeriod = " . - (isset($object->fileProcessingGracePeriod) ? $object->fileProcessingGracePeriod : 'NOT SET')); - $extendTypeSubForm = $this->getSubForm(self::EXTENSION_SUBFORM_NAME); if ($extendTypeSubForm) { $object = $extendTypeSubForm->getObject($object, $objectType, $properties, $add_underscore, $include_empty_fields); From 9ca208e258e83296b07d4997e405db2c2d99b454 Mon Sep 17 00:00:00 2001 From: yambenari24 Date: Sun, 15 Mar 2026 19:58:33 +0200 Subject: [PATCH 11/22] put the logic only for the zoom drop folder --- plugins/drop_folder/admin/forms/DropFolderConfigure.php | 7 ------- .../forms/Form_ZoomDropFolderConfigureExtend_SubForm.php | 6 ++++-- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/plugins/drop_folder/admin/forms/DropFolderConfigure.php b/plugins/drop_folder/admin/forms/DropFolderConfigure.php index 6aa08fbe558..a686ea5fb1f 100644 --- a/plugins/drop_folder/admin/forms/DropFolderConfigure.php +++ b/plugins/drop_folder/admin/forms/DropFolderConfigure.php @@ -188,13 +188,6 @@ public function init() 'filters' => array('StringTrim'), )); - $this->addElement('text', 'fileProcessingGracePeriod', array( - 'label' => 'File processing grace period (seconds):', - 'description' => 'Time to wait before processing a file. Leave empty for default: 10800 (3 hours). Maximum: 21600 (6 hours).', - 'required' => false, - 'filters' => array('StringTrim'), - )); - $fileDeletePolicies = new Kaltura_Form_Element_EnumSelect('fileDeletePolicy', array('enum' => 'Kaltura_Client_DropFolder_Enum_DropFolderFileDeletePolicy')); $fileDeletePolicies->setLabel('File Deletion Policy:'); $fileDeletePolicies->setRequired(true); diff --git a/plugins/vendor/zoom/ZoomDropFolderPlugin/admin/forms/Form_ZoomDropFolderConfigureExtend_SubForm.php b/plugins/vendor/zoom/ZoomDropFolderPlugin/admin/forms/Form_ZoomDropFolderConfigureExtend_SubForm.php index 5b282454b22..8a47b44657a 100644 --- a/plugins/vendor/zoom/ZoomDropFolderPlugin/admin/forms/Form_ZoomDropFolderConfigureExtend_SubForm.php +++ b/plugins/vendor/zoom/ZoomDropFolderPlugin/admin/forms/Form_ZoomDropFolderConfigureExtend_SubForm.php @@ -17,14 +17,16 @@ public function init() 'disabled' => true, 'filters' => array('StringTrim'), )); - + $this->addElement('text', 'lastHandledMeetingTime', array( 'label' => 'Last Handled Meeting Time:', 'filters' => array('StringTrim'), )); $this->addElement('text', 'fileProcessingGracePeriod', array( - 'label' => 'File Processing Grace Period:', + 'label' => 'File processing grace period (seconds):', + 'description' => 'Time to wait before processing a file. Leave empty for default: 10800 (3 hours). Maximum: 21600 (6 hours).', + 'required' => false, 'filters' => array('StringTrim'), )); } From 289c0a83a50ec42a3652945c067bb766521720f2 Mon Sep 17 00:00:00 2001 From: yambenari24 Date: Sun, 15 Mar 2026 21:31:49 +0200 Subject: [PATCH 12/22] move the fileProcessingGracePeriod from dropFolder to zoomDropFolder --- .../lib/api/types/KalturaDropFolder.php | 39 ----------- plugins/drop_folder/lib/model/DropFolder.php | 21 ------ .../services/DropFolderService.php | 21 ------ .../lib/api/KalturaZoomDropFolder.php | 68 ++++++++++++++++--- .../lib/model/ZoomDropFolder.php | 41 +++++++++++ 5 files changed, 101 insertions(+), 89 deletions(-) diff --git a/plugins/drop_folder/lib/api/types/KalturaDropFolder.php b/plugins/drop_folder/lib/api/types/KalturaDropFolder.php index 4ac5ec28a8f..43a34b14d27 100644 --- a/plugins/drop_folder/lib/api/types/KalturaDropFolder.php +++ b/plugins/drop_folder/lib/api/types/KalturaDropFolder.php @@ -66,12 +66,6 @@ class KalturaDropFolder extends KalturaObject implements IFilterable */ public $fileSizeCheckInterval; - /** - * The amount of time, in seconds, to wait before processing a drop folder file - * @var int - */ - public $fileProcessingGracePeriod; - /** * @var KalturaDropFolderFileDeletePolicy */ @@ -190,7 +184,6 @@ class KalturaDropFolder extends KalturaObject implements IFilterable 'dc', 'path', 'fileSizeCheckInterval', - 'fileProcessingGracePeriod', 'fileDeletePolicy', 'fileDeleteRegex', 'autoFileDeleteDays', @@ -222,33 +215,8 @@ public function toObject($dbObject = null, $skip = array()) $dbObject = new DropFolder(); $this->trimStringProperties(array ('path')); - // Set fileProcessingGracePeriod BEFORE calling parent to preserve user value - // (parent may not recognize this property due to reflection cache) - $fileProcessingGracePeriodValue = $this->fileProcessingGracePeriod; - - // Convert to integer if it's a numeric string - if (is_string($fileProcessingGracePeriodValue) && is_numeric($fileProcessingGracePeriodValue)) { - $fileProcessingGracePeriodValue = (int)$fileProcessingGracePeriodValue; - } - - // Set default if empty - if (is_null($fileProcessingGracePeriodValue) || $fileProcessingGracePeriodValue === '' || $fileProcessingGracePeriodValue === 0) { - $fileProcessingGracePeriodValue = DropFolder::FILE_PROCESSING_GRACE_PERIOD_DEFAULT_VALUE; - } - - // Validate maximum value - if ($fileProcessingGracePeriodValue > DropFolder::FILE_PROCESSING_GRACE_PERIOD_MAX_VALUE) { - throw new KalturaAPIException(KalturaErrors::INVALID_FIELD_VALUE, 'fileProcessingGracePeriod'); - } - parent::toObject($dbObject, $skip); - // Explicitly set fileProcessingGracePeriod to ensure it's saved - if (!is_null($fileProcessingGracePeriodValue) && !in_array('fileProcessingGracePeriod', $skip)) - { - $dbObject->setFileProcessingGracePeriod($fileProcessingGracePeriodValue); - } - if ($this->fileHandlerConfig) { $dbFileHandlerConfig = $this->fileHandlerConfig->toObject(); @@ -262,13 +230,6 @@ public function doFromObject($source_object, KalturaDetachedResponseProfile $res { parent::doFromObject($source_object, $responseProfile); - // Explicitly load fileProcessingGracePeriod from database object - // (parent may not recognize this property due to reflection cache) - if ($this->shouldGet('fileProcessingGracePeriod', $responseProfile)) - { - $this->fileProcessingGracePeriod = $source_object->getFileProcessingGracePeriod(); - } - if($this->shouldGet('fileHandlerConfig', $responseProfile)) { $dbFileHandlerConfig = $source_object->getFileHandlerConfig(); diff --git a/plugins/drop_folder/lib/model/DropFolder.php b/plugins/drop_folder/lib/model/DropFolder.php index 4cfaa7c2fc8..e009dbc1254 100644 --- a/plugins/drop_folder/lib/model/DropFolder.php +++ b/plugins/drop_folder/lib/model/DropFolder.php @@ -56,11 +56,6 @@ public function preInsert(PropelPDO $con = null) $this->setAutoFileDeleteDays(DropFolder::AUTO_FILE_DELETE_DAYS_DEFAULT_VALUE); } - $currentValue = $this->getFileProcessingGracePeriod(); - if (is_null($currentValue)) { - $this->setFileProcessingGracePeriod(DropFolder::FILE_PROCESSING_GRACE_PERIOD_DEFAULT_VALUE); - } - return $ret; } @@ -142,7 +137,6 @@ public function setFileHandlerConfig($fileHandlerConfig) const CUSTOM_DATA_IGNORE_FILE_NAME_PATTERNS = 'ignore_file_name_patterns'; const CUSTOM_DATA_LAST_ACCESSED_AT = 'last_accessed_at'; const CUSTOM_DATA_FILE_DELETE_REGEX = 'file_delete_regex'; - const CUSTOM_DATA_FILE_PROCESSING_GRACE_PERIOD = 'file_processing_grace_period'; // File size check interval - value in seconds @@ -177,21 +171,6 @@ public function setFileDeleteRegex($fileDeleteRegex) $this->putInCustomData(self::CUSTOM_DATA_FILE_DELETE_REGEX, $fileDeleteRegex); } - // File processing grace period - - /** - * @return int - */ - public function getFileProcessingGracePeriod() - { - return $this->getFromCustomData(self::CUSTOM_DATA_FILE_PROCESSING_GRACE_PERIOD); - } - - public function setFileProcessingGracePeriod($seconds) - { - $this->putInCustomData(self::CUSTOM_DATA_FILE_PROCESSING_GRACE_PERIOD, $seconds); - } - // Automatic file delete days /** diff --git a/plugins/drop_folder/services/DropFolderService.php b/plugins/drop_folder/services/DropFolderService.php index 5941b34afdf..b1ca64603f3 100644 --- a/plugins/drop_folder/services/DropFolderService.php +++ b/plugins/drop_folder/services/DropFolderService.php @@ -43,7 +43,6 @@ public function addAction(KalturaDropFolder $dropFolder) $dropFolder->validatePropertyNotNull('path'); $dropFolder->validatePropertyNotNull('partnerId'); $dropFolder->validatePropertyMinValue('fileSizeCheckInterval', 0, true); - $dropFolder->validatePropertyMinValue('fileProcessingGracePeriod', 0, true); $dropFolder->validatePropertyMinValue('autoFileDeleteDays', 0, true); $dropFolder->validatePropertyNotNull('fileHandlerType'); $dropFolder->validatePropertyNotNull('fileHandlerConfig'); @@ -54,20 +53,6 @@ public function addAction(KalturaDropFolder $dropFolder) $dropFolder->fileSizeCheckInterval = DropFolder::FILE_SIZE_CHECK_INTERVAL_DEFAULT_VALUE; } - - // Convert to integer if it's a numeric string - if (is_string($dropFolder->fileProcessingGracePeriod) && is_numeric($dropFolder->fileProcessingGracePeriod)) { - $dropFolder->fileProcessingGracePeriod = (int)$dropFolder->fileProcessingGracePeriod; - } - - if (is_null($dropFolder->fileProcessingGracePeriod) || $dropFolder->fileProcessingGracePeriod === '' || $dropFolder->fileProcessingGracePeriod === 0) { - $dropFolder->fileProcessingGracePeriod = DropFolder::FILE_PROCESSING_GRACE_PERIOD_DEFAULT_VALUE; - } - - if ($dropFolder->fileProcessingGracePeriod > DropFolder::FILE_PROCESSING_GRACE_PERIOD_MAX_VALUE) { - throw new KalturaAPIException(KalturaErrors::INVALID_FIELD_VALUE, 'fileProcessingGracePeriod'); - } - if (is_null($dropFolder->fileNamePatterns)) { $dropFolder->fileNamePatterns = DropFolder::FILE_NAME_PATTERNS_DEFAULT_VALUE; } @@ -156,14 +141,8 @@ public function updateAction($dropFolderId, KalturaDropFolder $dropFolder) } $dropFolder->validatePropertyMinValue('fileSizeCheckInterval', 0, true); - $dropFolder->validatePropertyMinValue('fileProcessingGracePeriod', 0, true); $dropFolder->validatePropertyMinValue('autoFileDeleteDays', 0, true); - // Validate fileProcessingGracePeriod does not exceed maximum value - if (!is_null($dropFolder->fileProcessingGracePeriod) && $dropFolder->fileProcessingGracePeriod > DropFolder::FILE_PROCESSING_GRACE_PERIOD_MAX_VALUE) { - throw new KalturaAPIException(KalturaErrors::INVALID_FIELD_VALUE, 'fileProcessingGracePeriod'); - } - if (!is_null($dropFolder->path) && $dropFolder->path != $dbDropFolder->getPath() && $dropFolder->type == KalturaDropFolderType::LOCAL) { $existingDropFolder = DropFolderPeer::retrieveByPathDefaultFilter($dropFolder->path); diff --git a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php index b356036a049..cefe0b2b4bc 100644 --- a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php +++ b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php @@ -66,12 +66,19 @@ class KalturaZoomDropFolder extends KalturaDropFolder */ public $lastHandledMeetingTime; + /** + * The amount of time, in seconds, to wait before processing a drop folder file + * @var int + */ + public $fileProcessingGracePeriod; + /* * mapping between the field on this object (on the left) and the setter/getter on the entry object (on the right) */ private static $map_between_objects = array( 'zoomVendorIntegrationId', - 'lastHandledMeetingTime' + 'lastHandledMeetingTime', + 'fileProcessingGracePeriod' ); public function getMapBetweenObjects() @@ -82,7 +89,17 @@ public function getMapBetweenObjects() public function doFromObject($sourceObject, KalturaDetachedResponseProfile $responseProfile = null) { parent::doFromObject($sourceObject, $responseProfile); - + + // Explicitly load fileProcessingGracePeriod from source object + if ($this->shouldGet('fileProcessingGracePeriod', $responseProfile)) + { + $value = $sourceObject->getFileProcessingGracePeriod(); + if (!is_null($value)) + { + $this->fileProcessingGracePeriod = $value; + } + } + /* @var ZoomVendorIntegration $vendorIntegration */ $vendorIntegration = VendorIntegrationPeer::retrieveByPK($this->zoomVendorIntegrationId); try @@ -122,11 +139,16 @@ public function doFromObject($sourceObject, KalturaDetachedResponseProfile $resp { $this->errorDescription = $e->getMessage(); } - + } public function toObject($dbObject = null, $skip = array()) { + if (!$dbObject) + { + $dbObject = new ZoomDropFolder(); + } + if ($this->description) { /* @var ZoomVendorIntegration $vendorIntegration */ @@ -138,14 +160,44 @@ public function toObject($dbObject = null, $skip = array()) $vendorIntegration->setZoomAccountDescription($this->description); $vendorIntegration->save(); } - - if (!$dbObject) + + // Handle fileProcessingGracePeriod validation and defaults + $fileProcessingGracePeriodValue = $this->fileProcessingGracePeriod; + + // Convert to integer if it's a numeric string + if (is_string($fileProcessingGracePeriodValue) && is_numeric($fileProcessingGracePeriodValue)) { - $dbObject = new ZoomDropFolder(); + $fileProcessingGracePeriodValue = (int)$fileProcessingGracePeriodValue; + } + + // Set default if empty + if (is_null($fileProcessingGracePeriodValue) || $fileProcessingGracePeriodValue === '' || $fileProcessingGracePeriodValue === 0) + { + $fileProcessingGracePeriodValue = DropFolder::FILE_PROCESSING_GRACE_PERIOD_DEFAULT_VALUE; + } + + // Validate maximum value + if ($fileProcessingGracePeriodValue > DropFolder::FILE_PROCESSING_GRACE_PERIOD_MAX_VALUE) + { + throw new KalturaAPIException(KalturaErrors::INVALID_FIELD_VALUE, 'fileProcessingGracePeriod'); } - + $dbObject->setType(ZoomDropFolderPlugin::getDropFolderTypeCoreValue(ZoomDropFolderType::ZOOM)); - return parent::toObject($dbObject, $skip); + $dbObject = parent::toObject($dbObject, $skip); + + // Explicitly set fileProcessingGracePeriod to ensure it's saved + if (!is_null($fileProcessingGracePeriodValue) && !in_array('fileProcessingGracePeriod', $skip)) + { + $dbObject->setFileProcessingGracePeriod($fileProcessingGracePeriodValue); + } + + return $dbObject; + } + + public function validateForInsert($propertiesToSkip = array()) + { + $this->validatePropertyMinValue('fileProcessingGracePeriod', 0, true); + return parent::validateForInsert($propertiesToSkip); } } diff --git a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php index 288aa198c11..16f1affb579 100644 --- a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php +++ b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php @@ -9,6 +9,7 @@ class ZoomDropFolder extends RemoteDropFolder const ZOOM_VENDOR_INTEGRATION_ID = 'zoom_vendor_integration_id'; const LAST_HANDLED_MEETING_TIME = 'last_handled_meeting_time'; + const FILE_PROCESSING_GRACE_PERIOD = 'file_processing_grace_period'; /** * @var string @@ -19,6 +20,11 @@ class ZoomDropFolder extends RemoteDropFolder * @var time */ protected $lastHandledMeetingTime; + + /** + * @var int + */ + protected $fileProcessingGracePeriod; /** * return string @@ -52,6 +58,41 @@ public function setLastHandledMeetingTime($v) $this->putInCustomData(self::LAST_HANDLED_MEETING_TIME, $v); } + /** + * @return int + */ + public function getFileProcessingGracePeriod() + { + return $this->getFromCustomData(self::FILE_PROCESSING_GRACE_PERIOD); + } + + /** + * @param int $v + */ + public function setFileProcessingGracePeriod($v) + { + $this->putInCustomData(self::FILE_PROCESSING_GRACE_PERIOD, $v); + } + + /** + * Code to be run before inserting to database + * @param PropelPDO $con + * @return boolean + */ + public function preInsert(PropelPDO $con = null) + { + $ret = parent::preInsert($con); + + // Set default value for fileProcessingGracePeriod if not set + $currentValue = $this->getFileProcessingGracePeriod(); + if (is_null($currentValue)) + { + $this->setFileProcessingGracePeriod(DropFolder::FILE_PROCESSING_GRACE_PERIOD_DEFAULT_VALUE); + } + + return $ret; + } + public function getImportJobData() { return new kDropFolderImportJobData(); From 75eda2646904ee6de3dfd52e5d5dc30d2e49808b Mon Sep 17 00:00:00 2001 From: yambenari24 Date: Sun, 15 Mar 2026 21:34:05 +0200 Subject: [PATCH 13/22] Update DropFolderConfigureAction.php --- plugins/drop_folder/admin/DropFolderConfigureAction.php | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/drop_folder/admin/DropFolderConfigureAction.php b/plugins/drop_folder/admin/DropFolderConfigureAction.php index 88a4b815f9b..5bcb05f3f9e 100644 --- a/plugins/drop_folder/admin/DropFolderConfigureAction.php +++ b/plugins/drop_folder/admin/DropFolderConfigureAction.php @@ -111,7 +111,6 @@ private function processForm(Form_DropFolderConfigure $form, $formData, $partner $dropFolder->fileNamePatterns = '*'; if (is_null($dropFolderId)) { $dropFolder->status = Kaltura_Client_DropFolder_Enum_DropFolderStatus::ENABLED; - $responseDropFolder = $dropFolderPluginClient->dropFolder->add($dropFolder); } else { From c9dca1bc22bc64b39d08a40e8e440d7eeef6d35c Mon Sep 17 00:00:00 2001 From: yambenari24 Date: Sun, 15 Mar 2026 21:34:39 +0200 Subject: [PATCH 14/22] Update DropFolderConfigureAction.php --- plugins/drop_folder/admin/DropFolderConfigureAction.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/drop_folder/admin/DropFolderConfigureAction.php b/plugins/drop_folder/admin/DropFolderConfigureAction.php index 5bcb05f3f9e..1df71679e91 100644 --- a/plugins/drop_folder/admin/DropFolderConfigureAction.php +++ b/plugins/drop_folder/admin/DropFolderConfigureAction.php @@ -104,9 +104,7 @@ private function processForm(Form_DropFolderConfigure $form, $formData, $partner $dropFolder = $form->getObject("Kaltura_Client_DropFolder_Type_DropFolder", $formData, false, true); $this->validateConversionProfileId($dropFolder->conversionProfileId, $partnerId); - unset($dropFolder->id); - if($dropFolder->fileHandlerType === Kaltura_Client_DropFolder_Enum_DropFolderFileHandlerType::CONTENT) $dropFolder->fileNamePatterns = '*'; if (is_null($dropFolderId)) { From b4eae255f8cae0b0ae854596ee45ed88a86fec8b Mon Sep 17 00:00:00 2001 From: yambenari24 Date: Sun, 15 Mar 2026 21:35:50 +0200 Subject: [PATCH 15/22] Update KalturaDropFolder.php --- plugins/drop_folder/lib/api/types/KalturaDropFolder.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/drop_folder/lib/api/types/KalturaDropFolder.php b/plugins/drop_folder/lib/api/types/KalturaDropFolder.php index 43a34b14d27..00bc17efeed 100644 --- a/plugins/drop_folder/lib/api/types/KalturaDropFolder.php +++ b/plugins/drop_folder/lib/api/types/KalturaDropFolder.php @@ -214,9 +214,7 @@ public function toObject($dbObject = null, $skip = array()) if (is_null($dbObject)) $dbObject = new DropFolder(); $this->trimStringProperties(array ('path')); - parent::toObject($dbObject, $skip); - if ($this->fileHandlerConfig) { $dbFileHandlerConfig = $this->fileHandlerConfig->toObject(); From 43adf5c04a043084ca69012224961d511b9427eb Mon Sep 17 00:00:00 2001 From: yambenari24 Date: Mon, 16 Mar 2026 07:46:08 +0200 Subject: [PATCH 16/22] Update KalturaZoomDropFolder.php --- .../lib/api/KalturaZoomDropFolder.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php index cefe0b2b4bc..b6d56de50f9 100644 --- a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php +++ b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php @@ -144,11 +144,6 @@ public function doFromObject($sourceObject, KalturaDetachedResponseProfile $resp public function toObject($dbObject = null, $skip = array()) { - if (!$dbObject) - { - $dbObject = new ZoomDropFolder(); - } - if ($this->description) { /* @var ZoomVendorIntegration $vendorIntegration */ @@ -161,6 +156,11 @@ public function toObject($dbObject = null, $skip = array()) $vendorIntegration->save(); } + if (!$dbObject) + { + $dbObject = new ZoomDropFolder(); + } + // Handle fileProcessingGracePeriod validation and defaults $fileProcessingGracePeriodValue = $this->fileProcessingGracePeriod; From fe3880986961b2aeacd8491e98d4d5770e044c4e Mon Sep 17 00:00:00 2001 From: yambenari24 Date: Mon, 16 Mar 2026 07:53:30 +0200 Subject: [PATCH 17/22] Update KalturaZoomDropFolder.php --- .../zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php index b6d56de50f9..cb810a801f7 100644 --- a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php +++ b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php @@ -171,7 +171,7 @@ public function toObject($dbObject = null, $skip = array()) } // Set default if empty - if (is_null($fileProcessingGracePeriodValue) || $fileProcessingGracePeriodValue === '' || $fileProcessingGracePeriodValue === 0) + if (is_null($fileProcessingGracePeriodValue) || $fileProcessingGracePeriodValue === '') { $fileProcessingGracePeriodValue = DropFolder::FILE_PROCESSING_GRACE_PERIOD_DEFAULT_VALUE; } From 4954ed794f3a32a205a6355ad954c97d775ac78d Mon Sep 17 00:00:00 2001 From: yambenari24 Date: Mon, 16 Mar 2026 08:29:42 +0200 Subject: [PATCH 18/22] Update KalturaZoomDropFolder.php --- .../lib/api/KalturaZoomDropFolder.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php index cb810a801f7..4036b45c9ae 100644 --- a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php +++ b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php @@ -69,6 +69,8 @@ class KalturaZoomDropFolder extends KalturaDropFolder /** * The amount of time, in seconds, to wait before processing a drop folder file * @var int + * @minValue 0 + * @maxValue 21600 */ public $fileProcessingGracePeriod; @@ -176,12 +178,6 @@ public function toObject($dbObject = null, $skip = array()) $fileProcessingGracePeriodValue = DropFolder::FILE_PROCESSING_GRACE_PERIOD_DEFAULT_VALUE; } - // Validate maximum value - if ($fileProcessingGracePeriodValue > DropFolder::FILE_PROCESSING_GRACE_PERIOD_MAX_VALUE) - { - throw new KalturaAPIException(KalturaErrors::INVALID_FIELD_VALUE, 'fileProcessingGracePeriod'); - } - $dbObject->setType(ZoomDropFolderPlugin::getDropFolderTypeCoreValue(ZoomDropFolderType::ZOOM)); $dbObject = parent::toObject($dbObject, $skip); @@ -197,7 +193,15 @@ public function toObject($dbObject = null, $skip = array()) public function validateForInsert($propertiesToSkip = array()) { $this->validatePropertyMinValue('fileProcessingGracePeriod', 0, true); + $this->validatePropertyMaxValue('fileProcessingGracePeriod', DropFolder::FILE_PROCESSING_GRACE_PERIOD_MAX_VALUE, true); return parent::validateForInsert($propertiesToSkip); } + public function validateForUpdate($sourceObject, $propertiesToSkip = array()) + { + $this->validatePropertyMinValue('fileProcessingGracePeriod', 0, true); + $this->validatePropertyMaxValue('fileProcessingGracePeriod', DropFolder::FILE_PROCESSING_GRACE_PERIOD_MAX_VALUE, true); + return parent::validateForUpdate($sourceObject, $propertiesToSkip); + } + } From 987c2802ad8f003847e3bdf3dcef384d03cf07f3 Mon Sep 17 00:00:00 2001 From: yambenari24 Date: Mon, 16 Mar 2026 12:48:35 +0200 Subject: [PATCH 19/22] Update ZoomDropFolder.php --- .../zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php index 16f1affb579..c0a4634dda6 100644 --- a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php +++ b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php @@ -82,8 +82,7 @@ public function setFileProcessingGracePeriod($v) public function preInsert(PropelPDO $con = null) { $ret = parent::preInsert($con); - - // Set default value for fileProcessingGracePeriod if not set + $currentValue = $this->getFileProcessingGracePeriod(); if (is_null($currentValue)) { From 4b933eb3ab4ae4edad301f9520369ac6c2a7b400 Mon Sep 17 00:00:00 2001 From: yambenari24 Date: Mon, 16 Mar 2026 12:49:12 +0200 Subject: [PATCH 20/22] remove comments --- .../ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php | 3 +-- .../zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php index 4036b45c9ae..1673a75ed60 100644 --- a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php +++ b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php @@ -180,8 +180,7 @@ public function toObject($dbObject = null, $skip = array()) $dbObject->setType(ZoomDropFolderPlugin::getDropFolderTypeCoreValue(ZoomDropFolderType::ZOOM)); $dbObject = parent::toObject($dbObject, $skip); - - // Explicitly set fileProcessingGracePeriod to ensure it's saved + if (!is_null($fileProcessingGracePeriodValue) && !in_array('fileProcessingGracePeriod', $skip)) { $dbObject->setFileProcessingGracePeriod($fileProcessingGracePeriodValue); diff --git a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php index c0a4634dda6..638f7e1b4c3 100644 --- a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php +++ b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/model/ZoomDropFolder.php @@ -82,7 +82,7 @@ public function setFileProcessingGracePeriod($v) public function preInsert(PropelPDO $con = null) { $ret = parent::preInsert($con); - + $currentValue = $this->getFileProcessingGracePeriod(); if (is_null($currentValue)) { From 6f23e4ae64ab38a3810df0a8ec70717f084a89f9 Mon Sep 17 00:00:00 2001 From: yambenari24 Date: Mon, 16 Mar 2026 12:49:55 +0200 Subject: [PATCH 21/22] Update KalturaZoomDropFolder.php --- .../ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php index 1673a75ed60..c19339b2d66 100644 --- a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php +++ b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php @@ -162,8 +162,7 @@ public function toObject($dbObject = null, $skip = array()) { $dbObject = new ZoomDropFolder(); } - - // Handle fileProcessingGracePeriod validation and defaults + $fileProcessingGracePeriodValue = $this->fileProcessingGracePeriod; // Convert to integer if it's a numeric string @@ -180,7 +179,7 @@ public function toObject($dbObject = null, $skip = array()) $dbObject->setType(ZoomDropFolderPlugin::getDropFolderTypeCoreValue(ZoomDropFolderType::ZOOM)); $dbObject = parent::toObject($dbObject, $skip); - + if (!is_null($fileProcessingGracePeriodValue) && !in_array('fileProcessingGracePeriod', $skip)) { $dbObject->setFileProcessingGracePeriod($fileProcessingGracePeriodValue); From db0e47baeaa6e7957cea9c3218b36324cfeb80ba Mon Sep 17 00:00:00 2001 From: yambenari24 Date: Mon, 16 Mar 2026 12:50:36 +0200 Subject: [PATCH 22/22] Update KalturaZoomDropFolder.php --- .../ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php index c19339b2d66..8a2655d32ec 100644 --- a/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php +++ b/plugins/vendor/zoom/ZoomDropFolderPlugin/lib/api/KalturaZoomDropFolder.php @@ -91,8 +91,7 @@ public function getMapBetweenObjects() public function doFromObject($sourceObject, KalturaDetachedResponseProfile $responseProfile = null) { parent::doFromObject($sourceObject, $responseProfile); - - // Explicitly load fileProcessingGracePeriod from source object + if ($this->shouldGet('fileProcessingGracePeriod', $responseProfile)) { $value = $sourceObject->getFileProcessingGracePeriod(); @@ -162,7 +161,7 @@ public function toObject($dbObject = null, $skip = array()) { $dbObject = new ZoomDropFolder(); } - + $fileProcessingGracePeriodValue = $this->fileProcessingGracePeriod; // Convert to integer if it's a numeric string