Skip to content

Commit 719d3e5

Browse files
committed
docs(legal+guide): update contributor guide, legal terms, and backup path sanitization
1 parent 20b8476 commit 719d3e5

6 files changed

Lines changed: 736 additions & 676 deletions

File tree

‎app/Console/Commands/BackupToDrive.php‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,13 @@ public function __construct(protected GoogleDriveBackupService $driveService)
2929
parent::__construct();
3030

3131
$timestamp = now()->format('Y-m-d_His');
32+
$rawVersion = config('app.version') ?: 'v1.0.0';
33+
$version = trim(preg_replace('/[^A-Za-z0-9._-]+/', '_', $rawVersion), '_') ?: 'v1.0.0';
3234

3335
$this->backupDir = storage_path('app/backups');
3436
$this->databaseDumpPath = $this->backupDir.'/database.sql.gz';
3537
$this->s3TarPath = $this->backupDir.'/s3.tar';
36-
$this->finalArchivePath = $this->backupDir."/hsc-stack-backup-{$timestamp}.tar.gz";
38+
$this->finalArchivePath = $this->backupDir."/backup_{$version}_{$timestamp}.tar.gz";
3739
}
3840

3941
public function handle(): int

‎app/Http/Controllers/AboutUsController.php‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public function index()
1212
{
1313
$users = Cache::remember('about_us_info', now()->addHours(24), function () {
1414
return User::where('is_verified', true)
15-
->select(['id', 'name', 'username', 'title', 'about', 'institution', 'image_path', 'priority'])
15+
->select(['id', 'name', 'username', 'title', 'about', 'institution', 'image_path', 'priority', 'is_board_member'])
1616
->get()
1717
->map(fn (User $user) => [
1818
'id' => $user->id,
@@ -23,6 +23,7 @@ public function index()
2323
'institution' => $user->institution,
2424
'image_url' => $user->image_url,
2525
'priority' => (int) $user->priority,
26+
'is_board_member' => (bool) $user->is_board_member,
2627
])
2728
->all();
2829
});

0 commit comments

Comments
 (0)