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
7b7db495
Verified
Commit
7b7db495
authored
5 years ago
by
Damien
Browse files
Options
Downloads
Patches
Plain Diff
FIX #12070 TIME 0:05 Fix no file + diffusionList
parent
325b0587
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/19.12/1912.sql
+1
-0
1 addition, 0 deletions
migration/19.12/1912.sql
src/app/resource/controllers/ResController.php
+5
-5
5 additions, 5 deletions
src/app/resource/controllers/ResController.php
with
6 additions
and
5 deletions
migration/19.12/1912.sql
+
1
−
0
View file @
7b7db495
...
@@ -401,6 +401,7 @@ UPDATE priorities SET delays = 30 WHERE delays IS NULL;
...
@@ -401,6 +401,7 @@ UPDATE priorities SET delays = 30 WHERE delays IS NULL;
ALTER
TABLE
priorities
ALTER
COLUMN
delays
SET
NOT
NULL
;
ALTER
TABLE
priorities
ALTER
COLUMN
delays
SET
NOT
NULL
;
ALTER
TABLE
res_letterbox
ALTER
COLUMN
status
DROP
NOT
NULL
;
ALTER
TABLE
res_letterbox
ALTER
COLUMN
status
DROP
NOT
NULL
;
ALTER
TABLE
res_letterbox
ALTER
COLUMN
docserver_id
DROP
NOT
NULL
;
ALTER
TABLE
res_letterbox
ALTER
COLUMN
docserver_id
DROP
NOT
NULL
;
ALTER
TABLE
res_letterbox
ALTER
COLUMN
format
DROP
NOT
NULL
;
/* REFACTORING SUPPRESSION */
/* REFACTORING SUPPRESSION */
...
...
This diff is collapsed.
Click to expand it.
src/app/resource/controllers/ResController.php
+
5
−
5
View file @
7b7db495
...
@@ -699,8 +699,8 @@ class ResController
...
@@ -699,8 +699,8 @@ class ResController
$body
=
$args
[
'body'
];
$body
=
$args
[
'body'
];
if
(
!
empty
(
$body
[
'diffusion'
]))
{
if
(
!
empty
(
$body
[
'diffusion
List
'
]))
{
foreach
(
$body
[
'diffusion'
]
as
$diffusion
)
{
foreach
(
$body
[
'diffusion
List
'
]
as
$diffusion
)
{
if
(
$diffusion
[
'mode'
]
==
'dest'
)
{
if
(
$diffusion
[
'mode'
]
==
'dest'
)
{
ResModel
::
update
([
'set'
=>
[
'dest_user'
=>
$diffusion
[
'id'
]],
'where'
=>
[
'res_id = ?'
],
'data'
=>
[
$args
[
'resId'
]]]);
ResModel
::
update
([
'set'
=>
[
'dest_user'
=>
$diffusion
[
'id'
]],
'where'
=>
[
'res_id = ?'
],
'data'
=>
[
$args
[
'resId'
]]]);
}
}
...
@@ -857,12 +857,12 @@ class ResController
...
@@ -857,12 +857,12 @@ class ResController
return
[
'errors'
=>
'Body tags : One or more tags do not exist'
];
return
[
'errors'
=>
'Body tags : One or more tags do not exist'
];
}
}
}
}
if
(
!
empty
(
$body
[
'diffusion'
]))
{
if
(
!
empty
(
$body
[
'diffusion
List
'
]))
{
if
(
!
Validator
::
arrayType
()
->
notEmpty
()
->
validate
(
$body
[
'diffusion'
]))
{
if
(
!
Validator
::
arrayType
()
->
notEmpty
()
->
validate
(
$body
[
'diffusion
List
'
]))
{
return
[
'errors'
=>
'Body diffusion is not an array'
];
return
[
'errors'
=>
'Body diffusion is not an array'
];
}
}
$destFound
=
false
;
$destFound
=
false
;
foreach
(
$body
[
'diffusion'
]
as
$key
=>
$diffusion
)
{
foreach
(
$body
[
'diffusion
List
'
]
as
$key
=>
$diffusion
)
{
if
(
$diffusion
[
'mode'
]
==
'dest'
)
{
if
(
$diffusion
[
'mode'
]
==
'dest'
)
{
if
(
$destFound
)
{
if
(
$destFound
)
{
return
[
'errors'
=>
"Body diffusion has multiple dest"
];
return
[
'errors'
=>
"Body diffusion has multiple dest"
];
...
...
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