- 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.
76 lines
1.8 KiB
PHP
76 lines
1.8 KiB
PHP
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: Stefan
|
|
* Date: 28.09.2016
|
|
* Time: 08:39
|
|
*/
|
|
|
|
namespace Workflow;
|
|
|
|
|
|
class FrontendJS
|
|
{
|
|
private static $_OnReady = array();
|
|
private static $_Script = array();
|
|
private static $_Global = array();
|
|
private static $_initialized = false;
|
|
|
|
/**
|
|
* @var string[]
|
|
*/
|
|
private static $_Classes = array();
|
|
|
|
protected static function AttachOnReady($script) {
|
|
self::$_OnReady[] = $script;
|
|
}
|
|
protected function AttachScriptFile($script) {
|
|
$script = \Vtiger_Loader::resolveNameToPath($script);
|
|
|
|
if(file_exists($script)) {
|
|
self::$_Script[] = file_get_contents($script);
|
|
}
|
|
}
|
|
protected function AttachScript($script) {
|
|
self::$_Script[] = $script;
|
|
}
|
|
protected function AttachGlobal($script) {
|
|
self::$_Global[] = $script;
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
public static function generateScripts() {
|
|
if(self::$_initialized === false) {
|
|
$alle = glob(dirname(__FILE__).'/../../extends/frontendjs/*.inc.php');
|
|
foreach($alle as $datei) { include_once(realpath($datei)); }
|
|
}
|
|
self::$_initialized = true;
|
|
|
|
foreach(self::$_Classes as $class) {
|
|
/**
|
|
* @var $obj FrontendJS
|
|
*/
|
|
$obj = new $class();
|
|
|
|
$obj->_addScripts();
|
|
}
|
|
|
|
return array(
|
|
'onready' => implode(PHP_EOL, self::$_OnReady),
|
|
'script' => implode(PHP_EOL, self::$_Script),
|
|
'global' => implode(PHP_EOL, self::$_Global),
|
|
);
|
|
}
|
|
|
|
public static function register($className) {
|
|
self::$_Classes[] = $className;
|
|
}
|
|
|
|
/**
|
|
* Function called to add Scripts
|
|
* @abstract
|
|
*/
|
|
protected function _addScripts() {}
|
|
} |