Changeset 1069180
- Timestamp:
- 01/16/2015 09:07:27 AM (11 years ago)
- Location:
- adentify/trunk
- Files:
-
- 32 edited
-
adentify.php (modified) (1 diff)
-
composer.json (modified) (1 diff)
-
composer.lock (modified) (6 diffs)
-
css/adentify.admin.css (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
vendor/autoload.php (modified) (1 diff)
-
vendor/composer/ClassLoader.php (modified) (1 diff)
-
vendor/composer/autoload_namespaces.php (modified) (1 diff)
-
vendor/composer/autoload_real.php (modified) (4 diffs)
-
vendor/composer/installed.json (modified) (4 diffs)
-
vendor/twig/twig/CHANGELOG (modified) (1 diff)
-
vendor/twig/twig/composer.json (modified) (2 diffs)
-
vendor/twig/twig/doc/advanced.rst (modified) (2 diffs)
-
vendor/twig/twig/doc/advanced_legacy.rst (modified) (2 diffs)
-
vendor/twig/twig/doc/api.rst (modified) (1 diff)
-
vendor/twig/twig/doc/filters/index.rst (modified) (2 diffs)
-
vendor/twig/twig/doc/filters/slice.rst (modified) (1 diff)
-
vendor/twig/twig/doc/installation.rst (modified) (2 diffs)
-
vendor/twig/twig/doc/intro.rst (modified) (1 diff)
-
vendor/twig/twig/doc/tags/if.rst (modified) (1 diff)
-
vendor/twig/twig/doc/tags/index.rst (modified) (1 diff)
-
vendor/twig/twig/doc/templates.rst (modified) (1 diff)
-
vendor/twig/twig/ext/twig/php_twig.h (modified) (1 diff)
-
vendor/twig/twig/lib/Twig/Environment.php (modified) (5 diffs)
-
vendor/twig/twig/lib/Twig/ExpressionParser.php (modified) (2 diffs)
-
vendor/twig/twig/lib/Twig/Extension/Core.php (modified) (2 diffs)
-
vendor/twig/twig/lib/Twig/Extension/Escaper.php (modified) (1 diff)
-
vendor/twig/twig/lib/Twig/Node/Expression/Call.php (modified) (2 diffs)
-
vendor/twig/twig/lib/Twig/Node/Expression/Unary.php (modified) (1 diff)
-
vendor/twig/twig/lib/Twig/Node/Module.php (modified) (5 diffs)
-
vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php (modified) (1 diff)
-
vendor/twig/twig/lib/Twig/Template.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
adentify/trunk/adentify.php
r1062077 r1069180 72 72 bind_textdomain_codeset('adentify', 'UTF-8'); 73 73 74 load_plugin_textdomain('adentify', ADENTIFY__PLUGIN_DIR, 'languages'); 75 74 76 // Choose domain 75 77 textdomain("adentify"); -
adentify/trunk/composer.json
r1051693 r1069180 2 2 "require": { 3 3 "guzzlehttp/guzzle": "~4.0", 4 "twig/twig": "1.*" 4 "twig/twig": "1.*", 5 "twig/extensions": "~1.2" 5 6 } 6 7 } -
adentify/trunk/composer.lock
r1051693 r1069180 5 5 "This file is @generated automatically" 6 6 ], 7 "hash": " 0ec612e88f1cbd7560099f458be96318",7 "hash": "7eaaf9d005ec21e2036272768fb10508", 8 8 "packages": [ 9 9 { … … 126 126 }, 127 127 { 128 "name": "twig/extensions", 129 "version": "v1.2.0", 130 "source": { 131 "type": "git", 132 "url": "https://github.com/twigphp/Twig-extensions.git", 133 "reference": "8cf4b9fe04077bd54fc73f4fde83347040c3b8cd" 134 }, 135 "dist": { 136 "type": "zip", 137 "url": "https://api.github.com/repos/twigphp/Twig-extensions/zipball/8cf4b9fe04077bd54fc73f4fde83347040c3b8cd", 138 "reference": "8cf4b9fe04077bd54fc73f4fde83347040c3b8cd", 139 "shasum": "" 140 }, 141 "require": { 142 "twig/twig": "~1.12" 143 }, 144 "require-dev": { 145 "symfony/translation": "~2.3" 146 }, 147 "suggest": { 148 "symfony/translation": "Allow the time_diff output to be translated" 149 }, 150 "type": "library", 151 "extra": { 152 "branch-alias": { 153 "dev-master": "1.2.x-dev" 154 } 155 }, 156 "autoload": { 157 "psr-0": { 158 "Twig_Extensions_": "lib/" 159 } 160 }, 161 "notification-url": "https://packagist.org/downloads/", 162 "license": [ 163 "MIT" 164 ], 165 "authors": [ 166 { 167 "name": "Fabien Potencier", 168 "email": "fabien@symfony.com" 169 } 170 ], 171 "description": "Common additional features for Twig that do not directly belong in core", 172 "homepage": "http://twig.sensiolabs.org/doc/extensions/index.html", 173 "keywords": [ 174 "i18n", 175 "text" 176 ], 177 "time": "2014-10-30 14:30:03" 178 }, 179 { 128 180 "name": "twig/twig", 129 "version": "v1.1 6.2",130 "source": { 131 "type": "git", 132 "url": "https://github.com/ fabpot/Twig.git",133 "reference": " 42f758d9fe2146d1f0470604fc05ee43580873fc"134 }, 135 "dist": { 136 "type": "zip", 137 "url": "https://api.github.com/repos/ fabpot/Twig/zipball/42f758d9fe2146d1f0470604fc05ee43580873fc",138 "reference": " 42f758d9fe2146d1f0470604fc05ee43580873fc",181 "version": "v1.17.0", 182 "source": { 183 "type": "git", 184 "url": "https://github.com/twigphp/Twig.git", 185 "reference": "2493970fa4d587eca73f77e6d8bd48a8bdd4c608" 186 }, 187 "dist": { 188 "type": "zip", 189 "url": "https://api.github.com/repos/twigphp/Twig/zipball/2493970fa4d587eca73f77e6d8bd48a8bdd4c608", 190 "reference": "2493970fa4d587eca73f77e6d8bd48a8bdd4c608", 139 191 "shasum": "" 140 192 }, … … 145 197 "extra": { 146 198 "branch-alias": { 147 "dev-master": "1.1 6-dev"199 "dev-master": "1.17-dev" 148 200 } 149 201 }, … … 171 223 { 172 224 "name": "Twig Team", 173 "homepage": "http s://github.com/fabpot/Twig/graphs/contributors",225 "homepage": "http://twig.sensiolabs.org/contributors", 174 226 "role": "Contributors" 175 227 } … … 180 232 "templating" 181 233 ], 182 "time": "201 4-10-17 12:53:44"234 "time": "2015-01-14 10:15:49" 183 235 } 184 236 ], … … 188 240 "stability-flags": [], 189 241 "prefer-stable": false, 242 "prefer-lowest": false, 190 243 "platform": [], 191 244 "platform-dev": [] -
adentify/trunk/css/adentify.admin.css
r1051693 r1069180 7 7 .ad-media-frame-content .photo-overlay .tag { 8 8 position: absolute; 9 width: 30px; 10 height: 30px; 9 11 } 10 12 -
adentify/trunk/readme.txt
r1062077 r1069180 5 5 Requires at least: 3.0.1 6 6 Tested up to: 3.4 7 Stable tag: 1.0. 17 Stable tag: 1.0.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 57 57 = 1.0.1 = 58 58 * Support of french and english 59 = 1.0.2 = 60 * Fix tags visibility in media library 61 * Vendors updates -
adentify/trunk/vendor/autoload.php
r1051693 r1069180 5 5 require_once __DIR__ . '/composer' . '/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit 48bcd35fe6c277d310482b681b4bd422::getLoader();7 return ComposerAutoloaderInite491e20965111888db47f8663238b757::getLoader(); -
adentify/trunk/vendor/composer/ClassLoader.php
r1051693 r1069180 57 57 public function getPrefixes() 58 58 { 59 return call_user_func_array('array_merge', $this->prefixesPsr0); 59 if (!empty($this->prefixesPsr0)) { 60 return call_user_func_array('array_merge', $this->prefixesPsr0); 61 } 62 63 return array(); 60 64 } 61 65 -
adentify/trunk/vendor/composer/autoload_namespaces.php
r1051693 r1069180 7 7 8 8 return array( 9 'Twig_Extensions_' => array($vendorDir . '/twig/extensions/lib'), 9 10 'Twig_' => array($vendorDir . '/twig/twig/lib'), 10 11 ); -
adentify/trunk/vendor/composer/autoload_real.php
r1051693 r1069180 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 48bcd35fe6c277d310482b681b4bd4225 class ComposerAutoloaderInite491e20965111888db47f8663238b757 6 6 { 7 7 private static $loader; … … 20 20 } 21 21 22 spl_autoload_register(array('ComposerAutoloaderInit 48bcd35fe6c277d310482b681b4bd422', 'loadClassLoader'), true, true);22 spl_autoload_register(array('ComposerAutoloaderInite491e20965111888db47f8663238b757', 'loadClassLoader'), true, true); 23 23 self::$loader = $loader = new \Composer\Autoload\ClassLoader(); 24 spl_autoload_unregister(array('ComposerAutoloaderInit 48bcd35fe6c277d310482b681b4bd422', 'loadClassLoader'));24 spl_autoload_unregister(array('ComposerAutoloaderInite491e20965111888db47f8663238b757', 'loadClassLoader')); 25 25 26 26 $map = require __DIR__ . '/autoload_namespaces.php'; … … 43 43 $includeFiles = require __DIR__ . '/autoload_files.php'; 44 44 foreach ($includeFiles as $file) { 45 composerRequire 48bcd35fe6c277d310482b681b4bd422($file);45 composerRequiree491e20965111888db47f8663238b757($file); 46 46 } 47 47 … … 50 50 } 51 51 52 function composerRequire 48bcd35fe6c277d310482b681b4bd422($file)52 function composerRequiree491e20965111888db47f8663238b757($file) 53 53 { 54 54 require $file; -
adentify/trunk/vendor/composer/installed.json
r1051693 r1069180 124 124 { 125 125 "name": "twig/twig", 126 "version": "v1.1 6.2",127 "version_normalized": "1.1 6.2.0",128 "source": { 129 "type": "git", 130 "url": "https://github.com/ fabpot/Twig.git",131 "reference": " 42f758d9fe2146d1f0470604fc05ee43580873fc"132 }, 133 "dist": { 134 "type": "zip", 135 "url": "https://api.github.com/repos/ fabpot/Twig/zipball/42f758d9fe2146d1f0470604fc05ee43580873fc",136 "reference": " 42f758d9fe2146d1f0470604fc05ee43580873fc",126 "version": "v1.17.0", 127 "version_normalized": "1.17.0.0", 128 "source": { 129 "type": "git", 130 "url": "https://github.com/twigphp/Twig.git", 131 "reference": "2493970fa4d587eca73f77e6d8bd48a8bdd4c608" 132 }, 133 "dist": { 134 "type": "zip", 135 "url": "https://api.github.com/repos/twigphp/Twig/zipball/2493970fa4d587eca73f77e6d8bd48a8bdd4c608", 136 "reference": "2493970fa4d587eca73f77e6d8bd48a8bdd4c608", 137 137 "shasum": "" 138 138 }, … … 140 140 "php": ">=5.2.4" 141 141 }, 142 "time": "201 4-10-17 12:53:44",143 "type": "library", 144 "extra": { 145 "branch-alias": { 146 "dev-master": "1.1 6-dev"142 "time": "2015-01-14 10:15:49", 143 "type": "library", 144 "extra": { 145 "branch-alias": { 146 "dev-master": "1.17-dev" 147 147 } 148 148 }, … … 171 171 { 172 172 "name": "Twig Team", 173 "homepage": "http s://github.com/fabpot/Twig/graphs/contributors",173 "homepage": "http://twig.sensiolabs.org/contributors", 174 174 "role": "Contributors" 175 175 } … … 180 180 "templating" 181 181 ] 182 }, 183 { 184 "name": "twig/extensions", 185 "version": "v1.2.0", 186 "version_normalized": "1.2.0.0", 187 "source": { 188 "type": "git", 189 "url": "https://github.com/twigphp/Twig-extensions.git", 190 "reference": "8cf4b9fe04077bd54fc73f4fde83347040c3b8cd" 191 }, 192 "dist": { 193 "type": "zip", 194 "url": "https://api.github.com/repos/twigphp/Twig-extensions/zipball/8cf4b9fe04077bd54fc73f4fde83347040c3b8cd", 195 "reference": "8cf4b9fe04077bd54fc73f4fde83347040c3b8cd", 196 "shasum": "" 197 }, 198 "require": { 199 "twig/twig": "~1.12" 200 }, 201 "require-dev": { 202 "symfony/translation": "~2.3" 203 }, 204 "suggest": { 205 "symfony/translation": "Allow the time_diff output to be translated" 206 }, 207 "time": "2014-10-30 14:30:03", 208 "type": "library", 209 "extra": { 210 "branch-alias": { 211 "dev-master": "1.2.x-dev" 212 } 213 }, 214 "installation-source": "dist", 215 "autoload": { 216 "psr-0": { 217 "Twig_Extensions_": "lib/" 218 } 219 }, 220 "notification-url": "https://packagist.org/downloads/", 221 "license": [ 222 "MIT" 223 ], 224 "authors": [ 225 { 226 "name": "Fabien Potencier", 227 "email": "fabien@symfony.com" 228 } 229 ], 230 "description": "Common additional features for Twig that do not directly belong in core", 231 "homepage": "http://twig.sensiolabs.org/doc/extensions/index.html", 232 "keywords": [ 233 "i18n", 234 "text" 235 ] 182 236 } 183 237 ] -
adentify/trunk/vendor/twig/twig/CHANGELOG
r1051693 r1069180 1 * 1.17.0 (2015-01-14) 2 3 * added a 'filename' autoescaping strategy, which dynamically chooses the 4 autoescaping strategy for a template based on template file extension. 5 6 * 1.16.3 (2014-12-25) 7 8 * fixed regression for dynamic parent templates 9 * fixed cache management with statcache 10 * fixed a regression in the slice filter 11 1 12 * 1.16.2 (2014-10-17) 2 13 -
adentify/trunk/vendor/twig/twig/composer.json
r1051693 r1069180 15 15 { 16 16 "name": "Twig Team", 17 "homepage": "http s://github.com/fabpot/Twig/graphs/contributors",17 "homepage": "http://twig.sensiolabs.org/contributors", 18 18 "role": "Contributors" 19 19 }, … … 37 37 "extra": { 38 38 "branch-alias": { 39 "dev-master": "1.1 6-dev"39 "dev-master": "1.17-dev" 40 40 } 41 41 } -
adentify/trunk/vendor/twig/twig/doc/advanced.rst
r1051693 r1069180 504 504 505 505 Before writing your own extensions, have a look at the Twig official 506 extension repository: http://github.com/ fabpot/Twig-extensions.506 extension repository: http://github.com/twigphp/Twig-extensions. 507 507 508 508 An extension is a class that implements the following interface:: … … 831 831 .. _`spl_autoload_register()`: http://www.php.net/spl_autoload_register 832 832 .. _`rot13`: http://www.php.net/manual/en/function.str-rot13.php 833 .. _`tests/Twig/Fixtures`: https://github.com/ fabpot/Twig/tree/master/test/Twig/Tests/Fixtures834 .. _`tests/Twig/Node`: https://github.com/ fabpot/Twig/tree/master/test/Twig/Tests/Node833 .. _`tests/Twig/Fixtures`: https://github.com/twigphp/Twig/tree/master/test/Twig/Tests/Fixtures 834 .. _`tests/Twig/Node`: https://github.com/twigphp/Twig/tree/master/test/Twig/Tests/Node -
adentify/trunk/vendor/twig/twig/doc/advanced_legacy.rst
r1051693 r1069180 530 530 531 531 Before writing your own extensions, have a look at the Twig official 532 extension repository: http://github.com/ fabpot/Twig-extensions.532 extension repository: http://github.com/twigphp/Twig-extensions. 533 533 534 534 An extension is a class that implements the following interface:: … … 884 884 .. _`spl_autoload_register()`: http://www.php.net/spl_autoload_register 885 885 .. _`rot13`: http://www.php.net/manual/en/function.str-rot13.php 886 .. _`tests/Twig/Fixtures`: https://github.com/ fabpot/Twig/tree/master/test/Twig/Tests/Fixtures887 .. _`tests/Twig/Node`: https://github.com/ fabpot/Twig/tree/master/test/Twig/Tests/Node886 .. _`tests/Twig/Fixtures`: https://github.com/twigphp/Twig/tree/master/test/Twig/Tests/Fixtures 887 .. _`tests/Twig/Node`: https://github.com/twigphp/Twig/tree/master/test/Twig/Tests/Node -
adentify/trunk/vendor/twig/twig/doc/api.rst
r1051693 r1069180 95 95 exception instead (default to ``false``). 96 96 97 * ``autoescape``: If set to ``true``, auto-escaping will be enabled by default 98 for all templates (default to ``true``). As of Twig 1.8, you can set the 99 escaping strategy to use (``html``, ``js``, ``false`` to disable). 100 As of Twig 1.9, you can set the escaping strategy to use (``css``, ``url``, 101 ``html_attr``, or a PHP callback that takes the template "filename" and must 97 * ``autoescape``: If set to ``true``, HTML auto-escaping will be enabled by 98 default for all templates (default to ``true``). 99 100 As of Twig 1.8, you can set the escaping strategy to use (``html``, ``js``, 101 ``false`` to disable). 102 103 As of Twig 1.9, you can set the escaping strategy to use (``css``, ``url``, 104 ``html_attr``, or a PHP callback that takes the template "filename" and must 102 105 return the escaping strategy to use -- the callback cannot be a function name 103 106 to avoid collision with built-in escaping strategies). 107 108 As of Twig 1.17, the ``filename`` escaping strategy determines the escaping 109 strategy to use for a template based on the template filename extension. 104 110 105 111 * ``optimizations``: A flag that indicates which optimizations to apply -
adentify/trunk/vendor/twig/twig/doc/filters/index.rst
r1051693 r1069180 21 21 length 22 22 lower 23 merge 23 24 nl2br 24 25 number_format 25 merge26 upper27 26 raw 28 27 replace … … 35 34 title 36 35 trim 36 upper 37 37 url_encode -
adentify/trunk/vendor/twig/twig/doc/filters/slice.rst
r1051693 r1069180 33 33 {% endfor %} 34 34 35 {{ '12345'[1:2] }} 35 {{ '12345'[1:2] }} {# will display "23" #} 36 36 37 37 {# you can omit the first argument -- which is the same as 0 #} -
adentify/trunk/vendor/twig/twig/doc/installation.rst
r1051693 r1069180 29 29 .. code-block:: bash 30 30 31 git clone git://github.com/ fabpot/Twig.git31 git clone git://github.com/twigphp/Twig.git 32 32 33 33 Installing the PEAR package … … 108 108 ``Twig_Template::getAttribute()`` method. 109 109 110 .. _`download page`: https://github.com/fabpot/Twig/tags111 .. _`Composer`: https://getcomposer.org/download/110 .. _`download page`: https://github.com/twigphp/Twig/tags 111 .. _`Composer`: https://getcomposer.org/download/ 112 112 .. _`PHP documentation`: https://wiki.php.net/internals/windows/stepbystepbuild 113 .. _`Zend Server FAQ`: http://www.zend.com/en/products/server/faq#faqD6113 .. _`Zend Server FAQ`: http://www.zend.com/en/products/server/faq#faqD6 -
adentify/trunk/vendor/twig/twig/doc/intro.rst
r1051693 r1069180 51 51 require_once '/path/to/vendor/autoload.php'; 52 52 53 $loader = new Twig_Loader_Array( 53 $loader = new Twig_Loader_Array(array( 54 54 'index' => 'Hello {{ name }}!', 55 ) ;55 )); 56 56 $twig = new Twig_Environment($loader); 57 57 -
adentify/trunk/vendor/twig/twig/doc/tags/if.rst
r1051693 r1069180 30 30 defined`` instead. 31 31 32 You can also use ``not`` to check for values that evaluate to ``false``: 33 34 .. code-block:: jinja 35 36 {% if not user.subscribed %} 37 <p>You are not subscribed to our mailing list.</p> 38 {% endif %} 39 32 40 For multiple branches ``elseif`` and ``else`` can be used like in PHP. You can use 33 41 more complex ``expressions`` there too: -
adentify/trunk/vendor/twig/twig/doc/tags/index.rst
r1051693 r1069180 7 7 autoescape 8 8 block 9 filter10 9 do 11 10 embed 12 11 extends 12 filter 13 13 flush 14 14 for -
adentify/trunk/vendor/twig/twig/doc/templates.rst
r1051693 r1069180 867 867 .. _`Twig plugin`: https://github.com/pulse00/Twig-Eclipse-Plugin 868 868 .. _`Twig language definition`: https://github.com/gabrielcorpse/gedit-twig-template-language 869 .. _`extension repository`: http://github.com/ fabpot/Twig-extensions869 .. _`extension repository`: http://github.com/twigphp/Twig-extensions 870 870 .. _`Twig syntax mode`: https://github.com/bobthecow/Twig-HTML.mode 871 871 .. _`other Twig syntax mode`: https://github.com/muxx/Twig-HTML.mode -
adentify/trunk/vendor/twig/twig/ext/twig/php_twig.h
r1051693 r1069180 16 16 #define PHP_TWIG_H 17 17 18 #define PHP_TWIG_VERSION "1.1 6.2"18 #define PHP_TWIG_VERSION "1.17.0" 19 19 20 20 #include "php.h" -
adentify/trunk/vendor/twig/twig/lib/Twig/Environment.php
r1051693 r1069180 17 17 class Twig_Environment 18 18 { 19 const VERSION = '1.1 6.2';19 const VERSION = '1.17.0'; 20 20 21 21 protected $charset; … … 73 73 * * true: equivalent to html 74 74 * * html, js: set the autoescaping to one of the supported strategies 75 * * filename: set the autoescaping strategy based on the template filename extension 75 76 * * PHP callback: a PHP callback that returns an escaping strategy based on the template "filename" 76 77 * … … 224 225 } 225 226 226 /**227 * Sets the cache directory or false if cache is disabled.228 *229 * @param string|false $cache The absolute path to the compiled templates,230 * or false to disable cache231 */227 /** 228 * Sets the cache directory or false if cache is disabled. 229 * 230 * @param string|false $cache The absolute path to the compiled templates, 231 * or false to disable cache 232 */ 232 233 public function setCache($cache) 233 234 { … … 354 355 * 355 356 * @param string $name The template name 356 * @param timestamp$time The last modification time of the cached template357 * @param int $time The last modification time of the cached template 357 358 * 358 359 * @return bool true if the template is fresh, false otherwise … … 1233 1234 $dir = dirname($file); 1234 1235 if (!is_dir($dir)) { 1235 if (false === @mkdir($dir, 0777, true) && !is_dir($dir)) { 1236 throw new RuntimeException(sprintf("Unable to create the cache directory (%s).", $dir)); 1236 if (false === @mkdir($dir, 0777, true)) { 1237 clearstatcache(false, $dir); 1238 if (!is_dir($dir)) { 1239 throw new RuntimeException(sprintf("Unable to create the cache directory (%s).", $dir)); 1240 } 1237 1241 } 1238 1242 } elseif (!is_writable($dir)) { -
adentify/trunk/vendor/twig/twig/lib/Twig/ExpressionParser.php
r1051693 r1069180 164 164 $this->parser->getStream()->next(); 165 165 $node = new Twig_Node_Expression_Name($token->getValue(), $token->getLine()); 166 break; 167 } elseif (isset($this->unaryOperators[$token->getValue()])) { 168 $class = $this->unaryOperators[$token->getValue()]['class']; 169 170 $ref = new ReflectionClass($class); 171 $negClass = 'Twig_Node_Expression_Unary_Neg'; 172 $posClass = 'Twig_Node_Expression_Unary_Pos'; 173 if (!(in_array($ref->getName(), array($negClass, $posClass)) || $ref->isSubclassOf($negClass) || $ref->isSubclassOf($posClass))) { 174 throw new Twig_Error_Syntax(sprintf('Unexpected unary operator "%s"', $token->getValue()), $token->getLine(), $this->parser->getFilename()); 175 } 176 177 $this->parser->getStream()->next(); 178 $expr = $this->parsePrimaryExpression(); 179 180 $node = new $class($expr, $token->getLine()); 166 181 break; 167 182 } … … 584 599 protected function checkConstantExpression(Twig_NodeInterface $node) 585 600 { 586 if (!($node instanceof Twig_Node_Expression_Constant || $node instanceof Twig_Node_Expression_Array)) { 601 if (!($node instanceof Twig_Node_Expression_Constant || $node instanceof Twig_Node_Expression_Array 602 || $node instanceof Twig_Node_Expression_Unary_Neg || $node instanceof Twig_Node_Expression_Unary_Pos 603 )) { 587 604 return false; 588 605 } -
adentify/trunk/vendor/twig/twig/lib/Twig/Extension/Core.php
r1051693 r1069180 709 709 710 710 if ($start >= 0 && $length >= 0) { 711 return iterator_to_array(new LimitIterator($item, $start, $length === null ? -1 : $length), $preserveKeys); 711 try { 712 return iterator_to_array(new LimitIterator($item, $start, $length === null ? -1 : $length), $preserveKeys); 713 } catch (OutOfBoundsException $exception) { 714 return array(); 715 } 712 716 } 713 717 … … 931 935 { 932 936 if (is_array($compare)) { 933 return in_array($value, $compare, is_object($value)); 934 } elseif (is_string($compare)) { 935 if (!strlen($value)) { 936 return empty($compare); 937 } 938 939 return false !== strpos($compare, (string) $value); 937 return in_array($value, $compare, is_object($value) || is_resource($value)); 938 } elseif (is_string($compare) && (is_string($value) || is_int($value) || is_float($value))) { 939 return '' === $value || false !== strpos($compare, (string) $value); 940 940 } elseif ($compare instanceof Traversable) { 941 return in_array($value, iterator_to_array($compare, false), is_object($value) );941 return in_array($value, iterator_to_array($compare, false), is_object($value) || is_resource($value)); 942 942 } 943 943 -
adentify/trunk/vendor/twig/twig/lib/Twig/Extension/Escaper.php
r1051693 r1069180 65 65 } 66 66 67 if ('filename' === $defaultStrategy) { 68 $defaultStrategy = array('Twig_FileExtensionEscapingStrategy', 'guess'); 69 } 70 67 71 $this->defaultStrategy = $defaultStrategy; 68 72 } -
adentify/trunk/vendor/twig/twig/lib/Twig/Node/Expression/Call.php
r1051693 r1069180 139 139 140 140 $arguments = array(); 141 $names = array(); 141 142 $pos = 0; 142 143 foreach ($definition as $param) { 143 $name = $this->normalizeName($param->name);144 $names[] = $name = $this->normalizeName($param->name); 144 145 145 146 if (array_key_exists($name, $parameters)) { … … 164 165 165 166 if (!empty($parameters)) { 166 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'))); 167 throw new Twig_Error_Syntax(sprintf( 168 'Unknown argument%s "%s" for %s "%s(%s)".', 169 count($parameters) > 1 ? 's' : '', implode('", "', array_keys($parameters)), $this->getAttribute('type'), $this->getAttribute('name'), implode(', ', $names) 170 )); 167 171 } 168 172 -
adentify/trunk/vendor/twig/twig/lib/Twig/Node/Expression/Unary.php
r1051693 r1069180 19 19 public function compile(Twig_Compiler $compiler) 20 20 { 21 $compiler->raw(' (');21 $compiler->raw(' '); 22 22 $this->operator($compiler); 23 $compiler 24 ->subcompile($this->getNode('node')) 25 ->raw(')') 26 ; 23 $compiler->subcompile($this->getNode('node')); 27 24 } 28 25 -
adentify/trunk/vendor/twig/twig/lib/Twig/Node/Module.php
r1051693 r1069180 78 78 protected function compileGetParent(Twig_Compiler $compiler) 79 79 { 80 if (null === $ this->getNode('parent')) {80 if (null === $parent = $this->getNode('parent')) { 81 81 return; 82 82 } … … 85 85 ->write("protected function doGetParent(array \$context)\n", "{\n") 86 86 ->indent() 87 ->addDebugInfo($parent) 87 88 ->write("return ") 88 89 ; 89 90 90 if ($ this->getNode('parent')instanceof Twig_Node_Expression_Constant) {91 if ($parent instanceof Twig_Node_Expression_Constant) { 91 92 $compiler->subcompile($this->getNode('parent')); 92 93 } else { … … 109 110 $compiler->subcompile($this->getNode('body')); 110 111 111 if (null !== $this->getNode('parent')) { 112 if ($this->getNode('parent') instanceof Twig_Node_Expression_Constant) { 112 if (null !== $parent = $this->getNode('parent')) { 113 $compiler->addDebugInfo($parent); 114 if ($parent instanceof Twig_Node_Expression_Constant) { 113 115 $compiler->write("\$this->parent"); 114 116 } else { … … 141 143 142 144 // parent 143 if (null === $ this->getNode('parent')) {145 if (null === $parent = $this->getNode('parent')) { 144 146 $compiler->write("\$this->parent = false;\n\n"); 145 } elseif ($this->getNode('parent') instanceof Twig_Node_Expression_Constant) { 146 $compiler 147 } elseif ($parent instanceof Twig_Node_Expression_Constant) { 148 $compiler 149 ->addDebugInfo($parent) 150 ->write("try {\n") 151 ->indent() 147 152 ->write("\$this->parent = \$this->env->loadTemplate(") 148 153 ->subcompile($this->getNode('parent')) 149 ->raw(");\n\n") 154 ->raw(");\n") 155 ->outdent() 156 ->write("} catch (Twig_Error_Loader \$e) {\n") 157 ->indent() 158 ->write("\$e->setTemplateFile(\$this->getTemplateName());\n") 159 ->write(sprintf("\$e->setTemplateLine(%d);\n\n", $parent->getLine())) 160 ->write("throw \$e;\n") 161 ->outdent() 162 ->write("}\n\n") 150 163 ; 151 164 } … … 250 263 ->write(");\n") 251 264 ->outdent() 252 ->write("}\n\n") ;265 ->write("}\n\n") 253 266 ; 254 267 } -
adentify/trunk/vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php
r1051693 r1069180 206 206 } 207 207 208 // include function without the with_context=false parameter 209 elseif ($node instanceof Twig_Node_Expression_Function 210 && 'include' === $node->getAttribute('name') 211 && (!$node->getNode('arguments')->hasNode('with_context') 212 || false !== $node->getNode('arguments')->getNode('with_context')->getAttribute('value') 213 ) 214 ) { 215 $this->addLoopToAll(); 216 } 217 208 218 // the loop variable is referenced via an attribute 209 219 elseif ($node instanceof Twig_Node_Expression_GetAttr -
adentify/trunk/vendor/twig/twig/lib/Twig/Template.php
r1051693 r1069180 21 21 22 22 protected $parent; 23 protected $parents ;23 protected $parents = array(); 24 24 protected $env; 25 25 protected $blocks; … … 67 67 } 68 68 69 $parent = $this->doGetParent($context); 70 if (false === $parent) { 71 return false; 72 } elseif ($parent instanceof Twig_Template) { 73 $name = $parent->getTemplateName(); 74 $this->parents[$name] = $parent; 75 $parent = $name; 76 } elseif (!isset($this->parents[$parent])) { 77 $this->parents[$parent] = $this->env->loadTemplate($parent); 69 try { 70 $parent = $this->doGetParent($context); 71 72 if (false === $parent) { 73 return false; 74 } 75 76 if ($parent instanceof Twig_Template) { 77 return $this->parents[$parent->getTemplateName()] = $parent; 78 } 79 80 if (!isset($this->parents[$parent])) { 81 $this->parents[$parent] = $this->env->loadTemplate($parent); 82 } 83 } catch (Twig_Error_Loader $e) { 84 $e->setTemplateFile(null); 85 $e->guess(); 86 87 throw $e; 78 88 } 79 89
Note: See TracChangeset
for help on using the changeset viewer.