[php:core] add Main option commonTempPath

## commonTempPath
Temp directory path for working place.

It will be encouraged to set up outside the document root.

**Data type:** string  
**Default value:** `'./.tmp'`
This commit is contained in:
nao-pon
2016-01-20 16:49:05 +09:00
parent a619bf43c5
commit 9b22635ec5
2 changed files with 13 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
order deny,allow
deny from all
+11
View File
@@ -63,6 +63,13 @@ class elFinder {
*/
protected static $base64encodeSessionData = false;
/**
* elFinder common tempraly path
*
* @var string
**/
protected static $commonTempPath = '';
/**
* Session key of net mount volumes
* @var string
@@ -296,6 +303,10 @@ class elFinder {
$this->netVolumesSessionKey = !empty($opts['netVolumesSessionKey'])? $opts['netVolumesSessionKey'] : 'elFinderNetVolumes';
$this->callbackWindowURL = (isset($opts['callbackWindowURL']) ? $opts['callbackWindowURL'] : '');
self::$sessionCacheKey = !empty($opts['sessionCacheKey']) ? $opts['sessionCacheKey'] : 'elFinderCaches';
elFinder::$commonTempPath = (isset($opts['commonTempPath']) ? $opts['commonTempPath'] : './.tmp');
if (!is_writable(elFinder::$commonTempPath)) {
elFinder::$commonTempPath = '';
}
// check session cache
$_optsMD5 = md5(json_encode($opts['roots']));