* code for task #2464.
This commit is contained in:
@@ -159,7 +159,7 @@ class installModel extends model
|
||||
*/
|
||||
public function getDataRoot()
|
||||
{
|
||||
$result['path'] = $this->app->getAppRoot() . 'www' . $this->app->getPathFix() . 'data';
|
||||
$result['path'] = $this->app->getAppRoot() . 'www' . DS . 'data';
|
||||
$result['exists'] = is_dir($result['path']);
|
||||
$result['writable']= is_writable($result['path']);
|
||||
return $result;
|
||||
@@ -173,7 +173,7 @@ class installModel extends model
|
||||
*/
|
||||
public function checkDataRoot()
|
||||
{
|
||||
$dataRoot = $this->app->getAppRoot() . 'www' . $this->app->getPathFix() . 'data';
|
||||
$dataRoot = $this->app->getAppRoot() . 'www' . DS . 'data';
|
||||
return $result = (is_dir($dataRoot) and is_writable($dataRoot)) ? 'ok' : 'fail';
|
||||
}
|
||||
|
||||
@@ -354,7 +354,7 @@ class installModel extends model
|
||||
*/
|
||||
public function createTable($version)
|
||||
{
|
||||
$dbFile = $this->app->getAppRoot() . 'db' . $this->app->getPathFix() . 'zentao.sql';
|
||||
$dbFile = $this->app->getAppRoot() . 'db' . DS . 'zentao.sql';
|
||||
$tables = explode(';', file_get_contents($dbFile));
|
||||
foreach($tables as $table)
|
||||
{
|
||||
@@ -425,7 +425,7 @@ class installModel extends model
|
||||
*/
|
||||
public function importDemoData()
|
||||
{
|
||||
$demoDataFile = $this->app->getAppRoot() . 'db' . $this->app->getPathFix() . 'demo.sql';
|
||||
$demoDataFile = $this->app->getAppRoot() . 'db' . DS . 'demo.sql';
|
||||
$insertTables = explode(";\n", file_get_contents($demoDataFile));
|
||||
foreach($insertTables as $table)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user