mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 15:06:06 +00:00
improved installer
This commit is contained in:
@@ -35,21 +35,29 @@ class SystemHelper
|
||||
|
||||
protected $modRewriteUrl = '/api/v1/Metadata';
|
||||
|
||||
protected $writableDir = 'data';
|
||||
protected $systemConfig = 'data/config.php';
|
||||
|
||||
|
||||
public function initWritable()
|
||||
{
|
||||
if (is_writable($this->writableDir)) {
|
||||
return true;
|
||||
$pathInfo = pathinfo($this->systemConfig);
|
||||
|
||||
if (!is_writable($pathInfo['dirname'])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
if (!@touch($this->systemConfig)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getWritableDir()
|
||||
public function getSystemDir()
|
||||
{
|
||||
return $this->writableDir;
|
||||
$pathInfo = pathinfo($this->systemConfig);
|
||||
|
||||
return $pathInfo['dirname'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user