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(); $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
@ -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");

View file

@ -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"/>

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); notify.alert(response.message, true);
setTimeout(() => { setTimeout(() => {
window.location = "/dashboard"; window.location = "/dashboard";
}, 800); }, 1500);
} }
}) })
.catch((err) => { .catch((err) => {