aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--classes/BiblioIsisDb.php21
-rw-r--r--schemas/fbe.yaml3
2 files changed, 13 insertions, 11 deletions
diff --git a/classes/BiblioIsisDb.php b/classes/BiblioIsisDb.php
index 36648aa..75d9b92 100644
--- a/classes/BiblioIsisDb.php
+++ b/classes/BiblioIsisDb.php
@@ -256,8 +256,13 @@ class BiblioIsisDb implements IsisDb {
$method = 'subfields_from_'. $method;
return $this->{$method}($name, $key);
}
+ else {
+ foreach ($name as $value) {
+ $data[] = array('field' => $value);
+ }
+ }
- return $name;
+ return $data;
}
/**
@@ -332,7 +337,7 @@ class BiblioIsisDb implements IsisDb {
* Deals with repetition.
*
* As Biblio::Isis always return field values as arrays, we
- * have to check the database schema to see if we have to
+ * have to check the database schema to see if we want to
* convert then to a single value.
*
* @param $field
@@ -357,8 +362,9 @@ class BiblioIsisDb implements IsisDb {
* Deals with repetition.
*
* As Biblio::Isis always return field values as arrays, we
- * have to check the database schema to see if we have to
- * convert then to a single value.
+ * have to check the database schema to see if we want to
+ * convert then to a single value. The current implementation
+ * is just a placeholder as no conversion is done.
*
* @param $field
* Database field.
@@ -370,12 +376,7 @@ class BiblioIsisDb implements IsisDb {
* The value according to the repetition config.
*/
function repetition($key, $value) {
- if ($this->is_repetitive($key, $value)) {
- return $value;
- }
- else {
- return $value[0];
- }
+ return $value;
}
/**
diff --git a/schemas/fbe.yaml b/schemas/fbe.yaml
index 7b26380..e0041fa 100644
--- a/schemas/fbe.yaml
+++ b/schemas/fbe.yaml
@@ -44,7 +44,8 @@ fields:
b: título atribuído
x: título ainda não confirmado
map:
- field: title
+ subfields:
+ a: title
22:
name: Outros títulos
repeat: Yes