diff -ruN original/pear_override/render/Xhtml/Image.php mod/pear_override/render/Xhtml/Image.php --- original/pear_override/render/Xhtml/Image.php 2007-03-03 09:24:21.000000000 +0600 +++ mod/pear_override/render/Xhtml/Image.php 2011-10-20 16:32:50.000000000 +0700 @@ -55,7 +55,7 @@ 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 {image} i ON n.nid = i.nid LEFT JOIN {files} f ON i.fid = f.fid WHERE n.status = 1 AND n.type = 'image' AND LOWER(n.title) = LOWER('%s') LIMIT 1", $src)); if ($image) { $src = file_create_url($image->filepath); if (!isset($options['attr']['alt'])) { @@ -65,7 +65,7 @@ $options['attr']['title'] = $image->title; } if (!isset($options['attr']['link'])) { - $options['attr']['link'] = url("node/$image->nid", null, null, true); + $options['attr']['link'] = url("node/$image->nid", array('absolute'=> true)); } } }