#1660 - Drag to relocate images not working

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44561 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2007-11-09 04:13:26 +00:00
parent 15eff6e217
commit 5b2bcd75c2

View File

@ -476,7 +476,7 @@ class File extends DataObject {
function getRelativePath() {
if($this->ParentID) {
$p = $this->Parent();
$p = DataObject::get_one('Folder', "ID={$this->ParentID}");
if($p->ID) return $p->getRelativePath() . $this->getField("Name");
else return "assets/" . $this->getField("Name");