installer modification

This commit is contained in:
Taras Machyshyn
2014-04-15 17:44:18 +03:00
parent b47ccbe395
commit 1e866da2aa
23 changed files with 650 additions and 569 deletions
+6 -14
View File
@@ -35,29 +35,21 @@ class SystemHelper
protected $modRewriteUrl = '/api/v1/Metadata';
protected $systemConfig = 'data/config.php';
protected $writableDir = 'data';
public function initWritable()
{
$pathInfo = pathinfo($this->systemConfig);
if (!is_writable($pathInfo['dirname'])) {
return false;
if (is_writable($this->writableDir)) {
return true;
}
if (!@touch($this->systemConfig)) {
return false;
}
return true;
return false;
}
public function getSystemDir()
public function getWritableDir()
{
$pathInfo = pathinfo($this->systemConfig);
return $pathInfo['dirname'];
return $this->writableDir;
}