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
de91eacc
Commit
de91eacc
authored
8 years ago
by
Giovannoni Laurent
Browse files
Options
Downloads
Plain Diff
Merge branch 'develop' of
https://labs.maarch.org/maarch/MaarchCourrier
into develop
parents
614a8e3a
b44bfd5b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/tags/class/TagControler_Abstract.php
+5
-7
5 additions, 7 deletions
modules/tags/class/TagControler_Abstract.php
with
5 additions
and
7 deletions
modules/tags/class/TagControler_Abstract.php
+
5
−
7
View file @
de91eacc
...
...
@@ -82,12 +82,12 @@ abstract class tag_controler_Abstract extends ObjectControler
if
(
$core
->
test_service
(
'private_tag'
,
'tags'
,
false
)
==
1
){
$entitiesRestriction
=
array
();
$userEntities
=
users_controler
::
getEntities
(
$_SESSION
[
'user'
][
'UserId'
]);
//var_dump($entitiesDirection);
foreach
(
$userEntities
as
$entity
)
{
$entity_id
=
$entity
[
'ENTITY_ID'
];
$entitiesRestriction
[]
=
$entity_id
;
}
//var_dump($entitiesRestriction);
//CHECK TAG IS ALLOW FOR THESE ENTITIES
if
(
!
empty
(
$entitiesRestriction
)){
$entitiesRestriction
=
"'"
.
implode
(
"','"
,
$entitiesRestriction
)
.
"'"
;
...
...
@@ -103,7 +103,6 @@ abstract class tag_controler_Abstract extends ObjectControler
$restrictedTagIdList
=
$stmt
->
fetchAll
(
PDO
::
FETCH_COLUMN
,
0
);
//var_dump($restrictedTagIdList);
//CHECK TAG WHO IS NOT RESTRICTED
$stmt
=
$db
->
query
(
'SELECT tag_id'
...
...
@@ -112,7 +111,6 @@ abstract class tag_controler_Abstract extends ObjectControler
,
array
());
$freeTagIdList
=
$stmt
->
fetchAll
(
PDO
::
FETCH_COLUMN
,
0
);
//var_dump($freeTagIdList);
//MERGE ALLOWED TAGS AND FREE TAGS
$tagIdList
=
array_merge
(
$restrictedTagIdList
,
$freeTagIdList
);
...
...
@@ -120,17 +118,17 @@ abstract class tag_controler_Abstract extends ObjectControler
$tagIdList
=
"'"
.
implode
(
"','"
,
$tagIdList
)
.
"'"
;
$where
=
' WHERE tag_id IN ('
.
$tagIdList
.
')'
;
}
else
{
$where
=
''
;
// NO TAG ALLOWED
$where
=
' WHERE tag_id = 0'
;
}
$stmt
=
$db
->
query
(
'SELECT tag_id, tag_label FROM '
.
_TAG_TABLE_NAME
.
$where
.
' ORDER BY tag_label ASC '
,
$where_what
);
}
else
{
}
else
{
$stmt
=
$db
->
query
(
'SELECT tag_id, tag_label FROM '
.
_TAG_TABLE_NAME
...
...
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