[svn r16639] fix another bug when editing a document with audioplayer

skala
Eric Marguin 16 years ago
parent 38dfe92324
commit 08d6fdeacd
  1. 6
      main/document/create_document.php
  2. 5
      main/document/edit_document.php
  3. 7
      main/newscorm/learnpath.class.php

@ -1,5 +1,5 @@
<?php
// $Id: create_document.php 16635 2008-10-28 10:12:46Z elixir_inter $
// $Id: create_document.php 16639 2008-10-29 08:39:49Z elixir_inter $
/*
==============================================================================
Dokeos - elearning and course management software
@ -400,8 +400,10 @@ if ($form->validate())
// change the path of mp3 to absolute
// first regexp deals with ../../../ urls
$content = preg_replace("|(flashvars=\"file=)(\.+/)+|","$1".api_get_path(REL_COURSE_PATH).$_course['path'].'/document/',$content);
//second regexp deals with audio/ urls
$content = preg_replace("|(flashvars=\"file=)([^/]+)/|","$1".api_get_path(REL_COURSE_PATH).$_course['path'].'/document/$2/',$content);
fputs($fp, $content);

@ -1,4 +1,4 @@
<?php // $Id: edit_document.php 16635 2008-10-28 10:12:46Z elixir_inter $
<?php // $Id: edit_document.php 16639 2008-10-29 08:39:49Z elixir_inter $
/*
==============================================================================
Dokeos - elearning and course management software
@ -413,7 +413,10 @@ if($is_allowedToEdit)
$texte = str_replace('flv=/','flv=/|',$texte);
// change the path of mp3 to absolute
// first regexp deals with ../../../ urls
$texte = preg_replace("|(flashvars=\"file=)(\.+/)+|","$1".api_get_path(REL_COURSE_PATH).$_course['path'].'/document/',$texte);
//second regexp deals with audio/ urls
$texte = preg_replace("|(flashvars=\"file=)([^/]+)/|","$1".api_get_path(REL_COURSE_PATH).$_course['path'].'/document/$2/',$texte);
fputs($fp,$texte);

@ -4483,8 +4483,10 @@ class learnpath {
$content = str_replace(api_get_path('WEB_COURSE_PATH'), api_get_path(REL_PATH).'courses/', $content);
// change the path of mp3 to absolute
// first regexp deals with ../../../ urls
$content = preg_replace("|(flashvars=\"file=)(\.+/)+|","$1".api_get_path(REL_COURSE_PATH).$_course['path'].'/document/',$content);
//second regexp deals with audio/ urls
$content = preg_replace("|(flashvars=\"file=)([^/]+)/|","$1".api_get_path(REL_COURSE_PATH).$_course['path'].'/document/$2/',$content);
// for flv player : to prevent edition problem with firefox, we have to use a strange tip (don't blame me please)
@ -4588,7 +4590,10 @@ class learnpath {
$content = str_replace(api_get_path('WEB_COURSE_PATH'), $_configuration['url_append'].'/courses/', $content);
// change the path of mp3 to absolute
// first regexp deals with ../../../ urls
$content = preg_replace("|(flashvars=\"file=)(\.+/)+|","$1".api_get_path(REL_COURSE_PATH).$_course['path'].'/document/',$content);
//second regexp deals with audio/ urls
$content = preg_replace("|(flashvars=\"file=)([^/]+)/|","$1".api_get_path(REL_COURSE_PATH).$_course['path'].'/document/$2/',$content);
fputs($fp, $content);
fclose($fp);

Loading…
Cancel
Save