Rev 1162 | Rev 1280 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1162 | Rev 1169 | ||
---|---|---|---|
Line 331... | Line 331... | ||
331 | $maxlen = OIDplus::baseConfig()->getValue('LIMITS_MAX_ID_LENGTH')-strlen(self::root()); |
331 | $maxlen = OIDplus::baseConfig()->getValue('LIMITS_MAX_ID_LENGTH')-strlen(self::root()); |
332 | if (strlen($out->oid) > $maxlen) { |
332 | if (strlen($out->oid) > $maxlen) { |
333 | throw new OIDplusException(_L('The resulting OID "%1" is too long (max allowed length: %2).',$out->oid,$maxlen)); |
333 | throw new OIDplusException(_L('The resulting OID "%1" is too long (max allowed length: %2).',$out->oid,$maxlen)); |
334 | } |
334 | } |
335 | 335 | ||
336 | $depth = 0; |
- | |
337 | foreach (explode('.',$out->oid) as $arc) { |
- | |
338 | if (strlen($arc) > OIDplus::baseConfig()->getValue('LIMITS_MAX_OID_ARC_SIZE')) { |
- | |
339 | $maxlen = OIDplus::baseConfig()->getValue('LIMITS_MAX_OID_ARC_SIZE'); |
- | |
340 | throw new OIDplusException(_L('Arc "%1" is too long and therefore cannot be appended to the OID "%2" (max allowed arc size is "%3")',$arc,$this->oid,$maxlen)); |
- | |
341 | } |
- | |
342 | $depth++; |
- | |
343 | } |
- | |
344 | if ($depth > OIDplus::baseConfig()->getValue('LIMITS_MAX_OID_DEPTH')) { |
- | |
345 | $maxdepth = OIDplus::baseConfig()->getValue('LIMITS_MAX_OID_DEPTH'); |
- | |
346 | throw new OIDplusException(_L('OID %1 has too many arcs (current depth %2, max depth %3)',$out->oid,$depth,$maxdepth)); |
- | |
347 | } |
- | |
348 | - | ||
349 | return $out; |
336 | return $out; |
350 | } |
337 | } |
351 | 338 | ||
352 | /** |
339 | /** |
353 | * @param OIDplusOid $parent |
340 | * @param OIDplusOid $parent |