security fix and fix parent pages
API CI/CD / Validate (composer + pint) (push) Successful in 3m7s
API CI/CD / Test (PHPUnit) (push) Failing after 5m46s
API CI/CD / Build frontend assets (push) Successful in 1m2s
API CI/CD / Security audit (push) Failing after 49s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped

This commit is contained in:
root
2026-07-06 02:14:16 -04:00
parent 39228168c8
commit 90f9857b06
43 changed files with 4323 additions and 132 deletions
@@ -12,22 +12,38 @@ class WhatsappContextService
public function schoolYear(?string $override = null): string
{
$override = trim((string) $override);
if ($override !== '') {
return $override;
foreach ([
$override,
request()->query('school_year'),
request()->header('X-School-Year'),
request()->header('X-Selected-School-Year'),
Configuration::getConfig('school_year'),
] as $candidate) {
$value = trim((string) ($candidate ?? ''));
if ($value !== '') {
return $value;
}
}
return trim((string) (Configuration::getConfig('school_year') ?? ''));
return '';
}
public function semester(?string $override = null): string
{
$override = trim((string) $override);
if ($override !== '') {
return $override;
foreach ([
$override,
request()->query('semester'),
request()->header('X-Semester'),
request()->header('X-Selected-Semester'),
Configuration::getConfig('semester'),
] as $candidate) {
$value = trim((string) ($candidate ?? ''));
if ($value !== '') {
return $value;
}
}
return trim((string) (Configuration::getConfig('semester') ?? ''));
return '';
}
/**