Skip to content

Исправлена ошибка удаление настроек - #35

Merged
boffart merged 5 commits into
masterfrom
develop
Aug 7, 2026
Merged

Исправлена ошибка удаление настроек#35
boffart merged 5 commits into
masterfrom
develop

Conversation

@boffart

@boffart boffart commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

No description provided.

jorikfon and others added 5 commits April 7, 2026 15:31
…rsion

Use the module's own Lib\MikoPBXVersion compatibility layer instead of
the non-existent MikoPBX\Common\Providers\MikoPBXVersionProvider class,
which caused a fatal error on older MikoPBX releases when saving an employee.
- Fix terminology: "dial plan" → "call group" (EN) / keep "телефонная группа" (RU)
- Fix translations across all 25 language files for consistency
- Rewrite README.md and README.ru.md to match project conventions (badges, concise structure)
- Rename README_RU.md → README.ru.md
- Rename sound files from moduleusersgroups-call-direction-unavailable.wav to forbidden.wav
  (MikoPBX core auto-adds moduleusersgroups- prefix during installation)
- Add forbidden.wav sound files for 23 languages
Currently translated at 100.0% (37 of 37 strings)

Translation: MIKOPBX/ModuleUsersGroups
Translate-URL: https://weblate.mikopbx.com/projects/mikopbx/moduleusersgroups/pt_BR/
…le (#34)

Root cause: UsersGroups declared its hasMany GroupMembers / AllowedOutboundRules
relations with ACTION_CASCADE. On module disable the core probe
PbxExtensionState::makeBeforeDisableTest() calls beforeDelete() on every module
record, which cascade-deletes the child rows. The probe wraps the work in a
transaction and rolls it back, but the rollback runs on the MAIN database
connection while this module stores its tables in a SEPARATE database file, so
the cascade deletes are never rolled back and every group member and
outbound-rule link is lost on each disable/enable cycle.

Changes:
- Models/UsersGroups: ACTION_CASCADE -> NO_ACTION on both child relations
- App/Controllers deleteAction: explicit, transactional child cleanup
  (reassign members to the default group or delete them, delete the group's
  outbound-rule links) replacing the removed ORM cascade
- Lib/RestAPI CleanupOrphanedMembersAction: set-based deletes, report a failed
  DELETE as failure, and sweep members/rules orphaned by a missing group
- Setup/PbxExtensionSetup: drop the destructive transferOldSettings() migration
  that dropped live module tables
- Messages/en,ru: add mod_usrgr_ErrorOnDeleteGroup
@boffart
boffart merged commit 216f7a6 into master Aug 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants