- Added comprehensive AI Assistant system (aiassist/ directory): * Vector search and embedding capabilities * Typebot proxy integration * Elastic search functionality * Message classification and chat history * MCP proxy for external integrations - Implemented Court Status API (GetCourtStatus.php): * Real-time court document status checking * Integration with external court systems * Comprehensive error handling and logging - Enhanced S3 integration: * Improved file backup system with metadata * Batch processing capabilities * Enhanced error logging and recovery * Copy operations with URL fixing - Added Telegram contact creation API - Improved error logging across all modules - Enhanced callback system for AI responses - Extensive backup file storage with timestamps - Updated documentation and README files - File storage improvements: * Thousands of backup files with proper metadata * Fix operations for broken file references * Project-specific backup and recovery systems * Comprehensive file integrity checking Total: 26,461+ files added/modified including AWS SDK, vendor dependencies, and extensive backup system.
47 lines
1.2 KiB
PHP
47 lines
1.2 KiB
PHP
<?php
|
|
|
|
class EMAILMaker_Utils_Helper
|
|
{
|
|
public static function count($value)
|
|
{
|
|
return !empty($value) && is_array($value) ? count($value) : 0;
|
|
}
|
|
|
|
/**
|
|
* @param array $templates
|
|
* @param int $defaultType 1=detail view 2=list view
|
|
* @return array|int|string
|
|
*/
|
|
public static function getDefaultTemplateIds($templates, $defaultType)
|
|
{
|
|
$ids = array();
|
|
|
|
if (!empty($templates)) {
|
|
foreach ($templates as $templateId => $template) {
|
|
if(!empty($template['is_default_single_template'])) {
|
|
continue;
|
|
}
|
|
|
|
$default = (int)$template['is_default'];
|
|
|
|
if ($default === $defaultType || 3 === $default) {
|
|
$ids[] = $templateId;
|
|
}
|
|
}
|
|
}
|
|
|
|
return $ids;
|
|
}
|
|
|
|
/**
|
|
* @param string $sourceModule
|
|
* @return array
|
|
*/
|
|
public static function getPDFTemplates($sourceModule)
|
|
{
|
|
/** @var PDFMaker_Module_Model $moduleModel */
|
|
$moduleModel = Vtiger_Module_Model::getInstance('PDFMaker');
|
|
|
|
return $moduleModel->GetAvailableTemplates($sourceModule);
|
|
}
|
|
} |