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
656b0896
Commit
656b0896
authored
6 years ago
by
kevin.dezaphi
Browse files
Options
Downloads
Patches
Plain Diff
FEAT #8545 redirect only dest
parent
02f105e4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/visa/rejection_visa_entity.php
+5
-34
5 additions, 34 deletions
modules/visa/rejection_visa_entity.php
with
5 additions
and
34 deletions
modules/visa/rejection_visa_entity.php
+
5
−
34
View file @
656b0896
...
@@ -137,43 +137,14 @@ function manage_empty_error($arr_id, $history, $id_action, $label_action, $statu
...
@@ -137,43 +137,14 @@ function manage_empty_error($arr_id, $history, $id_action, $label_action, $statu
$res_id
=
$arr_id
[
0
];
$res_id
=
$arr_id
[
0
];
$db
->
query
(
'UPDATE listinstance SET process_date = NULL WHERE res_id = ? AND difflist_type = ?'
,
[
$res_id
,
'VISA_CIRCUIT'
]);
$db
->
query
(
'UPDATE listinstance SET process_date = NULL WHERE res_id = ? AND difflist_type = ?'
,
[
$res_id
,
'VISA_CIRCUIT'
]);
$stmt
=
$db
->
query
(
"SELECT coll_id, res_id, listinstance_type, added_by_user, added_by_entity, visible, viewed, difflist_type FROM listinstance WHERE res_id = ? AND item_mode = 'dest'"
,
[
$res_id
]);
$resListinstance
=
$stmt
->
fetch
();
$stmt
=
$db
->
query
(
'SELECT initiator FROM res_letterbox WHERE res_id = ?'
,
[
$res_id
]);
$stmt
=
$db
->
query
(
'SELECT initiator FROM res_letterbox WHERE res_id = ?'
,
[
$res_id
]);
$resInitiator
=
$stmt
->
fetch
();
$resInitiator
=
$stmt
->
fetch
();
$stmt
=
$db
->
query
(
'SELECT item_id, item_type, item_mode FROM listmodels WHERE object_id = ?'
,
[
$resInitiator
[
'initiator'
]]);
$stmt
=
$db
->
query
(
"SELECT item_id, item_type FROM listmodels WHERE object_id = ? and item_mode = 'dest'"
,
[
$resInitiator
[
'initiator'
]]);
$resListModels
=
$stmt
->
fetchAll
();
$resListModel
=
$stmt
->
fetch
();
if
(
!
empty
(
$resListModels
))
{
if
(
!
empty
(
$resListModel
))
{
$db
->
query
(
"DELETE FROM listinstance WHERE res_id = ? AND (item_mode = 'dest' OR item_mode = 'cc')"
,
[
$res_id
]);
$db
->
query
(
"UPDATE listinstance SET item_id = ?, item_type = ? WHERE res_id = ? AND item_mode = 'dest'"
,
[
$resListModel
[
'item_id'
],
$resListModel
[
'item_type'
],
$res_id
]);
if
(
$status
==
'_NOSTATUS_'
)
{
$db
->
query
(
"UPDATE res_letterbox SET dest_user = ? WHERE res_id = ?"
,
[
$resListModel
[
'item_id'
],
$res_id
]);
$newStatus
=
'NEW'
;
}
else
{
$newStatus
=
$status
;
}
$db
->
query
(
"UPDATE res_letterbox SET status = ? WHERE res_id = ? "
,
[
$newStatus
,
$res_id
]);
foreach
(
$resListModels
as
$resListModel
)
{
$db
->
query
(
'INSERT INTO listinstance (
coll_id, res_id, listinstance_type, sequence, item_id, item_type, item_mode, added_by_user,
added_by_entity, visible, viewed, difflist_type, signatory, requested_signature
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'
,
[
$resListinstance
[
'coll_id'
],
$resListinstance
[
'res_id'
],
$resListinstance
[
'listinstance_type'
],
0
,
$resListModel
[
'item_id'
],
$resListModel
[
'item_type'
],
$resListModel
[
'item_mode'
],
$resListinstance
[
'added_by_user'
],
$resListinstance
[
'added_by_entity'
],
$resListinstance
[
'visible'
],
$resListinstance
[
'viewed'
],
$resListinstance
[
'difflist_type'
],
'false'
,
'false'
]);
}
}
}
return
array
(
'result'
=>
$res_id
.
'#'
,
'history_msg'
=>
$label_action
);
return
array
(
'result'
=>
$res_id
.
'#'
,
'history_msg'
=>
$label_action
);
}
}
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