mirror of
https://github.com/xevidos/codiad.git
synced 2024-12-22 13:52:16 +01:00
Merge branch 'development' into 'master'
Updated Install and update script to create sessions path. See merge request xevidos/codiad!8
This commit is contained in:
commit
d8e5f978dc
2 changed files with 24 additions and 1 deletions
|
@ -18,6 +18,7 @@
|
||||||
$users = $path . "/data/users.php";
|
$users = $path . "/data/users.php";
|
||||||
$projects = $path . "/data/projects.php";
|
$projects = $path . "/data/projects.php";
|
||||||
$active = $path . "/data/active.php";
|
$active = $path . "/data/active.php";
|
||||||
|
$sessions = $path . "/data/sessions";
|
||||||
$config = $path . "/config.php";
|
$config = $path . "/config.php";
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
@ -112,7 +113,16 @@ if (!file_exists($users) && !file_exists($projects) && !file_exists($active)) {
|
||||||
$project_data = array("name"=>$project_name,"path"=>$project_path);
|
$project_data = array("name"=>$project_name,"path"=>$project_path);
|
||||||
|
|
||||||
saveJSON($projects, array($project_data));
|
saveJSON($projects, array($project_data));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create sessions path.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ( ! is_dir( $sessions ) ) {
|
||||||
|
|
||||||
|
mkdir( $sessions, 770 );
|
||||||
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////
|
||||||
// Create Users file
|
// Create Users file
|
||||||
//////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -170,6 +170,8 @@ class updater {
|
||||||
|
|
||||||
function update() {
|
function update() {
|
||||||
|
|
||||||
|
$sessions = "../../data/sessions";
|
||||||
|
|
||||||
echo "<script>document.getElementById('progress').innerHTML = '<p class=\"status_box\">Downloading latest version ... </p>';</script>";
|
echo "<script>document.getElementById('progress').innerHTML = '<p class=\"status_box\">Downloading latest version ... </p>';</script>";
|
||||||
if ( ! $this->download() ) {
|
if ( ! $this->download() ) {
|
||||||
|
|
||||||
|
@ -186,6 +188,17 @@ class updater {
|
||||||
|
|
||||||
echo "<script>document.getElementById('progress').innerHTML = '<p class=\"status_box\">Updating ... </p>';</script>";
|
echo "<script>document.getElementById('progress').innerHTML = '<p class=\"status_box\">Updating ... </p>';</script>";
|
||||||
|
|
||||||
|
//Add Sessions path if not there.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create sessions path.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ( ! is_dir( $sessions ) ) {
|
||||||
|
|
||||||
|
mkdir( $sessions, 770 );
|
||||||
|
}
|
||||||
|
|
||||||
$src = $this->path . "/codiad-master/";
|
$src = $this->path . "/codiad-master/";
|
||||||
$src_folder = $this->path . "/codiad-master";
|
$src_folder = $this->path . "/codiad-master";
|
||||||
$dest = $this->path . "/";
|
$dest = $this->path . "/";
|
||||||
|
|
Loading…
Reference in a new issue