Skip to content

Commit

Permalink
Prevent useless DB query on plugin init
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric-anne committed Jul 25, 2022
1 parent ec1a9f3 commit 8f3bab2
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8f3bab2

Please sign in to comment.