From 1c2f6361b08b65713faacd8e16c6f06822caeb08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Anne?= Date: Mon, 25 Jul 2022 10:23:45 +0200 Subject: [PATCH] Prevent useless DB query on plugin init --- setup.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/setup.php b/setup.php index 65f63d2e..3d51c4b4 100644 --- a/setup.php +++ b/setup.php @@ -230,12 +230,7 @@ function plugin_datainjection_migratetypes_datainjection($types) { function plugin_datainjection_checkDirectories() { - $plugin = new Plugin(); - - if ($plugin->isInstalled('datainjection') - && (!file_exists(PLUGIN_DATAINJECTION_UPLOAD_DIR) - || !is_writable(PLUGIN_DATAINJECTION_UPLOAD_DIR)) - ) { + if (!file_exists(PLUGIN_DATAINJECTION_UPLOAD_DIR) || !is_writable(PLUGIN_DATAINJECTION_UPLOAD_DIR)) { return false; } return true;