Skip to content

Commit

Permalink
#825 Поправил парсер
Browse files Browse the repository at this point in the history
  • Loading branch information
boffart committed Oct 24, 2024
1 parent dd7b3a8 commit ac9a8a3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/PBXCoreREST/Lib/Extensions/DropdownsAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,12 @@ private static function findModuleByExtensionNumber(string $number): mixed
$obj = $relation['object'];

// Check if the related object belongs to a module
if (strpos(get_class($obj), 'Modules\\') === 0) {
$moduleUniqueID = explode('Models\\', get_class($obj))[1];
$className = get_class($obj);
[$param1,$moduleUniqueID,$param2] = explode('\\', $className);
$idFound = ('Modules' === $param1 && $param2 === 'Models');

if ( !$idFound && strpos($className, 'Modules\\') === 0) {
$moduleUniqueID = explode('Models\\', $className)[1];
}
}

Expand Down

0 comments on commit ac9a8a3

Please sign in to comment.