Fix plugin install:install command

This commit is contained in:
slawkens 2025-06-23 00:21:41 +02:00
parent 6cf4b9dac5
commit 0da524fefe

View File

@ -781,15 +781,15 @@ class Plugins {
return false; return false;
} }
if(!isset($plugin_json['install'])) { $install = $plugin_json['install'] ?? '';
self::$error = "Plugin doesn't have install options defined. Skipping..."; if (self::getAutoLoadOption($plugin_json, 'install', true) && is_file(PLUGINS . $plugin_name . '/install.php')) {
return false; $install = 'plugins/' . $plugin_name . '/install.php';
} }
global $db; global $db;
if (file_exists(BASE . $plugin_json['install'])) { if (file_exists(BASE . $install)) {
$db->revalidateCache(); $db->revalidateCache();
require BASE . $plugin_json['install']; require BASE . $install;
$db->revalidateCache(); $db->revalidateCache();
} }
else { else {