Skip to content

Commit

Permalink
fix: missing folders on baremetal installation
Browse files Browse the repository at this point in the history
fix: missing fonts
  • Loading branch information
Miguel Ribeiro committed Oct 5, 2024
1 parent 212f4c7 commit 5a5cac5
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 1 deletion.
5 changes: 5 additions & 0 deletions endpoints/payments/add.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 5 additions & 0 deletions endpoints/subscription/add.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 5 additions & 0 deletions endpoints/user/save_user.php
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion includes/version.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php
$version = "v2.27.2";
$version = "v2.27.3";
?>
6 changes: 6 additions & 0 deletions registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Binary file added webfonts/fa-regular-400.ttf
Binary file not shown.
Binary file added webfonts/fa-regular-400.woff2
Binary file not shown.

0 comments on commit 5a5cac5

Please sign in to comment.