From ba1195567b55993eb4f46c683bf0125f21bb80ce Mon Sep 17 00:00:00 2001 From: Silvio Date: Thu, 29 Jul 2010 10:35:33 -0300 Subject: Check for repetitions at subfields_from_fetch() on BiblioIsisDb --- classes/BiblioIsisDb.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/BiblioIsisDb.php b/classes/BiblioIsisDb.php index b4fa52f..3baa529 100644 --- a/classes/BiblioIsisDb.php +++ b/classes/BiblioIsisDb.php @@ -309,6 +309,10 @@ class BiblioIsisDb implements IsisDb { * Data with processed subfields. */ function subfields_from_fetch($name, $key) { + // Check if entry has repetitions. + $this->is_repetitive($key, $name); + + // Iterate over all values. foreach ($name as $entry => $value) { if (substr($value, 0, 1) != '^') { $field = preg_replace('/\^.*/', '', $value); @@ -364,7 +368,7 @@ class BiblioIsisDb implements IsisDb { if (isset($this->format['fields'][$field]['repeat']) && $this->format['fields'][$field]['repeat'] == FALSE) { if (is_array($value) && count($value) > 1) { - $this->logger("$field is configured as non repetitive but data shows a repetition for value". var_dump($value)); + $this->logger("Field $field is configured as non repetitive but data shows a repetition for value."); } return FALSE; } -- cgit v1.2.3