mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge branch '3.2.x'
This commit is contained in:
commit
a44f31ec42
5 changed files with 394 additions and 287 deletions
|
@ -48,7 +48,7 @@
|
||||||
"symfony/routing": "~3.1",
|
"symfony/routing": "~3.1",
|
||||||
"symfony/twig-bridge": "~3.1",
|
"symfony/twig-bridge": "~3.1",
|
||||||
"symfony/yaml": "~3.1",
|
"symfony/yaml": "~3.1",
|
||||||
"twig/twig": "^1.0,<1.25"
|
"twig/twig": "^1.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"fabpot/goutte": "~3.1",
|
"fabpot/goutte": "~3.1",
|
||||||
|
|
662
phpBB/composer.lock
generated
662
phpBB/composer.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -22,6 +22,14 @@ class lexer extends \Twig_Lexer
|
||||||
|
|
||||||
public function tokenize($code, $filename = null)
|
public function tokenize($code, $filename = null)
|
||||||
{
|
{
|
||||||
|
// Handle \Twig_Source format input
|
||||||
|
if ($code instanceof \Twig_Source)
|
||||||
|
{
|
||||||
|
$source = $code;
|
||||||
|
$code = $source->getCode();
|
||||||
|
$filename = $source->getName();
|
||||||
|
}
|
||||||
|
|
||||||
// Our phpBB tags
|
// Our phpBB tags
|
||||||
// Commented out tokens are handled separately from the main replace
|
// Commented out tokens are handled separately from the main replace
|
||||||
$phpbb_tags = array(
|
$phpbb_tags = array(
|
||||||
|
@ -125,7 +133,8 @@ class lexer extends \Twig_Lexer
|
||||||
// Appends any filters
|
// Appends any filters
|
||||||
$code = preg_replace('#{([a-zA-Z0-9_\.]+)(\|[^}]+?)?}#', '{{ $1$2 }}', $code);
|
$code = preg_replace('#{([a-zA-Z0-9_\.]+)(\|[^}]+?)?}#', '{{ $1$2 }}', $code);
|
||||||
|
|
||||||
return parent::tokenize($code, $filename);
|
// Tokenize \Twig_Source instance
|
||||||
|
return parent::tokenize(new \Twig_Source($code, $filename));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -35,7 +35,7 @@ class loader extends \Twig_Loader_Filesystem
|
||||||
{
|
{
|
||||||
$this->filesystem = $filesystem;
|
$this->filesystem = $filesystem;
|
||||||
|
|
||||||
parent::__construct($paths);
|
parent::__construct($paths, $this->filesystem->realpath(dirname(__FILE__)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue