discord webhook fix

This commit is contained in:
2026-01-01 16:40:04 -05:00
parent 3abaf3d13f
commit bfac062dd3
4 changed files with 70 additions and 11 deletions

View File

@@ -28,7 +28,14 @@ try {
foreach ($lines as $line) {
if (strpos($line, '=') !== false && strpos($line, '#') !== 0) {
list($key, $value) = explode('=', $line, 2);
$envVars[trim($key)] = trim($value);
$key = trim($key);
$value = trim($value);
// Remove surrounding quotes if present
if ((substr($value, 0, 1) === '"' && substr($value, -1) === '"') ||
(substr($value, 0, 1) === "'" && substr($value, -1) === "'")) {
$value = substr($value, 1, -1);
}
$envVars[$key] = $value;
}
}
debug_log("Environment variables loaded");

View File

@@ -20,7 +20,14 @@ class TicketController {
foreach ($lines as $line) {
if (strpos($line, '=') !== false && strpos($line, '#') !== 0) {
list($key, $value) = explode('=', $line, 2);
$this->envVars[trim($key)] = trim($value);
$key = trim($key);
$value = trim($value);
// Remove surrounding quotes if present
if ((substr($value, 0, 1) === '"' && substr($value, -1) === '"') ||
(substr($value, 0, 1) === "'" && substr($value, -1) === "'")) {
$value = substr($value, 1, -1);
}
$this->envVars[$key] = $value;
}
}
}

View File

@@ -29,12 +29,14 @@
<style>
.user-header {
background: var(--header-bg, #2c3e50);
padding: 0.75rem 2rem;
padding: 0.5rem 1rem;
color: var(--header-text, white);
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid var(--border-color, #ddd);
max-width: 100%;
box-sizing: border-box;
}
body.light-mode .user-header {
--header-bg: #f8f9fa;
@@ -49,22 +51,42 @@
.user-header-left, .user-header-right {
display: flex;
align-items: center;
gap: 1rem;
gap: 0.75rem;
flex-shrink: 1;
min-width: 0;
}
.app-title {
font-weight: bold;
font-size: 1.1rem;
font-size: 1rem;
color: var(--header-text);
white-space: nowrap;
}
.user-name {
color: var(--header-text);
font-size: 0.9rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.admin-badge {
background: #e74c3c;
color: white;
padding: 0.25rem 0.5rem;
padding: 0.2rem 0.4rem;
border-radius: 4px;
font-size: 0.85rem;
font-size: 0.75rem;
white-space: nowrap;
}
/* Responsive design for smaller screens */
@media (max-width: 768px) {
.user-header {
padding: 0.5rem 0.75rem;
}
.app-title {
font-size: 0.9rem;
}
.user-name {
font-size: 0.85rem;
}
}
</style>
<div class="dashboard-header">

View File

@@ -43,12 +43,14 @@
<style>
.user-header {
background: var(--header-bg, #2c3e50);
padding: 0.75rem 2rem;
padding: 0.5rem 1rem;
color: var(--header-text, white);
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid var(--border-color, #ddd);
max-width: 100%;
box-sizing: border-box;
}
body.light-mode .user-header {
--header-bg: #f8f9fa;
@@ -63,25 +65,46 @@
.user-header-left, .user-header-right {
display: flex;
align-items: center;
gap: 1rem;
gap: 0.75rem;
flex-shrink: 1;
min-width: 0;
}
.back-link {
color: var(--header-text);
text-decoration: none;
font-weight: bold;
font-size: 1rem;
white-space: nowrap;
}
.back-link:hover {
text-decoration: underline;
}
.user-name {
color: var(--header-text);
font-size: 0.9rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.admin-badge {
background: #e74c3c;
color: white;
padding: 0.25rem 0.5rem;
padding: 0.2rem 0.4rem;
border-radius: 4px;
font-size: 0.85rem;
font-size: 0.75rem;
white-space: nowrap;
}
/* Responsive design for smaller screens */
@media (max-width: 768px) {
.user-header {
padding: 0.5rem 0.75rem;
}
.back-link {
font-size: 0.9rem;
}
.user-name {
font-size: 0.85rem;
}
}
</style>
<div class="ticket-container" data-priority="<?php echo $ticket["priority"]; ?>">