#150 - Pages with similar content

#148 - Stable against restructures (from r87251)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89174 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2009-10-15 22:19:25 +00:00
parent 7e54fc1fc2
commit f84180813f
3 changed files with 9 additions and 4 deletions

View File

@ -1321,10 +1321,10 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
} else {
$this->HasBrokenLink = true;
}
} else if($link == '' || $link[0] == '/') {
$this->HasBrokenLink = true;
} else if($candidateFile = File::find(Convert::raw2sql(urldecode($link)))) {
$linkedFiles[] = $candidateFile->ID;
} else if($link == '' || $link[0] == '/') {
$this->HasBrokenLink = true;
}
}

View File

@ -90,6 +90,11 @@ class File extends DataObject {
function TreeTitle() {
return $this->Name;
}
// Used by AssetTableField
function BackLinkTrackingCount() {
return $this->BackLinkTracking()->Count();
}
/**
* Event handler called before deleting from the database.

View File

@ -328,7 +328,7 @@ class Folder extends File {
$this,
"Files",
"File",
array("Title" => _t('Folder.TITLE', "Title"), "Filename" => _t('Folder.FILENAME', "Filename")),
array("Title" => _t('Folder.TITLE', "Title"), "Filename" => _t('Folder.FILENAME', "Filename")),
""
);
$fileList->setFolder($this);
@ -498,4 +498,4 @@ class Folder_UnusedAssetsField extends CompositeField {
return $assetList;
}
}
?>
?>