Files
crm.clientright.ru/kcfinder/lib/helper_text.php
Fedor ac7467f0b4 Major CRM updates: AI Assistant, Court Status API, S3 integration improvements, and extensive file storage system
- 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.
2025-10-16 11:17:21 +03:00

69 lines
2.0 KiB
PHP

<?php
/** This file is part of KCFinder project
*
* @desc Text processing helper class
* @package KCFinder
* @version 2.21
* @author Pavel Tzonkov <pavelc@users.sourceforge.net>
* @copyright 2010 KCFinder Project
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
* @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2
* @link http://kcfinder.sunhater.com
*/
class text {
/** Replace repeated white spaces to single space
* @param string $string
* @return string */
static function clearWhitespaces($string) {
return trim(preg_replace('/\s+/s', " ", $string));
}
/** Normalize the string for HTML attribute value
* @param string $string
* @return string */
static function htmlValue($string) {
return str_replace('"', "&quot;", $string);
}
/** Normalize the string for JavaScript string value
* @param string $string
* @return string */
static function jsValue($string) {
return preg_replace('/\r?\n/', "\\n", str_replace('"', "\\\"", str_replace("'", "\\'", $string)));
}
/** Normalize the string for XML tag content data
* @param string $string
* @param bool $cdata */
static function xmlData($string, $cdata=false) {
$string = str_replace("]]>", "]]]]><![CDATA[>", $string);
if (!$cdata)
$string = "<![CDATA[$string]]>";
return $string;
}
/** Returns compressed content of given CSS code
* @param string $code
* @return string */
static function compressCSS($code) {
$code = self::clearWhitespaces($code);
$code = preg_replace('/ ?\{ ?/', "{", $code);
$code = preg_replace('/ ?\} ?/', "}", $code);
$code = preg_replace('/ ?\; ?/', ";", $code);
$code = preg_replace('/ ?\> ?/', ">", $code);
$code = preg_replace('/ ?\, ?/', ",", $code);
$code = preg_replace('/ ?\: ?/', ":", $code);
$code = str_replace(";}", "}", $code);
return $code;
}
}
?>