fixed incorrect input type (#52), cleaned up site restore process (#53)

This commit is contained in:
Ro 2021-08-25 16:12:35 -07:00
parent d7c2827115
commit f2450b2be5
4 changed files with 24 additions and 25 deletions

View file

@ -101,6 +101,7 @@ class SetUp
$backup = $request->getUploadedFiles();
$file = $backup["backup-upload"];
$size = $file->getSize();
$name = $file->getClientFileName();
//park it so it can be read
@ -128,11 +129,11 @@ class SetUp
//move to appropriate spots
/*
rename(
"../content/settings/settings.json",
"../config/settings.json"
);
*/
rename(
"../content/settings/settings.json",
"../config/settings.json"
);
*/
//load up old config file
$newConfig = json_decode(
@ -151,15 +152,22 @@ class SetUp
rename("../content/settings/tags.json", "../config/tags.json");
rename(
"../content/public/assets/images/blog",
"../public/assets/images/blog"
);
//images path for blog and user
$blogImagePath = "../public/assets/images/blog";
$userImagePath = "../public/assets/images/user";
rename(
"../content/public/assets/images/user",
"../public/assets/images/user"
);
//check to see if image dirs are empty, if not chill
if ($globs = glob($blogImagePath . "/*")) {
//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");

View file

@ -28,7 +28,7 @@
<div id="dash-restore" class="dash-restore">
<form id="init-restore">
<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>
<label>Grab your backup zip</label>
<input id="backup-upload" type="file" name="backup-upload" placeholder="Backup Zip"/>

File diff suppressed because one or more lines are too long

View file

@ -130,7 +130,7 @@ export default class Base {
notify.alert(response.message, true);
setTimeout(() => {
window.location = "/dashboard";
}, 800);
}, 1500);
}
})
.catch((err) => {