Skip to content

Commit

Permalink
Remove a useless check, the _id in database is always prefixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
EreMaijala committed Oct 5, 2023
1 parent 65d393d commit 8003c94
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/RecordManager/Base/Command/Records/Export.php
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,7 @@ function ($record) use (
if (!$record['deleted']) {
if ($injectId) {
$id = $record['_id'];
$sourcePrefix = "$sourceId.";
if (str_starts_with($id, "$sourceId.")) {
$id = substr($id, strlen($sourcePrefix));
}
$id = substr($id, strlen("$sourceId."));
$dom->addChild($injectId, htmlspecialchars($id, ENT_NOQUOTES));
$xml = $dom->saveXML();
}
Expand Down

0 comments on commit 8003c94

Please sign in to comment.