mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-02-14 13:39:35 +00:00
Refactor ID extraction logic in BuerklinProvider
This commit is contained in:
parent
46c2fe3aad
commit
5f65176636
1 changed files with 6 additions and 3 deletions
|
|
@ -662,9 +662,12 @@ class BuerklinProvider implements BatchInfoProviderInterface, URLHandlerInfoProv
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$id = basename(rtrim($path, '/'));
|
// Reject "/.../p" and "/.../p/" (no actual ID)
|
||||||
|
if ($id === 'p' || $id === '') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return $id !== '' ? $id : null;
|
return $id;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue