mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
reverted
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@88282 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
e21297ecc0
commit
ad7c4eca89
@ -98,7 +98,7 @@ class Image extends File {
|
|||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function getTag() {
|
function getTag() {
|
||||||
if(file_exists($this->FullPath)) {
|
if(file_exists("../" . $this->Filename)) {
|
||||||
$url = $this->URL();
|
$url = $this->URL();
|
||||||
$title = ($this->Title) ? $this->Title : $this->Filename;
|
$title = ($this->Title) ? $this->Title : $this->Filename;
|
||||||
|
|
||||||
@ -790,4 +790,4 @@ class Image_Uploader extends Controller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
@ -422,14 +422,14 @@ class File extends DataObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getFullPath() {
|
function getFullPath() {
|
||||||
$baseFolder = ASSETS_PATH;
|
$baseFolder = Director::baseFolder();
|
||||||
|
|
||||||
if(strpos($this->getFilename(), $baseFolder) === 0) {
|
if(strpos($this->getFilename(), $baseFolder) === 0) {
|
||||||
// if path is absolute already, just return
|
// if path is absolute already, just return
|
||||||
return $this->getFilename();
|
return $this->getFilename();
|
||||||
} else {
|
} else {
|
||||||
// otherwise assume silverstripe-basefolder
|
// otherwise assume silverstripe-basefolder
|
||||||
return substr(ASSETS_PATH, 0, strlen(ASSETS_PATH) - strlen(ASSETS_DIR)) . $this->getFilename();
|
return Director::baseFolder() . '/' . $this->getFilename();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -615,4 +615,4 @@ class File extends DataObject {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
Loading…
x
Reference in New Issue
Block a user