diff --git a/endpoints/payments/add.php b/endpoints/payments/add.php index 93ebf021d..37d8144c2 100644 --- a/endpoints/payments/add.php +++ b/endpoints/payments/add.php @@ -4,6 +4,11 @@ require_once '../../includes/inputvalidation.php'; require_once '../../includes/getsettings.php'; +if (!file_exists('images/uploads/logos')) { + mkdir('../../images/uploads/logos', 0777, true); + mkdir('../../images/uploads/logos/avatars', 0777, true); +} + function sanitizeFilename($filename) { $filename = preg_replace("/[^a-zA-Z0-9\s]/", "", $filename); diff --git a/endpoints/subscription/add.php b/endpoints/subscription/add.php index 060cafc6e..42934d056 100644 --- a/endpoints/subscription/add.php +++ b/endpoints/subscription/add.php @@ -4,6 +4,11 @@ require_once '../../includes/inputvalidation.php'; require_once '../../includes/getsettings.php'; +if (!file_exists('images/uploads/logos')) { + mkdir('../../images/uploads/logos', 0777, true); + mkdir('../../images/uploads/logos/avatars', 0777, true); +} + function sanitizeFilename($filename) { $filename = preg_replace("/[^a-zA-Z0-9\s]/", "", $filename); diff --git a/endpoints/user/save_user.php b/endpoints/user/save_user.php index 98d156dc9..aa2bf4144 100644 --- a/endpoints/user/save_user.php +++ b/endpoints/user/save_user.php @@ -2,6 +2,11 @@ require_once '../../includes/connect_endpoint.php'; require_once '../../includes/inputvalidation.php'; +if (!file_exists('images/uploads/logos')) { + mkdir('../../images/uploads/logos', 0777, true); + mkdir('../../images/uploads/logos/avatars', 0777, true); +} + function update_exchange_rate($db, $userId) { $query = "SELECT api_key, provider FROM fixer WHERE user_id = :userId"; diff --git a/includes/version.php b/includes/version.php index 8afbed6ce..3287fd772 100644 --- a/includes/version.php +++ b/includes/version.php @@ -1,3 +1,3 @@ \ No newline at end of file diff --git a/registration.php b/registration.php index c9d1b7eb0..7e08e5c20 100644 --- a/registration.php +++ b/registration.php @@ -17,6 +17,12 @@ function validate($value) return $value; } +// If logo folder doesn't exist, create it +if (!file_exists('images/uploads/logos')) { + mkdir('images/uploads/logos', 0777, true); + mkdir('images/uploads/logos/avatars', 0777, true); +} + // If there's already a user on the database, redirect to login page if registrations are closed or maxn users is reached $stmt = $db->prepare('SELECT COUNT(*) as userCount FROM user'); $result = $stmt->execute(); diff --git a/service-worker.js b/service-worker.js index c7c804149..22019bcfe 100644 --- a/service-worker.js +++ b/service-worker.js @@ -26,6 +26,8 @@ self.addEventListener('install', function (event) { 'webfonts/fa-solid-900.ttf', 'webfonts/fa-brands-400.woff2', 'webfonts/fa-brands-400.ttf', + 'webfonts/fa-regular-400.woff2', + 'webfonts/fa-regular-400.ttf', 'scripts/common.js', 'scripts/dashboard.js', 'scripts/stats.js', diff --git a/webfonts/fa-regular-400.ttf b/webfonts/fa-regular-400.ttf new file mode 100644 index 000000000..549d68dc0 Binary files /dev/null and b/webfonts/fa-regular-400.ttf differ diff --git a/webfonts/fa-regular-400.woff2 b/webfonts/fa-regular-400.woff2 new file mode 100644 index 000000000..18400d7fa Binary files /dev/null and b/webfonts/fa-regular-400.woff2 differ