mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
the silverstripe-cache folder is now named according to the location of the silverstripe install, meaning that there are no clashes of permissions on shared servers (merged from branches/2.2.0, r44847)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44902 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
f58a5c7992
commit
7acd5738be
@ -4,7 +4,8 @@
|
||||
* This is loaded into the TEMP_FOLDER define on start up
|
||||
*/
|
||||
function getTempFolder() {
|
||||
$ssTmp = dirname(dirname($_SERVER['SCRIPT_FILENAME'])) . "/silverstripe-cache";
|
||||
$cachefolder = "silverstripe-cache" . str_replace(array("/",":", "\\"),"-", substr($_SERVER['SCRIPT_FILENAME'], 0, strlen($_SERVER['SCRIPT_FILENAME']) - strlen('/sapphire/main.php')));
|
||||
$ssTmp = dirname(dirname($_SERVER['SCRIPT_FILENAME'])) . "/" . $cachefolder;
|
||||
if(@file_exists($ssTmp)) {
|
||||
return $ssTmp;
|
||||
}
|
||||
@ -20,7 +21,7 @@ function getTempFolder() {
|
||||
}
|
||||
|
||||
$worked = true;
|
||||
$ssTmp = "$sysTmp/silverstripe-cache";
|
||||
$ssTmp = "$sysTmp/$cachefolder";
|
||||
if(!@file_exists($ssTmp)) {
|
||||
@$worked = mkdir($ssTmp);
|
||||
}
|
||||
@ -127,4 +128,4 @@ function _t($entity, $string = "", $priority = 40, $context = "") {
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user