Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
GLPI
glpi
Commits
477eb33d
Commit
477eb33d
authored
Apr 29, 2019
by
Alexandre Delaunay
Committed by
Johan Cwiklinski
Apr 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
search softwares: fix bad performances
fix performance issue when summing licenses in software search
parent
abcb711f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
2 deletions
+16
-2
inc/search.class.php
inc/search.class.php
+1
-1
inc/software.class.php
inc/software.class.php
+6
-0
install/mysql/glpi-empty.sql
install/mysql/glpi-empty.sql
+1
-1
install/update_94_95.php
install/update_94_95.php
+8
-0
No files found.
inc/search.class.php
View file @
477eb33d
...
...
@@ -358,7 +358,7 @@ class Search {
break
;
case
'sort'
:
$p
[
$key
]
=
intval
(
$val
);
if
(
$p
[
$key
]
<
=
0
)
{
if
(
$p
[
$key
]
<
0
)
{
$p
[
$key
]
=
1
;
}
break
;
...
...
inc/software.class.php
View file @
477eb33d
...
...
@@ -1107,4 +1107,10 @@ class Software extends CommonDBTM {
}
static
function
getDefaultSearchRequest
()
{
return
[
'sort'
=>
0
];
}
}
install/mysql/glpi-empty.sql
View file @
477eb33d
...
...
@@ -8098,7 +8098,7 @@ CREATE TABLE `glpi_softwarelicenses` (
KEY
`softwarelicensetypes_id`
(
`softwarelicensetypes_id`
),
KEY
`softwareversions_id_use`
(
`softwareversions_id_use`
),
KEY
`date_mod`
(
`date_mod`
),
KEY
`softwares_id_expire`
(
`softwares_id`
,
`expire`
),
KEY
`softwares_id_expire
_number
`
(
`softwares_id`
,
`expire`
,
`number`
),
KEY
`locations_id`
(
`locations_id`
),
KEY
`users_id_tech`
(
`users_id_tech`
),
KEY
`users_id`
(
`users_id`
),
...
...
install/update_94_95.php
View file @
477eb33d
...
...
@@ -105,6 +105,14 @@ function update94to95() {
$migration
->
addConfig
([
'timezone'
=>
null
]);
/** /Timezones */
// Fix search Softwares performance
$migration
->
dropKey
(
'glpi_softwarelicenses'
,
'softwares_id_expire_number'
);
$migration
->
addKey
(
'glpi_softwarelicenses'
,
[
'softwares_id'
,
'expire'
,
'number'
],
'softwares_id_expire_number'
);
// ************ Keep it at the end **************
$migration
->
executeMigration
();
...
...
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