Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmr committed Jan 27, 2024
1 parent a12d22a commit 872386a
Show file tree
Hide file tree
Showing 9 changed files with 1,925 additions and 1,791 deletions.
39 changes: 22 additions & 17 deletions front/showinfos.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,35 +30,40 @@
include('../../../inc/includes.php');

if (!isset($_GET["file"])) {
$_GET["file"] = "";
$image = $_GET['img'];
$_GET["file"] = "";
$image = $_GET['img'];
} else {
$image = $_GET['file'];
$image = $_GET['file'];
}

$items_id = $_GET['items_id'];
$name = $_GET['name'];
$name = $_GET['name'];
$itemtype = $_GET['itemtype'];
$idpos = $_GET['id'];
$idpos = $_GET['id'];

$pos = new PluginPositionsPosition();

if ($itemtype == 'Location') {
PluginPositionsPosition::showGeolocLocation($items_id);
PluginPositionsPosition::showGeolocLocation($items_id);
} else {

$detail = new PluginPositionsInfo();
$restrict = "`is_active` = 1 ";
$pos->getFromDB($idpos);
$dbu = new DbUtils();
$detail = new PluginPositionsInfo();
$restrict = "`is_active` = 1 ";
$pos->getFromDB($idpos);
$dbu = new DbUtils();

$restrict = ["is_active" => 1,
"is_deleted" => 0] + $dbu->getEntitiesRestrictCriteria("glpi_plugin_positions_infos",
'', '', $pos->maybeRecursive());
$infos = $dbu->getAllDataFromTable('glpi_plugin_positions_infos', $restrict);
$restrict = ["is_active" => 1,
"is_deleted" => 0] + $dbu->getEntitiesRestrictCriteria("glpi_plugin_positions_infos",
'', '', $pos->maybeRecursive());
$infos = $dbu->getAllDataFromTable('glpi_plugin_positions_infos', $restrict);

$item = new $itemtype();
$item->getFromDB($items_id);
if ($itemtype == "Socket") {
$item = new \Glpi\Socket();
} else {
$item = new $itemtype();
}

PluginPositionsPosition::showOverlay($image, $item, $infos);
$item->getFromDB($items_id);

PluginPositionsPosition::showOverlay($image, $item, $infos);
}
2 changes: 2 additions & 0 deletions hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ function plugin_positions_install() {
$DB->runFile(PLUGIN_POSITIONS_DIR."/sql/update-4.5.1.sql");
}

$DB->runFile(PLUGIN_POSITIONS_DIR."/sql/update-6.0.3.sql");

if ($DB->tableExists("glpi_plugin_positions_profiles")) {

$notepad_tables = ['glpi_plugin_positions_positions'];
Expand Down
2 changes: 1 addition & 1 deletion inc/imageitem.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static function showAllItems($myname, $types, $value_type = 0, $value = 0, $enti
if ($myname == 'type') {
$newtypes = array_flip($types);
unset($newtypes['Location']);
unset($newtypes['Netpoint']);
unset($newtypes['Socket']);
if (Plugin::isPluginActive("resources")) {
unset($newtypes['PluginResourcesResource']);
}
Expand Down
12 changes: 6 additions & 6 deletions inc/menu.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,19 @@ static function getMenuContent() {

$menu = [];
$menu['title'] = self::getMenuName();
$menu['page'] = PLUGIN_POSITIONS_NOTFULL_WEBDIR."/front/map.form.php";
$menu['page'] = PLUGIN_POSITIONS_NOTFULL_DIR."/front/map.form.php";
$menu['links']['search'] = PluginPositionsPosition::getSearchURL(false);

$menu['options']['positions']['links']['search'] = PluginPositionsPosition::getSearchURL(false);
$menu['options']['positions']['links']['config'] = PLUGIN_POSITIONS_NOTFULL_WEBDIR.'/front/config.form.php';
$menu['options']['config']['links']['config'] = PLUGIN_POSITIONS_NOTFULL_WEBDIR.'/config.form.php';
$menu['options']['info']['links']['search'] = PLUGIN_POSITIONS_NOTFULL_WEBDIR.'/front/info.php';
$menu['options']['info']['links']['config'] = PLUGIN_POSITIONS_NOTFULL_WEBDIR.'/front/config.form.php';
$menu['options']['positions']['links']['config'] = PLUGIN_POSITIONS_NOTFULL_DIR.'/front/config.form.php';
$menu['options']['config']['links']['config'] = PLUGIN_POSITIONS_NOTFULL_DIR.'/front/config.form.php';
$menu['options']['info']['links']['search'] = PLUGIN_POSITIONS_NOTFULL_DIR.'/front/info.php';
$menu['options']['info']['links']['config'] = PLUGIN_POSITIONS_NOTFULL_DIR.'/front/config.form.php';

if (PluginPositionsPosition::canCreate()) {
$menu['links']['add'] = PluginPositionsPosition::getFormURL(false);
$menu['options']['positions']['links']['add'] = PluginPositionsPosition::getFormURL(false);
$menu['options']['info']['links']['add'] = PLUGIN_POSITIONS_NOTFULL_WEBDIR.'/front/info.form.php';
$menu['options']['info']['links']['add'] = PLUGIN_POSITIONS_NOTFULL_DIR.'/front/info.form.php';
}

$menu['icon'] = self::getIcon();
Expand Down
Loading

0 comments on commit 872386a

Please sign in to comment.