Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
feat: compatibiliy with GLPI 9.4
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Aug 31, 2018
1 parent d302dc1 commit 2211039
Show file tree
Hide file tree
Showing 13 changed files with 102 additions and 10 deletions.
10 changes: 9 additions & 1 deletion inc/agent.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,15 @@ public function post_purgeItem() {
}

public function getSearchOptionsNew() {
$tab = parent::getSearchOptionsNew();
return $this->rawSearchOptions();
}

public function rawSearchOptions() {
if (method_exists('CommonDBTM', 'rawSearchOptions')) {
$tab = parent::rawSearchOptions();
} else {
$tab = parent::getSearchOptionsNew();
}

$tab[] = [
'id' => '2',
Expand Down
4 changes: 4 additions & 0 deletions inc/entityconfig.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,10 @@ public function canAddAgent($entityId) {
* @return array
*/
public function getSearchOptionsNew() {
return $this->rawSearchOptions();
}

public function rawSearchOptions() {
$tab = [];

$tab[] = [
Expand Down
10 changes: 9 additions & 1 deletion inc/file.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,15 @@ private function getUploadedFile($uploadMandatory = false) {
* @return array
*/
public function getSearchOptionsNew() {
$tab = parent::getSearchOptionsNew();
return $this->rawSearchOptions();
}

public function rawSearchOptions() {
if (method_exists('CommonDBTM', 'rawSearchOptions')) {
$tab = parent::rawSearchOptions();
} else {
$tab = parent::getSearchOptionsNew();
}

$tab[] = [
'id' => '2',
Expand Down
10 changes: 9 additions & 1 deletion inc/fleet.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,15 @@ public function pre_deleteItem() {
* @return array
*/
public function getSearchOptionsNew() {
$tab = parent::getSearchOptionsNew();
return $this->rawSearchOptions();
}

public function rawSearchOptions() {
if (method_exists('CommonDBTM', 'rawSearchOptions')) {
$tab = parent::rawSearchOptions();
} else {
$tab = parent::getSearchOptionsNew();
}

$tab[] = [
'id' => '2',
Expand Down
10 changes: 9 additions & 1 deletion inc/geolocation.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,15 @@ public static function showForAgent(CommonDBTM $item) {
* @return array
*/
public function getSearchOptionsNew() {
$tab = parent::getSearchOptionsNew();
return $this->rawSearchOptions();
}

public function rawSearchOptions() {
if (method_exists('CommonDBTM', 'rawSearchOptions')) {
$tab = parent::rawSearchOptions();
} else {
$tab = parent::getSearchOptionsNew();
}

$tab[] = [
'id' => '2',
Expand Down
10 changes: 9 additions & 1 deletion inc/invitation.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,15 @@ public function sendInvitation() {
* @return array
*/
public function getSearchOptionsNew() {
$tab = parent::getSearchOptionsNew();
return $this->rawSearchOptions();
}

public function rawSearchOptions() {
if (method_exists('CommonDBTM', 'rawSearchOptions')) {
$tab = parent::rawSearchOptions();
} else {
$tab = parent::getSearchOptionsNew();
}

$tab[] = [
'id' => '2',
Expand Down
4 changes: 4 additions & 0 deletions inc/invitationlog.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ public function getRights($interface = 'central') {
* @return array
*/
public function getSearchOptionsNew() {
return $this->rawSearchOptions();
}

public function rawSearchOptions() {
$tab = [];

$tab[] = [
Expand Down
10 changes: 9 additions & 1 deletion inc/package.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,15 @@ public function post_purgeItem() {
* @return array
*/
public function getSearchOptionsNew() {
$tab = parent::getSearchOptionsNew();
return $this->rawSearchOptions();
}

public function rawSearchOptions() {
if (method_exists('CommonDBTM', 'rawSearchOptions')) {
$tab = parent::rawSearchOptions();
} else {
$tab = parent::getSearchOptionsNew();
}

$tab[] = [
'id' => '2',
Expand Down
10 changes: 9 additions & 1 deletion inc/policy.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,15 @@ static function getTypeName($nb = 0) {
* @return array
*/
public function getSearchOptionsNew() {
$tab = parent::getSearchOptionsNew();
return $this->rawSearchOptions();
}

public function rawSearchOptions() {
if (method_exists('CommonDBTM', 'rawSearchOptions')) {
$tab = parent::rawSearchOptions();
} else {
$tab = parent::getSearchOptionsNew();
}

$tab[0] = [
'id' => 'common',
Expand Down
4 changes: 4 additions & 0 deletions inc/policycategory.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ static function getTypeName($nb = 0) {
* @return array
*/
public function getSearchOptionsNew() {
return $this->rawSearchOptions();
}

public function rawSearchOptions() {
$tab = [];

$tab[] = [
Expand Down
10 changes: 9 additions & 1 deletion inc/task.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,15 @@ public static function cleanupPolicies(PluginFlyvemdmNotifiableInterface $item,
* @return array
*/
public function getSearchOptionsNew() {
$tab = parent::getSearchOptionsNew();
return $this->rawSearchOptions();
}

public function rawSearchOptions() {
if (method_exists('CommonDBTM', 'rawSearchOptions')) {
$tab = parent::rawSearchOptions();
} else {
$tab = parent::getSearchOptionsNew();
}

$tab[] = [
'id' => '3',
Expand Down
10 changes: 9 additions & 1 deletion inc/taskstatus.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,15 @@ public static function showForFleet(CommonDBTM $item, $withTemplate = '') {
}

public function getSearchOptionsNew() {
$tab = parent::getSearchOptionsNew();
return $this->rawSearchOptions();
}

public function rawSearchOptions() {
if (method_exists('CommonDBTM', 'rawSearchOptions')) {
$tab = parent::rawSearchOptions();
} else {
$tab = parent::getSearchOptionsNew();
}

$tab[] = [
'id' => '2',
Expand Down
10 changes: 9 additions & 1 deletion inc/wellknownpath.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,15 @@ public function getFromDBByPath($path) {
* @return array
*/
public function getSearchOptionsNew() {
$tab = parent::getSearchOptionsNew();
return $this->rawSearchOptions();
}

public function rawSearchOptions() {
if (method_exists('CommonDBTM', 'rawSearchOptions')) {
$tab = parent::rawSearchOptions();
} else {
$tab = parent::getSearchOptionsNew();
}

$tab[] = [
'id' => '2',
Expand Down

0 comments on commit 2211039

Please sign in to comment.