mirror of
https://github.com/tips-of-mine/GLPI-Plugin-SOC-Case-Management.git
synced 2025-12-17 02:54:40 +01:00
Fix: Correct PluginSocProfile registration and add activation functions
This commit addresses two issues:
1. Re-applies the fix for the `PluginSocProfile` registration.
The extraneous 'classname' attribute, which caused a warning
(Warning: Unknown attributes "classname" used in "PluginSocProfile" class
registration in /var/www/glpi/src/Plugin.php on line 1667),
has been removed. The registration is now correctly:
`Plugin::registerClass('PluginSocProfile');`
2. Ensures plugin activation/deactivation functions are present.
Adds the `plugin_enable_soc` and `plugin_disable_soc` functions
to `setup.php`. These are required by GLPI to manage the plugin's
lifecycle and display the enable/disable buttons in the plugin
management interface.
These changes ensure the plugin registers correctly without warnings and
can be properly activated and deactivated within GLPI.
This commit is contained in:
@@ -76,7 +76,7 @@ function plugin_init_soc() {
|
||||
|
||||
// Register plugin classes
|
||||
Plugin::registerClass('PluginSocCase');
|
||||
Plugin::registerClass('PluginSocProfile', ['classname' => 'PluginSocProfile']);
|
||||
Plugin::registerClass('PluginSocProfile');
|
||||
|
||||
// Add menu items
|
||||
if (Session::haveRight('plugin_soc_case', READ)) {
|
||||
|
||||
Reference in New Issue
Block a user