- 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.
84 lines
2.7 KiB
PHP
84 lines
2.7 KiB
PHP
<?php
|
|
/* * *******************************************************************************
|
|
* The content of this file is subject to the ITS4YouSMTP license.
|
|
* ("License"); You may not use this file except in compliance with the License
|
|
* The Initial Developer of the Original Code is IT-Solutions4You s.r.o.
|
|
* Portions created by IT-Solutions4You s.r.o. are Copyright(C) IT-Solutions4You s.r.o.
|
|
* All Rights Reserved.
|
|
* ****************************************************************************** */
|
|
|
|
class ITS4YouSMTP
|
|
{
|
|
public $db;
|
|
public $log;
|
|
public $moduleName = 'ITS4YouSMTP';
|
|
public $parentName = 'Tools';
|
|
public $table_name = 'its4you_smtp';
|
|
public $table_index = 'id';
|
|
public $tab_name = ['its4you_smtp'];
|
|
public $tab_name_index = [
|
|
'its4you_smtp' => 'id',
|
|
];
|
|
|
|
public function __construct()
|
|
{
|
|
global $log;
|
|
|
|
$this->db = PearDatabase::getInstance();
|
|
$this->log = $log;
|
|
}
|
|
|
|
/**
|
|
* @param string $moduleName
|
|
* @param string $eventType
|
|
* @throws Exception
|
|
*/
|
|
public function vtlib_handler($moduleName, $eventType)
|
|
{
|
|
require_once 'include/utils/utils.php';
|
|
require_once 'vtlib/Vtiger/Module.php';
|
|
include_once 'modules/ModComments/ModComments.php';
|
|
include_once 'modules/ModTracker/ModTracker.php';
|
|
|
|
switch ($eventType) {
|
|
case 'module.postinstall':
|
|
case 'module.enabled':
|
|
case 'module.postupdate':
|
|
$this->addCustomLinks();
|
|
break;
|
|
case 'module.disabled':
|
|
case 'module.preuninstall':
|
|
case 'module.preupdate':
|
|
$this->deleteCustomLinks();
|
|
break;
|
|
}
|
|
}
|
|
|
|
public function addCustomLinks()
|
|
{
|
|
$this->updateTables();
|
|
|
|
Settings_MenuEditor_Module_Model::addModuleToApp($this->moduleName, $this->parentName);
|
|
}
|
|
|
|
public function updateTables()
|
|
{
|
|
$fields = [
|
|
'encoded_password' => 'ALTER TABLE its4you_smtp ADD COLUMN encoded_password VARCHAR(1) DEFAULT NULL',
|
|
'mailer_type' => 'ALTER TABLE its4you_smtp ADD COLUMN mailer_type VARCHAR(20) DEFAULT NULL',
|
|
'from_name_field' => 'ALTER TABLE its4you_smtp ADD COLUMN from_name_field VARCHAR(50) DEFAULT NULL',
|
|
];
|
|
|
|
foreach ($fields as $field => $sql) {
|
|
preg_match('/ALTER\ TABLE\ ([a-z0-9\_]+)\ ADD/', $sql, $matches);
|
|
|
|
if ($matches[1] && !columnExists($field, $matches[1])) {
|
|
$this->db->pquery($sql);
|
|
}
|
|
}
|
|
}
|
|
|
|
public function deleteCustomLinks()
|
|
{
|
|
}
|
|
} |