forked from projects/fipamo
This commit is contained in:
parent
d7c2827115
commit
f2450b2be5
4 changed files with 24 additions and 25 deletions
|
@ -101,6 +101,7 @@ class SetUp
|
||||||
|
|
||||||
$backup = $request->getUploadedFiles();
|
$backup = $request->getUploadedFiles();
|
||||||
$file = $backup["backup-upload"];
|
$file = $backup["backup-upload"];
|
||||||
|
$size = $file->getSize();
|
||||||
$name = $file->getClientFileName();
|
$name = $file->getClientFileName();
|
||||||
|
|
||||||
//park it so it can be read
|
//park it so it can be read
|
||||||
|
@ -128,11 +129,11 @@ class SetUp
|
||||||
|
|
||||||
//move to appropriate spots
|
//move to appropriate spots
|
||||||
/*
|
/*
|
||||||
rename(
|
rename(
|
||||||
"../content/settings/settings.json",
|
"../content/settings/settings.json",
|
||||||
"../config/settings.json"
|
"../config/settings.json"
|
||||||
);
|
);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//load up old config file
|
//load up old config file
|
||||||
$newConfig = json_decode(
|
$newConfig = json_decode(
|
||||||
|
@ -151,15 +152,22 @@ class SetUp
|
||||||
|
|
||||||
rename("../content/settings/tags.json", "../config/tags.json");
|
rename("../content/settings/tags.json", "../config/tags.json");
|
||||||
|
|
||||||
rename(
|
//images path for blog and user
|
||||||
"../content/public/assets/images/blog",
|
$blogImagePath = "../public/assets/images/blog";
|
||||||
"../public/assets/images/blog"
|
$userImagePath = "../public/assets/images/user";
|
||||||
);
|
|
||||||
|
|
||||||
rename(
|
//check to see if image dirs are empty, if not chill
|
||||||
"../content/public/assets/images/user",
|
if ($globs = glob($blogImagePath . "/*")) {
|
||||||
"../public/assets/images/user"
|
//directory not empty, relax
|
||||||
);
|
} else {
|
||||||
|
rename("../content/public/assets/images/blog", $blogImagePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($globs = glob($userImagePath . "/*")) {
|
||||||
|
//directory not empty, relax
|
||||||
|
} else {
|
||||||
|
rename("../content/public/assets/images/user", $userImagePath);
|
||||||
|
}
|
||||||
|
|
||||||
rename("../content/content/pages/", "../content/pages");
|
rename("../content/content/pages/", "../content/pages");
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<div id="dash-restore" class="dash-restore">
|
<div id="dash-restore" class="dash-restore">
|
||||||
<form id="init-restore">
|
<form id="init-restore">
|
||||||
<img id="the-logo" src="/assets/images/global/fipamo-logo.svg"/>
|
<img id="the-logo" src="/assets/images/global/fipamo-logo.svg"/>
|
||||||
<input type="text" name="restore_member_handle" id="restore_member_handle" placeholder="handle"/><input type="text" name="restore_member_pass" id="restore_member_pass" placeholder="password"/>
|
<input type="text" name="restore_member_handle" id="restore_member_handle" placeholder="handle"/><input type="password" name="restore_member_pass" id="restore_member_pass" placeholder="password"/>
|
||||||
<div>
|
<div>
|
||||||
<label>Grab your backup zip</label>
|
<label>Grab your backup zip</label>
|
||||||
<input id="backup-upload" type="file" name="backup-upload" placeholder="Backup Zip"/>
|
<input id="backup-upload" type="file" name="backup-upload" placeholder="Backup Zip"/>
|
||||||
|
|
11
public/assets/scripts/dash.min.js
vendored
11
public/assets/scripts/dash.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -130,7 +130,7 @@ export default class Base {
|
||||||
notify.alert(response.message, true);
|
notify.alert(response.message, true);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.location = "/dashboard";
|
window.location = "/dashboard";
|
||||||
}, 800);
|
}, 1500);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|
Loading…
Reference in a new issue