From 0b921ccf928a72bd1c2b59e0154a5ae0d1bf8d94 Mon Sep 17 00:00:00 2001 From: Kaya84 <35736369+Kaya84@users.noreply.github.com> Date: Fri, 19 Nov 2021 09:25:06 +0100 Subject: [PATCH] Update setup.php --- setup.php | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/setup.php b/setup.php index 8b13789..540bcaa 100644 --- a/setup.php +++ b/setup.php @@ -1 +1,64 @@ +. + -------------------------------------------------------------------------- +*/ + +define('PLUGIN_REMOTESUPPORT_VERSION', '0.0.1'); +define('PLUGIN_REMOTESUPPORT_MIN_GLPI', '9.5.0'); +define('PLUGIN_REMOTESUPPORT_MAX_GLPI', '9.6.0'); + +function plugin_init_remotesupport() +{ + global $PLUGIN_HOOKS; + $PLUGIN_HOOKS['csrf_compliant']['remotesupport'] = true; + + if (Plugin::isPluginActive('remotesupport')) { + + $PLUGIN_HOOKS['add_javascript']['remotesupport'][] = 'js/support.js'; + // Add Config Page + Plugin::registerClass('PluginRemotesupportConfig', ['addtabon' => 'Config']); + + $PLUGIN_HOOKS["menu_toadd"]['remotesupport'] = ['tools' => 'PluginRemotesupportMenu']; + $PLUGIN_HOOKS['config_page']['remotesupport'] = 'front/index.php'; + $PLUGIN_HOOKS['menu']['remotesupport'] = true; + $PLUGIN_HOOKS['post_init']['remotesupport'] = 'plugin_remotesupport_postinit'; + + + } +} + +function plugin_version_remotesupport() +{ + return [ + 'name' => __('Remote Support Input', 'remotesupport'), + 'version' => PLUGIN_REMOTESUPPORT_VERSION, + 'author' => 'Alessandro Carloni', + 'license' => 'GPLv2', + 'homepage' =>'https://github.com/Kaya84/', + 'requirements' => [ + 'glpi' => [ + 'min' => PLUGIN_REMOTESUPPORT_MIN_GLPI, + 'max' => PLUGIN_REMOTESUPPORT_MAX_GLPI + ] + ] + ]; +}