- 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.
62 lines
1.7 KiB
PHP
62 lines
1.7 KiB
PHP
<?php
|
|
|
|
class Settings_ITS4YouInstaller_Version_Model extends Vtiger_Base_Model
|
|
{
|
|
protected $db;
|
|
protected $extension;
|
|
|
|
/**
|
|
* @param array $values
|
|
*/
|
|
public function __construct($values = array())
|
|
{
|
|
parent::__construct($values);
|
|
|
|
$this->db = PearDatabase::getInstance();
|
|
}
|
|
|
|
/**
|
|
* @param string $extension
|
|
* @return Settings_ITS4YouInstaller_Version_Model
|
|
* @throws Exception
|
|
*/
|
|
public static function getInstance($extension)
|
|
{
|
|
$self = new self();
|
|
$self->set('extension', $extension);
|
|
$self->retrieveData();
|
|
|
|
return $self;
|
|
}
|
|
|
|
/**
|
|
* @throws Exception
|
|
*/
|
|
public function retrieveData()
|
|
{
|
|
$result = $this->db->pquery('SELECT * FROM its4you_installer_version WHERE extension=?', [$this->get('extension')]);
|
|
$data = $this->db->query_result_rowdata($result);
|
|
|
|
foreach ($data as $key => $value) {
|
|
$this->set($key, $value);
|
|
}
|
|
}
|
|
|
|
public function save()
|
|
{
|
|
$data = [
|
|
'extension' => $this->get('extension'),
|
|
'version' => $this->get('version'),
|
|
'update_datetime' => date('Y-m-d H:i:s'),
|
|
];
|
|
|
|
if (!$this->isEmpty('versionid')) {
|
|
$query = 'UPDATE its4you_installer_version SET extension=?, version=?, update_datetime=? WHERE versionid=?';
|
|
$data['versionid'] = $this->get('versionid');
|
|
} else {
|
|
$query = 'INSERT INTO its4you_installer_version (extension, version, update_datetime) VALUES (?,?,?)';
|
|
}
|
|
|
|
$this->db->pquery($query, $data);
|
|
}
|
|
} |