Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ONLYOFFICE/onlyoffice-nextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'appinfo/application.php')
-rw-r--r--appinfo/application.php18
1 files changed, 13 insertions, 5 deletions
diff --git a/appinfo/application.php b/appinfo/application.php
index 3b3065a..bbf013a 100644
--- a/appinfo/application.php
+++ b/appinfo/application.php
@@ -89,10 +89,18 @@ class Application extends App implements IBootstrap {
}
public function register(IRegistrationContext $context): void {
- require_once __DIR__ . "/../3rdparty/jwt/BeforeValidException.php";
- require_once __DIR__ . "/../3rdparty/jwt/ExpiredException.php";
- require_once __DIR__ . "/../3rdparty/jwt/SignatureInvalidException.php";
- require_once __DIR__ . "/../3rdparty/jwt/JWT.php";
+ if (!class_exists('\\Firebase\\JWT\\BeforeValidException')) {
+ require_once __DIR__ . "/../3rdparty/jwt/BeforeValidException.php";
+ }
+ if (!class_exists('\\Firebase\\JWT\\ExpiredException')) {
+ require_once __DIR__ . "/../3rdparty/jwt/ExpiredException.php";
+ }
+ if (!class_exists('\\Firebase\\JWT\\SignatureInvalidException')) {
+ require_once __DIR__ . "/../3rdparty/jwt/SignatureInvalidException.php";
+ }
+ if (!class_exists('\\Firebase\\JWT\\JWT')) {
+ require_once __DIR__ . "/../3rdparty/jwt/JWT.php";
+ }
$context->registerService("L10N", function (ContainerInterface $c) {
return $c->get("ServerContainer")->getL10N($c->get("AppName"));
@@ -301,4 +309,4 @@ class Application extends App implements IBootstrap {
});
}
}
-} \ No newline at end of file
+}