Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix sonar qube
  • Loading branch information
nolanpro committed May 31, 2024
commit f32f94e900cb6c8827c094716434ecfe696ec17d
39 changes: 22 additions & 17 deletions ProcessMaker/Models/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -1162,29 +1162,34 @@ public function manageCustomRoutes()
break;

default:
if ($webEntryProperties->webentryRouteConfig->firstUrlSegment !== '') {
$webentryRouteConfig = $webEntryProperties->webentryRouteConfig;
try {
WebentryRoute::updateOrCreate(
[
'process_id' => $this->id,
'node_id' => $webentryRouteConfig->nodeId,
],
[
'first_segment' => $webentryRouteConfig->firstUrlSegment,
'params' => $webentryRouteConfig->parameters,
]
);
} catch (Exception $e) {
\Log::info('*** Error: ' . $e->getMessage());
}
}
$this->manageWebentryRoute($webEntryProperties);
break;
}
}
}
}

private function manageWebentryRoute($webEntryProperties)
{
if ($webEntryProperties->webentryRouteConfig->firstUrlSegment !== '') {
$webentryRouteConfig = $webEntryProperties->webentryRouteConfig;
try {
WebentryRoute::updateOrCreate(
[
'process_id' => $this->id,
'node_id' => $webentryRouteConfig->nodeId,
],
[
'first_segment' => $webentryRouteConfig->firstUrlSegment,
'params' => $webentryRouteConfig->parameters,
]
);
} catch (Exception $e) {
\Log::info('*** Error: ' . $e->getMessage());
}
}
}

/**
* Get node element attributes
*
Expand Down