[svn r13222] fix bugs with flv player in learnpath docs

skala
Eric Marguin 18 years ago
parent 42fc3c10f9
commit ca4d414ae7
  1. 9
      main/newscorm/learnpath.class.php

@ -3976,9 +3976,18 @@ class learnpath {
$content = stripslashes(text_filter($content)); $content = stripslashes(text_filter($content));
//if flv player, change absolute paht temporarely to prevent from erasing it in the following lines
$content = str_replace('flv=h','flv=h|',$content);
$content = str_replace('flv=/','flv=/|',$content);
$path_to_remove = api_get_path('WEB_COURSE_PATH') . $_course['path'] . '/document' . $dir; $path_to_remove = api_get_path('WEB_COURSE_PATH') . $_course['path'] . '/document' . $dir;
$content = str_replace($path_to_remove, './', $content); $content = str_replace($path_to_remove, './', $content);
// for flv player : change back the url to absolute
$content = str_replace('flv=h|','flv=h',$content);
$content = str_replace('flv=/|','flv=/',$content);
if(!file_exists($filepath . $filename)) if(!file_exists($filepath . $filename))
{ {
if($fp = @fopen($filepath . $filename, 'w')) if($fp = @fopen($filepath . $filename, 'w'))

Loading…
Cancel
Save