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
6514254b
Commit
6514254b
authored
Apr 29, 2019
by
Johan Cwiklinski
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '9.5/bugfixes'
parents
a130a83b
ff8d56d5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
8 deletions
+22
-8
inc/location.class.php
inc/location.class.php
+2
-2
inc/search.class.php
inc/search.class.php
+1
-1
inc/software.class.php
inc/software.class.php
+9
-3
inc/transfer.class.php
inc/transfer.class.php
+1
-1
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/location.class.php
View file @
6514254b
...
...
@@ -351,7 +351,7 @@ class Location extends CommonTreeDropdown {
$criteria
=
[
'SELECT'
=>
[
"
$table
.id"
,
"
$crit
AS type"
new
\
QueryExpression
(
$DB
->
quoteValue
(
$crit
)
.
' AS '
.
$DB
->
quoteName
(
'type'
)),
],
'FROM'
=>
$table
,
'WHERE'
=>
[
...
...
@@ -366,7 +366,7 @@ class Location extends CommonTreeDropdown {
$union
->
addQuery
([
'SELECT'
=>
[
'id'
,
new
\
QueryExpression
(
"'
$type
' AS type"
)
new
\
QueryExpression
(
$DB
->
quoteValue
(
$type
)
.
' AS '
.
$DB
->
quoteName
(
'type'
)),
],
'FROM'
=>
$table
,
'WHERE'
=>
[
...
...
inc/search.class.php
View file @
6514254b
...
...
@@ -481,7 +481,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 @
6514254b
...
...
@@ -562,8 +562,6 @@ class Software extends CommonDBTM {
'datatype'
=>
'bool'
];
$tab
=
array_merge
(
$tab
,
SoftwareLicense
::
rawSearchOptionsToAdd
());
$tab
[]
=
[
'id'
=>
'80'
,
'table'
=>
'glpi_entities'
,
...
...
@@ -609,6 +607,8 @@ class Software extends CommonDBTM {
'massiveaction'
=>
false
];
$tab
=
array_merge
(
$tab
,
SoftwareLicense
::
rawSearchOptionsToAdd
());
$name
=
_n
(
'Version'
,
'Versions'
,
Session
::
getPluralNumber
());
$tab
[]
=
[
'id'
=>
'versions'
,
...
...
@@ -1057,7 +1057,7 @@ class Software extends CommonDBTM {
);
$DB
->
update
(
'glpi_
computers_softwareversion
s'
,
[
'glpi_
softwarelicense
s'
,
[
'softwareversions_id_use'
=>
$dest
[
'id'
]
],
[
'softwareversions_id_use'
=>
$from
[
'id'
]
...
...
@@ -1129,4 +1129,10 @@ class Software extends CommonDBTM {
}
static
function
getDefaultSearchRequest
()
{
return
[
'sort'
=>
0
];
}
}
inc/transfer.class.php
View file @
6514254b
...
...
@@ -906,7 +906,7 @@ class Transfer extends CommonDBTM {
'glpi_contacts'
=>
[
'ON'
=>
[
'glpi_contacts_suppliers'
=>
'contacts_id'
,
'glpi_
suppliers'
=>
'id'
'glpi_
contacts'
=>
'id'
]
]
],
...
...
install/mysql/glpi-empty.sql
View file @
6514254b
...
...
@@ -8133,7 +8133,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 @
6514254b
...
...
@@ -107,6 +107,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