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
69951aee
Commit
69951aee
authored
7 years ago
by
Florian Azizian
Browse files
Options
Downloads
Patches
Plain Diff
FIX #5607 récupérer automatiquement les roles persistent lorsqu'on redirige en masse
parent
fd2d97cd
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
modules/entities/load_listinstance.php
+10
-2
10 additions, 2 deletions
modules/entities/load_listinstance.php
modules/entities/redirect.php
+19
-16
19 additions, 16 deletions
modules/entities/redirect.php
with
29 additions
and
18 deletions
modules/entities/load_listinstance.php
+
10
−
2
View file @
69951aee
...
@@ -103,8 +103,16 @@ if(($specific_role <> null || $specific_role <> '') && empty($_SESSION[$origin][
...
@@ -103,8 +103,16 @@ if(($specific_role <> null || $specific_role <> '') && empty($_SESSION[$origin][
$content
=
''
;
$content
=
''
;
if
(
!
empty
(
$_SESSION
[
$origin
][
'diff_list'
]))
{
if
(
!
empty
(
$_SESSION
[
$origin
][
'diff_list'
]))
{
// Si on redirige en masse plusieurs courriers, on ne récupère pas les roles persistent
$_SESSION
[
$origin
][
'diff_list'
]
=
$diffList
->
list_difflist_roles_to_keep
(
$_SESSION
[
'doc_id'
],
$_REQUEST
[
'collId'
],
$objectType
,
$_SESSION
[
$origin
][
'diff_list'
]);
if
(
empty
(
$_SESSION
[
'stockCheckbox'
])
||
count
(
$_SESSION
[
'stockCheckbox'
])
==
1
){
if
(
!
empty
(
$_SESSION
[
'stockCheckbox'
])
&&
count
(
$_SESSION
[
'stockCheckbox'
])
==
1
){
// Cas où on redirige en masse un courrier
$res_id
=
$_SESSION
[
'stockCheckbox'
][
0
];
}
else
{
$res_id
=
$_SESSION
[
'doc_id'
];
}
$_SESSION
[
$origin
][
'diff_list'
]
=
$diffList
->
list_difflist_roles_to_keep
(
$res_id
,
$_REQUEST
[
'collId'
],
$objectType
,
$_SESSION
[
$origin
][
'diff_list'
]);
}
$roles
=
$diffList
->
list_difflist_roles
();
$roles
=
$diffList
->
list_difflist_roles
();
$difflist
=
$_SESSION
[
$origin
][
'diff_list'
];
$difflist
=
$_SESSION
[
$origin
][
'diff_list'
];
...
...
This diff is collapsed.
Click to expand it.
modules/entities/redirect.php
+
19
−
16
View file @
69951aee
...
@@ -64,10 +64,9 @@ require_once('apps/' . $_SESSION['config']['app_id'] . '/class/class_chrono.php'
...
@@ -64,10 +64,9 @@ require_once('apps/' . $_SESSION['config']['app_id'] . '/class/class_chrono.php'
$values_str
.
=
$values
[
$i
]
.
', '
;
$values_str
.
=
$values
[
$i
]
.
', '
;
}
else
if
(
_ID_TO_DISPLAY
==
'chrono_number'
){
}
else
if
(
_ID_TO_DISPLAY
==
'chrono_number'
){
$values_str
.
=
$values
[
$i
]
.
', '
;
$values_str
.
=
$values
[
$i
]
.
', '
;
$chrono_number
=
$cr7
->
get_chrono_number
(
$values
[
$i
],
'res_view_letterbox'
);
$chrono_number
=
$cr7
->
get_chrono_number
(
$values
[
$i
],
'res_view_letterbox'
);
$chrono_number_str
.
=
$chrono_number
.
', '
;
$values_str_chrn
.
=
$chrono_number
.
', '
;
$values_str_chrn
.
=
$chrono_number_str
;
}
}
}
}
}
else
{
}
else
{
...
@@ -81,8 +80,7 @@ require_once('apps/' . $_SESSION['config']['app_id'] . '/class/class_chrono.php'
...
@@ -81,8 +80,7 @@ require_once('apps/' . $_SESSION['config']['app_id'] . '/class/class_chrono.php'
$values_str
.
=
$_SESSION
[
'stockCheckbox'
][
$i
]
.
', '
;
$values_str
.
=
$_SESSION
[
'stockCheckbox'
][
$i
]
.
', '
;
$chrono_number
=
$cr7
->
get_chrono_number
(
$_SESSION
[
'stockCheckbox'
][
$i
],
'res_view_letterbox'
);
$chrono_number
=
$cr7
->
get_chrono_number
(
$_SESSION
[
'stockCheckbox'
][
$i
],
'res_view_letterbox'
);
$chrono_number_str
.
=
$chrono_number
.
', '
;
$values_str_chrn
.
=
$chrono_number
.
', '
;
$values_str_chrn
.
=
$chrono_number_str
;
}
}
}
}
}
}
...
@@ -104,8 +102,8 @@ require_once('apps/' . $_SESSION['config']['app_id'] . '/class/class_chrono.php'
...
@@ -104,8 +102,8 @@ require_once('apps/' . $_SESSION['config']['app_id'] . '/class/class_chrono.php'
{
{
$EntitiesIdExclusion
=
array
();
$EntitiesIdExclusion
=
array
();
$entities
=
$entity_ctrl
->
getAllEntities
();
$entities
=
$entity_ctrl
->
getAllEntities
();
$countEntities
=
count
(
$entities
);
$countEntities
=
count
(
$entities
);
for
(
$cptAllEnt
=
0
;
$cptAllEnt
<
$countEntities
;
$cptAllEnt
++
)
{
for
(
$cptAllEnt
=
0
;
$cptAllEnt
<
$countEntities
;
$cptAllEnt
++
)
{
if
(
!
is_integer
(
array_search
(
$entities
[
$cptAllEnt
]
->
__get
(
'entity_id'
),
$servicesCompare
)))
{
if
(
!
is_integer
(
array_search
(
$entities
[
$cptAllEnt
]
->
__get
(
'entity_id'
),
$servicesCompare
)))
{
...
@@ -113,7 +111,7 @@ require_once('apps/' . $_SESSION['config']['app_id'] . '/class/class_chrono.php'
...
@@ -113,7 +111,7 @@ require_once('apps/' . $_SESSION['config']['app_id'] . '/class/class_chrono.php'
}
}
}
}
$allEntitiesTree
=
array
();
$allEntitiesTree
=
array
();
$allEntitiesTree
=
$ent
->
getShortEntityTreeAdvanced
(
$allEntitiesTree
=
$ent
->
getShortEntityTreeAdvanced
(
$allEntitiesTree
,
'all'
,
''
,
$EntitiesIdExclusion
,
'all'
$allEntitiesTree
,
'all'
,
''
,
$EntitiesIdExclusion
,
'all'
);
);
...
@@ -395,10 +393,15 @@ function manage_form($arr_id, $history, $id_action, $label_action, $status, $col
...
@@ -395,10 +393,15 @@ function manage_form($arr_id, $history, $id_action, $label_action, $status, $col
$stmt
=
$db
->
query
(
$stmt
=
$db
->
query
(
"INSERT INTO notes (identifier, tablename, user_id, "
"INSERT INTO notes (identifier, tablename, user_id, "
.
"date_note, note_text, coll_id ) VALUES (?,?,?,CURRENT_TIMESTAMP,?,?)"
,
array
(
$res_id
,
$table
,
$userIdTypist
,
$content_note
,
$coll_id
)
.
"date_note, note_text, coll_id ) VALUES (?,?,?,CURRENT_TIMESTAMP,?,?)"
,
array
(
$res_id
,
$table
,
$userIdTypist
,
$content_note
,
$coll_id
)
);
);
}
}
$stmt
=
$db
->
query
(
"update "
.
$table
.
" set destination = ? where res_id = ?"
,
array
(
$entityId
,
$res_id
));
$stmt
=
$db
->
query
(
"update "
.
$table
.
" set destination = ? where res_id = ?"
,
array
(
$entityId
,
$res_id
));
}
// Si on redirige en masse plusieurs courriers, on récupère automatiquement les roles persistent
if
(
count
(
$arr_id
)
>
1
){
$new_difflist
=
$diffList
->
list_difflist_roles_to_keep
(
$res_id
,
$coll_id
,
$new_difflist
[
'difflist_type'
],
$new_difflist
);
}
}
# If feature activated, put old dest in copy
# If feature activated, put old dest in copy
...
@@ -407,7 +410,7 @@ function manage_form($arr_id, $history, $id_action, $label_action, $status, $col
...
@@ -407,7 +410,7 @@ function manage_form($arr_id, $history, $id_action, $label_action, $status, $col
$stmt
=
$db
->
query
(
$stmt
=
$db
->
query
(
"select * "
"select * "
.
" from "
.
$_SESSION
[
'tablename'
][
'ent_listinstance'
]
.
" from "
.
$_SESSION
[
'tablename'
][
'ent_listinstance'
]
.
" where coll_id = ? and res_id = ? and item_type = 'user_id' and item_mode = 'dest'"
,
array
(
$coll_id
,
$res_id
)
.
" where coll_id = ? and res_id = ? and item_type = 'user_id' and item_mode = 'dest'"
,
array
(
$coll_id
,
$res_id
)
);
);
$old_dest
=
$stmt
->
fetchObject
();
$old_dest
=
$stmt
->
fetchObject
();
...
@@ -447,10 +450,10 @@ function manage_form($arr_id, $history, $id_action, $label_action, $status, $col
...
@@ -447,10 +450,10 @@ function manage_form($arr_id, $history, $id_action, $label_action, $status, $col
array_push
(
array_push
(
$new_difflist
[
'copy'
][
'users'
],
$new_difflist
[
'copy'
][
'users'
],
array
(
array
(
'user_id'
=>
$old_dest
->
item_id
,
'user_id'
=>
$old_dest
->
item_id
,
'viewed'
=>
(
integer
)
$old_dest
->
viewed
,
'viewed'
=>
(
integer
)
$old_dest
->
viewed
,
'visible'
=>
'Y'
,
'visible'
=>
'Y'
,
'difflist_type'
=>
$new_difflist
[
'difflist_type'
]
'difflist_type'
=>
$new_difflist
[
'difflist_type'
]
)
)
);
);
}
}
...
...
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