Skip to content

Commit

Permalink
fix rawSerachoption datatype
Browse files Browse the repository at this point in the history
  • Loading branch information
amma35 committed Sep 3, 2018
1 parent 5b88f12 commit ce7d575
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion inc/hardware.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ static function updateLockforComputer(CommonDBTM $item) {
$cfg_ocs = PluginOcsinventoryngOcsServer::getConfig($ocslink->fields["plugin_ocsinventoryng_ocsservers_id"]);
if ($cfg_ocs["use_locks"]) {
foreach ($item->updates as $k => $field) {
if (!array_key_exists($field, PluginOcsinventoryngOcslink::getLockableFields($ocslink->fields["plugin_ocsinventoryng_ocsservers_id"], $ocslink->fields["ocsid"]))) {
if (!array_key_exists($field,
PluginOcsinventoryngOcslink::getLockableFields($ocslink->fields["plugin_ocsinventoryng_ocsservers_id"],
$ocslink->fields["ocsid"]))) {
unset($item->updates[$k]);
}
}
Expand Down
3 changes: 2 additions & 1 deletion inc/notimportedcomputer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,8 @@ function rawSearchOptions() {
'table' => 'glpi_plugin_ocsinventoryng_ocsservers',
'field' => 'name',
'name' => __('Server'),
'linkfield' => 'plugin_ocsinventoryng_ocsservers_id'
'linkfield' => 'plugin_ocsinventoryng_ocsservers_id',
'datatype' => 'dropdown'
];

$tab[] = [
Expand Down
6 changes: 4 additions & 2 deletions inc/ocslink.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1139,9 +1139,11 @@ static function getLocksForComputer($ID, $withrule = 1) {
if ($cfg_ocs["use_locks"]) {
// Print lock fields for OCSNG
if ($withrule) {
$lockable_fields = self::getLockableFields($data["plugin_ocsinventoryng_ocsservers_id"], $data["ocsid"]);
$lockable_fields = self::getLockableFields($data["plugin_ocsinventoryng_ocsservers_id"],
$data["ocsid"]);
} else {
$lockable_fields = self::getLockableFields($data["plugin_ocsinventoryng_ocsservers_id"], 0);
$lockable_fields = self::getLockableFields($data["plugin_ocsinventoryng_ocsservers_id"],
0);
}
$dbu = new DbUtils();
$locked = $dbu->importArrayFromDB($data["computer_update"]);
Expand Down

0 comments on commit ce7d575

Please sign in to comment.