--- a/server/src/app/Services/LexvoResolver.php Thu Feb 25 12:24:30 2016 +0100
+++ b/server/src/app/Services/LexvoResolver.php Thu Feb 25 21:26:15 2016 +0100
@@ -21,6 +21,7 @@
}
return $lexvoid;
}
+
/**
* Get name from Viaf id
* @param string $id The id to resolve. Can be an url starting with http://viaf.org/viaf/
@@ -40,6 +41,10 @@
*/
public function getNames(array $ids) {
+ if(count($ids) > config('corpusparole.lexvo_max_ids')) {
+ throw new LexvoResolverException("Too manys ids provided");
+ }
+
$lexvoids = array_map([$this, 'checkLexvoId'], $ids);
$lexvoidsMap = array_combine($lexvoids, $ids);