Skip to content

Commit

Permalink
Min fixes
Browse files Browse the repository at this point in the history
Bump version
  • Loading branch information
tsmr committed Nov 24, 2024
1 parent 104ef12 commit d614fa1
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 26 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ Ce plugin vous permet d'afficher vos applications métiers de votre réseau sous
![alt text](https://github.com/InfotelGLPI/webapplications/blob/master/screenshots/kbitems.png?raw=true)

Si besoin de définir l'environnement en GLPI 10 :
https://github.com/glpi-project/glpi/pull/18288

Ce plugin est sur Transifex - Aidez-nous à le traduire :
https://www.transifex.com/infotelGLPI/GLPI_webapplications/

Expand Down
5 changes: 0 additions & 5 deletions TODO.txt
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@
lier des processus à des entités ?


Si besoin de définir l'environnementen GLPI 10 :
https://github.com/glpi-project/glpi/pull/18288
6 changes: 3 additions & 3 deletions inc/certificate.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static function getTypeName($nb = 0)
public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
{
if ($_SESSION['glpishow_count_on_tabs']) {
$ApplianceId = $_SESSION['plugin_webapplications_loaded_appliances_id'];
$ApplianceId = $_SESSION['plugin_webapplications_loaded_appliances_id'] ?? 0;;
$self = new Certificate();
$nb = count(PluginWebapplicationsDashboard::getObjects($self, $ApplianceId));
return self::createTabEntry(self::getTypeName($nb), $nb);
Expand Down Expand Up @@ -122,11 +122,11 @@ public static function showListObjects($list)
]
);
}

echo "</span>";
echo "</div>";
echo "</div>";
echo "</div>";
echo "</span>";

}
echo "</div>";
}
Expand Down
2 changes: 1 addition & 1 deletion inc/dashboard.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ classname = 'accordion';
};"
);

$ApplianceId = $_SESSION['plugin_webapplications_loaded_appliances_id'];
$ApplianceId = $_SESSION['plugin_webapplications_loaded_appliances_id'] ?? 0;;

$appliance = new Appliance();
$appliance->getFromDB($ApplianceId);
Expand Down
6 changes: 3 additions & 3 deletions inc/databaseinstance.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static function getTypeName($nb = 0)
public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
{
if ($_SESSION['glpishow_count_on_tabs']) {
$ApplianceId = $_SESSION['plugin_webapplications_loaded_appliances_id'];
$ApplianceId = $_SESSION['plugin_webapplications_loaded_appliances_id'] ?? 0;;
$self = new DatabaseInstance();
$nb = count(PluginWebapplicationsDashboard::getObjects($self, $ApplianceId));
return self::createTabEntry(self::getTypeName($nb), $nb);
Expand Down Expand Up @@ -423,11 +423,11 @@ public static function showListObjects($list)
]
);
}

echo "</span>";
echo "</div>";
echo "</div>";
echo "</div>";
echo "</span>";

}
echo "</div>";
}
Expand Down
5 changes: 3 additions & 2 deletions inc/entity.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public static function getIcon()
public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
{
if ($_SESSION['glpishow_count_on_tabs']) {
$ApplianceId = $_SESSION['plugin_webapplications_loaded_appliances_id'];
$ApplianceId = $_SESSION['plugin_webapplications_loaded_appliances_id'] ?? 0;;
$self = new self();
$nb = count(PluginWebapplicationsDashboard::getObjects($self, $ApplianceId));
return self::createTabEntry(self::getTypeName($nb), $nb);
Expand Down Expand Up @@ -251,10 +251,11 @@ public static function showListObjects($list)
]
);
}
echo "</span>";
echo "</div>";
echo "</div>";
echo "</div>";
echo "</span>";

}
echo "</div>";
}
Expand Down
4 changes: 2 additions & 2 deletions inc/knowbase.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static function getIcon()
public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
{
if ($_SESSION['glpishow_count_on_tabs']) {
$ApplianceId = $_SESSION['plugin_webapplications_loaded_appliances_id'];
$ApplianceId = $_SESSION['plugin_webapplications_loaded_appliances_id'] ?? 0;;
$kbAppDBTM = new KnowbaseItem_Item();
$kbApp = $kbAppDBTM->find(['items_id' => $ApplianceId,
'itemtype' => 'Appliance']);
Expand All @@ -72,7 +72,7 @@ public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $
public static function showLists()
{

$ApplianceId = $_SESSION['plugin_webapplications_loaded_appliances_id'];
$ApplianceId = $_SESSION['plugin_webapplications_loaded_appliances_id'] ?? 0;;
$item = new Appliance();
$item->getFromDB($ApplianceId);

Expand Down
4 changes: 2 additions & 2 deletions inc/logicalinfrastructure.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
{
global $DB;

$ApplianceId = $_SESSION['plugin_webapplications_loaded_appliances_id'];
$ApplianceId = $_SESSION['plugin_webapplications_loaded_appliances_id'] ?? 0;;

$item = new Appliance();
$item->getFromDB($ApplianceId);
Expand Down Expand Up @@ -145,7 +145,7 @@ public function showForm($ID, $options = [])

public static function showLists()
{
$ApplianceId = $_SESSION['plugin_webapplications_loaded_appliances_id'];
$ApplianceId = $_SESSION['plugin_webapplications_loaded_appliances_id'] ?? 0;;

$item = new Appliance();
$item->getFromDB($ApplianceId);
Expand Down
4 changes: 2 additions & 2 deletions inc/physicalinfrastructure.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $
public static function getItems()
{
global $CFG_GLPI;
$ApplianceId = $_SESSION['plugin_webapplications_loaded_appliances_id'];
$ApplianceId = $_SESSION['plugin_webapplications_loaded_appliances_id'] ?? 0;;

$itemsAppDBTM = new Appliance_Item();

Expand Down Expand Up @@ -98,7 +98,7 @@ public static function showListObjects($list)
{
global $DB;

$ApplianceId = $_SESSION['plugin_webapplications_loaded_appliances_id'];
$ApplianceId = $_SESSION['plugin_webapplications_loaded_appliances_id'] ?? 0;;
$list_by_itemtypes = [];
foreach ($list as $item) {
$list_by_itemtypes[$item['itemtype']][] = $item['id'];
Expand Down
7 changes: 4 additions & 3 deletions inc/process.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public static function getIcon()
public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
{
if ($_SESSION['glpishow_count_on_tabs']) {
$ApplianceId = $_SESSION['plugin_webapplications_loaded_appliances_id'];
$ApplianceId = $_SESSION['plugin_webapplications_loaded_appliances_id'] ?? 0;;
$self = new self();
$nb = count(PluginWebapplicationsDashboard::getObjects($self, $ApplianceId));
return self::createTabEntry(self::getTypeName($nb), $nb);
Expand Down Expand Up @@ -102,7 +102,7 @@ public function showForm($ID, $options = [])

public function post_getEmpty()
{
$ApplianceId = $_SESSION['plugin_webapplications_loaded_appliances_id'];
$ApplianceId = $_SESSION['plugin_webapplications_loaded_appliances_id'] ?? 0;;
if ($ApplianceId > 0) {
$webs = getAllDataFromTable(
PluginWebapplicationsAppliance::getTable(),
Expand Down Expand Up @@ -303,10 +303,11 @@ public static function showListObjects($list)
]
);
}
echo "</span>";
echo "</div>";
echo "</div>";
echo "</div>";
echo "</span>";

}
echo "</div>";
}
Expand Down
5 changes: 3 additions & 2 deletions inc/stream.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public static function getIcon()
public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
{
if ($_SESSION['glpishow_count_on_tabs']) {
$ApplianceId = $_SESSION['plugin_webapplications_loaded_appliances_id'];
$ApplianceId = $_SESSION['plugin_webapplications_loaded_appliances_id'] ?? 0;;
$self = new self();
$nb = count(PluginWebapplicationsDashboard::getObjects($self, $ApplianceId));
return self::createTabEntry(self::getTypeName($nb), $nb);
Expand Down Expand Up @@ -416,10 +416,11 @@ public static function showListObjects($list)
]
);
}
echo "</span>";
echo "</div>";
echo "</div>";
echo "</div>";
echo "</span>";

}
echo "</div>";
}
Expand Down
2 changes: 1 addition & 1 deletion setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
--------------------------------------------------------------------------
*/

define('PLUGIN_WEBAPPLICATIONS_VERSION', '5.0.1');
define('PLUGIN_WEBAPPLICATIONS_VERSION', '5.0.2');

if (!defined("PLUGIN_WEBAPPLICATIONS_DIR")) {
define("PLUGIN_WEBAPPLICATIONS_DIR", Plugin::getPhpDir("webapplications"));
Expand Down
5 changes: 5 additions & 0 deletions webapplications.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
<author>Infotel</author>
</authors>
<versions>
<version>
<num>5.0.2</num>
<compatibility>~10.0.11</compatibility>
<download_url>https://github.com/InfotelGLPI/webapplications/releases/download/5.0.2/glpi-webapplications-5.0.2.tar.bz2</download_url>
</version>
<version>
<num>5.0.1</num>
<compatibility>~10.0.11</compatibility>
Expand Down

0 comments on commit d614fa1

Please sign in to comment.