[svn r17729] lp-search: minor: return an empty image path if no imge on db

especially for scorm now
skala
Marco Villegas 16 years ago
parent 23d00c0dd8
commit 7790136bf5
  1. 10
      main/inc/lib/search/tool_processors/learnpath_processor.class.php

@ -106,8 +106,14 @@ class learnpath_processor extends search_processor {
$img_location = api_get_path(WEB_COURSE_PATH).api_get_course_path($course_id)."/document/";
$thumbnail_path = str_replace ('.png.html', '_thumb.png', $row['path']);
$big_img_path = str_replace ('.png.html', '.png', $row['path']);
$thumbnail = $img_location . $thumbnail_path;
$image = $img_location . $big_img_path;
$thumbnail = '';
if (!empty($thumbnail_path)) {
$thumbnail = $img_location . $thumbnail_path;
}
$image = '';
if (!empty($big_img_path)) {
$image = $img_location . $big_img_path;
}
$name = $row['name'];
}

Loading…
Cancel
Save