Plugin Directory

Changeset 1069180


Ignore:
Timestamp:
01/16/2015 09:07:27 AM (11 years ago)
Author:
AdEntify
Message:

fix languages and update vendors

Location:
adentify/trunk
Files:
32 edited

Legend:

Unmodified
Added
Removed
  • adentify/trunk/adentify.php

    r1062077 r1069180  
    7272bind_textdomain_codeset('adentify', 'UTF-8');
    7373
     74load_plugin_textdomain('adentify', ADENTIFY__PLUGIN_DIR, 'languages');
     75
    7476// Choose domain
    7577textdomain("adentify");
  • adentify/trunk/composer.json

    r1051693 r1069180  
    22    "require": {
    33        "guzzlehttp/guzzle": "~4.0",
    4         "twig/twig": "1.*"
     4        "twig/twig": "1.*",
     5        "twig/extensions": "~1.2"
    56   }
    67}
  • adentify/trunk/composer.lock

    r1051693 r1069180  
    55        "This file is @generated automatically"
    66    ],
    7     "hash": "0ec612e88f1cbd7560099f458be96318",
     7    "hash": "7eaaf9d005ec21e2036272768fb10508",
    88    "packages": [
    99        {
     
    126126        },
    127127        {
     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        {
    128180            "name": "twig/twig",
    129             "version": "v1.16.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",
    139191                "shasum": ""
    140192            },
     
    145197            "extra": {
    146198                "branch-alias": {
    147                     "dev-master": "1.16-dev"
     199                    "dev-master": "1.17-dev"
    148200                }
    149201            },
     
    171223                {
    172224                    "name": "Twig Team",
    173                     "homepage": "https://github.com/fabpot/Twig/graphs/contributors",
     225                    "homepage": "http://twig.sensiolabs.org/contributors",
    174226                    "role": "Contributors"
    175227                }
     
    180232                "templating"
    181233            ],
    182             "time": "2014-10-17 12:53:44"
     234            "time": "2015-01-14 10:15:49"
    183235        }
    184236    ],
     
    188240    "stability-flags": [],
    189241    "prefer-stable": false,
     242    "prefer-lowest": false,
    190243    "platform": [],
    191244    "platform-dev": []
  • adentify/trunk/css/adentify.admin.css

    r1051693 r1069180  
    77.ad-media-frame-content .photo-overlay .tag {
    88    position: absolute;
     9    width: 30px;
     10    height: 30px;
    911}
    1012
  • adentify/trunk/readme.txt

    r1062077 r1069180  
    55Requires at least: 3.0.1
    66Tested up to: 3.4
    7 Stable tag: 1.0.1
     7Stable tag: 1.0.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5757= 1.0.1 =
    5858* 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  
    55require_once __DIR__ . '/composer' . '/autoload_real.php';
    66
    7 return ComposerAutoloaderInit48bcd35fe6c277d310482b681b4bd422::getLoader();
     7return ComposerAutoloaderInite491e20965111888db47f8663238b757::getLoader();
  • adentify/trunk/vendor/composer/ClassLoader.php

    r1051693 r1069180  
    5757    public function getPrefixes()
    5858    {
    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();
    6064    }
    6165
  • adentify/trunk/vendor/composer/autoload_namespaces.php

    r1051693 r1069180  
    77
    88return array(
     9    'Twig_Extensions_' => array($vendorDir . '/twig/extensions/lib'),
    910    'Twig_' => array($vendorDir . '/twig/twig/lib'),
    1011);
  • adentify/trunk/vendor/composer/autoload_real.php

    r1051693 r1069180  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit48bcd35fe6c277d310482b681b4bd422
     5class ComposerAutoloaderInite491e20965111888db47f8663238b757
    66{
    77    private static $loader;
     
    2020        }
    2121
    22         spl_autoload_register(array('ComposerAutoloaderInit48bcd35fe6c277d310482b681b4bd422', 'loadClassLoader'), true, true);
     22        spl_autoload_register(array('ComposerAutoloaderInite491e20965111888db47f8663238b757', 'loadClassLoader'), true, true);
    2323        self::$loader = $loader = new \Composer\Autoload\ClassLoader();
    24         spl_autoload_unregister(array('ComposerAutoloaderInit48bcd35fe6c277d310482b681b4bd422', 'loadClassLoader'));
     24        spl_autoload_unregister(array('ComposerAutoloaderInite491e20965111888db47f8663238b757', 'loadClassLoader'));
    2525
    2626        $map = require __DIR__ . '/autoload_namespaces.php';
     
    4343        $includeFiles = require __DIR__ . '/autoload_files.php';
    4444        foreach ($includeFiles as $file) {
    45             composerRequire48bcd35fe6c277d310482b681b4bd422($file);
     45            composerRequiree491e20965111888db47f8663238b757($file);
    4646        }
    4747
     
    5050}
    5151
    52 function composerRequire48bcd35fe6c277d310482b681b4bd422($file)
     52function composerRequiree491e20965111888db47f8663238b757($file)
    5353{
    5454    require $file;
  • adentify/trunk/vendor/composer/installed.json

    r1051693 r1069180  
    124124    {
    125125        "name": "twig/twig",
    126         "version": "v1.16.2",
    127         "version_normalized": "1.16.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",
    137137            "shasum": ""
    138138        },
     
    140140            "php": ">=5.2.4"
    141141        },
    142         "time": "2014-10-17 12:53:44",
    143         "type": "library",
    144         "extra": {
    145             "branch-alias": {
    146                 "dev-master": "1.16-dev"
     142        "time": "2015-01-14 10:15:49",
     143        "type": "library",
     144        "extra": {
     145            "branch-alias": {
     146                "dev-master": "1.17-dev"
    147147            }
    148148        },
     
    171171            {
    172172                "name": "Twig Team",
    173                 "homepage": "https://github.com/fabpot/Twig/graphs/contributors",
     173                "homepage": "http://twig.sensiolabs.org/contributors",
    174174                "role": "Contributors"
    175175            }
     
    180180            "templating"
    181181        ]
     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        ]
    182236    }
    183237]
  • 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
    112* 1.16.2 (2014-10-17)
    213
  • adentify/trunk/vendor/twig/twig/composer.json

    r1051693 r1069180  
    1515        {
    1616            "name": "Twig Team",
    17             "homepage": "https://github.com/fabpot/Twig/graphs/contributors",
     17            "homepage": "http://twig.sensiolabs.org/contributors",
    1818            "role": "Contributors"
    1919        },
     
    3737    "extra": {
    3838        "branch-alias": {
    39             "dev-master": "1.16-dev"
     39            "dev-master": "1.17-dev"
    4040        }
    4141    }
  • adentify/trunk/vendor/twig/twig/doc/advanced.rst

    r1051693 r1069180  
    504504
    505505    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.
    507507
    508508An extension is a class that implements the following interface::
     
    831831.. _`spl_autoload_register()`: http://www.php.net/spl_autoload_register
    832832.. _`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/Fixtures
    834 .. _`tests/Twig/Node`:         https://github.com/fabpot/Twig/tree/master/test/Twig/Tests/Node
     833.. _`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  
    530530
    531531    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.
    533533
    534534An extension is a class that implements the following interface::
     
    884884.. _`spl_autoload_register()`: http://www.php.net/spl_autoload_register
    885885.. _`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/Fixtures
    887 .. _`tests/Twig/Node`:         https://github.com/fabpot/Twig/tree/master/test/Twig/Tests/Node
     886.. _`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  
    9595  exception instead (default to ``false``).
    9696
    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
    102105  return the escaping strategy to use -- the callback cannot be a function name
    103106  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.
    104110
    105111* ``optimizations``: A flag that indicates which optimizations to apply
  • adentify/trunk/vendor/twig/twig/doc/filters/index.rst

    r1051693 r1069180  
    2121    length
    2222    lower
     23    merge
    2324    nl2br
    2425    number_format
    25     merge
    26     upper
    2726    raw
    2827    replace
     
    3534    title
    3635    trim
     36    upper
    3737    url_encode
  • adentify/trunk/vendor/twig/twig/doc/filters/slice.rst

    r1051693 r1069180  
    3333    {% endfor %}
    3434
    35     {{ '12345'[1:2] }}
     35    {{ '12345'[1:2] }} {# will display "23" #}
    3636
    3737    {# you can omit the first argument -- which is the same as 0 #}
  • adentify/trunk/vendor/twig/twig/doc/installation.rst

    r1051693 r1069180  
    2929.. code-block:: bash
    3030
    31     git clone git://github.com/fabpot/Twig.git
     31    git clone git://github.com/twigphp/Twig.git
    3232
    3333Installing the PEAR package
     
    108108``Twig_Template::getAttribute()`` method.
    109109
    110 .. _`download page`: https://github.com/fabpot/Twig/tags
    111 .. _`Composer`: https://getcomposer.org/download/
     110.. _`download page`:     https://github.com/twigphp/Twig/tags
     111.. _`Composer`:          https://getcomposer.org/download/
    112112.. _`PHP documentation`: https://wiki.php.net/internals/windows/stepbystepbuild
    113 .. _`Zend Server FAQ`: http://www.zend.com/en/products/server/faq#faqD6
     113.. _`Zend Server FAQ`:   http://www.zend.com/en/products/server/faq#faqD6
  • adentify/trunk/vendor/twig/twig/doc/intro.rst

    r1051693 r1069180  
    5151    require_once '/path/to/vendor/autoload.php';
    5252
    53     $loader = new Twig_Loader_Array(
     53    $loader = new Twig_Loader_Array(array(
    5454        'index' => 'Hello {{ name }}!',
    55     );
     55    ));
    5656    $twig = new Twig_Environment($loader);
    5757
  • adentify/trunk/vendor/twig/twig/doc/tags/if.rst

    r1051693 r1069180  
    3030    defined`` instead.
    3131
     32You 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
    3240For multiple branches ``elseif`` and ``else`` can be used like in PHP. You can use
    3341more complex ``expressions`` there too:
  • adentify/trunk/vendor/twig/twig/doc/tags/index.rst

    r1051693 r1069180  
    77    autoescape
    88    block
    9     filter
    109    do
    1110    embed
    1211    extends
     12    filter
    1313    flush
    1414    for
  • adentify/trunk/vendor/twig/twig/doc/templates.rst

    r1051693 r1069180  
    867867.. _`Twig plugin`:                https://github.com/pulse00/Twig-Eclipse-Plugin
    868868.. _`Twig language definition`:   https://github.com/gabrielcorpse/gedit-twig-template-language
    869 .. _`extension repository`:       http://github.com/fabpot/Twig-extensions
     869.. _`extension repository`:       http://github.com/twigphp/Twig-extensions
    870870.. _`Twig syntax mode`:           https://github.com/bobthecow/Twig-HTML.mode
    871871.. _`other Twig syntax mode`:     https://github.com/muxx/Twig-HTML.mode
  • adentify/trunk/vendor/twig/twig/ext/twig/php_twig.h

    r1051693 r1069180  
    1616#define PHP_TWIG_H
    1717
    18 #define PHP_TWIG_VERSION "1.16.2"
     18#define PHP_TWIG_VERSION "1.17.0"
    1919
    2020#include "php.h"
  • adentify/trunk/vendor/twig/twig/lib/Twig/Environment.php

    r1051693 r1069180  
    1717class Twig_Environment
    1818{
    19     const VERSION = '1.16.2';
     19    const VERSION = '1.17.0';
    2020
    2121    protected $charset;
     
    7373     *                  * true: equivalent to html
    7474     *                  * html, js: set the autoescaping to one of the supported strategies
     75     *                  * filename: set the autoescaping strategy based on the template filename extension
    7576     *                  * PHP callback: a PHP callback that returns an escaping strategy based on the template "filename"
    7677     *
     
    224225    }
    225226
    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 cache
    231       */
     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     */
    232233    public function setCache($cache)
    233234    {
     
    354355     *
    355356     * @param string    $name The template name
    356      * @param timestamp $time The last modification time of the cached template
     357     * @param int      $time The last modification time of the cached template
    357358     *
    358359     * @return bool    true if the template is fresh, false otherwise
     
    12331234        $dir = dirname($file);
    12341235        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                }
    12371241            }
    12381242        } elseif (!is_writable($dir)) {
  • adentify/trunk/vendor/twig/twig/lib/Twig/ExpressionParser.php

    r1051693 r1069180  
    164164                    $this->parser->getStream()->next();
    165165                    $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());
    166181                    break;
    167182                }
     
    584599    protected function checkConstantExpression(Twig_NodeInterface $node)
    585600    {
    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        )) {
    587604            return false;
    588605        }
  • adentify/trunk/vendor/twig/twig/lib/Twig/Extension/Core.php

    r1051693 r1069180  
    709709
    710710        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            }
    712716        }
    713717
     
    931935{
    932936    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);
    940940    } 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));
    942942    }
    943943
  • adentify/trunk/vendor/twig/twig/lib/Twig/Extension/Escaper.php

    r1051693 r1069180  
    6565        }
    6666
     67        if ('filename' === $defaultStrategy) {
     68            $defaultStrategy = array('Twig_FileExtensionEscapingStrategy', 'guess');
     69        }
     70
    6771        $this->defaultStrategy = $defaultStrategy;
    6872    }
  • adentify/trunk/vendor/twig/twig/lib/Twig/Node/Expression/Call.php

    r1051693 r1069180  
    139139
    140140        $arguments = array();
     141        $names = array();
    141142        $pos = 0;
    142143        foreach ($definition as $param) {
    143             $name = $this->normalizeName($param->name);
     144            $names[] = $name = $this->normalizeName($param->name);
    144145
    145146            if (array_key_exists($name, $parameters)) {
     
    164165
    165166        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            ));
    167171        }
    168172
  • adentify/trunk/vendor/twig/twig/lib/Twig/Node/Expression/Unary.php

    r1051693 r1069180  
    1919    public function compile(Twig_Compiler $compiler)
    2020    {
    21         $compiler->raw('(');
     21        $compiler->raw(' ');
    2222        $this->operator($compiler);
    23         $compiler
    24             ->subcompile($this->getNode('node'))
    25             ->raw(')')
    26         ;
     23        $compiler->subcompile($this->getNode('node'));
    2724    }
    2825
  • adentify/trunk/vendor/twig/twig/lib/Twig/Node/Module.php

    r1051693 r1069180  
    7878    protected function compileGetParent(Twig_Compiler $compiler)
    7979    {
    80         if (null === $this->getNode('parent')) {
     80        if (null === $parent = $this->getNode('parent')) {
    8181            return;
    8282        }
     
    8585            ->write("protected function doGetParent(array \$context)\n", "{\n")
    8686            ->indent()
     87            ->addDebugInfo($parent)
    8788            ->write("return ")
    8889        ;
    8990
    90         if ($this->getNode('parent') instanceof Twig_Node_Expression_Constant) {
     91        if ($parent instanceof Twig_Node_Expression_Constant) {
    9192            $compiler->subcompile($this->getNode('parent'));
    9293        } else {
     
    109110        $compiler->subcompile($this->getNode('body'));
    110111
    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) {
    113115                $compiler->write("\$this->parent");
    114116            } else {
     
    141143
    142144        // parent
    143         if (null === $this->getNode('parent')) {
     145        if (null === $parent = $this->getNode('parent')) {
    144146            $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()
    147152                ->write("\$this->parent = \$this->env->loadTemplate(")
    148153                ->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")
    150163            ;
    151164        }
     
    250263            ->write(");\n")
    251264            ->outdent()
    252             ->write("}\n\n");
     265            ->write("}\n\n")
    253266        ;
    254267    }
  • adentify/trunk/vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php

    r1051693 r1069180  
    206206        }
    207207
     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
    208218        // the loop variable is referenced via an attribute
    209219        elseif ($node instanceof Twig_Node_Expression_GetAttr
  • adentify/trunk/vendor/twig/twig/lib/Twig/Template.php

    r1051693 r1069180  
    2121
    2222    protected $parent;
    23     protected $parents;
     23    protected $parents = array();
    2424    protected $env;
    2525    protected $blocks;
     
    6767        }
    6868
    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;
    7888        }
    7989
Note: See TracChangeset for help on using the changeset viewer.