| @@ 485-490 (lines=6) @@ | ||
| 482 | public function getPropertyIndexByChecksum($checksum) { |
|
| 483 | $this->retrieve(); |
|
| 484 | $idx = 0; |
|
| 485 | foreach ($this->children as $i => &$property) { |
|
| 486 | if (substr(md5($property->serialize()), 0, 8) == $checksum ) { |
|
| 487 | return $idx; |
|
| 488 | } |
|
| 489 | $idx += 1; |
|
| 490 | } |
|
| 491 | throw new Exception(self::$l10n->t('Property not found'), 404); |
|
| 492 | } |
|
| 493 | ||
| @@ 503-507 (lines=5) @@ | ||
| 500 | */ |
|
| 501 | public function getPropertyByChecksum($checksum) { |
|
| 502 | $this->retrieve(); |
|
| 503 | foreach ($this->children as $i => &$property) { |
|
| 504 | if (substr(md5($property->serialize()), 0, 8) == $checksum ) { |
|
| 505 | return $property; |
|
| 506 | } |
|
| 507 | } |
|
| 508 | throw new Exception(self::$l10n->t('Property not found'), 404); |
|
| 509 | } |
|
| 510 | ||