Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
GLPI
glpi
Commits
8db3b86c
Commit
8db3b86c
authored
Jan 20, 2021
by
Johan Cwiklinski
Browse files
Use maybe* methods
Co-authored-by:
Cédric Anne
<
cedric.anne@gmail.com
>
parent
46244585
Changes
2
Hide whitespace changes
Inline
Side-by-side
inc/stat.class.php
View file @
8db3b86c
...
...
@@ -749,7 +749,7 @@ class Stat extends CommonGLPI {
$criteria
=
[];
$WHERE
=
[];
if
(
$
DB
->
fieldExists
(
$table
,
'is_d
eleted
'
))
{
if
(
$
item
->
maybeD
eleted
(
))
{
$WHERE
[
"
$table
.is_deleted"
]
=
0
;
}
$WHERE
+=
getEntitiesRestrictCriteria
(
$table
);
...
...
@@ -1938,4 +1938,3 @@ class Stat extends CommonGLPI {
return
"fas fa-chart-bar"
;
}
}
inc/state.class.php
View file @
8db3b86c
...
...
@@ -120,10 +120,10 @@ class State extends CommonTreeDropdown {
}
else
{
$table
=
getTableForItemType
(
$itemtype
);
$WHERE
=
[];
if
(
$
DB
->
fieldExists
(
$table
,
'is_d
eleted
'
))
{
if
(
$
item
->
maybeD
eleted
(
))
{
$WHERE
[
"
$table
.is_deleted"
]
=
0
;
}
if
(
$
DB
->
fieldExists
(
$table
,
'is_t
emplate
'
))
{
if
(
$
item
->
maybeT
emplate
(
))
{
$WHERE
[
"
$table
.is_template"
]
=
0
;
}
$WHERE
+=
getEntitiesRestrictCriteria
(
$table
);
...
...
Write
Preview
Supports
Markdown
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