if(isset($fileinfo['file']) && is_array($fileinfo['file']) && !empty($fileinfo['file'])){
foreach($fileinfo['file'] as $fn){
if (!in_array(realpath($import_path.$fn), $filearray)){
- $filearray[] = realpath($import_path. $fn);
+ //if url, skip
+ if (preg_match('/^http[s]?\:/', $fn) == 0){
+ $filearray[] = realpath($import_path. $fn);
+ }
}
}
}
}
}
} else if (isset($elements[$name]) && ($attrs[$elements[$name]] != '')) {
- /* we know exactly which attribute contains the reference to the file. */
- //hack, if param[name]=autoplay or autostart, ignore
- if (!($name=='param' && ($attrs['name']=='autoplay' || $attrs['name']=='autoStart'))){
- //skip glossary.html, tweak to accomodate atutor imscp; also skip repeated entries.
+ //hack, if param[name]=src or none <param> tag, extract. Skip all other <param> attributes.
+ if ($name!='param' || $attrs['name']=='src'){
+ //skip glossary.html, tweak to accomodate atutor imscp; also skip repeated entries.
if (strpos($attrs[$elements[$name]], 'glossary.html')===false
&& !in_array($attrs[$elements[$name]], $my_files)){
$my_files[] = $attrs[$elements[$name]];