Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
1e06d556
Commit
1e06d556
authored
4 years ago
by
Guillaume Heurtier
Browse files
Options
Downloads
Patches
Plain Diff
FIX #15578 TIME 0:35 fix missing loginpage_message/homepage_message in parameters
parent
c724820f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
migration/20.10/2010.sql
+12
-0
12 additions, 0 deletions
migration/20.10/2010.sql
src/app/parameter/controllers/ParameterController.php
+22
-0
22 additions, 0 deletions
src/app/parameter/controllers/ParameterController.php
with
34 additions
and
0 deletions
migration/20.10/2010.sql
+
12
−
0
View file @
1e06d556
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
src/app/parameter/controllers/ParameterController.php
+
22
−
0
View file @
1e06d556
...
@@ -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
]);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment