X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/b8e2d75014c89c9e345c3f940ec8743bd158df67..refs/pull/3113/head:/app/Theming/ThemeService.php diff --git a/app/Theming/ThemeService.php b/app/Theming/ThemeService.php index 54e476ae2..275dc9d8c 100644 --- a/app/Theming/ThemeService.php +++ b/app/Theming/ThemeService.php @@ -1,6 +1,11 @@ -addCommands([$command]); + }); + } + /** * Read any actions from the set theme path if the 'functions.php' file exists. */ public function readThemeActions() { $themeActionsFile = theme_path('functions.php'); - if (file_exists($themeActionsFile)) { + if ($themeActionsFile && file_exists($themeActionsFile)) { require $themeActionsFile; } } @@ -53,9 +70,9 @@ class ThemeService /** * @see SocialAuthService::addSocialDriver */ - public function addSocialDriver(string $driverName, array $config, string $socialiteHandler) + public function addSocialDriver(string $driverName, array $config, string $socialiteHandler, callable $configureForRedirect = null) { $socialAuthService = app()->make(SocialAuthService::class); - $socialAuthService->addSocialDriver($driverName, $config, $socialiteHandler); + $socialAuthService->addSocialDriver($driverName, $config, $socialiteHandler, $configureForRedirect); } -} \ No newline at end of file +}