Skip to content

Commit

Permalink
add script differently depending on the version of nextcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
individual-it committed Feb 15, 2022
1 parent 1e26558 commit 0ee36aa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/Listener/LoadSidebarScript.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ public function handle(Event $event): void {
if (!($event instanceof LoadSidebar)) {
return;
}
Util::addScript(Application::APP_ID, 'integration_openproject-projectTab', 'files');
$currentVersion = implode('.', Util::getVersion());
//changed from nextcloud 24
if (version_compare($currentVersion, '24') >= 0) {
Util::addScript(Application::APP_ID, 'integration_openproject-projectTab', 'files');
} else {
Util::addScript(Application::APP_ID, 'integration_openproject-projectTab');
}
Util::addStyle(Application::APP_ID, 'tab');
}
}

0 comments on commit 0ee36aa

Please sign in to comment.