-<?php namespace BookStack\Theming;
+<?php
+
+namespace BookStack\Theming;
use BookStack\Auth\Access\SocialAuthService;
*
* If a callback returns a non-null value, this method will
* stop and return that value itself.
+ *
* @return mixed
*/
public function dispatch(string $event, ...$args)
return $result;
}
}
+
return null;
}
public function readThemeActions()
{
$themeActionsFile = theme_path('functions.php');
- if (file_exists($themeActionsFile)) {
+ if ($themeActionsFile && file_exists($themeActionsFile)) {
require $themeActionsFile;
}
}
/**
* @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
+}