Compare commits

...

2 Commits

Author SHA1 Message Date
Yasen Pramatarov 6c26b422e5 Minor fixes 2025-11-13 22:19:34 +02:00
Yasen Pramatarov 51a9f75429 Minor fixes 2025-11-13 19:47:53 +02:00
5 changed files with 8 additions and 7 deletions

View File

@ -97,7 +97,7 @@ if ($action !== '') {
$migrationsDir = __DIR__ . '/../../doc/database/migrations';
$runner = new \App\Core\MigrationRunner($db, $migrationsDir);
$applied = $runner->applyPendingMigrations();
// Clean up any test migration files after applying
if (!empty($applied)) {
foreach ($applied as $migration) {

View File

@ -49,7 +49,7 @@ function isCacheExpired($agentId) {
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// Apply rate limiting for adding new contacts
require '../app/includes/rate_limit_middleware.php';
require_once '../app/includes/rate_limit_middleware.php';
checkRateLimit($db, 'contact', $userId);
// Validate agent ID for POST operations

View File

@ -14,6 +14,10 @@ $isAjax = isset($_SERVER['HTTP_X_REQUESTED_WITH']) &&
// Get any new feedback messages
include_once '../app/helpers/feedback.php';
// Initialize security helper
require_once '../app/helpers/security.php';
$security = SecurityHelper::getInstance();
$action = $_REQUEST['action'] ?? '';
$agent = $_REQUEST['agent'] ?? '';
$host = $_REQUEST['host'] ?? '';

View File

@ -30,9 +30,9 @@ CREATE TABLE `user_meta` (
`name` varchar(255) DEFAULT NULL,
`email` varchar(256) DEFAULT NULL,
`timezone` varchar(255) DEFAULT NULL,
`theme` varchar(64) DEFAULT NULL,
`avatar` varchar(255) DEFAULT NULL,
`bio` text DEFAULT NULL,
`theme` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`,`user_id`) USING BTREE,
KEY `user_id` (`user_id`),
CONSTRAINT `user_meta_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`)
@ -202,7 +202,7 @@ CREATE TABLE `platform` (
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
INSERT INTO `platforms` (`id`, `name`, `jitsi_url`, `jilo_database`) VALUES
INSERT INTO `platform` (`id`, `name`, `jitsi_url`, `jilo_database`) VALUES
(1,'example.com','https://meet.example.com','../../jilo/jilo.db');
-- --------------------------------------------------------

View File

@ -1,3 +0,0 @@
-- Add user theme preference column to user_meta, if it doesn't exist
ALTER TABLE user_meta
ADD COLUMN IF NOT EXISTS theme VARCHAR(64) NULL DEFAULT NULL AFTER timezone;