Browse Source

Merge pull request #421 from AngelFQC/7322

Fix images path - refs #7322
Yannick Warnier 10 years ago
parent
commit
0ab13e7c2b
2 changed files with 2 additions and 2 deletions
  1. 1 1
      main/document/document.php
  2. 1 1
      main/gradebook/lib/gradebook_functions.inc.php

+ 1 - 1
main/document/document.php

@@ -652,7 +652,7 @@ if (isset($_GET['curdirpath']) &&
             $new_content_html
         );
         $new_content_html = str_replace(
-            '/main/img/',
+            SYS_CODE_PATH . 'img/',
             api_get_path(WEB_IMG_PATH),
             $new_content_html
         );

+ 1 - 1
main/gradebook/lib/gradebook_functions.inc.php

@@ -676,7 +676,7 @@ function get_user_certificate_content($user_id, $course_code, $is_preview = fals
 
     $path_image_in_default_course = api_get_path(WEB_CODE_PATH) . 'default_course_document';
     $new_content_html = str_replace('/main/default_course_document', $path_image_in_default_course, $new_content_html);
-    $new_content_html = str_replace('/main/img/', api_get_path(WEB_IMG_PATH), $new_content_html);
+    $new_content_html = str_replace(SYS_CODE_PATH . 'img/', api_get_path(WEB_IMG_PATH), $new_content_html);
 
     //add print header
     if ($hide_print_button == false) {