--- D:/web/htdocs/sites/all/modules/pearwiki_filter/old/render/Image.php Thu Aug 02 11:40:30 2007 +++ D:/web/htdocs/sites/all/modules/pearwiki_filter/new/render/Image.php Mon Aug 06 13:12:15 2007 @@ -52,10 +52,14 @@ // note the image source $src = $options['src']; + + if (!isset($options['attr']['type'])) { + $options['attr']['type'] = '_original'; + } if (pearwiki_filter_use_image($pearwiki_current_format)) { // check if image node exists for this name - $image = db_fetch_object(db_query("SELECT n.nid, n.title, f.filename, f.filepath FROM {node} n LEFT JOIN {files} f ON n.nid = f.nid WHERE n.status = 1 AND n.type = 'image' AND LOWER(n.title) = LOWER('%s') LIMIT 1", $src)); + $image = db_fetch_object(db_query("SELECT n.nid, n.title, f.filename, f.filepath FROM {node} n LEFT JOIN {files} f ON n.nid = f.nid WHERE n.status = 1 AND n.type = 'image' AND f.filename = '%s' AND LOWER(n.title) = LOWER('%s') LIMIT 1", $options['attr']['type'], $src)); if ($image) { $src = file_create_url($image->filepath); if (!isset($options['attr']['alt'])) {