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 (from r96988)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102415 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-04-12 03:29:56 +00:00
parent f4290d9500
commit 474a6a9931
2 changed files with 3 additions and 15 deletions

View File

@ -88,18 +88,6 @@ class Image extends File {
$this->deleteFormattedImages();
}
/**
* 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

@ -425,13 +425,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();
}
/**