MINOR Code formatting fixes in HtmlEditorField

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@70059 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-01-13 04:02:00 +00:00 committed by Sam Minnee
parent 3d6a492e93
commit 504c515ee6

View File

@ -111,6 +111,7 @@ class HtmlEditorField extends TextareaField {
if(!ereg("^[ \t\r\n]*<", $content)) $content = "<p>$content</p>";
$links = HTTP::getLinksIn($content);
$linkedPages = array();
if($links) foreach($links as $link) {
$link = Director::makeRelative($link);
@ -135,10 +136,8 @@ class HtmlEditorField extends TextareaField {
}
$images = HTTP::getImagesIn($content);
if($images) {
foreach($images as $image) {
$image = Director::makeRelative($image);
if(substr($image,0,7) == 'assets/') {
$candidateImage = DataObject::get_one("File", "Filename = '$image'");