mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Fix image tracking to take resized images into account (from r86198)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89170 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
39ceae44c1
commit
d2cd852df4
@ -1323,7 +1323,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
}
|
||||
} else if($link == '' || $link[0] == '/') {
|
||||
$this->HasBrokenLink = true;
|
||||
} else if($candidateFile = DataObject::get_one("File", "\"Filename\" = '" . Convert::raw2sql(urldecode($link)) . "'", false)) {
|
||||
} else if($candidateFile = File::find(Convert::raw2sql(urldecode($link)))) {
|
||||
$linkedFiles[] = $candidateFile->ID;
|
||||
}
|
||||
}
|
||||
@ -1333,7 +1333,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
foreach($images as $image) {
|
||||
$image = Director::makeRelative($image);
|
||||
if(substr($image,0,7) == 'assets/') {
|
||||
$candidateImage = DataObject::get_one("File", "\"Filename\" = '$image'");
|
||||
$candidateImage = File::find($image);
|
||||
if($candidateImage) $linkedFiles[] = $candidateImage->ID;
|
||||
else $this->HasBrokenFile = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user