"ogg" => false,
"mp3" => false
);
- foreach($source["documents"] as $document){
+ $source_documents = $source["reference"] ? $source["reference"]["documents"] : $source["documents"];
+ foreach($source_documents as $document){
$file_name = false;
if(substr(urldecode($document["url"]), 0, strlen($base_url)) == $base_url){
$file_name = $document_root.substr(urldecode($document["url"]), strlen($base_url));
"ogg" => false,
"mp3" => false
);
- foreach($source["documents"] as $document){
+ $source_documents = $source["reference"] ? $source["reference"]["documents"] : $source["documents"];
+ foreach($source_documents as $document){
$file_name = false;
if(substr(urldecode($document["url"]), 0, strlen($base_url)) == $base_url){
$file_name = $document_root.substr(urldecode($document["url"]), strlen($base_url));