X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/c61c3bc60890f171589f3fcdccbe217c900af1c1..refs/pull/3391/head:/app/Theming/ThemeService.php diff --git a/app/Theming/ThemeService.php b/app/Theming/ThemeService.php index cc68de1e1..275dc9d8c 100644 --- a/app/Theming/ThemeService.php +++ b/app/Theming/ThemeService.php @@ -1,4 +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; } } -} \ No newline at end of file + + /** + * @see SocialAuthService::addSocialDriver + */ + public function addSocialDriver(string $driverName, array $config, string $socialiteHandler, callable $configureForRedirect = null) + { + $socialAuthService = app()->make(SocialAuthService::class); + $socialAuthService->addSocialDriver($driverName, $config, $socialiteHandler, $configureForRedirect); + } +}