<?php
function plugin_init_portswitch()
{
// + $CFG_GLPI
global $PLUGIN_HOOKS, $CFG_GLPI;
// + CSRF Compliance
$PLUGIN_HOOKS['csrf_compliant']['portswitch'] = true;
// +
Plugin::registerClass('PluginPortswitchPortswitch', array( 'addtabon' => 'Plugin'));
// + Benutzersitzung gültig? Dann auf Formular umleiten
if (Session::getLoginUserID()) {
$PLUGIN_HOOKS['menu_entry']['portswitch'] = 'front/portswitch.php';
}
return true;
}
// + Versionshinweise (vorher in plugin_portswitch_classes.php
// minGlpiVersion 0.71 -> 0.84
// version 1.0 -> 1.1
function plugin_version_portswitch()
{
return array( 'name' => "portswitch",
'minGlpiVersion' => '0.84',
'version' => '1.1',
'author' => 'Lukas Reitz',
'homepage' => ' ');
}
function plugin_portswitch_check_prerequisites()
{
// -
/*if(GLPI_VERSION >= 0.83)
return true;
echo "Plugin benoetigt mindestens Version 0.83";
return false;*/
// +
if (version_compare(GLPI_Version, '0.84', 'lt')) {
_e('Dieses Plugin benötigt GLPI >= 0.84');
return false;
}
}
function plugin_portswitch_check_config()
{
return true;
}
?>
- Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
preferences:
327.54 ms | 405 KiB | 456 Q