Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
glpi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
GLPI
glpi
Commits
3a77fb51
Commit
3a77fb51
authored
May 06, 2019
by
Johan Cwiklinski
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '9.4/bugfixes' into 9.5/bugfixes
parents
e6a3f26d
6d88b163
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
9 deletions
+14
-9
inc/commontreedropdown.class.php
inc/commontreedropdown.class.php
+1
-0
inc/ipaddress.class.php
inc/ipaddress.class.php
+7
-5
tests/units/DBmysqlIterator.php
tests/units/DBmysqlIterator.php
+6
-4
No files found.
inc/commontreedropdown.class.php
View file @
3a77fb51
...
...
@@ -535,6 +535,7 @@ abstract class CommonTreeDropdown extends CommonDropdown {
$nb
++
;
echo
"<tr class='tab_bg_1'><td>"
;
if
(((
$fk
==
'entities_id'
)
&&
in_array
(
$data
[
'id'
],
$_SESSION
[
'glpiactiveentities'
]))
||
!
$entity_assign
||
((
$fk
!=
'entities_id'
)
&&
in_array
(
$data
[
'entities_id'
],
$_SESSION
[
'glpiactiveentities'
])))
{
echo
"<a href='"
.
$this
->
getFormURL
();
echo
'?id='
.
$data
[
'id'
]
.
"'>"
.
$data
[
'name'
]
.
"</a>"
;
...
...
inc/ipaddress.class.php
View file @
3a77fb51
...
...
@@ -1162,8 +1162,10 @@ class IPAddress extends CommonDBChild {
'ON'
=>
[
'NAME'
=>
'items_id'
,
'PORT'
=>
'id'
,
[
'NOT'
=>
[
'PORT.itemtype'
=>
$CFG_GLPI
[
'networkport_types'
]
'AND'
=>
[
'NOT'
=>
[
'PORT.itemtype'
=>
$CFG_GLPI
[
'networkport_types'
]
]
]
]
]
...
...
@@ -1193,13 +1195,13 @@ class IPAddress extends CommonDBChild {
$queries
[]
=
$criteria
;
$criteria
=
$main_criteria
;
$criteria
[
'SELECT'
]
=
$criteria
[
'SELECT'
]
+
[
$criteria
[
'SELECT'
]
=
array_merge
(
$criteria
[
'SELECT'
],
[
new
\
QueryExpression
(
"NULL AS name_id"
),
new
\
QueryExpression
(
"NULL AS port_id"
),
new
\
QueryExpression
(
'NULL AS item_id'
),
new
\
QueryExpression
(
"NULL AS item_type"
)
];
$criteria
[
'INNER JOIN'
][
'glpi_ipaddresses AS ADDR'
][
'ON'
][
0
][
'AND'
][
'ADDR.itemtype'
]
=
[
'!'
,
'NetworkName'
];
]
)
;
$criteria
[
'INNER JOIN'
][
'glpi_ipaddresses AS ADDR'
][
'ON'
][
0
][
'AND'
][
'ADDR.itemtype'
]
=
[
'!
=
'
,
'NetworkName'
];
$queries
[]
=
$criteria
;
$union
=
new
\
QueryUnion
(
$queries
);
...
...
tests/units/DBmysqlIterator.php
View file @
3a77fb51
...
...
@@ -946,8 +946,8 @@ class DBmysqlIterator extends DbTestCase {
AND `NAME`.`itemtype` = 'NetworkPort')
INNER JOIN `glpi_networkports` AS `PORT`
ON (`NAME`.`items_id` = `PORT`.`id`
NOT
`PORT`.`itemtype`
IN ('"
.
implode
(
"', '"
,
$CFG_GLPI
[
"networkport_types"
])
.
"'
))
AND NOT (
`PORT`.`itemtype`
IN ('"
.
implode
(
"', '"
,
$CFG_GLPI
[
"networkport_types"
])
.
"')
))
LEFT JOIN `glpi_entities` ON (`ADDR`.`entities_id` = `glpi_entities`.`id`)
WHERE `LINK`.`ipnetworks_id` = '42')"
;
...
...
@@ -1099,8 +1099,10 @@ class DBmysqlIterator extends DbTestCase {
'ON'
=>
[
'NAME'
=>
'items_id'
,
'PORT'
=>
'id'
,
[
'NOT'
=>
[
'PORT.itemtype'
=>
$CFG_GLPI
[
'networkport_types'
]
'AND'
=>
[
'NOT'
=>
[
'PORT.itemtype'
=>
$CFG_GLPI
[
'networkport_types'
]
]
]
]
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment