Fixes 28158, issues with the folder browser datatype and thumbnails

[TFS Changeset #73322]
This commit is contained in:
hartvig
2010-07-19 10:16:32 +00:00
parent 60fa1158b4
commit a59f72b183

View File

@@ -60,10 +60,10 @@ namespace umbraco.editorControls
// Check for thumbnail!
string fileNameOrg = p.Value.ToString();
string ext = fileNameOrg.Substring(fileNameOrg.LastIndexOf(".")+1, fileNameOrg.Length-fileNameOrg.LastIndexOf(".")-1);
string fileNameThumb = SystemDirectories.Root + fileNameOrg.Replace("."+ext, "_thumb.jpg");
if (File.Exists(IOHelper.MapPath(fileNameThumb)))
string fileNameThumb = fileNameOrg.Replace("."+ext, "_thumb.jpg");
if (File.Exists(IOHelper.MapPath(IOHelper.FindFile(fileNameThumb))))
{
writer.WriteLine("<a href=\"?id=" + m.Id.ToString() + "\"><img src=\"" + fileNameThumb + "\" alt=\"" + m.Text + "\" style=\"border: none\"/></a> &nbsp; ");
writer.WriteLine("<a href=\"?id=" + m.Id.ToString() + "\"><img src=\"" + IOHelper.ResolveUrl(fileNameThumb) + "\" alt=\"" + m.Text + "\" style=\"border: none\"/></a> &nbsp; ");
}
}
}