MINOR: as title does not exist we fail validation without alt tags take at least the filename

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@74114 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Will Rossiter 2009-04-06 03:23:44 +00:00 committed by Sam Minnee
parent 20a77500f3
commit e799219724

View File

@ -100,7 +100,7 @@ class Image extends File {
function getTag() {
if(file_exists("../" . $this->Filename)) {
$url = $this->URL();
$title = $this->Title;
$title = ($this->Title) ? $this->Title : $this->Filename;
return "<img src=\"$url\" alt=\"$title\" />";
}
}