Revision 1958
Added by darkviper about 11 years ago
branches/2.8.x/CHANGELOG | ||
---|---|---|
11 | 11 |
! = Update/Change |
12 | 12 |
=============================================================================== |
13 | 13 |
|
14 |
14 Aug-2013 Build 1958 M.v.d.Decken(DarkViper) |
|
15 |
! update Twig 1.13.1 -> 1.13.2 |
|
14 | 16 |
14 Aug-2013 Build 1957 M.v.d.Decken(DarkViper) |
15 | 17 |
# typofixes in /admin/pages/setings.php |
16 | 18 |
# typofixes in /include/jscalendar/lang/ |
branches/2.8.x/wb/include/Sensio/Twig/lib/Twig/Node/Expression/Call.php | ||
---|---|---|
146 | 146 |
|
147 | 147 |
if (array_key_exists($name, $parameters)) { |
148 | 148 |
if (array_key_exists($pos, $parameters)) { |
149 |
throw new Twig_Error_Syntax(sprintf('Arguments "%s" is defined twice for %s "%s".', $name, $this->getAttribute('type'), $this->getAttribute('name')));
|
|
149 |
throw new Twig_Error_Syntax(sprintf('Argument "%s" is defined twice for %s "%s".', $name, $this->getAttribute('type'), $this->getAttribute('name'))); |
|
150 | 150 |
} |
151 | 151 |
|
152 | 152 |
$arguments[] = $parameters[$name]; |
... | ... | |
164 | 164 |
} |
165 | 165 |
} |
166 | 166 |
|
167 |
foreach (array_keys($parameters) as $name) {
|
|
168 |
throw new Twig_Error_Syntax(sprintf('Unknown argument "%s" for %s "%s".', $name, $this->getAttribute('type'), $this->getAttribute('name')));
|
|
167 |
if (!empty($parameters)) {
|
|
168 |
throw new Twig_Error_Syntax(sprintf('Unknown argument%s "%s" for %s "%s".', count($parameters) > 1 ? 's' : '' , implode('", "', array_keys($parameters)), $this->getAttribute('type'), $this->getAttribute('name')));
|
|
169 | 169 |
} |
170 | 170 |
|
171 | 171 |
return $arguments; |
branches/2.8.x/wb/include/Sensio/Twig/lib/Twig/Loader/Filesystem.php | ||
---|---|---|
16 | 16 |
*/ |
17 | 17 |
class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderInterface |
18 | 18 |
{ |
19 |
/** Identifier of the main namespace. */ |
|
20 |
const MAIN_NAMESPACE = '__main__'; |
|
21 |
|
|
19 | 22 |
protected $paths; |
20 | 23 |
protected $cache; |
21 | 24 |
|
... | ... | |
38 | 41 |
* |
39 | 42 |
* @return array The array of paths where to look for templates |
40 | 43 |
*/ |
41 |
public function getPaths($namespace = '__main__')
|
|
44 |
public function getPaths($namespace = self::MAIN_NAMESPACE)
|
|
42 | 45 |
{ |
43 | 46 |
return isset($this->paths[$namespace]) ? $this->paths[$namespace] : array(); |
44 | 47 |
} |
... | ... | |
46 | 49 |
/** |
47 | 50 |
* Returns the path namespaces. |
48 | 51 |
* |
49 |
* The "__main__" namespace is always defined.
|
|
52 |
* The main namespace is always defined.
|
|
50 | 53 |
* |
51 | 54 |
* @return array The array of defined namespaces |
52 | 55 |
*/ |
... | ... | |
61 | 64 |
* @param string|array $paths A path or an array of paths where to look for templates |
62 | 65 |
* @param string $namespace A path namespace |
63 | 66 |
*/ |
64 |
public function setPaths($paths, $namespace = '__main__')
|
|
67 |
public function setPaths($paths, $namespace = self::MAIN_NAMESPACE)
|
|
65 | 68 |
{ |
66 | 69 |
if (!is_array($paths)) { |
67 | 70 |
$paths = array($paths); |
... | ... | |
81 | 84 |
* |
82 | 85 |
* @throws Twig_Error_Loader |
83 | 86 |
*/ |
84 |
public function addPath($path, $namespace = '__main__')
|
|
87 |
public function addPath($path, $namespace = self::MAIN_NAMESPACE)
|
|
85 | 88 |
{ |
86 | 89 |
// invalidate the cache |
87 | 90 |
$this->cache = array(); |
... | ... | |
101 | 104 |
* |
102 | 105 |
* @throws Twig_Error_Loader |
103 | 106 |
*/ |
104 |
public function prependPath($path, $namespace = '__main__')
|
|
107 |
public function prependPath($path, $namespace = self::MAIN_NAMESPACE)
|
|
105 | 108 |
{ |
106 | 109 |
// invalidate the cache |
107 | 110 |
$this->cache = array(); |
... | ... | |
175 | 178 |
|
176 | 179 |
$this->validateName($name); |
177 | 180 |
|
178 |
$namespace = '__main__';
|
|
181 |
$namespace = self::MAIN_NAMESPACE;
|
|
179 | 182 |
if (isset($name[0]) && '@' == $name[0]) { |
180 | 183 |
if (false === $pos = strpos($name, '/')) { |
181 | 184 |
throw new Twig_Error_Loader(sprintf('Malformed namespaced template name "%s" (expecting "@namespace/template_name").', $name)); |
branches/2.8.x/wb/include/Sensio/Twig/lib/Twig/Error.php | ||
---|---|---|
186 | 186 |
protected function guessTemplateInfo() |
187 | 187 |
{ |
188 | 188 |
$template = null; |
189 |
$templateClass = null; |
|
189 | 190 |
|
190 | 191 |
if (version_compare(phpversion(), '5.3.6', '>=')) { |
191 | 192 |
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS | DEBUG_BACKTRACE_PROVIDE_OBJECT); |
... | ... | |
195 | 196 |
|
196 | 197 |
foreach ($backtrace as $trace) { |
197 | 198 |
if (isset($trace['object']) && $trace['object'] instanceof Twig_Template && 'Twig_Template' !== get_class($trace['object'])) { |
198 |
if (null === $this->filename || $this->filename == $trace['object']->getTemplateName()) { |
|
199 |
$currentClass = get_class($trace['object']); |
|
200 |
$isEmbedContainer = 0 === strpos($templateClass, $currentClass); |
|
201 |
if (null === $this->filename || ($this->filename == $trace['object']->getTemplateName() && !$isEmbedContainer)) { |
|
199 | 202 |
$template = $trace['object']; |
203 |
$templateClass = get_class($trace['object']); |
|
200 | 204 |
} |
201 | 205 |
} |
202 | 206 |
} |
branches/2.8.x/wb/include/Sensio/Twig/lib/Twig/Environment.php | ||
---|---|---|
16 | 16 |
*/ |
17 | 17 |
class Twig_Environment |
18 | 18 |
{ |
19 |
const VERSION = '1.13.1';
|
|
19 |
const VERSION = '1.13.2';
|
|
20 | 20 |
|
21 | 21 |
protected $charset; |
22 | 22 |
protected $loader; |
... | ... | |
728 | 728 |
public function addNodeVisitor(Twig_NodeVisitorInterface $visitor) |
729 | 729 |
{ |
730 | 730 |
if ($this->extensionInitialized) { |
731 |
throw new LogicException('Unable to add a node visitor as extensions have already been initialized.', $extension->getName());
|
|
731 |
throw new LogicException('Unable to add a node visitor as extensions have already been initialized.'); |
|
732 | 732 |
} |
733 | 733 |
|
734 | 734 |
$this->staging->addNodeVisitor($visitor); |
branches/2.8.x/wb/include/Sensio/Twig/CHANGELOG | ||
---|---|---|
1 |
* 1.13.2 (2013-08-03) |
|
2 |
|
|
3 |
* fixed the error line number for an error occurs in and embedded template |
|
4 |
* fixed crashes of the C extension on some edge cases |
|
5 |
|
|
1 | 6 |
* 1.13.1 (2013-06-06) |
2 | 7 |
|
3 | 8 |
* added the possibility to ignore the filesystem constructor argument in Twig_Loader_Filesystem |
branches/2.8.x/wb/admin/interface/version.php | ||
---|---|---|
51 | 51 |
|
52 | 52 |
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled) |
53 | 53 |
if(!defined('VERSION')) define('VERSION', '2.8.3'); |
54 |
if(!defined('REVISION')) define('REVISION', '1956');
|
|
54 |
if(!defined('REVISION')) define('REVISION', '1958');
|
|
55 | 55 |
if(!defined('SP')) define('SP', ''); |
Also available in: Unified diff
update Twig from version 1.13.1 to 1.13.2