Skip to content

Commit

Permalink
Migrate Socket to Twig
Browse files Browse the repository at this point in the history
  • Loading branch information
cconard96 authored and trasher committed Jan 24, 2024
1 parent 49d85fe commit 73cf6d3
Show file tree
Hide file tree
Showing 7 changed files with 501 additions and 529 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ The present file will list all changes made to the project; according to the
- `Glpi\Api\API::returnSanitizedContent()`
- `Glpi\Dashboard\Widget::getCssGradientPalette()`
- `Glpi\Inventory\Conf::importFile()`
- `Glpi\Socket::executeAddMulti()`
- `Glpi\Socket::showNetworkPortForm()`
- `Glpi\System\Requirement\DataDirectoriesProtectedPath` class.
- `Glpi\System\Requirement\ProtectedWebAccess` class.
- `Glpi\System\Requirement\SafeDocumentRoot` class.
Expand Down
1 change: 0 additions & 1 deletion front/socket.form.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@
}

// Add a socket from item : format data
// see Socket::showNetworkPortForm()
if (
isset($_REQUEST['_add_fromitem'])
&& isset($_REQUEST['_from_itemtype'])
Expand Down
4 changes: 3 additions & 1 deletion src/Dropdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
use Glpi\Application\View\TemplateRenderer;
use Glpi\DBAL\QueryExpression;
use Glpi\DBAL\QueryFunction;
use Glpi\Features\DCBreadcrumb;
use Glpi\Plugin\Hooks;
use Glpi\SocketModel;

Expand Down Expand Up @@ -367,7 +368,8 @@ public static function show($itemtype, $options = [])
}

if ($params['display_dc_position']) {
if ($rack = $item->isRackPart($itemtype, $params['value'], true)) {
/** @var DCBreadcrumb $item */
if ($rack = $item->getParentRack()) {
$dc_icon = "<span id='" . $breadcrumb_id . "' title='" . __s('Display on datacenter') . "'>";
$dc_icon .= "&nbsp;<a class='fas fa-crosshairs' href='" . $rack->getLinkURL() . "'></a>";
$dc_icon .= "</span>";
Expand Down
Loading

0 comments on commit 73cf6d3

Please sign in to comment.