3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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 - 7.2.0