Przeglądaj źródła

post-to-post update 1.7

tags/0.9.1^2
Alej 4 lat temu
rodzic
commit
9f1ef2f8b3
46 zmienionych plików z 394 dodań i 318 usunięć
  1. 11
    2
      plugins/posts-to-posts/composer.json
  2. 2
    2
      plugins/posts-to-posts/posts-to-posts.php
  3. 10
    7
      plugins/posts-to-posts/readme.txt
  4. 0
    26
      plugins/posts-to-posts/vendor/mustache/mustache/.php_cs
  5. 0
    13
      plugins/posts-to-posts/vendor/mustache/mustache/.styleci.yml
  6. 0
    19
      plugins/posts-to-posts/vendor/mustache/mustache/.travis.yml
  7. 0
    35
      plugins/posts-to-posts/vendor/mustache/mustache/CONTRIBUTING.md
  8. 6
    4
      plugins/posts-to-posts/vendor/mustache/mustache/README.md
  9. 2
    2
      plugins/posts-to-posts/vendor/mustache/mustache/composer.json
  10. 0
    17
      plugins/posts-to-posts/vendor/mustache/mustache/phpunit.xml.dist
  11. 16
    2
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Autoloader.php
  12. 8
    1
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Cache.php
  13. 2
    2
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Cache/AbstractCache.php
  14. 9
    3
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Cache/FilesystemCache.php
  15. 1
    1
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Cache/NoopCache.php
  16. 45
    37
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Compiler.php
  17. 3
    3
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Context.php
  18. 63
    21
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Engine.php
  19. 1
    1
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Exception.php
  20. 1
    1
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Exception/InvalidArgumentException.php
  21. 1
    1
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Exception/LogicException.php
  22. 1
    1
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Exception/RuntimeException.php
  23. 10
    5
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Exception/SyntaxException.php
  24. 10
    4
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Exception/UnknownFilterException.php
  25. 10
    4
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Exception/UnknownHelperException.php
  26. 10
    4
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Exception/UnknownTemplateException.php
  27. 3
    3
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/HelperCollection.php
  28. 33
    6
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/LambdaHelper.php
  29. 3
    3
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Loader.php
  30. 2
    2
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Loader/ArrayLoader.php
  31. 2
    2
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Loader/CascadingLoader.php
  32. 17
    6
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Loader/FilesystemLoader.php
  33. 3
    3
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Loader/InlineLoader.php
  34. 1
    1
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Loader/MutableLoader.php
  35. 1
    1
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Loader/StringLoader.php
  36. 1
    1
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Logger.php
  37. 1
    1
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Logger/AbstractLogger.php
  38. 7
    7
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Logger/StreamLogger.php
  39. 8
    8
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Parser.php
  40. 3
    4
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Template.php
  41. 71
    46
      plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Tokenizer.php
  42. 7
    1
      plugins/posts-to-posts/vendor/scribu/lib-posts-to-posts/composer.json
  43. 1
    1
      plugins/posts-to-posts/vendor/scribu/lib-posts-to-posts/side-post.php
  44. 3
    3
      plugins/posts-to-posts/vendor/scribu/scb-framework/AdminPage.php
  45. 4
    0
      plugins/posts-to-posts/vendor/scribu/scb-framework/Forms.php
  46. 1
    1
      plugins/posts-to-posts/vendor/scribu/scb-framework/load.php

+ 11
- 2
plugins/posts-to-posts/composer.json Wyświetl plik

4
     "homepage": "http://wordpress.org/plugins/posts-to-posts",
4
     "homepage": "http://wordpress.org/plugins/posts-to-posts",
5
     "license": "GPL-2.0+",
5
     "license": "GPL-2.0+",
6
     "minimum-stability": "dev",
6
     "minimum-stability": "dev",
7
+    "scripts": {
8
+        "zip": "git archive --format zip --output \"../../posts-to-posts.zip\" master"
9
+    },
7
     "require": {
10
     "require": {
8
         "composer/installers": "~1.0",
11
         "composer/installers": "~1.0",
12
+        "scribu/lib-posts-to-posts": "dev-master",
13
+        "mustache/mustache": "~2.6"
9
     },
14
     },
10
     "repositories": [
15
     "repositories": [
11
         {
16
         {
12
             "type": "vcs",
17
             "type": "vcs",
13
-            "url": "https://github.com/scribu/wp-lib-posts-to-posts"
18
+            "url": "https://github.com/jeffreyvr/wp-lib-posts-to-posts"
19
+        },
20
+        {
21
+            "type": "vcs",
22
+            "url": "https://github.com/jeffreyvr/wp-scb-framework"
14
         }
23
         }
15
     ]
24
     ]
16
-}
25
+}

+ 2
- 2
plugins/posts-to-posts/posts-to-posts.php Wyświetl plik

2
 /*
2
 /*
3
 Plugin Name: Posts 2 Posts
3
 Plugin Name: Posts 2 Posts
4
 Description: Create many-to-many relationships between all types of posts.
4
 Description: Create many-to-many relationships between all types of posts.
5
-Version: 1.6.6
5
+Version: 1.7
6
 Author: scribu
6
 Author: scribu
7
 Author URI: http://scribu.net/
7
 Author URI: http://scribu.net/
8
 Plugin URI: http://scribu.net/wordpress/posts-to-posts
8
 Plugin URI: http://scribu.net/wordpress/posts-to-posts
10
 Domain Path: /lang
10
 Domain Path: /lang
11
 */
11
 */
12
 
12
 
13
-define( 'P2P_PLUGIN_VERSION', '1.6.6' );
13
+define( 'P2P_PLUGIN_VERSION', '1.7' );
14
 
14
 
15
 define( 'P2P_TEXTDOMAIN', 'posts-to-posts' );
15
 define( 'P2P_TEXTDOMAIN', 'posts-to-posts' );
16
 
16
 

+ 10
- 7
plugins/posts-to-posts/readme.txt Wyświetl plik

1
 === Posts 2 Posts ===
1
 === Posts 2 Posts ===
2
 
2
 
3
 Contributors: scribu, ciobi, ayecode, stiofansisland
3
 Contributors: scribu, ciobi, ayecode, stiofansisland
4
-Tags: connections, custom post types, relationships, many-to-many, users  
5
-Requires at least: 3.9  
4
+Tags: connections, custom post types, relationships, many-to-many, users
5
+Requires at least: 4.5
6
 Requires PHP: 5.6
6
 Requires PHP: 5.6
7
-Tested up to: 5.4
8
-Stable tag: 1.6.6
7
+Tested up to: 5.9
8
+Stable tag: 1.7
9
 
9
 
10
-License: GPLv2 or later  
11
-License URI: http://www.gnu.org/licenses/gpl-2.0.html  
10
+License: GPLv2 or later
11
+License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
12
 
13
 Efficient many-to-many connections between posts, pages, custom post types, users.
13
 Efficient many-to-many connections between posts, pages, custom post types, users.
14
 
14
 
42
 See [Installing Plugins](http://codex.wordpress.org/Managing_Plugins#Installing_Plugins).
42
 See [Installing Plugins](http://codex.wordpress.org/Managing_Plugins#Installing_Plugins).
43
 
43
 
44
 After activating it, refer to the [Basic usage](https://github.com/scribu/wp-posts-to-posts/wiki/Basic-usage) tutorial.
44
 After activating it, refer to the [Basic usage](https://github.com/scribu/wp-posts-to-posts/wiki/Basic-usage) tutorial.
45
- 
45
+
46
 Additional info can be found on the [wiki](http://github.com/scribu/wp-posts-to-posts/wiki).
46
 Additional info can be found on the [wiki](http://github.com/scribu/wp-posts-to-posts/wiki).
47
 
47
 
48
 == Frequently Asked Questions ==
48
 == Frequently Asked Questions ==
61
 
61
 
62
 == Changelog ==
62
 == Changelog ==
63
 
63
 
64
+= 1.7 =
65
+* Update Mustache package to support PHP 8.
66
+
64
 = 1.6.6 =
67
 = 1.6.6 =
65
 * AyeCode Ltd have committed to security and maintenance updates - INFO
68
 * AyeCode Ltd have committed to security and maintenance updates - INFO
66
 * Deprecated PHP notices showing with latest WordPress - FIXED
69
 * Deprecated PHP notices showing with latest WordPress - FIXED

+ 0
- 26
plugins/posts-to-posts/vendor/mustache/mustache/.php_cs Wyświetl plik

1
-<?php
2
-
3
-use Symfony\CS\Config\Config;
4
-use Symfony\CS\FixerInterface;
5
-
6
-$config = Config::create()
7
-    // use symfony level and extra fixers:
8
-    ->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
9
-    ->fixers(array(
10
-        '-concat_without_spaces',
11
-        '-pre_increment',
12
-        '-unalign_double_arrow',
13
-        '-unalign_equals',
14
-        'align_double_arrow',
15
-        'concat_with_spaces',
16
-        'ordered_use',
17
-        'strict',
18
-    ))
19
-    ->setUsingLinter(false);
20
-
21
-$finder = $config->getFinder()
22
-    ->in('bin')
23
-    ->in('src')
24
-    ->in('test');
25
-
26
-return $config;

+ 0
- 13
plugins/posts-to-posts/vendor/mustache/mustache/.styleci.yml Wyświetl plik

1
-preset: symfony
2
-
3
-enabled:
4
-  - align_double_arrow
5
-  - concat_with_spaces
6
-  - ordered_use
7
-  - strict
8
-
9
-disabled:
10
-  - concat_without_spaces
11
-  - pre_increment
12
-  - unalign_double_arrow
13
-  - unalign_equals

+ 0
- 19
plugins/posts-to-posts/vendor/mustache/mustache/.travis.yml Wyświetl plik

1
-language: php
2
-
3
-install:
4
-  - curl http://get.sensiolabs.org/php-cs-fixer.phar -o php-cs-fixer.phar
5
-
6
-script:
7
-  - phpunit
8
-  - if [[ `php -r "echo version_compare(PHP_VERSION, '5.3.6', '>=') && !defined('HHVM_VERSION');"` ]]; then php php-cs-fixer.phar --diff --dry-run -vv fix; fi
9
-
10
-php:
11
-  - 5.2
12
-  - 5.3
13
-  - 5.4
14
-  - 5.5
15
-  - 5.6
16
-  - 7.0
17
-  - hhvm
18
-
19
-sudo: false

+ 0
- 35
plugins/posts-to-posts/vendor/mustache/mustache/CONTRIBUTING.md Wyświetl plik

1
-# Contributions welcome!
2
-
3
-
4
-### Here's a quick guide:
5
-
6
- 1. [Fork the repo on GitHub](https://github.com/bobthecow/mustache.php).
7
-
8
- 2. Update submodules: `git submodule update --init`
9
-
10
- 3. Run the test suite. We only take pull requests with passing tests, and it's great to know that you have a clean slate. Make sure you have PHPUnit 3.5+, then run `phpunit` from the project directory.
11
-
12
- 4. Add tests for your change. Only refactoring and documentation changes require no new tests. If you are adding functionality or fixing a bug, add a test!
13
-
14
- 5. Make the tests pass.
15
-
16
- 6. Push your fork to GitHub and submit a pull request against the `dev` branch.
17
-
18
-
19
-### You can do some things to increase the chance that your pull request is accepted the first time:
20
-
21
- * Submit one pull request per fix or feature.
22
- * To help with that, do all your work in a feature branch (e.g. `feature/my-alsome-feature`).
23
- * Follow the conventions you see used in the project.
24
- * Use `phpcs --standard=PSR2` to check your changes against the coding standard.
25
- * Write tests that fail without your code, and pass with it.
26
- * Don't bump version numbers. Those will be updated — per [semver](http://semver.org) — once your change is merged into `master`.
27
- * Update any documentation: docblocks, README, examples, etc.
28
- * ... Don't update the wiki until your change is merged and released, but make a note in your pull request so we don't forget.
29
-
30
-
31
-### Mustache.php follows the PSR-* coding standards:
32
-
33
- * [PSR-0: Class and file naming conventions](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md)
34
- * [PSR-1: Basic coding standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md)
35
- * [PSR-2: Coding style guide](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)

+ 6
- 4
plugins/posts-to-posts/vendor/mustache/mustache/README.md Wyświetl plik

1
 Mustache.php
1
 Mustache.php
2
 ============
2
 ============
3
 
3
 
4
-A [Mustache](http://mustache.github.com/) implementation in PHP.
4
+A [Mustache](https://mustache.github.io/) implementation in PHP.
5
 
5
 
6
 [![Package version](http://img.shields.io/packagist/v/mustache/mustache.svg?style=flat-square)](https://packagist.org/packages/mustache/mustache)
6
 [![Package version](http://img.shields.io/packagist/v/mustache/mustache.svg?style=flat-square)](https://packagist.org/packages/mustache/mustache)
7
 [![Build status](http://img.shields.io/travis/bobthecow/mustache.php/dev.svg?style=flat-square)](http://travis-ci.org/bobthecow/mustache.php)
7
 [![Build status](http://img.shields.io/travis/bobthecow/mustache.php/dev.svg?style=flat-square)](http://travis-ci.org/bobthecow/mustache.php)
8
+[![StyleCI](https://styleci.io/repos/569670/shield)](https://styleci.io/repos/569670)
8
 [![Monthly downloads](http://img.shields.io/packagist/dm/mustache/mustache.svg?style=flat-square)](https://packagist.org/packages/mustache/mustache)
9
 [![Monthly downloads](http://img.shields.io/packagist/dm/mustache/mustache.svg?style=flat-square)](https://packagist.org/packages/mustache/mustache)
9
 
10
 
10
 
11
 
15
 
16
 
16
 ```php
17
 ```php
17
 <?php
18
 <?php
18
-$m = new Mustache_Engine;
19
+$m = new Mustache_Engine(array('entity_flags' => ENT_QUOTES));
19
 echo $m->render('Hello {{planet}}', array('planet' => 'World!')); // "Hello World!"
20
 echo $m->render('Hello {{planet}}', array('planet' => 'World!')); // "Hello World!"
20
 ```
21
 ```
21
 
22
 
52
 
53
 
53
 ```php
54
 ```php
54
 <?php
55
 <?php
55
-$m = new Mustache_Engine;
56
+$m = new Mustache_Engine(array('entity_flags' => ENT_QUOTES));
56
 $chris = new Chris;
57
 $chris = new Chris;
57
 echo $m->render($template, $chris);
58
 echo $m->render($template, $chris);
58
 ```
59
 ```
59
 
60
 
61
+*Note:* we recommend using `ENT_QUOTES` as a default of [entity_flags](https://github.com/bobthecow/mustache.php/wiki#entity_flags) to decrease the chance of Cross-site scripting vulnerability.
60
 
62
 
61
 And That's Not All!
63
 And That's Not All!
62
 -------------------
64
 -------------------
67
 See Also
69
 See Also
68
 --------
70
 --------
69
 
71
 
72
+ * [mustache(5)](http://mustache.github.io/mustache.5.html) man page.
70
  * [Readme for the Ruby Mustache implementation](http://github.com/defunkt/mustache/blob/master/README.md).
73
  * [Readme for the Ruby Mustache implementation](http://github.com/defunkt/mustache/blob/master/README.md).
71
- * [mustache(5)](http://mustache.github.com/mustache.5.html) man page.

+ 2
- 2
plugins/posts-to-posts/vendor/mustache/mustache/composer.json Wyświetl plik

16
         "php": ">=5.2.4"
16
         "php": ">=5.2.4"
17
     },
17
     },
18
     "require-dev": {
18
     "require-dev": {
19
-        "phpunit/phpunit": "~3.7|~4.0",
20
-        "fabpot/php-cs-fixer": "~1.6"
19
+        "phpunit/phpunit": "~3.7|~4.0|~5.0",
20
+        "friendsofphp/php-cs-fixer": "~1.11"
21
     },
21
     },
22
     "autoload": {
22
     "autoload": {
23
         "psr-0": { "Mustache": "src/" }
23
         "psr-0": { "Mustache": "src/" }

+ 0
- 17
plugins/posts-to-posts/vendor/mustache/mustache/phpunit.xml.dist Wyświetl plik

1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<phpunit backupGlobals="false" colors="true" bootstrap="./test/bootstrap.php">
3
-	<testsuite name="Mustache">
4
-		<directory suffix="Test.php">./test</directory>
5
-		<exclude>./test/Mustache/Test/FiveThree</exclude>
6
-	</testsuite>
7
-
8
-	<testsuite name="Mustache FiveThree">
9
-		<directory suffix="Test.php" phpVersion="5.3.0" phpVersionOperator=">=">./test/Mustache/Test/FiveThree</directory>
10
-	</testsuite>
11
-
12
-	<filter>
13
-		<whitelist>
14
-			<directory suffix=".php">./src/Mustache</directory>
15
-		</whitelist>
16
-	</filter>
17
-</phpunit>

+ 16
- 2
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Autoloader.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.
16
 {
16
 {
17
     private $baseDir;
17
     private $baseDir;
18
 
18
 
19
+    /**
20
+     * An array where the key is the baseDir and the key is an instance of this
21
+     * class.
22
+     *
23
+     * @var array
24
+     */
25
+    private static $instances;
26
+
19
     /**
27
     /**
20
      * Autoloader constructor.
28
      * Autoloader constructor.
21
      *
29
      *
45
      */
53
      */
46
     public static function register($baseDir = null)
54
     public static function register($baseDir = null)
47
     {
55
     {
48
-        $loader = new self($baseDir);
56
+        $key = $baseDir ? $baseDir : 0;
57
+
58
+        if (!isset(self::$instances[$key])) {
59
+            self::$instances[$key] = new self($baseDir);
60
+        }
61
+
62
+        $loader = self::$instances[$key];
49
         spl_autoload_register(array($loader, 'autoload'));
63
         spl_autoload_register(array($loader, 'autoload'));
50
 
64
 
51
         return $loader;
65
         return $loader;

+ 8
- 1
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Cache.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.
33
      * @param string $value
33
      * @param string $value
34
      */
34
      */
35
     public function cache($key, $value);
35
     public function cache($key, $value);
36
+
37
+    /**
38
+     * Set a logger instance.
39
+     *
40
+     * @param Mustache_Logger|Psr\Log\LoggerInterface $logger
41
+     */
42
+    public function setLogger($logger = null);
36
 }
43
 }

+ 2
- 2
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Cache/AbstractCache.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.
47
     /**
47
     /**
48
      * Add a log record if logging is enabled.
48
      * Add a log record if logging is enabled.
49
      *
49
      *
50
-     * @param int    $level   The logging level
50
+     * @param string $level   The logging level
51
      * @param string $message The log message
51
      * @param string $message The log message
52
      * @param array  $context The log context
52
      * @param array  $context The log context
53
      */
53
      */

+ 9
- 3
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Cache/FilesystemCache.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.
27
     /**
27
     /**
28
      * Filesystem cache constructor.
28
      * Filesystem cache constructor.
29
      *
29
      *
30
-     * @param string $baseDir  Directory for compiled templates.
31
-     * @param int    $fileMode Override default permissions for cache files. Defaults to using the system-defined umask.
30
+     * @param string $baseDir  Directory for compiled templates
31
+     * @param int    $fileMode Override default permissions for cache files. Defaults to using the system-defined umask
32
      */
32
      */
33
     public function __construct($baseDir, $fileMode = null)
33
     public function __construct($baseDir, $fileMode = null)
34
     {
34
     {
108
             );
108
             );
109
 
109
 
110
             @mkdir($dirName, 0777, true);
110
             @mkdir($dirName, 0777, true);
111
+            // @codeCoverageIgnoreStart
111
             if (!is_dir($dirName)) {
112
             if (!is_dir($dirName)) {
112
                 throw new Mustache_Exception_RuntimeException(sprintf('Failed to create cache directory "%s".', $dirName));
113
                 throw new Mustache_Exception_RuntimeException(sprintf('Failed to create cache directory "%s".', $dirName));
113
             }
114
             }
115
+            // @codeCoverageIgnoreEnd
114
         }
116
         }
115
 
117
 
116
         return $dirName;
118
         return $dirName;
143
                 return;
145
                 return;
144
             }
146
             }
145
 
147
 
148
+            // @codeCoverageIgnoreStart
146
             $this->log(
149
             $this->log(
147
                 Mustache_Logger::ERROR,
150
                 Mustache_Logger::ERROR,
148
                 'Unable to rename Mustache temp cache file: "{tempName}" -> "{fileName}"',
151
                 'Unable to rename Mustache temp cache file: "{tempName}" -> "{fileName}"',
149
                 array('tempName' => $tempFile, 'fileName' => $fileName)
152
                 array('tempName' => $tempFile, 'fileName' => $fileName)
150
             );
153
             );
154
+            // @codeCoverageIgnoreEnd
151
         }
155
         }
152
 
156
 
157
+        // @codeCoverageIgnoreStart
153
         throw new Mustache_Exception_RuntimeException(sprintf('Failed to write cache file "%s".', $fileName));
158
         throw new Mustache_Exception_RuntimeException(sprintf('Failed to write cache file "%s".', $fileName));
159
+        // @codeCoverageIgnoreEnd
154
     }
160
     }
155
 }
161
 }

+ 1
- 1
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Cache/NoopCache.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.

+ 45
- 37
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Compiler.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.
75
     /**
75
     /**
76
      * Helper function for walking the Mustache token parse tree.
76
      * Helper function for walking the Mustache token parse tree.
77
      *
77
      *
78
-     * @throws Mustache_Exception_SyntaxException upon encountering unknown token types.
78
+     * @throws Mustache_Exception_SyntaxException upon encountering unknown token types
79
      *
79
      *
80
      * @param array $tree  Parse tree of Mustache tokens
80
      * @param array $tree  Parse tree of Mustache tokens
81
      * @param int   $level (default: 0)
81
      * @param int   $level (default: 0)
191
             {
191
             {
192
                 $this->lambdaHelper = new Mustache_LambdaHelper($this->mustache, $context);
192
                 $this->lambdaHelper = new Mustache_LambdaHelper($this->mustache, $context);
193
                 $buffer = \'\';
193
                 $buffer = \'\';
194
-                $newContext = array();
195
         %s
194
         %s
196
 
195
 
197
                 return $buffer;
196
                 return $buffer;
207
             public function renderInternal(Mustache_Context $context, $indent = \'\')
206
             public function renderInternal(Mustache_Context $context, $indent = \'\')
208
             {
207
             {
209
                 $buffer = \'\';
208
                 $buffer = \'\';
210
-                $newContext = array();
211
         %s
209
         %s
212
 
210
 
213
                 return $buffer;
211
                 return $buffer;
240
         $blockFunction = $context->findInBlock(%s);
238
         $blockFunction = $context->findInBlock(%s);
241
         if (is_callable($blockFunction)) {
239
         if (is_callable($blockFunction)) {
242
             $buffer .= call_user_func($blockFunction, $context);
240
             $buffer .= call_user_func($blockFunction, $context);
243
-        } else {%s
244
-        }
241
+        %s}
245
     ';
242
     ';
246
 
243
 
244
+    const BLOCK_VAR_ELSE = '} else {%s';
245
+
247
     /**
246
     /**
248
      * Generate Mustache Template inheritance block variable PHP source.
247
      * Generate Mustache Template inheritance block variable PHP source.
249
      *
248
      *
261
     {
260
     {
262
         $id = var_export($id, true);
261
         $id = var_export($id, true);
263
 
262
 
264
-        return sprintf($this->prepare(self::BLOCK_VAR, $level), $id, $this->walk($nodes, $level));
263
+        $else = $this->walk($nodes, $level);
264
+        if ($else !== '') {
265
+            $else = sprintf($this->prepare(self::BLOCK_VAR_ELSE, $level + 1, false, true), $else);
266
+        }
267
+
268
+        return sprintf($this->prepare(self::BLOCK_VAR, $level), $id, $else);
265
     }
269
     }
266
 
270
 
267
-    const BLOCK_ARG = '$newContext[%s] = array($this, \'block%s\');';
271
+    const BLOCK_ARG = '%s => array($this, \'block%s\'),';
268
 
272
 
269
     /**
273
     /**
270
      * Generate Mustache Template inheritance block argument PHP source.
274
      * Generate Mustache Template inheritance block argument PHP source.
282
     private function blockArg($nodes, $id, $start, $end, $otag, $ctag, $level)
286
     private function blockArg($nodes, $id, $start, $end, $otag, $ctag, $level)
283
     {
287
     {
284
         $key = $this->block($nodes);
288
         $key = $this->block($nodes);
285
-        $keystr = var_export($key, true);
286
         $id = var_export($id, true);
289
         $id = var_export($id, true);
287
 
290
 
288
-        return sprintf($this->prepare(self::BLOCK_ARG, 1), $id, $key);
291
+        return sprintf($this->prepare(self::BLOCK_ARG, $level), $id, $key);
289
     }
292
     }
290
 
293
 
291
     const BLOCK_FUNCTION = '
294
     const BLOCK_FUNCTION = '
317
     }
320
     }
318
 
321
 
319
     const SECTION_CALL = '
322
     const SECTION_CALL = '
320
-        // %s section
321
         $value = $context->%s(%s);%s
323
         $value = $context->%s(%s);%s
322
         $buffer .= $this->section%s($context, $indent, $value);
324
         $buffer .= $this->section%s($context, $indent, $value);
323
     ';
325
     ';
326
         private function section%s(Mustache_Context $context, $indent, $value)
328
         private function section%s(Mustache_Context $context, $indent, $value)
327
         {
329
         {
328
             $buffer = \'\';
330
             $buffer = \'\';
331
+
329
             if (%s) {
332
             if (%s) {
330
                 $source = %s;
333
                 $source = %s;
331
-                $result = call_user_func($value, $source, $this->lambdaHelper);
334
+                $result = (string) call_user_func($value, $source, %s);
332
                 if (strpos($result, \'{{\') === false) {
335
                 if (strpos($result, \'{{\') === false) {
333
                     $buffer .= $result;
336
                     $buffer .= $result;
334
                 } else {
337
                 } else {
335
                     $buffer .= $this->mustache
338
                     $buffer .= $this->mustache
336
-                        ->loadLambda((string) $result%s)
339
+                        ->loadLambda($result%s)
337
                         ->renderInternal($context);
340
                         ->renderInternal($context);
338
                 }
341
                 }
339
             } elseif (!empty($value)) {
342
             } elseif (!empty($value)) {
360
      * @param string   $otag    Current Mustache opening tag
363
      * @param string   $otag    Current Mustache opening tag
361
      * @param string   $ctag    Current Mustache closing tag
364
      * @param string   $ctag    Current Mustache closing tag
362
      * @param int      $level
365
      * @param int      $level
363
-     * @param bool     $arg     (default: false)
364
      *
366
      *
365
      * @return string Generated section PHP source code
367
      * @return string Generated section PHP source code
366
      */
368
      */
367
-    private function section($nodes, $id, $filters, $start, $end, $otag, $ctag, $level, $arg = false)
369
+    private function section($nodes, $id, $filters, $start, $end, $otag, $ctag, $level)
368
     {
370
     {
369
         $source   = var_export(substr($this->source, $start, $end - $start), true);
371
         $source   = var_export(substr($this->source, $start, $end - $start), true);
370
         $callable = $this->getCallable();
372
         $callable = $this->getCallable();
371
 
373
 
372
         if ($otag !== '{{' || $ctag !== '}}') {
374
         if ($otag !== '{{' || $ctag !== '}}') {
373
-            $delims = ', ' . var_export(sprintf('{{= %s %s =}}', $otag, $ctag), true);
375
+            $delimTag = var_export(sprintf('{{= %s %s =}}', $otag, $ctag), true);
376
+            $helper = sprintf('$this->lambdaHelper->withDelimiters(%s)', $delimTag);
377
+            $delims = ', ' . $delimTag;
374
         } else {
378
         } else {
379
+            $helper = '$this->lambdaHelper';
375
             $delims = '';
380
             $delims = '';
376
         }
381
         }
377
 
382
 
378
         $key = ucfirst(md5($delims . "\n" . $source));
383
         $key = ucfirst(md5($delims . "\n" . $source));
379
 
384
 
380
         if (!isset($this->sections[$key])) {
385
         if (!isset($this->sections[$key])) {
381
-            $this->sections[$key] = sprintf($this->prepare(self::SECTION), $key, $callable, $source, $delims, $this->walk($nodes, 2));
386
+            $this->sections[$key] = sprintf($this->prepare(self::SECTION), $key, $callable, $source, $helper, $delims, $this->walk($nodes, 2));
382
         }
387
         }
383
 
388
 
384
-        if ($arg === true) {
385
-            return $key;
386
-        } else {
387
-            $method  = $this->getFindMethod($id);
388
-            $id      = var_export($id, true);
389
-            $filters = $this->getFilters($filters, $level);
389
+        $method  = $this->getFindMethod($id);
390
+        $id      = var_export($id, true);
391
+        $filters = $this->getFilters($filters, $level);
390
 
392
 
391
-            return sprintf($this->prepare(self::SECTION_CALL, $level), $id, $method, $id, $filters, $key);
392
-        }
393
+        return sprintf($this->prepare(self::SECTION_CALL, $level), $method, $id, $filters, $key);
393
     }
394
     }
394
 
395
 
395
     const INVERTED_SECTION = '
396
     const INVERTED_SECTION = '
396
-        // %s inverted section
397
         $value = $context->%s(%s);%s
397
         $value = $context->%s(%s);%s
398
         if (empty($value)) {
398
         if (empty($value)) {
399
             %s
399
             %s
416
         $id      = var_export($id, true);
416
         $id      = var_export($id, true);
417
         $filters = $this->getFilters($filters, $level);
417
         $filters = $this->getFilters($filters, $level);
418
 
418
 
419
-        return sprintf($this->prepare(self::INVERTED_SECTION, $level), $id, $method, $id, $filters, $this->walk($nodes, $level));
419
+        return sprintf($this->prepare(self::INVERTED_SECTION, $level), $method, $id, $filters, $this->walk($nodes, $level));
420
     }
420
     }
421
 
421
 
422
     const PARTIAL_INDENT = ', $indent . %s';
422
     const PARTIAL_INDENT = ', $indent . %s';
451
     }
451
     }
452
 
452
 
453
     const PARENT = '
453
     const PARENT = '
454
-        %s
455
-
456
-        if ($parent = $this->mustache->LoadPartial(%s)) {
457
-            $context->pushBlockContext($newContext);
454
+        if ($parent = $this->mustache->loadPartial(%s)) {
455
+            $context->pushBlockContext(array(%s
456
+            ));
458
             $buffer .= $parent->renderInternal($context, $indent);
457
             $buffer .= $parent->renderInternal($context, $indent);
459
             $context->popBlockContext();
458
             $context->popBlockContext();
460
         }
459
         }
461
     ';
460
     ';
462
 
461
 
462
+    const PARENT_NO_CONTEXT = '
463
+        if ($parent = $this->mustache->loadPartial(%s)) {
464
+            $buffer .= $parent->renderInternal($context, $indent);
465
+        }
466
+    ';
467
+
463
     /**
468
     /**
464
      * Generate Mustache Template inheritance parent call PHP source.
469
      * Generate Mustache Template inheritance parent call PHP source.
465
      *
470
      *
474
     {
479
     {
475
         $realChildren = array_filter($children, array(__CLASS__, 'onlyBlockArgs'));
480
         $realChildren = array_filter($children, array(__CLASS__, 'onlyBlockArgs'));
476
 
481
 
482
+        if (empty($realChildren)) {
483
+            return sprintf($this->prepare(self::PARENT_NO_CONTEXT, $level), var_export($id, true));
484
+        }
485
+
477
         return sprintf(
486
         return sprintf(
478
             $this->prepare(self::PARENT, $level),
487
             $this->prepare(self::PARENT, $level),
479
-            $this->walk($realChildren, $level),
480
             var_export($id, true),
488
             var_export($id, true),
481
-            var_export($indent, true)
489
+            $this->walk($realChildren, $level + 1)
482
         );
490
         );
483
     }
491
     }
484
 
492
 
487
      *
495
      *
488
      * @param array $node
496
      * @param array $node
489
      *
497
      *
490
-     * @return bool True if $node is a block arg token.
498
+     * @return bool True if $node is a block arg token
491
      */
499
      */
492
     private static function onlyBlockArgs(array $node)
500
     private static function onlyBlockArgs(array $node)
493
     {
501
     {
495
     }
503
     }
496
 
504
 
497
     const VARIABLE = '
505
     const VARIABLE = '
498
-        $value = $this->resolveValue($context->%s(%s), $context, $indent);%s
499
-        $buffer .= %s%s;
506
+        $value = $this->resolveValue($context->%s(%s), $context);%s
507
+        $buffer .= %s($value === null ? \'\' : %s);
500
     ';
508
     ';
501
 
509
 
502
     /**
510
     /**
615
     /**
623
     /**
616
      * Select the appropriate Context `find` method for a given $id.
624
      * Select the appropriate Context `find` method for a given $id.
617
      *
625
      *
618
-     * The return value will be one of `find`, `findDot` or `last`.
626
+     * The return value will be one of `find`, `findDot`, `findAnchoredDot` or `last`.
619
      *
627
      *
620
      * @see Mustache_Context::find
628
      * @see Mustache_Context::find
621
      * @see Mustache_Context::findDot
629
      * @see Mustache_Context::findDot

+ 3
- 3
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Context.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.
150
      *
150
      *
151
      * @see Mustache_Context::findDot
151
      * @see Mustache_Context::findDot
152
      *
152
      *
153
-     * @throws Mustache_Exception_InvalidArgumentException if given an invalid anchored dot $id.
153
+     * @throws Mustache_Exception_InvalidArgumentException if given an invalid anchored dot $id
154
      *
154
      *
155
      * @param string $id Dotted variable selector
155
      * @param string $id Dotted variable selector
156
      *
156
      *
182
      *
182
      *
183
      * @param string $id
183
      * @param string $id
184
      *
184
      *
185
-     * @return mixed Variable value, or '' if not found.
185
+     * @return mixed Variable value, or '' if not found
186
      */
186
      */
187
     public function findInBlock($id)
187
     public function findInBlock($id)
188
     {
188
     {

+ 63
- 21
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Engine.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.
23
  */
23
  */
24
 class Mustache_Engine
24
 class Mustache_Engine
25
 {
25
 {
26
-    const VERSION        = '2.9.0';
27
-    const SPEC_VERSION   = '1.1.2';
26
+    const VERSION        = '2.14.0';
27
+    const SPEC_VERSION   = '1.2.2';
28
 
28
 
29
     const PRAGMA_FILTERS      = 'FILTERS';
29
     const PRAGMA_FILTERS      = 'FILTERS';
30
     const PRAGMA_BLOCKS       = 'BLOCKS';
30
     const PRAGMA_BLOCKS       = 'BLOCKS';
54
     private $logger;
54
     private $logger;
55
     private $strictCallables = false;
55
     private $strictCallables = false;
56
     private $pragmas = array();
56
     private $pragmas = array();
57
+    private $delimiters;
57
 
58
 
58
     // Services
59
     // Services
59
     private $tokenizer;
60
     private $tokenizer;
81
      *         // sections are often too dynamic to benefit from caching.
82
      *         // sections are often too dynamic to benefit from caching.
82
      *         'cache_lambda_templates' => true,
83
      *         'cache_lambda_templates' => true,
83
      *
84
      *
85
+     *         // Customize the tag delimiters used by this engine instance. Note that overriding here changes the
86
+     *         // delimiters used to parse all templates and partials loaded by this instance. To override just for a
87
+     *         // single template, use an inline "change delimiters" tag at the start of the template file:
88
+     *         //
89
+     *         //     {{=<% %>=}}
90
+     *         //
91
+     *         'delimiters' => '<% %>',
92
+     *
84
      *         // A Mustache template loader instance. Uses a StringLoader if not specified.
93
      *         // A Mustache template loader instance. Uses a StringLoader if not specified.
85
      *         'loader' => new Mustache_Loader_FilesystemLoader(dirname(__FILE__).'/views'),
94
      *         'loader' => new Mustache_Loader_FilesystemLoader(dirname(__FILE__).'/views'),
86
      *
95
      *
126
      *         'pragmas' => [Mustache_Engine::PRAGMA_FILTERS],
135
      *         'pragmas' => [Mustache_Engine::PRAGMA_FILTERS],
127
      *     );
136
      *     );
128
      *
137
      *
129
-     * @throws Mustache_Exception_InvalidArgumentException If `escape` option is not callable.
138
+     * @throws Mustache_Exception_InvalidArgumentException If `escape` option is not callable
130
      *
139
      *
131
      * @param array $options (default: array())
140
      * @param array $options (default: array())
132
      */
141
      */
133
     public function __construct(array $options = array())
142
     public function __construct(array $options = array())
134
     {
143
     {
135
         if (isset($options['template_class_prefix'])) {
144
         if (isset($options['template_class_prefix'])) {
145
+            if ((string) $options['template_class_prefix'] === '') {
146
+                throw new Mustache_Exception_InvalidArgumentException('Mustache Constructor "template_class_prefix" must not be empty');
147
+            }
148
+
136
             $this->templateClassPrefix = $options['template_class_prefix'];
149
             $this->templateClassPrefix = $options['template_class_prefix'];
137
         }
150
         }
138
 
151
 
191
             $this->strictCallables = $options['strict_callables'];
204
             $this->strictCallables = $options['strict_callables'];
192
         }
205
         }
193
 
206
 
207
+        if (isset($options['delimiters'])) {
208
+            $this->delimiters = $options['delimiters'];
209
+        }
210
+
194
         if (isset($options['pragmas'])) {
211
         if (isset($options['pragmas'])) {
195
             foreach ($options['pragmas'] as $pragma) {
212
             foreach ($options['pragmas'] as $pragma) {
196
                 if (!isset(self::$knownPragmas[$pragma])) {
213
                 if (!isset(self::$knownPragmas[$pragma])) {
429
     /**
446
     /**
430
      * Set the Mustache Logger instance.
447
      * Set the Mustache Logger instance.
431
      *
448
      *
432
-     * @throws Mustache_Exception_InvalidArgumentException If logger is not an instance of Mustache_Logger or Psr\Log\LoggerInterface.
449
+     * @throws Mustache_Exception_InvalidArgumentException If logger is not an instance of Mustache_Logger or Psr\Log\LoggerInterface
433
      *
450
      *
434
      * @param Mustache_Logger|Psr\Log\LoggerInterface $logger
451
      * @param Mustache_Logger|Psr\Log\LoggerInterface $logger
435
      */
452
      */
589
     /**
606
     /**
590
      * Helper method to generate a Mustache template class.
607
      * Helper method to generate a Mustache template class.
591
      *
608
      *
592
-     * @param string $source
609
+     * This method must be updated any time options are added which make it so
610
+     * the same template could be parsed and compiled multiple different ways.
611
+     *
612
+     * @param string|Mustache_Source $source
593
      *
613
      *
594
      * @return string Mustache Template class name
614
      * @return string Mustache Template class name
595
      */
615
      */
596
     public function getTemplateClassName($source)
616
     public function getTemplateClassName($source)
597
     {
617
     {
598
-        return $this->templateClassPrefix . md5(sprintf(
599
-            'version:%s,escape:%s,entity_flags:%i,charset:%s,strict_callables:%s,pragmas:%s,source:%s',
600
-            self::VERSION,
601
-            isset($this->escape) ? 'custom' : 'default',
602
-            $this->entityFlags,
603
-            $this->charset,
604
-            $this->strictCallables ? 'true' : 'false',
605
-            implode(' ', $this->getPragmas()),
606
-            $source
607
-        ));
618
+        // For the most part, adding a new option here should do the trick.
619
+        //
620
+        // Pick a value here which is unique for each possible way the template
621
+        // could be compiled... but not necessarily unique per option value. See
622
+        // escape below, which only needs to differentiate between 'custom' and
623
+        // 'default' escapes.
624
+        //
625
+        // Keep this list in alphabetical order :)
626
+        $chunks = array(
627
+            'charset'         => $this->charset,
628
+            'delimiters'      => $this->delimiters ? $this->delimiters : '{{ }}',
629
+            'entityFlags'     => $this->entityFlags,
630
+            'escape'          => isset($this->escape) ? 'custom' : 'default',
631
+            'key'             => ($source instanceof Mustache_Source) ? $source->getKey() : 'source',
632
+            'pragmas'         => $this->getPragmas(),
633
+            'strictCallables' => $this->strictCallables,
634
+            'version'         => self::VERSION,
635
+        );
636
+
637
+        $key = json_encode($chunks);
638
+
639
+        // Template Source instances have already provided their own source key. For strings, just include the whole
640
+        // source string in the md5 hash.
641
+        if (!$source instanceof Mustache_Source) {
642
+            $key .= "\n" . $source;
643
+        }
644
+
645
+        return $this->templateClassPrefix . md5($key);
608
     }
646
     }
609
 
647
 
610
     /**
648
     /**
681
      * @see Mustache_Engine::loadPartial
719
      * @see Mustache_Engine::loadPartial
682
      * @see Mustache_Engine::loadLambda
720
      * @see Mustache_Engine::loadLambda
683
      *
721
      *
684
-     * @param string         $source
685
-     * @param Mustache_Cache $cache  (default: null)
722
+     * @param string|Mustache_Source $source
723
+     * @param Mustache_Cache         $cache  (default: null)
686
      *
724
      *
687
      * @return Mustache_Template
725
      * @return Mustache_Template
688
      */
726
      */
725
      */
763
      */
726
     private function tokenize($source)
764
     private function tokenize($source)
727
     {
765
     {
728
-        return $this->getTokenizer()->scan($source);
766
+        return $this->getTokenizer()->scan($source, $this->delimiters);
729
     }
767
     }
730
 
768
 
731
     /**
769
     /**
750
      *
788
      *
751
      * @see Mustache_Compiler::compile
789
      * @see Mustache_Compiler::compile
752
      *
790
      *
753
-     * @param string $source
791
+     * @param string|Mustache_Source $source
754
      *
792
      *
755
      * @return string generated Mustache template class code
793
      * @return string generated Mustache template class code
756
      */
794
      */
757
     private function compile($source)
795
     private function compile($source)
758
     {
796
     {
759
-        $tree = $this->parse($source);
760
         $name = $this->getTemplateClassName($source);
797
         $name = $this->getTemplateClassName($source);
761
 
798
 
762
         $this->log(
799
         $this->log(
765
             array('className' => $name)
802
             array('className' => $name)
766
         );
803
         );
767
 
804
 
805
+        if ($source instanceof Mustache_Source) {
806
+            $source = $source->getSource();
807
+        }
808
+        $tree = $this->parse($source);
809
+
768
         $compiler = $this->getCompiler();
810
         $compiler = $this->getCompiler();
769
         $compiler->setPragmas($this->getPragmas());
811
         $compiler->setPragmas($this->getPragmas());
770
 
812
 

+ 1
- 1
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Exception.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.

+ 1
- 1
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Exception/InvalidArgumentException.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.

+ 1
- 1
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Exception/LogicException.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.

+ 1
- 1
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Exception/RuntimeException.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.

+ 10
- 5
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Exception/SyntaxException.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.
17
     protected $token;
17
     protected $token;
18
 
18
 
19
     /**
19
     /**
20
-     * @param string $msg
21
-     * @param array  $token
20
+     * @param string    $msg
21
+     * @param array     $token
22
+     * @param Exception $previous
22
      */
23
      */
23
-    public function __construct($msg, array $token)
24
+    public function __construct($msg, array $token, Exception $previous = null)
24
     {
25
     {
25
         $this->token = $token;
26
         $this->token = $token;
26
-        parent::__construct($msg);
27
+        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
28
+            parent::__construct($msg, 0, $previous);
29
+        } else {
30
+            parent::__construct($msg); // @codeCoverageIgnore
31
+        }
27
     }
32
     }
28
 
33
 
29
     /**
34
     /**

+ 10
- 4
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Exception/UnknownFilterException.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.
17
     protected $filterName;
17
     protected $filterName;
18
 
18
 
19
     /**
19
     /**
20
-     * @param string $filterName
20
+     * @param string    $filterName
21
+     * @param Exception $previous
21
      */
22
      */
22
-    public function __construct($filterName)
23
+    public function __construct($filterName, Exception $previous = null)
23
     {
24
     {
24
         $this->filterName = $filterName;
25
         $this->filterName = $filterName;
25
-        parent::__construct(sprintf('Unknown filter: %s', $filterName));
26
+        $message = sprintf('Unknown filter: %s', $filterName);
27
+        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
28
+            parent::__construct($message, 0, $previous);
29
+        } else {
30
+            parent::__construct($message); // @codeCoverageIgnore
31
+        }
26
     }
32
     }
27
 
33
 
28
     public function getFilterName()
34
     public function getFilterName()

+ 10
- 4
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Exception/UnknownHelperException.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.
17
     protected $helperName;
17
     protected $helperName;
18
 
18
 
19
     /**
19
     /**
20
-     * @param string $helperName
20
+     * @param string    $helperName
21
+     * @param Exception $previous
21
      */
22
      */
22
-    public function __construct($helperName)
23
+    public function __construct($helperName, Exception $previous = null)
23
     {
24
     {
24
         $this->helperName = $helperName;
25
         $this->helperName = $helperName;
25
-        parent::__construct(sprintf('Unknown helper: %s', $helperName));
26
+        $message = sprintf('Unknown helper: %s', $helperName);
27
+        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
28
+            parent::__construct($message, 0, $previous);
29
+        } else {
30
+            parent::__construct($message); // @codeCoverageIgnore
31
+        }
26
     }
32
     }
27
 
33
 
28
     public function getHelperName()
34
     public function getHelperName()

+ 10
- 4
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Exception/UnknownTemplateException.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.
17
     protected $templateName;
17
     protected $templateName;
18
 
18
 
19
     /**
19
     /**
20
-     * @param string $templateName
20
+     * @param string    $templateName
21
+     * @param Exception $previous
21
      */
22
      */
22
-    public function __construct($templateName)
23
+    public function __construct($templateName, Exception $previous = null)
23
     {
24
     {
24
         $this->templateName = $templateName;
25
         $this->templateName = $templateName;
25
-        parent::__construct(sprintf('Unknown template: %s', $templateName));
26
+        $message = sprintf('Unknown template: %s', $templateName);
27
+        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
28
+            parent::__construct($message, 0, $previous);
29
+        } else {
30
+            parent::__construct($message); // @codeCoverageIgnore
31
+        }
26
     }
32
     }
27
 
33
 
28
     public function getTemplateName()
34
     public function getTemplateName()

+ 3
- 3
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/HelperCollection.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.
81
     /**
81
     /**
82
      * Get a helper by name.
82
      * Get a helper by name.
83
      *
83
      *
84
-     * @throws Mustache_Exception_UnknownHelperException If helper does not exist.
84
+     * @throws Mustache_Exception_UnknownHelperException If helper does not exist
85
      *
85
      *
86
      * @param string $name
86
      * @param string $name
87
      *
87
      *
137
     /**
137
     /**
138
      * Check whether a given helper is present in the collection.
138
      * Check whether a given helper is present in the collection.
139
      *
139
      *
140
-     * @throws Mustache_Exception_UnknownHelperException if the requested helper is not present.
140
+     * @throws Mustache_Exception_UnknownHelperException if the requested helper is not present
141
      *
141
      *
142
      * @param string $name
142
      * @param string $name
143
      */
143
      */

+ 33
- 6
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/LambdaHelper.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.
20
 {
20
 {
21
     private $mustache;
21
     private $mustache;
22
     private $context;
22
     private $context;
23
+    private $delims;
23
 
24
 
24
     /**
25
     /**
25
      * Mustache Lambda Helper constructor.
26
      * Mustache Lambda Helper constructor.
26
      *
27
      *
27
-     * @param Mustache_Engine  $mustache Mustache engine instance.
28
-     * @param Mustache_Context $context  Rendering context.
28
+     * @param Mustache_Engine  $mustache Mustache engine instance
29
+     * @param Mustache_Context $context  Rendering context
30
+     * @param string           $delims   Optional custom delimiters, in the format `{{= <% %> =}}`. (default: null)
29
      */
31
      */
30
-    public function __construct(Mustache_Engine $mustache, Mustache_Context $context)
32
+    public function __construct(Mustache_Engine $mustache, Mustache_Context $context, $delims = null)
31
     {
33
     {
32
         $this->mustache = $mustache;
34
         $this->mustache = $mustache;
33
         $this->context  = $context;
35
         $this->context  = $context;
36
+        $this->delims   = $delims;
34
     }
37
     }
35
 
38
 
36
     /**
39
     /**
38
      *
41
      *
39
      * @param string $string
42
      * @param string $string
40
      *
43
      *
41
-     * @return string Rendered template.
44
+     * @return string Rendered template
42
      */
45
      */
43
     public function render($string)
46
     public function render($string)
44
     {
47
     {
45
         return $this->mustache
48
         return $this->mustache
46
-            ->loadLambda((string) $string)
49
+            ->loadLambda((string) $string, $this->delims)
47
             ->renderInternal($this->context);
50
             ->renderInternal($this->context);
48
     }
51
     }
52
+
53
+    /**
54
+     * Render a string as a Mustache template with the current rendering context.
55
+     *
56
+     * @param string $string
57
+     *
58
+     * @return string Rendered template
59
+     */
60
+    public function __invoke($string)
61
+    {
62
+        return $this->render($string);
63
+    }
64
+
65
+    /**
66
+     * Get a Lambda Helper with custom delimiters.
67
+     *
68
+     * @param string $delims Custom delimiters, in the format `{{= <% %> =}}`
69
+     *
70
+     * @return Mustache_LambdaHelper
71
+     */
72
+    public function withDelimiters($delims)
73
+    {
74
+        return new self($this->mustache, $this->context, $delims);
75
+    }
49
 }
76
 }

+ 3
- 3
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Loader.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.
17
     /**
17
     /**
18
      * Load a Template by name.
18
      * Load a Template by name.
19
      *
19
      *
20
-     * @throws Mustache_Exception_UnknownTemplateException If a template file is not found.
20
+     * @throws Mustache_Exception_UnknownTemplateException If a template file is not found
21
      *
21
      *
22
      * @param string $name
22
      * @param string $name
23
      *
23
      *
24
-     * @return string Mustache Template source
24
+     * @return string|Mustache_Source Mustache Template source
25
      */
25
      */
26
     public function load($name);
26
     public function load($name);
27
 }
27
 }

+ 2
- 2
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Loader/ArrayLoader.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.
41
     /**
41
     /**
42
      * Load a Template.
42
      * Load a Template.
43
      *
43
      *
44
-     * @throws Mustache_Exception_UnknownTemplateException If a template file is not found.
44
+     * @throws Mustache_Exception_UnknownTemplateException If a template file is not found
45
      *
45
      *
46
      * @param string $name
46
      * @param string $name
47
      *
47
      *

+ 2
- 2
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Loader/CascadingLoader.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.
48
     /**
48
     /**
49
      * Load a Template by name.
49
      * Load a Template by name.
50
      *
50
      *
51
-     * @throws Mustache_Exception_UnknownTemplateException If a template file is not found.
51
+     * @throws Mustache_Exception_UnknownTemplateException If a template file is not found
52
      *
52
      *
53
      * @param string $name
53
      * @param string $name
54
      *
54
      *

+ 17
- 6
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Loader/FilesystemLoader.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.
40
      *         'extension' => '.ms',
40
      *         'extension' => '.ms',
41
      *     );
41
      *     );
42
      *
42
      *
43
-     * @throws Mustache_Exception_RuntimeException if $baseDir does not exist.
43
+     * @throws Mustache_Exception_RuntimeException if $baseDir does not exist
44
      *
44
      *
45
-     * @param string $baseDir Base directory containing Mustache template files.
45
+     * @param string $baseDir Base directory containing Mustache template files
46
      * @param array  $options Array of Loader options (default: array())
46
      * @param array  $options Array of Loader options (default: array())
47
      */
47
      */
48
     public function __construct($baseDir, array $options = array())
48
     public function __construct($baseDir, array $options = array())
53
             $this->baseDir = realpath($this->baseDir);
53
             $this->baseDir = realpath($this->baseDir);
54
         }
54
         }
55
 
55
 
56
-        if (!is_dir($this->baseDir)) {
56
+        if ($this->shouldCheckPath() && !is_dir($this->baseDir)) {
57
             throw new Mustache_Exception_RuntimeException(sprintf('FilesystemLoader baseDir must be a directory: %s', $baseDir));
57
             throw new Mustache_Exception_RuntimeException(sprintf('FilesystemLoader baseDir must be a directory: %s', $baseDir));
58
         }
58
         }
59
 
59
 
88
     /**
88
     /**
89
      * Helper function for loading a Mustache file by name.
89
      * Helper function for loading a Mustache file by name.
90
      *
90
      *
91
-     * @throws Mustache_Exception_UnknownTemplateException If a template file is not found.
91
+     * @throws Mustache_Exception_UnknownTemplateException If a template file is not found
92
      *
92
      *
93
      * @param string $name
93
      * @param string $name
94
      *
94
      *
98
     {
98
     {
99
         $fileName = $this->getFileName($name);
99
         $fileName = $this->getFileName($name);
100
 
100
 
101
-        if (!file_exists($fileName)) {
101
+        if ($this->shouldCheckPath() && !file_exists($fileName)) {
102
             throw new Mustache_Exception_UnknownTemplateException($name);
102
             throw new Mustache_Exception_UnknownTemplateException($name);
103
         }
103
         }
104
 
104
 
121
 
121
 
122
         return $fileName;
122
         return $fileName;
123
     }
123
     }
124
+
125
+    /**
126
+     * Only check if baseDir is a directory and requested templates are files if
127
+     * baseDir is using the filesystem stream wrapper.
128
+     *
129
+     * @return bool Whether to check `is_dir` and `file_exists`
130
+     */
131
+    protected function shouldCheckPath()
132
+    {
133
+        return strpos($this->baseDir, '://') === false || strpos($this->baseDir, 'file://') === 0;
134
+    }
124
 }
135
 }

+ 3
- 3
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Loader/InlineLoader.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.
68
      * @param string $fileName The file to parse for inline templates
68
      * @param string $fileName The file to parse for inline templates
69
      * @param int    $offset   A string offset for the start of the templates.
69
      * @param int    $offset   A string offset for the start of the templates.
70
      *                         This usually coincides with the `__halt_compiler`
70
      *                         This usually coincides with the `__halt_compiler`
71
-     *                         call, and the `__COMPILER_HALT_OFFSET__`.
71
+     *                         call, and the `__COMPILER_HALT_OFFSET__`
72
      */
72
      */
73
     public function __construct($fileName, $offset)
73
     public function __construct($fileName, $offset)
74
     {
74
     {
87
     /**
87
     /**
88
      * Load a Template by name.
88
      * Load a Template by name.
89
      *
89
      *
90
-     * @throws Mustache_Exception_UnknownTemplateException If a template file is not found.
90
+     * @throws Mustache_Exception_UnknownTemplateException If a template file is not found
91
      *
91
      *
92
      * @param string $name
92
      * @param string $name
93
      *
93
      *

+ 1
- 1
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Loader/MutableLoader.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.

+ 1
- 1
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Loader/StringLoader.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.

+ 1
- 1
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Logger.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.

+ 1
- 1
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Logger/AbstractLogger.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.

+ 7
- 7
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Logger/StreamLogger.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.
36
     protected $url    = null;
36
     protected $url    = null;
37
 
37
 
38
     /**
38
     /**
39
-     * @throws InvalidArgumentException if the logging level is unknown.
39
+     * @throws InvalidArgumentException if the logging level is unknown
40
      *
40
      *
41
      * @param resource|string $stream Resource instance or URL
41
      * @param resource|string $stream Resource instance or URL
42
      * @param int             $level  The minimum logging level at which this handler will be triggered
42
      * @param int             $level  The minimum logging level at which this handler will be triggered
65
     /**
65
     /**
66
      * Set the minimum logging level.
66
      * Set the minimum logging level.
67
      *
67
      *
68
-     * @throws Mustache_Exception_InvalidArgumentException if the logging level is unknown.
68
+     * @throws Mustache_Exception_InvalidArgumentException if the logging level is unknown
69
      *
69
      *
70
      * @param int $level The minimum logging level which will be written
70
      * @param int $level The minimum logging level which will be written
71
      */
71
      */
91
     /**
91
     /**
92
      * Logs with an arbitrary level.
92
      * Logs with an arbitrary level.
93
      *
93
      *
94
-     * @throws Mustache_Exception_InvalidArgumentException if the logging level is unknown.
94
+     * @throws Mustache_Exception_InvalidArgumentException if the logging level is unknown
95
      *
95
      *
96
      * @param mixed  $level
96
      * @param mixed  $level
97
      * @param string $message
97
      * @param string $message
111
     /**
111
     /**
112
      * Write a record to the log.
112
      * Write a record to the log.
113
      *
113
      *
114
-     * @throws Mustache_Exception_LogicException   If neither a stream resource nor url is present.
115
-     * @throws Mustache_Exception_RuntimeException If the stream url cannot be opened.
114
+     * @throws Mustache_Exception_LogicException   If neither a stream resource nor url is present
115
+     * @throws Mustache_Exception_RuntimeException If the stream url cannot be opened
116
      *
116
      *
117
      * @param int    $level   The logging level
117
      * @param int    $level   The logging level
118
      * @param string $message The log message
118
      * @param string $message The log message
139
     /**
139
     /**
140
      * Gets the name of the logging level.
140
      * Gets the name of the logging level.
141
      *
141
      *
142
-     * @throws InvalidArgumentException if the logging level is unknown.
142
+     * @throws InvalidArgumentException if the logging level is unknown
143
      *
143
      *
144
      * @param int $level
144
      * @param int $level
145
      *
145
      *

+ 8
- 8
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Parser.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.
63
     /**
63
     /**
64
      * Helper method for recursively building a parse tree.
64
      * Helper method for recursively building a parse tree.
65
      *
65
      *
66
-     * @throws Mustache_Exception_SyntaxException when nesting errors or mismatched section tags are encountered.
66
+     * @throws Mustache_Exception_SyntaxException when nesting errors or mismatched section tags are encountered
67
      *
67
      *
68
      * @param array &$tokens Set of Mustache tokens
68
      * @param array &$tokens Set of Mustache tokens
69
      * @param array $parent  Parent token (default: null)
69
      * @param array $parent  Parent token (default: null)
149
                 case Mustache_Tokenizer::T_BLOCK_VAR:
149
                 case Mustache_Tokenizer::T_BLOCK_VAR:
150
                     if ($this->pragmaBlocks) {
150
                     if ($this->pragmaBlocks) {
151
                         // BLOCKS pragma is enabled, let's do this!
151
                         // BLOCKS pragma is enabled, let's do this!
152
-                        if ($parent[Mustache_Tokenizer::TYPE] === Mustache_Tokenizer::T_PARENT) {
152
+                        if (isset($parent) && $parent[Mustache_Tokenizer::TYPE] === Mustache_Tokenizer::T_PARENT) {
153
                             $token[Mustache_Tokenizer::TYPE] = Mustache_Tokenizer::T_BLOCK_ARG;
153
                             $token[Mustache_Tokenizer::TYPE] = Mustache_Tokenizer::T_BLOCK_ARG;
154
                         }
154
                         }
155
                         $this->clearStandaloneLines($nodes, $tokens);
155
                         $this->clearStandaloneLines($nodes, $tokens);
195
      *
195
      *
196
      * Returns a whitespace token for indenting partials, if applicable.
196
      * Returns a whitespace token for indenting partials, if applicable.
197
      *
197
      *
198
-     * @param array $nodes  Parsed nodes.
199
-     * @param array $tokens Tokens to be parsed.
198
+     * @param array $nodes  Parsed nodes
199
+     * @param array $tokens Tokens to be parsed
200
      *
200
      *
201
-     * @return array|null Resulting indent token, if any.
201
+     * @return array|null Resulting indent token, if any
202
      */
202
      */
203
     private function clearStandaloneLines(array &$nodes, array &$tokens)
203
     private function clearStandaloneLines(array &$nodes, array &$tokens)
204
     {
204
     {
268
     /**
268
     /**
269
      * Check whether a token is allowed inside a parent tag.
269
      * Check whether a token is allowed inside a parent tag.
270
      *
270
      *
271
-     * @throws Mustache_Exception_SyntaxException if an invalid token is found inside a parent tag.
271
+     * @throws Mustache_Exception_SyntaxException if an invalid token is found inside a parent tag
272
      *
272
      *
273
      * @param array|null $parent
273
      * @param array|null $parent
274
      * @param array      $token
274
      * @param array      $token
275
      */
275
      */
276
     private function checkIfTokenIsAllowedInParent($parent, array $token)
276
     private function checkIfTokenIsAllowedInParent($parent, array $token)
277
     {
277
     {
278
-        if ($parent[Mustache_Tokenizer::TYPE] === Mustache_Tokenizer::T_PARENT) {
278
+        if (isset($parent) && $parent[Mustache_Tokenizer::TYPE] === Mustache_Tokenizer::T_PARENT) {
279
             throw new Mustache_Exception_SyntaxException('Illegal content in < parent tag', $token);
279
             throw new Mustache_Exception_SyntaxException('Illegal content in < parent tag', $token);
280
         }
280
         }
281
     }
281
     }

+ 3
- 4
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Template.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.
164
      *
164
      *
165
      * @param mixed            $value
165
      * @param mixed            $value
166
      * @param Mustache_Context $context
166
      * @param Mustache_Context $context
167
-     * @param string           $indent
168
      *
167
      *
169
      * @return string
168
      * @return string
170
      */
169
      */
171
-    protected function resolveValue($value, Mustache_Context $context, $indent = '')
170
+    protected function resolveValue($value, Mustache_Context $context)
172
     {
171
     {
173
         if (($this->strictCallables ? is_object($value) : !is_string($value)) && is_callable($value)) {
172
         if (($this->strictCallables ? is_object($value) : !is_string($value)) && is_callable($value)) {
174
             return $this->mustache
173
             return $this->mustache
175
                 ->loadLambda((string) call_user_func($value))
174
                 ->loadLambda((string) call_user_func($value))
176
-                ->renderInternal($context, $indent);
175
+                ->renderInternal($context);
177
         }
176
         }
178
 
177
 
179
         return $value;
178
         return $value;

+ 71
- 46
plugins/posts-to-posts/vendor/mustache/mustache/src/Mustache/Tokenizer.php Wyświetl plik

3
 /*
3
 /*
4
  * This file is part of Mustache.php.
4
  * This file is part of Mustache.php.
5
  *
5
  *
6
- * (c) 2010-2015 Justin Hileman
6
+ * (c) 2010-2017 Justin Hileman
7
  *
7
  *
8
  * For the full copyright and license information, please view the LICENSE
8
  * For the full copyright and license information, please view the LICENSE
9
  * file that was distributed with this source code.
9
  * file that was distributed with this source code.
72
     private $tokens;
72
     private $tokens;
73
     private $seenTag;
73
     private $seenTag;
74
     private $line;
74
     private $line;
75
+
75
     private $otag;
76
     private $otag;
76
-    private $ctag;
77
+    private $otagChar;
77
     private $otagLen;
78
     private $otagLen;
79
+
80
+    private $ctag;
81
+    private $ctagChar;
78
     private $ctagLen;
82
     private $ctagLen;
79
 
83
 
80
     /**
84
     /**
81
      * Scan and tokenize template source.
85
      * Scan and tokenize template source.
82
      *
86
      *
83
-     * @throws Mustache_Exception_SyntaxException when mismatched section tags are encountered.
87
+     * @throws Mustache_Exception_SyntaxException when mismatched section tags are encountered
88
+     * @throws Mustache_Exception_InvalidArgumentException when $delimiters string is invalid
84
      *
89
      *
85
      * @param string $text       Mustache template source to tokenize
90
      * @param string $text       Mustache template source to tokenize
86
-     * @param string $delimiters Optionally, pass initial opening and closing delimiters (default: null)
91
+     * @param string $delimiters Optionally, pass initial opening and closing delimiters (default: empty string)
87
      *
92
      *
88
      * @return array Set of Mustache tokens
93
      * @return array Set of Mustache tokens
89
      */
94
      */
90
-    public function scan($text, $delimiters = null)
95
+    public function scan($text, $delimiters = '')
91
     {
96
     {
92
         // Setting mbstring.func_overload makes things *really* slow.
97
         // Setting mbstring.func_overload makes things *really* slow.
93
         // Let's do everyone a favor and scan this string as ASCII instead.
98
         // Let's do everyone a favor and scan this string as ASCII instead.
99
+        //
100
+        // The INI directive was removed in PHP 8.0 so we don't need to check there (and can drop it
101
+        // when we remove support for older versions of PHP).
102
+        //
103
+        // @codeCoverageIgnoreStart
94
         $encoding = null;
104
         $encoding = null;
95
-        if (function_exists('mb_internal_encoding') && ini_get('mbstring.func_overload') & 2) {
96
-            $encoding = mb_internal_encoding();
97
-            mb_internal_encoding('ASCII');
105
+        if (version_compare(PHP_VERSION, '8.0.0', '<')) {
106
+            if (function_exists('mb_internal_encoding') && ini_get('mbstring.func_overload') & 2) {
107
+                $encoding = mb_internal_encoding();
108
+                mb_internal_encoding('ASCII');
109
+            }
98
         }
110
         }
111
+        // @codeCoverageIgnoreEnd
99
 
112
 
100
         $this->reset();
113
         $this->reset();
101
 
114
 
102
-        if ($delimiters = trim($delimiters)) {
115
+        if (is_string($delimiters) && $delimiters = trim($delimiters)) {
103
             $this->setDelimiters($delimiters);
116
             $this->setDelimiters($delimiters);
104
         }
117
         }
105
 
118
 
107
         for ($i = 0; $i < $len; $i++) {
120
         for ($i = 0; $i < $len; $i++) {
108
             switch ($this->state) {
121
             switch ($this->state) {
109
                 case self::IN_TEXT:
122
                 case self::IN_TEXT:
110
-                    if ($this->tagChange($this->otag, $this->otagLen, $text, $i)) {
123
+                    $char = $text[$i];
124
+                    // Test whether it's time to change tags.
125
+                    if ($char === $this->otagChar && substr($text, $i, $this->otagLen) === $this->otag) {
111
                         $i--;
126
                         $i--;
112
                         $this->flushBuffer();
127
                         $this->flushBuffer();
113
                         $this->state = self::IN_TAG_TYPE;
128
                         $this->state = self::IN_TAG_TYPE;
114
                     } else {
129
                     } else {
115
-                        $char = $text[$i];
116
                         $this->buffer .= $char;
130
                         $this->buffer .= $char;
117
                         if ($char === "\n") {
131
                         if ($char === "\n") {
118
                             $this->flushBuffer();
132
                             $this->flushBuffer();
148
                     break;
162
                     break;
149
 
163
 
150
                 default:
164
                 default:
151
-                    if ($this->tagChange($this->ctag, $this->ctagLen, $text, $i)) {
165
+                    $char = $text[$i];
166
+                    // Test whether it's time to change tags.
167
+                    if ($char === $this->ctagChar && substr($text, $i, $this->ctagLen) === $this->ctag) {
152
                         $token = array(
168
                         $token = array(
153
                             self::TYPE  => $this->tagType,
169
                             self::TYPE  => $this->tagType,
154
                             self::NAME  => trim($this->buffer),
170
                             self::NAME  => trim($this->buffer),
193
                         $this->state = self::IN_TEXT;
209
                         $this->state = self::IN_TEXT;
194
                         $this->tokens[] = $token;
210
                         $this->tokens[] = $token;
195
                     } else {
211
                     } else {
196
-                        $this->buffer .= $text[$i];
212
+                        $this->buffer .= $char;
197
                     }
213
                     }
198
                     break;
214
                     break;
199
             }
215
             }
202
         $this->flushBuffer();
218
         $this->flushBuffer();
203
 
219
 
204
         // Restore the user's encoding...
220
         // Restore the user's encoding...
221
+        // @codeCoverageIgnoreStart
205
         if ($encoding) {
222
         if ($encoding) {
206
             mb_internal_encoding($encoding);
223
             mb_internal_encoding($encoding);
207
         }
224
         }
225
+        // @codeCoverageIgnoreEnd
208
 
226
 
209
         return $this->tokens;
227
         return $this->tokens;
210
     }
228
     }
214
      */
232
      */
215
     private function reset()
233
     private function reset()
216
     {
234
     {
217
-        $this->state   = self::IN_TEXT;
218
-        $this->tagType = null;
219
-        $this->buffer  = '';
220
-        $this->tokens  = array();
221
-        $this->seenTag = false;
222
-        $this->line    = 0;
223
-        $this->otag    = '{{';
224
-        $this->ctag    = '}}';
225
-        $this->otagLen = 2;
226
-        $this->ctagLen = 2;
235
+        $this->state    = self::IN_TEXT;
236
+        $this->tagType  = null;
237
+        $this->buffer   = '';
238
+        $this->tokens   = array();
239
+        $this->seenTag  = false;
240
+        $this->line     = 0;
241
+
242
+        $this->otag     = '{{';
243
+        $this->otagChar = '{';
244
+        $this->otagLen  = 2;
245
+
246
+        $this->ctag     = '}}';
247
+        $this->ctagChar = '}';
248
+        $this->ctagLen  = 2;
227
     }
249
     }
228
 
250
 
229
     /**
251
     /**
244
     /**
266
     /**
245
      * Change the current Mustache delimiters. Set new `otag` and `ctag` values.
267
      * Change the current Mustache delimiters. Set new `otag` and `ctag` values.
246
      *
268
      *
269
+     * @throws Mustache_Exception_SyntaxException when delimiter string is invalid
270
+     *
247
      * @param string $text  Mustache template source
271
      * @param string $text  Mustache template source
248
      * @param int    $index Current tokenizer index
272
      * @param int    $index Current tokenizer index
249
      *
273
      *
255
         $close      = '=' . $this->ctag;
279
         $close      = '=' . $this->ctag;
256
         $closeIndex = strpos($text, $close, $index);
280
         $closeIndex = strpos($text, $close, $index);
257
 
281
 
258
-        $this->setDelimiters(trim(substr($text, $startIndex, $closeIndex - $startIndex)));
259
-
260
-        $this->tokens[] = array(
282
+        $token = array(
261
             self::TYPE => self::T_DELIM_CHANGE,
283
             self::TYPE => self::T_DELIM_CHANGE,
262
             self::LINE => $this->line,
284
             self::LINE => $this->line,
263
         );
285
         );
264
 
286
 
287
+        try {
288
+            $this->setDelimiters(trim(substr($text, $startIndex, $closeIndex - $startIndex)));
289
+        } catch (Mustache_Exception_InvalidArgumentException $e) {
290
+            throw new Mustache_Exception_SyntaxException($e->getMessage(), $token);
291
+        }
292
+
293
+        $this->tokens[] = $token;
294
+
265
         return $closeIndex + strlen($close) - 1;
295
         return $closeIndex + strlen($close) - 1;
266
     }
296
     }
267
 
297
 
268
     /**
298
     /**
269
      * Set the current Mustache `otag` and `ctag` delimiters.
299
      * Set the current Mustache `otag` and `ctag` delimiters.
270
      *
300
      *
301
+     * @throws Mustache_Exception_InvalidArgumentException when delimiter string is invalid
302
+     *
271
      * @param string $delimiters
303
      * @param string $delimiters
272
      */
304
      */
273
     private function setDelimiters($delimiters)
305
     private function setDelimiters($delimiters)
274
     {
306
     {
275
-        list($otag, $ctag) = explode(' ', $delimiters);
276
-        $this->otag = $otag;
277
-        $this->ctag = $ctag;
278
-        $this->otagLen = strlen($otag);
279
-        $this->ctagLen = strlen($ctag);
307
+        if (!preg_match('/^\s*(\S+)\s+(\S+)\s*$/', $delimiters, $matches)) {
308
+            throw new Mustache_Exception_InvalidArgumentException(sprintf('Invalid delimiters: %s', $delimiters));
309
+        }
310
+
311
+        list($_, $otag, $ctag) = $matches;
312
+
313
+        $this->otag     = $otag;
314
+        $this->otagChar = $otag[0];
315
+        $this->otagLen  = strlen($otag);
316
+
317
+        $this->ctag     = $ctag;
318
+        $this->ctagChar = $ctag[0];
319
+        $this->ctagLen  = strlen($ctag);
280
     }
320
     }
281
 
321
 
282
     /**
322
     /**
304
 
344
 
305
         return $end + $this->ctagLen - 1;
345
         return $end + $this->ctagLen - 1;
306
     }
346
     }
307
-
308
-    /**
309
-     * Test whether it's time to change tags.
310
-     *
311
-     * @param string $tag    Current tag name
312
-     * @param int    $tagLen Current tag name length
313
-     * @param string $text   Mustache template source
314
-     * @param int    $index  Current tokenizer index
315
-     *
316
-     * @return bool True if this is a closing section tag
317
-     */
318
-    private function tagChange($tag, $tagLen, $text, $index)
319
-    {
320
-        return substr($text, $index, $tagLen) === $tag;
321
-    }
322
 }
347
 }

+ 7
- 1
plugins/posts-to-posts/vendor/scribu/lib-posts-to-posts/composer.json Wyświetl plik

9
     },
9
     },
10
     "autoload": {
10
     "autoload": {
11
         "files": ["autoload.php"]
11
         "files": ["autoload.php"]
12
-    }
12
+    },
13
+    "repositories": [
14
+        {
15
+            "type": "vcs",
16
+            "url": "https://github.com/jeffreyvr/wp-scb-framework/"
17
+        }
18
+    ]
13
 }
19
 }

+ 1
- 1
plugins/posts-to-posts/vendor/scribu/lib-posts-to-posts/side-post.php Wyświetl plik

22
 		$ptype_object = get_post_type_object( $ptype );
22
 		$ptype_object = get_post_type_object( $ptype );
23
 
23
 
24
 		if ( !$ptype_object ) {
24
 		if ( !$ptype_object ) {
25
-			throw new P2P_Exception( "Can't find $ptype." );
25
+			throw new P2P_Exception( "Can't find post type $ptype." );
26
 		}
26
 		}
27
 
27
 
28
 		return $ptype_object;
28
 		return $ptype_object;

+ 3
- 3
plugins/posts-to-posts/vendor/scribu/scb-framework/AdminPage.php Wyświetl plik

136
 
136
 
137
 		add_action( 'admin_menu', array( $this, 'page_init' ), $this->args['admin_action_priority'] );
137
 		add_action( 'admin_menu', array( $this, 'page_init' ), $this->args['admin_action_priority'] );
138
 
138
 
139
+		// Commented out due to deprecated notice.
140
+		// add_filter( 'contextual_help', array( $this, '_contextual_help' ), 10, 2 );
141
+
139
 		if ( $file ) {
142
 		if ( $file ) {
140
 			$this->file = $file;
143
 			$this->file = $file;
141
 			$this->plugin_url = plugin_dir_url( $file );
144
 			$this->plugin_url = plugin_dir_url( $file );
508
 			'toplevel'              => '',
511
 			'toplevel'              => '',
509
 			'position'              => null,
512
 			'position'              => null,
510
 			'icon_url'              => '',
513
 			'icon_url'              => '',
511
-			'screen_icon'           => '',
512
 			'parent'                => 'options-general.php',
514
 			'parent'                => 'options-general.php',
513
 			'capability'            => 'manage_options',
515
 			'capability'            => 'manage_options',
514
 			'menu_title'            => $this->args['page_title'],
516
 			'menu_title'            => $this->args['page_title'],
538
 	 * @param string|object $screen
540
 	 * @param string|object $screen
539
 	 *
541
 	 *
540
 	 * @return string
542
 	 * @return string
541
-	 * @deprecated 1.6.6 Not used
542
 	 */
543
 	 */
543
 	public function _contextual_help( $help, $screen ) {
544
 	public function _contextual_help( $help, $screen ) {
544
 		if ( is_object( $screen ) ) {
545
 		if ( is_object( $screen ) ) {
580
 		return $links;
581
 		return $links;
581
 	}
582
 	}
582
 }
583
 }
583
-

+ 4
- 0
plugins/posts-to-posts/vendor/scribu/scb-framework/Forms.php Wyświetl plik

606
 	 * @return string
606
 	 * @return string
607
 	 */
607
 	 */
608
 	protected static function add_label( $input, $desc, $desc_pos ) {
608
 	protected static function add_label( $input, $desc, $desc_pos ) {
609
+		if ( empty( $desc ) ) {
610
+			return $input;
611
+		}
612
+
609
 		return html( 'label', self::add_desc( $input, $desc, $desc_pos ) ) . "\n";
613
 		return html( 'label', self::add_desc( $input, $desc, $desc_pos ) ) . "\n";
610
 	}
614
 	}
611
 
615
 

+ 1
- 1
plugins/posts-to-posts/vendor/scribu/scb-framework/load.php Wyświetl plik

1
 <?php
1
 <?php
2
 
2
 
3
-$GLOBALS['_scb_data'] = array( 60, __FILE__, array(
3
+$GLOBALS['_scb_data'] = array( 61, __FILE__, array(
4
 	'scbUtil',
4
 	'scbUtil',
5
 	'scbOptions',
5
 	'scbOptions',
6
 	'scbForms',
6
 	'scbForms',

Ładowanie…
Anuluj
Zapisz