+ add the logic of init data, tmp directories and .htaccess file.
This commit is contained in:
@@ -29,3 +29,25 @@ $saeDB = new saemysql();
|
||||
$saeSQL = "SELECT COUNT(`id`) FROM `" . $config->db->prefix . "config` WHERE 1 LIMIT 0,10";
|
||||
if($saeDB->getData($saeSQL)) $config->installed = true;
|
||||
$saeDB->closeDb();
|
||||
|
||||
$appRoot = dirname(dirname(__FILE__)) . '/' ;
|
||||
$htaccessFile = $appRoot . 'htaccess';
|
||||
if(file_exists($htaccessFile)) rename($htaccessFile, str_replace('htaccess', '.htaccss', $htaccessFile));
|
||||
|
||||
$tmpRoot = $appRoot . '/tmp/';
|
||||
if(!is_dir($tmpRoot))
|
||||
{
|
||||
mkdir($tmpRoot, 0777);
|
||||
mkdir($tmpRoot . 'cache', 0777);
|
||||
mkdir($tmpRoot . 'extension', 0777);
|
||||
mkdir($tmpRoot . 'log', 0777);
|
||||
mkdir($tmpRoot . 'model', 0777);
|
||||
mkdir($tmpRoot . 'svn', 0777);
|
||||
}
|
||||
|
||||
$dataRoot = $appRoot . 'data/';
|
||||
if(!is_dir($dataRoot))
|
||||
{
|
||||
mkdir($dataRoot, 0777);
|
||||
mkdir($dataRoot . 'upload', 0777);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user