API CHANGE #3600 Inconsistency in File::getURL() which returns an absolute URL, when it should be relative - please use getAbsoluteURL() instead for old behaviour

API CHANGE #3600 Image no longer has an explicit getURL() method, instead it inherits getURL() from File which returns a relative URL


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96988 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2010-01-15 01:22:48 +00:00 committed by Sam Minnee
parent 916be1aa2f
commit e77964a5b9
2 changed files with 3 additions and 15 deletions

View File

@ -81,18 +81,6 @@ class Image extends File {
}
}
/**
* Get the relative URL for this Image.
* Overwrites File->URL() which returns an absolute URL.
*
* @todo Refactor to return absolute URL like {@link File}
* @uses Director::baseURL()
* @return string
*/
function getURL() {
return Director::baseURL() . $this->Filename;
}
/**
* Return an XHTML img tag for this Image.
* @return string

View File

@ -421,13 +421,13 @@ class File extends DataObject {
}
/**
* Gets the absolute URL accessible through the web.
* Gets the relative URL accessible through the web.
*
* @uses Director::absoluteBaseURL()
* @uses Director::baseURL()
* @return string
*/
function getURL() {
return Director::absoluteBaseURL() . $this->getFilename();
return Director::baseURL() . $this->getFilename();
}
/**