mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
f4290d9500
commit
474a6a9931
@ -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
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user