Files
crm.clientright.ru/crm_extensions/file_storage/check_simple.php
Fedor 9245768987 🚀 CRM Files Migration & Real-time Features
 Features:
- Migrated ALL files to new S3 structure (Projects, Contacts, Accounts, HelpDesk, Invoice, etc.)
- Added Nextcloud folder buttons to ALL modules
- Fixed Nextcloud editor integration
- WebSocket server for real-time updates
- Redis Pub/Sub integration
- File path manager for organized storage
- Redis caching for performance (Functions.php)

📁 New Structure:
Documents/Project/ProjectName_ID/file_docID.ext
Documents/Contacts/FirstName_LastName_ID/file_docID.ext
Documents/Accounts/AccountName_ID/file_docID.ext

🔧 Technical:
- FilePathManager for standardized paths
- S3StorageService integration
- WebSocket server (Node.js + Docker)
- Redis cache for getBasicModuleInfo()
- Predis library for Redis connectivity

📝 Scripts:
- Migration scripts for all modules
- Test pages for WebSocket/SSE/Polling
- Documentation (MIGRATION_*.md, REDIS_*.md)

🎯 Result: 15,000+ files migrated successfully!
2025-10-24 19:59:28 +03:00

64 lines
1.7 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* Простая проверка структуры файлов
*/
require_once(__DIR__ . '/../../config.inc.php');
global $adb;
echo "🔍 ПРОВЕРКА СТРУКТУРЫ ФАЙЛОВ\n";
echo "==========================================\n\n";
// Проверяем файлы БЕЗ папки Project/ в начале
$sql = "SELECT notesid, filename
FROM vtiger_notes
WHERE deleted = 0
AND filelocationtype = 'S'
AND filename LIKE '%/%'
AND filename NOT LIKE 'Project/%'
AND filename NOT LIKE 'Contact/%'
AND filename NOT LIKE 'Accounts/%'
AND filename NOT LIKE '%/%/%'
LIMIT 10";
$result = $adb->query($sql);
$oldCount = $adb->num_rows($result);
echo "📊 Файлов в СТАРОЙ структуре (название_ID/файл): $oldCount\n\n";
if ($oldCount > 0) {
echo "📁 Примеры:\n";
while ($row = $adb->fetch_array($result)) {
echo " ID: {$row['notesid']}, Path: {$row['filename']}\n";
}
}
echo "\n";
// Проверяем файлы С папкой Project/
$sql2 = "SELECT COUNT(*) as cnt
FROM vtiger_notes
WHERE deleted = 0
AND filelocationtype = 'S'
AND filename LIKE 'Project/%'";
$result2 = $adb->query($sql2);
$newCount = $adb->query_result($result2, 0, 'cnt');
echo "📊 Файлов в НОВОЙ структуре (Project/название_ID/файл): $newCount\n\n";
echo "✅ Проверка завершена!\n\n";
if ($oldCount > 0) {
echo "🔄 Нужно перенести $oldCount файлов в папку Project/\n";
echo "Запустите: php move_projects_to_folder.php\n";
} else {
echo "Все файлы уже в правильной структуре!\n";
}
?>