- // If the GUID gets too long we only take the first parts and hope for best
- $guid = substr($guid, 0, 255);
-
- $itemuri = DBA::selectFirst('item-uri', ['id'], ['guid' => $guid]);
-
- if (!DBA::isResult($itemuri)) {
- return 0;
- }
-
- return $itemuri['id'];