|
|
|
@ -327,7 +327,12 @@ class PDF |
|
|
|
|
if (api_get_path(REL_PATH) != '/') { |
|
|
|
|
$old_src_fixed = str_replace(api_get_path(REL_PATH).'courses/'.$course_data['path'].'/document/', '', $old_src); |
|
|
|
|
} else { |
|
|
|
|
$old_src_fixed = str_replace('courses/'.$course_data['path'].'/document/', '', $old_src); |
|
|
|
|
if (strpos($old_src, 'courses/'.$course_data['path'].'/document/') !== false) { |
|
|
|
|
$old_src_fixed = str_replace('courses/'.$course_data['path'].'/document/', '', $old_src); |
|
|
|
|
} else { |
|
|
|
|
$document_path = ''; |
|
|
|
|
$old_src_fixed = $old_src; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$new_path = $document_path.$old_src_fixed; |
|
|
|
|