mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-02 13:09:53 +09:00
update to laravel 5.7 and try getting autologin saved
This commit is contained in:
@@ -13,9 +13,9 @@ namespace Symfony\Component\HttpKernel\Fragment;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Templating\EngineInterface;
|
||||
use Symfony\Component\HttpKernel\Controller\ControllerReference;
|
||||
use Symfony\Component\HttpKernel\UriSigner;
|
||||
use Symfony\Component\Templating\EngineInterface;
|
||||
use Twig\Environment;
|
||||
use Twig\Error\LoaderError;
|
||||
use Twig\Loader\ExistsLoaderInterface;
|
||||
@@ -38,7 +38,7 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer
|
||||
* @param string $globalDefaultTemplate The global default content (it can be a template name or the content)
|
||||
* @param string $charset
|
||||
*/
|
||||
public function __construct($templating = null, UriSigner $signer = null, $globalDefaultTemplate = null, $charset = 'utf-8')
|
||||
public function __construct($templating = null, UriSigner $signer = null, string $globalDefaultTemplate = null, string $charset = 'utf-8')
|
||||
{
|
||||
$this->setTemplating($templating);
|
||||
$this->globalDefaultTemplate = $globalDefaultTemplate;
|
||||
@@ -89,7 +89,7 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer
|
||||
}
|
||||
|
||||
// we need to sign the absolute URI, but want to return the path only.
|
||||
$uri = substr($this->signer->sign($this->generateFragmentUri($uri, $request, true)), strlen($request->getSchemeAndHttpHost()));
|
||||
$uri = substr($this->signer->sign($this->generateFragmentUri($uri, $request, true)), \strlen($request->getSchemeAndHttpHost()));
|
||||
}
|
||||
|
||||
// We need to replace ampersands in the URI with the encoded form in order to return valid html/xml content.
|
||||
@@ -102,12 +102,12 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer
|
||||
$content = $template;
|
||||
}
|
||||
|
||||
$attributes = isset($options['attributes']) && is_array($options['attributes']) ? $options['attributes'] : array();
|
||||
$attributes = isset($options['attributes']) && \is_array($options['attributes']) ? $options['attributes'] : array();
|
||||
if (isset($options['id']) && $options['id']) {
|
||||
$attributes['id'] = $options['id'];
|
||||
}
|
||||
$renderedAttributes = '';
|
||||
if (count($attributes) > 0) {
|
||||
if (\count($attributes) > 0) {
|
||||
$flags = ENT_QUOTES | ENT_SUBSTITUTE;
|
||||
foreach ($attributes as $attribute => $value) {
|
||||
$renderedAttributes .= sprintf(
|
||||
@@ -121,17 +121,12 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer
|
||||
return new Response(sprintf('<hx:include src="%s"%s>%s</hx:include>', $uri, $renderedAttributes, $content));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $template
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function templateExists($template)
|
||||
private function templateExists(string $template): bool
|
||||
{
|
||||
if ($this->templating instanceof EngineInterface) {
|
||||
try {
|
||||
return $this->templating->exists($template);
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
} catch (\Exception $e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user