connessione con hardware in assets
This commit is contained in:
@@ -2,8 +2,12 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
// Force OPcache to reload plugin files when accessed via web
|
||||
if (PHP_SAPI !== 'cli' && function_exists('opcache_invalidate')) {
|
||||
// Force OPcache to reload plugin files when accessed via web.
|
||||
// Only active on development environments: invalidating every plugin file
|
||||
// on each web request would be too expensive in production.
|
||||
$is_development_env = defined('GLPI_ENVIRONMENT_TYPE') && GLPI_ENVIRONMENT_TYPE === 'development';
|
||||
|
||||
if (PHP_SAPI !== 'cli' && $is_development_env && function_exists('opcache_invalidate')) {
|
||||
$files = new RecursiveIteratorIterator(
|
||||
new RecursiveDirectoryIterator(__DIR__, RecursiveDirectoryIterator::SKIP_DOTS)
|
||||
);
|
||||
@@ -24,7 +28,7 @@ use GlpiPlugin\Urbackup\Server;
|
||||
use GlpiPlugin\Urbackup\ServerAsset;
|
||||
use GlpiPlugin\Urbackup\MassiveAction as PluginUrbackupMassiveAction;
|
||||
|
||||
define('PLUGIN_URBACKUP_VERSION', '0.7.0');
|
||||
define('PLUGIN_URBACKUP_VERSION', '0.7.3');
|
||||
define('PLUGIN_URBACKUP_MIN_GLPI', '11.0.6');
|
||||
define('PLUGIN_URBACKUP_MAX_GLPI', '11.99.99');
|
||||
|
||||
@@ -61,10 +65,12 @@ function plugin_init_urbackup(): void
|
||||
Plugin::registerClass(ServerAsset::class);
|
||||
Plugin::registerClass(PluginUrbackupMassiveAction::class);
|
||||
|
||||
// Register tab on Computer (legacy, always enabled)
|
||||
Plugin::registerClass(AssetTab::class, [
|
||||
'addtabon' => ['Computer'],
|
||||
]);
|
||||
// Register tab on Computer (configurable from the plugin configuration page)
|
||||
if (Config::getEnableComputer()) {
|
||||
Plugin::registerClass(AssetTab::class, [
|
||||
'addtabon' => ['Computer'],
|
||||
]);
|
||||
}
|
||||
|
||||
// Register UrBackupCapacity for GLPI 11 Asset Definition types.
|
||||
// Tab registration happens inside `UrBackupCapacity::onClassBootstrap()`
|
||||
@@ -87,10 +93,6 @@ function plugin_init_urbackup(): void
|
||||
$PLUGIN_HOOKS[Hooks::ADD_CSS]['urbackup'] = [
|
||||
'public/css/urbackup.css',
|
||||
];
|
||||
|
||||
$PLUGIN_HOOKS[Hooks::ADD_JAVASCRIPT]['urbackup'] = [
|
||||
'public/js/urbackup.js',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user