mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
3d6a492e93
commit
504c515ee6
@ -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'");
|
||||
|
Loading…
x
Reference in New Issue
Block a user