Original vikon_core sync_root_dir.php only downloads files that are
missing locally or have size 0. Added local file size check before
downloading to avoid re-fetching 14GB+ of existing files.
Original vikon_core Path::getFsPathByModule() returns moduleRoot/files/,
not moduleRoot. Root FM files, 3-letter subdirs, and new files all go
under files/ directory. index.html etc come from core ZIP, not FM sync.
- UpdateCoreAction: split syncDirFiles into syncRootDir (→module root)
and syncSubDir (→files/{dirId})
- SyncFilesAction: same split, matching original PHP vikon_core behavior
- index.html, file_stubs/ etc go to module root
- 3-letter FM codes (eib, eid, rir) go inside files/
Root files (index.html, file_stubs/) and non-3-letter directories now go
to module root where VIKON expects them, not into files/ subdirectory.
dir_name from FM API is relative to module root.
- Add CURLOPT_RESOLVE DNS bypass for db-nica.ru / file.db-nica.ru
- Add OAuth callback route with CSRF state validation
- Add /authorize endpoint to generate OAuth URL with state
- Add ABITUR special case: init empty module core without ZIP download
- Add token validation caching (150s) to reduce API calls
- Block PHP/PHTML/PHAR files inside ZIP before extraction
- Add VikonTokenRefresh middleware for auto token refresh
- Add vikon.refresh middleware alias to Kernel
- CheckAccessAction: pull_updates/assist/getModulesTreeAsync (not checkAccessJson)
- CheckVersionAction: pull_updates/assist/getUpdateVersionJson (not getLatestVersion)
These are the actual endpoints used by the original vikon_core update.js
Original vikon_core security.php validates tokens via:
POST db-nica.ru/oauth2/resource/token/introspect
Body: client_id=542&access_token=XXX
Our code was incorrectly using:
GET auth.db-nica.ru/api/profile_applicant/check_access_token
Header: Authorization: Bearer XXX
This was the WRONG endpoint — the profile check is for abitur forms,
not for the update system.