Files
crm.clientright.ru/include/ComboUtil.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.3 KiB
PHP

<?php
/*********************************************************************************
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*
********************************************************************************/
require_once('include/utils/CommonUtils.php');
require_once('include/database/PearDatabase.php');
/** Function to returns the combo field values in array format
* @param $combofieldNames -- combofieldNames:: Type string array
* @returns $comboFieldArray -- comboFieldArray:: Type string array
*/
function getComboArray($combofieldNames)
{
global $log,$mod_strings;
$log->debug("Entering getComboArray(".$combofieldNames.") method ...");
global $adb,$current_user;
$roleid=$current_user->roleid;
$comboFieldArray = Array();
foreach ($combofieldNames as $tableName => $arrayName)
{
$fldArrName= $arrayName;
$arrayName = Array();
$sql = "select $tableName from vtiger_$tableName";
$params = array();
if(!is_admin($current_user))
{
$subrole = getRoleSubordinates($roleid);
if(count($subrole)> 0)
{
$roleids = $subrole;
array_push($roleids, $roleid);
}
else
{
$roleids = $roleid;
}
$sql = "select distinct $tableName from vtiger_$tableName inner join vtiger_role2picklist on vtiger_role2picklist.picklistvalueid = vtiger_$tableName.picklist_valueid where roleid in(". generateQuestionMarks($roleids) .") order by sortid";
$params = array($roleids);
}
$result = $adb->pquery($sql, $params);
while($row = $adb->fetch_array($result))
{
$val = $row[$tableName];
$arrayName[$val] = getTranslatedString($val);
}
$comboFieldArray[$fldArrName] = $arrayName;
}
$log->debug("Exiting getComboArray method ...");
return $comboFieldArray;
}
function getUniquePicklistID()
{
global $adb;
/*$sql="select id from vtiger_picklistvalues_seq";
$picklistvalue_id = $adb->query_result($adb->pquery($sql, array()),0,'id');
$qry = "update vtiger_picklistvalues_seq set id =?";
$adb->pquery($qry, array(++$picklistvalue_id));*/
return $adb->getUniqueID('vtiger_picklistvalues');
}
?>