Skip to content

Commit

Permalink
Drop duplicate canedit declaration; drop useless call; fixes #3062
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed Oct 31, 2017
1 parent 786d8d4 commit e41db76
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions inc/item_operatingsystem.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,7 @@ function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) {

static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) {

switch ($item->getType()) {
case 'OperatingSystem' :
self::showForOperatingSystem($item);
return true;
default :
self::showForItem($item, $withtemplate);
}
self::showForItem($item, $withtemplate);
}

/**
Expand All @@ -124,8 +118,6 @@ static function showForItem(CommonDBTM $item, $withtemplate = 0) {
//default options
$params = ['rand' => mt_rand()];

$canedit = $item->canAddItem('OperatingSystem') && OperatingSystem::canView();

$columns = [
__('Name'),
__('Version'),
Expand Down

0 comments on commit e41db76

Please sign in to comment.