Skip to content
Snippets Groups Projects
Commit 1e06d556 authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

FIX #15578 TIME 0:35 fix missing loginpage_message/homepage_message in parameters

parent c724820f
No related branches found
No related tags found
No related merge requests found
...@@ -360,6 +360,18 @@ INSERT INTO parameters (id, description, param_value_int) VALUES ('maximumSignRo ...@@ -360,6 +360,18 @@ INSERT INTO parameters (id, description, param_value_int) VALUES ('maximumSignRo
UPDATE history_batch SET total_errors = 0 WHERE total_errors IS NULL; UPDATE history_batch SET total_errors = 0 WHERE total_errors IS NULL;
DO $$ BEGIN
IF (SELECT count(id) from parameters where id = 'homepage_message') = 0 THEN
INSERT INTO parameters (id, param_value_string) VALUES ('homepage_message', '');
END IF;
END$$;
DO $$ BEGIN
IF (SELECT count(id) from parameters where id = 'loginpage_message') = 0 THEN
INSERT INTO parameters (id, param_value_string) VALUES ('loginpage_message', '');
END IF;
END$$;
/* ORDER ON CHRONO */ /* ORDER ON CHRONO */
CREATE OR REPLACE FUNCTION order_alphanum(text) RETURNS text AS $$ CREATE OR REPLACE FUNCTION order_alphanum(text) RETURNS text AS $$
declare declare
......
...@@ -48,6 +48,28 @@ class ParameterController ...@@ -48,6 +48,28 @@ class ParameterController
} }
} }
$parameterIds = array_column($parameters, 'id');
if (!in_array('loginpage_message', $parameterIds)) {
$parameters[] = [
"description" => null,
"id" => "loginpage_message",
"param_value_date" => null,
"param_value_int" => null,
"param_value_string" => "",
"value" => ""
];
}
if (!in_array('homepage_message', $parameterIds)) {
$parameters[] = [
"description" => null,
"id" => "homepage_message",
"param_value_date" => null,
"param_value_int" => null,
"param_value_string" => "",
"value" => ""
];
}
return $response->withJson(['parameters' => $parameters]); return $response->withJson(['parameters' => $parameters]);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment