diff --git a/composer.lock b/composer.lock
index 4a80d7d90..6f1af0fd7 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1,10 +1,10 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
- "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "516114a0fbd804e5234ebeacbac30376",
+ "content-hash": "ca5770d3c97cc1d0375413eeb61758ab",
"packages": [
{
"name": "bshaffer/oauth2-server-php",
@@ -640,16 +640,16 @@
},
{
"name": "sabre/vobject",
- "version": "4.1.5",
+ "version": "4.1.6",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/vobject.git",
- "reference": "0928660e92d46d2d24336a6db320636aa3a75414"
+ "reference": "122cacbdea2c6133ac04db86ec05854beef75adf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sabre-io/vobject/zipball/0928660e92d46d2d24336a6db320636aa3a75414",
- "reference": "0928660e92d46d2d24336a6db320636aa3a75414",
+ "url": "https://api.github.com/repos/sabre-io/vobject/zipball/122cacbdea2c6133ac04db86ec05854beef75adf",
+ "reference": "122cacbdea2c6133ac04db86ec05854beef75adf",
"shasum": ""
},
"require": {
@@ -733,7 +733,7 @@
"xCal",
"xCard"
],
- "time": "2018-03-08T21:06:39+00:00"
+ "time": "2018-04-20T07:22:50+00:00"
},
{
"name": "sabre/xml",
@@ -863,16 +863,16 @@
},
{
"name": "smarty/smarty",
- "version": "v3.1.31",
+ "version": "v3.1.32",
"source": {
"type": "git",
"url": "https://github.com/smarty-php/smarty.git",
- "reference": "c7d42e4a327c402897dd587871434888fde1e7a9"
+ "reference": "ac9d4b587e5bf53381e21881820a9830765cb459"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/smarty-php/smarty/zipball/c7d42e4a327c402897dd587871434888fde1e7a9",
- "reference": "c7d42e4a327c402897dd587871434888fde1e7a9",
+ "url": "https://api.github.com/repos/smarty-php/smarty/zipball/ac9d4b587e5bf53381e21881820a9830765cb459",
+ "reference": "ac9d4b587e5bf53381e21881820a9830765cb459",
"shasum": ""
},
"require": {
@@ -912,7 +912,7 @@
"keywords": [
"templating"
],
- "time": "2016-12-14T21:57:25+00:00"
+ "time": "2018-04-24T14:53:33+00:00"
}
],
"packages-dev": [
@@ -1118,27 +1118,27 @@
},
{
"name": "behat/mink-browserkit-driver",
- "version": "v1.3.2",
+ "version": "1.3.3",
"source": {
"type": "git",
"url": "https://github.com/minkphp/MinkBrowserKitDriver.git",
- "reference": "10e67fb4a295efcd62ea0bf16025a85ea19534fb"
+ "reference": "1b9a7ce903cfdaaec5fb32bfdbb26118343662eb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/minkphp/MinkBrowserKitDriver/zipball/10e67fb4a295efcd62ea0bf16025a85ea19534fb",
- "reference": "10e67fb4a295efcd62ea0bf16025a85ea19534fb",
+ "url": "https://api.github.com/repos/minkphp/MinkBrowserKitDriver/zipball/1b9a7ce903cfdaaec5fb32bfdbb26118343662eb",
+ "reference": "1b9a7ce903cfdaaec5fb32bfdbb26118343662eb",
"shasum": ""
},
"require": {
"behat/mink": "^1.7.1@dev",
"php": ">=5.3.6",
- "symfony/browser-kit": "~2.3|~3.0",
- "symfony/dom-crawler": "~2.3|~3.0"
+ "symfony/browser-kit": "~2.3|~3.0|~4.0",
+ "symfony/dom-crawler": "~2.3|~3.0|~4.0"
},
"require-dev": {
- "silex/silex": "~1.2",
- "symfony/phpunit-bridge": "~2.7|~3.0"
+ "mink/driver-testsuite": "dev-master",
+ "symfony/http-kernel": "~2.3|~3.0|~4.0"
},
"type": "mink-driver",
"extra": {
@@ -1170,7 +1170,7 @@
"browser",
"testing"
],
- "time": "2016-03-05T08:59:47+00:00"
+ "time": "2018-05-02T09:25:31+00:00"
},
{
"name": "behat/mink-extension",
@@ -1472,16 +1472,16 @@
},
{
"name": "guzzlehttp/guzzle",
- "version": "6.3.0",
+ "version": "6.3.3",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
- "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699"
+ "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4db5a78a5ea468d4831de7f0bf9d9415e348699",
- "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba",
+ "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba",
"shasum": ""
},
"require": {
@@ -1491,7 +1491,7 @@
},
"require-dev": {
"ext-curl": "*",
- "phpunit/phpunit": "^4.0 || ^5.0",
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
"psr/log": "^1.0"
},
"suggest": {
@@ -1500,7 +1500,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "6.2-dev"
+ "dev-master": "6.3-dev"
}
},
"autoload": {
@@ -1533,7 +1533,7 @@
"rest",
"web service"
],
- "time": "2017-06-22T18:50:49+00:00"
+ "time": "2018-04-22T15:46:56+00:00"
},
{
"name": "guzzlehttp/promises",
@@ -1914,25 +1914,28 @@
},
{
"name": "php-mock/php-mock-phpunit",
- "version": "2.0.1",
+ "version": "2.1.1",
"source": {
"type": "git",
"url": "https://github.com/php-mock/php-mock-phpunit.git",
- "reference": "b42fc41ecb7538564067527f6c30b8854f149d32"
+ "reference": "ff1cc1d4e7478ce74221e05742588619bee84f69"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-mock/php-mock-phpunit/zipball/b42fc41ecb7538564067527f6c30b8854f149d32",
- "reference": "b42fc41ecb7538564067527f6c30b8854f149d32",
+ "url": "https://api.github.com/repos/php-mock/php-mock-phpunit/zipball/ff1cc1d4e7478ce74221e05742588619bee84f69",
+ "reference": "ff1cc1d4e7478ce74221e05742588619bee84f69",
"shasum": ""
},
"require": {
"php": ">=7",
"php-mock/php-mock-integration": "^2",
- "phpunit/phpunit": "^6 <6.5"
+ "phpunit/phpunit": "^6 || ^7"
},
"type": "library",
"autoload": {
+ "files": [
+ "autoload.php"
+ ],
"psr-4": {
"phpmock\\phpunit\\": "classes/"
}
@@ -1961,7 +1964,7 @@
"test",
"test double"
],
- "time": "2017-12-02T09:49:02+00:00"
+ "time": "2018-04-06T13:54:43+00:00"
},
{
"name": "phpdocumentor/reflection-common",
@@ -2111,23 +2114,23 @@
},
{
"name": "phpspec/prophecy",
- "version": "1.7.5",
+ "version": "1.7.6",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
- "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401"
+ "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpspec/prophecy/zipball/dfd6be44111a7c41c2e884a336cc4f461b3b2401",
- "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401",
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712",
+ "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.0.2",
"php": "^5.3|^7.0",
"phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0",
- "sebastian/comparator": "^1.1|^2.0",
+ "sebastian/comparator": "^1.1|^2.0|^3.0",
"sebastian/recursion-context": "^1.0|^2.0|^3.0"
},
"require-dev": {
@@ -2170,7 +2173,7 @@
"spy",
"stub"
],
- "time": "2018-02-19T10:16:54+00:00"
+ "time": "2018-04-18T13:57:24+00:00"
},
{
"name": "phpunit/dbunit",
@@ -2226,16 +2229,16 @@
},
{
"name": "phpunit/php-code-coverage",
- "version": "5.3.0",
+ "version": "5.3.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "661f34d0bd3f1a7225ef491a70a020ad23a057a1"
+ "reference": "c89677919c5dd6d3b3852f230a663118762218ac"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/661f34d0bd3f1a7225ef491a70a020ad23a057a1",
- "reference": "661f34d0bd3f1a7225ef491a70a020ad23a057a1",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c89677919c5dd6d3b3852f230a663118762218ac",
+ "reference": "c89677919c5dd6d3b3852f230a663118762218ac",
"shasum": ""
},
"require": {
@@ -2285,7 +2288,7 @@
"testing",
"xunit"
],
- "time": "2017-12-06T09:29:45+00:00"
+ "time": "2018-04-06T15:36:58+00:00"
},
{
"name": "phpunit/php-file-iterator",
@@ -2475,16 +2478,16 @@
},
{
"name": "phpunit/phpunit",
- "version": "6.4.4",
+ "version": "6.5.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "562f7dc75d46510a4ed5d16189ae57fbe45a9932"
+ "reference": "4f21a3c6b97c42952fd5c2837bb354ec0199b97b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/562f7dc75d46510a4ed5d16189ae57fbe45a9932",
- "reference": "562f7dc75d46510a4ed5d16189ae57fbe45a9932",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4f21a3c6b97c42952fd5c2837bb354ec0199b97b",
+ "reference": "4f21a3c6b97c42952fd5c2837bb354ec0199b97b",
"shasum": ""
},
"require": {
@@ -2498,12 +2501,12 @@
"phar-io/version": "^1.0",
"php": "^7.0",
"phpspec/prophecy": "^1.7",
- "phpunit/php-code-coverage": "^5.2.2",
- "phpunit/php-file-iterator": "^1.4.2",
+ "phpunit/php-code-coverage": "^5.3",
+ "phpunit/php-file-iterator": "^1.4.3",
"phpunit/php-text-template": "^1.2.1",
"phpunit/php-timer": "^1.0.9",
- "phpunit/phpunit-mock-objects": "^4.0.3",
- "sebastian/comparator": "^2.0.2",
+ "phpunit/phpunit-mock-objects": "^5.0.5",
+ "sebastian/comparator": "^2.1",
"sebastian/diff": "^2.0",
"sebastian/environment": "^3.1",
"sebastian/exporter": "^3.1",
@@ -2529,7 +2532,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "6.4.x-dev"
+ "dev-master": "6.5.x-dev"
}
},
"autoload": {
@@ -2555,33 +2558,33 @@
"testing",
"xunit"
],
- "time": "2017-11-08T11:26:09+00:00"
+ "time": "2018-04-10T11:38:34+00:00"
},
{
"name": "phpunit/phpunit-mock-objects",
- "version": "4.0.4",
+ "version": "5.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
- "reference": "2f789b59ab89669015ad984afa350c4ec577ade0"
+ "reference": "33fd41a76e746b8fa96d00b49a23dadfa8334cdf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/2f789b59ab89669015ad984afa350c4ec577ade0",
- "reference": "2f789b59ab89669015ad984afa350c4ec577ade0",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/33fd41a76e746b8fa96d00b49a23dadfa8334cdf",
+ "reference": "33fd41a76e746b8fa96d00b49a23dadfa8334cdf",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.0.5",
"php": "^7.0",
"phpunit/php-text-template": "^1.2.1",
- "sebastian/exporter": "^3.0"
+ "sebastian/exporter": "^3.1"
},
"conflict": {
"phpunit/phpunit": "<6.0"
},
"require-dev": {
- "phpunit/phpunit": "^6.0"
+ "phpunit/phpunit": "^6.5"
},
"suggest": {
"ext-soap": "*"
@@ -2589,7 +2592,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0.x-dev"
+ "dev-master": "5.0.x-dev"
}
},
"autoload": {
@@ -2604,7 +2607,7 @@
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
+ "email": "sebastian@phpunit.de",
"role": "lead"
}
],
@@ -2614,7 +2617,7 @@
"mock",
"xunit"
],
- "time": "2017-08-03T14:08:16+00:00"
+ "time": "2018-01-06T05:45:45+00:00"
},
{
"name": "psr/container",
@@ -3276,16 +3279,16 @@
},
{
"name": "symfony/browser-kit",
- "version": "v3.4.6",
+ "version": "v3.4.9",
"source": {
"type": "git",
"url": "https://github.com/symfony/browser-kit.git",
- "reference": "490f27762705c8489bd042fe3e9377a191dba9b4"
+ "reference": "840bb6f0d5b3701fd768b68adf7193c2d0f98f79"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/browser-kit/zipball/490f27762705c8489bd042fe3e9377a191dba9b4",
- "reference": "490f27762705c8489bd042fe3e9377a191dba9b4",
+ "url": "https://api.github.com/repos/symfony/browser-kit/zipball/840bb6f0d5b3701fd768b68adf7193c2d0f98f79",
+ "reference": "840bb6f0d5b3701fd768b68adf7193c2d0f98f79",
"shasum": ""
},
"require": {
@@ -3329,11 +3332,11 @@
],
"description": "Symfony BrowserKit Component",
"homepage": "https://symfony.com",
- "time": "2018-01-03T07:37:34+00:00"
+ "time": "2018-03-19T22:32:39+00:00"
},
{
"name": "symfony/class-loader",
- "version": "v3.4.6",
+ "version": "v3.4.9",
"source": {
"type": "git",
"url": "https://github.com/symfony/class-loader.git",
@@ -3389,16 +3392,16 @@
},
{
"name": "symfony/config",
- "version": "v3.4.6",
+ "version": "v3.4.9",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
- "reference": "05e10567b529476a006b00746c5f538f1636810e"
+ "reference": "7c2a9d44f4433863e9bca682e7f03609234657f9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/config/zipball/05e10567b529476a006b00746c5f538f1636810e",
- "reference": "05e10567b529476a006b00746c5f538f1636810e",
+ "url": "https://api.github.com/repos/symfony/config/zipball/7c2a9d44f4433863e9bca682e7f03609234657f9",
+ "reference": "7c2a9d44f4433863e9bca682e7f03609234657f9",
"shasum": ""
},
"require": {
@@ -3448,20 +3451,20 @@
],
"description": "Symfony Config Component",
"homepage": "https://symfony.com",
- "time": "2018-02-14T10:03:57+00:00"
+ "time": "2018-03-19T22:32:39+00:00"
},
{
"name": "symfony/console",
- "version": "v3.4.6",
+ "version": "v3.4.9",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "067339e9b8ec30d5f19f5950208893ff026b94f7"
+ "reference": "5b1fdfa8eb93464bcc36c34da39cedffef822cdf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/067339e9b8ec30d5f19f5950208893ff026b94f7",
- "reference": "067339e9b8ec30d5f19f5950208893ff026b94f7",
+ "url": "https://api.github.com/repos/symfony/console/zipball/5b1fdfa8eb93464bcc36c34da39cedffef822cdf",
+ "reference": "5b1fdfa8eb93464bcc36c34da39cedffef822cdf",
"shasum": ""
},
"require": {
@@ -3482,7 +3485,7 @@
"symfony/process": "~3.3|~4.0"
},
"suggest": {
- "psr/log": "For using the console logger",
+ "psr/log-implementation": "For using the console logger",
"symfony/event-dispatcher": "",
"symfony/lock": "",
"symfony/process": ""
@@ -3517,20 +3520,20 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
- "time": "2018-02-26T15:46:28+00:00"
+ "time": "2018-04-30T01:22:56+00:00"
},
{
"name": "symfony/css-selector",
- "version": "v3.4.6",
+ "version": "v3.4.9",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
- "reference": "544655f1fc078a9cd839fdda2b7b1e64627c826a"
+ "reference": "519a80d7c1d95c6cc0b67f686d15fe27c6910de0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/css-selector/zipball/544655f1fc078a9cd839fdda2b7b1e64627c826a",
- "reference": "544655f1fc078a9cd839fdda2b7b1e64627c826a",
+ "url": "https://api.github.com/repos/symfony/css-selector/zipball/519a80d7c1d95c6cc0b67f686d15fe27c6910de0",
+ "reference": "519a80d7c1d95c6cc0b67f686d15fe27c6910de0",
"shasum": ""
},
"require": {
@@ -3570,20 +3573,20 @@
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
- "time": "2018-02-03T14:55:07+00:00"
+ "time": "2018-03-19T22:32:39+00:00"
},
{
"name": "symfony/debug",
- "version": "v3.4.6",
+ "version": "v3.4.9",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "9b1071f86e79e1999b3d3675d2e0e7684268b9bc"
+ "reference": "1b95888cfd996484527cb41e8952d9a5eaf7454f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/9b1071f86e79e1999b3d3675d2e0e7684268b9bc",
- "reference": "9b1071f86e79e1999b3d3675d2e0e7684268b9bc",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/1b95888cfd996484527cb41e8952d9a5eaf7454f",
+ "reference": "1b95888cfd996484527cb41e8952d9a5eaf7454f",
"shasum": ""
},
"require": {
@@ -3626,20 +3629,20 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
- "time": "2018-02-28T21:49:22+00:00"
+ "time": "2018-04-30T16:53:52+00:00"
},
{
"name": "symfony/dependency-injection",
- "version": "v3.4.6",
+ "version": "v3.4.9",
"source": {
"type": "git",
"url": "https://github.com/symfony/dependency-injection.git",
- "reference": "12e901abc1cb0d637a0e5abe9923471361d96b07"
+ "reference": "54ff9d78b56429f9a1ac12e60bfb6d169c0468e3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/12e901abc1cb0d637a0e5abe9923471361d96b07",
- "reference": "12e901abc1cb0d637a0e5abe9923471361d96b07",
+ "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/54ff9d78b56429f9a1ac12e60bfb6d169c0468e3",
+ "reference": "54ff9d78b56429f9a1ac12e60bfb6d169c0468e3",
"shasum": ""
},
"require": {
@@ -3697,20 +3700,20 @@
],
"description": "Symfony DependencyInjection Component",
"homepage": "https://symfony.com",
- "time": "2018-03-04T03:54:53+00:00"
+ "time": "2018-04-29T14:04:08+00:00"
},
{
"name": "symfony/dom-crawler",
- "version": "v3.4.6",
+ "version": "v3.4.9",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
- "reference": "2bb5d3101cc01f4fe580e536daf4f1959bc2d24d"
+ "reference": "1a4cffeb059226ff6bee9f48acb388faf674afff"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/2bb5d3101cc01f4fe580e536daf4f1959bc2d24d",
- "reference": "2bb5d3101cc01f4fe580e536daf4f1959bc2d24d",
+ "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/1a4cffeb059226ff6bee9f48acb388faf674afff",
+ "reference": "1a4cffeb059226ff6bee9f48acb388faf674afff",
"shasum": ""
},
"require": {
@@ -3753,20 +3756,20 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
- "time": "2018-02-22T10:48:49+00:00"
+ "time": "2018-03-19T22:32:39+00:00"
},
{
"name": "symfony/event-dispatcher",
- "version": "v3.4.6",
+ "version": "v3.4.9",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "58990682ac3fdc1f563b7e705452921372aad11d"
+ "reference": "fdd5abcebd1061ec647089c6c41a07ed60af09f8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/58990682ac3fdc1f563b7e705452921372aad11d",
- "reference": "58990682ac3fdc1f563b7e705452921372aad11d",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/fdd5abcebd1061ec647089c6c41a07ed60af09f8",
+ "reference": "fdd5abcebd1061ec647089c6c41a07ed60af09f8",
"shasum": ""
},
"require": {
@@ -3816,11 +3819,11 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
- "time": "2018-02-14T10:03:57+00:00"
+ "time": "2018-04-06T07:35:25+00:00"
},
{
"name": "symfony/filesystem",
- "version": "v3.4.6",
+ "version": "v3.4.9",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
@@ -3869,16 +3872,16 @@
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.7.0",
+ "version": "v1.8.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b"
+ "reference": "3296adf6a6454a050679cde90f95350ad604b171"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b",
- "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171",
+ "reference": "3296adf6a6454a050679cde90f95350ad604b171",
"shasum": ""
},
"require": {
@@ -3890,7 +3893,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.7-dev"
+ "dev-master": "1.8-dev"
}
},
"autoload": {
@@ -3924,20 +3927,20 @@
"portable",
"shim"
],
- "time": "2018-01-30T19:27:44+00:00"
+ "time": "2018-04-26T10:06:28+00:00"
},
{
"name": "symfony/translation",
- "version": "v3.4.6",
+ "version": "v3.4.9",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
- "reference": "80e19eaf12cbb546ac40384e5c55c36306823e57"
+ "reference": "d4af50f46cd8171fd5c1cdebdb9a8bbcd8078c6c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/translation/zipball/80e19eaf12cbb546ac40384e5c55c36306823e57",
- "reference": "80e19eaf12cbb546ac40384e5c55c36306823e57",
+ "url": "https://api.github.com/repos/symfony/translation/zipball/d4af50f46cd8171fd5c1cdebdb9a8bbcd8078c6c",
+ "reference": "d4af50f46cd8171fd5c1cdebdb9a8bbcd8078c6c",
"shasum": ""
},
"require": {
@@ -3958,7 +3961,7 @@
"symfony/yaml": "~3.4|~4.0"
},
"suggest": {
- "psr/log": "To use logging capability in translator",
+ "psr/log-implementation": "To use logging capability in translator",
"symfony/config": "",
"symfony/yaml": ""
},
@@ -3992,20 +3995,20 @@
],
"description": "Symfony Translation Component",
"homepage": "https://symfony.com",
- "time": "2018-02-22T06:28:18+00:00"
+ "time": "2018-04-30T01:22:56+00:00"
},
{
"name": "symfony/yaml",
- "version": "v3.4.6",
+ "version": "v3.4.9",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
- "reference": "6af42631dcf89e9c616242c900d6c52bd53bd1bb"
+ "reference": "033cfa61ef06ee0847e056e530201842b6e926c3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/6af42631dcf89e9c616242c900d6c52bd53bd1bb",
- "reference": "6af42631dcf89e9c616242c900d6c52bd53bd1bb",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/033cfa61ef06ee0847e056e530201842b6e926c3",
+ "reference": "033cfa61ef06ee0847e056e530201842b6e926c3",
"shasum": ""
},
"require": {
@@ -4050,7 +4053,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
- "time": "2018-02-16T09:50:28+00:00"
+ "time": "2018-04-08T08:21:29+00:00"
},
{
"name": "theseer/tokenizer",
@@ -4094,16 +4097,16 @@
},
{
"name": "webmozart/assert",
- "version": "1.2.0",
+ "version": "1.3.0",
"source": {
"type": "git",
"url": "https://github.com/webmozart/assert.git",
- "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f"
+ "reference": "0df1908962e7a3071564e857d86874dad1ef204a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f",
- "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f",
+ "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a",
+ "reference": "0df1908962e7a3071564e857d86874dad1ef204a",
"shasum": ""
},
"require": {
@@ -4140,15 +4143,18 @@
"check",
"validate"
],
- "time": "2016-11-23T20:04:58+00:00"
+ "time": "2018-01-29T19:49:41+00:00"
}
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {
+ "phpunit/phpunit": 0,
"behat/behat": 0,
"behat/mink-extension": 0,
- "behat/mink-goutte-driver": 0
+ "behat/mink-goutte-driver": 0,
+ "php-mock/php-mock-phpunit": 0,
+ "phpunit/dbunit": 0
},
"prefer-stable": false,
"prefer-lowest": false,
@@ -4160,7 +4166,5 @@
"ext-xml": "*",
"ext-openssl": "*"
},
- "platform-dev": {
- "php": ">=5.6 || >=7.0"
- }
+ "platform-dev": []
}
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 6ce7bf350..ea47f731d 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -657,17 +657,17 @@
},
{
"name": "sabre/vobject",
- "version": "4.1.5",
- "version_normalized": "4.1.5.0",
+ "version": "4.1.6",
+ "version_normalized": "4.1.6.0",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/vobject.git",
- "reference": "0928660e92d46d2d24336a6db320636aa3a75414"
+ "reference": "122cacbdea2c6133ac04db86ec05854beef75adf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sabre-io/vobject/zipball/0928660e92d46d2d24336a6db320636aa3a75414",
- "reference": "0928660e92d46d2d24336a6db320636aa3a75414",
+ "url": "https://api.github.com/repos/sabre-io/vobject/zipball/122cacbdea2c6133ac04db86ec05854beef75adf",
+ "reference": "122cacbdea2c6133ac04db86ec05854beef75adf",
"shasum": ""
},
"require": {
@@ -682,7 +682,7 @@
"suggest": {
"hoa/bench": "If you would like to run the benchmark scripts"
},
- "time": "2018-03-08T21:06:39+00:00",
+ "time": "2018-04-20T07:22:50+00:00",
"bin": [
"bin/vobject",
"bin/generate_vcards"
@@ -886,23 +886,23 @@
},
{
"name": "smarty/smarty",
- "version": "v3.1.31",
- "version_normalized": "3.1.31.0",
+ "version": "v3.1.32",
+ "version_normalized": "3.1.32.0",
"source": {
"type": "git",
"url": "https://github.com/smarty-php/smarty.git",
- "reference": "c7d42e4a327c402897dd587871434888fde1e7a9"
+ "reference": "ac9d4b587e5bf53381e21881820a9830765cb459"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/smarty-php/smarty/zipball/c7d42e4a327c402897dd587871434888fde1e7a9",
- "reference": "c7d42e4a327c402897dd587871434888fde1e7a9",
+ "url": "https://api.github.com/repos/smarty-php/smarty/zipball/ac9d4b587e5bf53381e21881820a9830765cb459",
+ "reference": "ac9d4b587e5bf53381e21881820a9830765cb459",
"shasum": ""
},
"require": {
"php": ">=5.2"
},
- "time": "2016-12-14T21:57:25+00:00",
+ "time": "2018-04-24T14:53:33+00:00",
"type": "library",
"extra": {
"branch-alias": {
diff --git a/vendor/sabre/vobject/CHANGELOG.md b/vendor/sabre/vobject/CHANGELOG.md
index 269b3dbff..6cfec988e 100644
--- a/vendor/sabre/vobject/CHANGELOG.md
+++ b/vendor/sabre/vobject/CHANGELOG.md
@@ -1,10 +1,17 @@
ChangeLog
=========
+4.1.6 (2018-04-20)
+------------------
+
+* #406, #407, #408, #409: Another round of performance improvements in serialization of properties (@gharlan, @staabm)
+* #410: Fixes in iTip for handling `BYDAY=SA,SO` (@gharlan)
+* #381: Fixes in iTip handling of `SCHEDULE-FORCE-SEND` (@alecpl)
+
4.1.5 (2018-03-08)
------------------
-* Serialization: Performance boost for long properties (@gharlan)
+* #404: Serialization: Performance boost for long properties (@gharlan)
4.1.4 (2017-12-22)
------------------
diff --git a/vendor/sabre/vobject/lib/ITip/Broker.php b/vendor/sabre/vobject/lib/ITip/Broker.php
index b9a30611b..b954cdc8d 100644
--- a/vendor/sabre/vobject/lib/ITip/Broker.php
+++ b/vendor/sabre/vobject/lib/ITip/Broker.php
@@ -897,6 +897,9 @@ class Broker {
if ($key === 'INTERVAL' && $val == 1) {
continue;
}
+ if (is_array($val)) {
+ $val = implode(',', $val);
+ }
$rrule[] = "$key=$val";
}
}
@@ -936,9 +939,9 @@ class Broker {
if (isset($attendees[$attendee->getNormalizedValue()])) {
$attendees[$attendee->getNormalizedValue()]['instances'][$recurId] = [
- 'id' => $recurId,
- 'partstat' => $partStat,
- 'force-send' => $forceSend,
+ 'id' => $recurId,
+ 'partstat' => $partStat,
+ 'forceSend' => $forceSend,
];
} else {
$attendees[$attendee->getNormalizedValue()] = [
diff --git a/vendor/sabre/vobject/lib/Parser/MimeDir.php b/vendor/sabre/vobject/lib/Parser/MimeDir.php
index 78e5bf385..742641236 100644
--- a/vendor/sabre/vobject/lib/Parser/MimeDir.php
+++ b/vendor/sabre/vobject/lib/Parser/MimeDir.php
@@ -283,22 +283,22 @@ class MimeDir extends Parser {
*/
protected function readLine() {
- if (!is_null($this->lineBuffer)) {
+ if (!\is_null($this->lineBuffer)) {
$rawLine = $this->lineBuffer;
$this->lineBuffer = null;
} else {
do {
- $eof = feof($this->input);
+ $eof = \feof($this->input);
- $rawLine = fgets($this->input);
+ $rawLine = \fgets($this->input);
- if ($eof || (feof($this->input) && $rawLine === false)) {
+ if ($eof || (\feof($this->input) && $rawLine === false)) {
throw new EofException('End of document reached prematurely');
}
if ($rawLine === false) {
throw new ParseException('Error reading from input stream');
}
- $rawLine = rtrim($rawLine, "\r\n");
+ $rawLine = \rtrim($rawLine, "\r\n");
} while ($rawLine === ''); // Skipping empty lines
$this->lineIndex++;
}
@@ -309,14 +309,15 @@ class MimeDir extends Parser {
// Looking ahead for folded lines.
while (true) {
- $nextLine = rtrim(fgets($this->input), "\r\n");
+ $nextLine = \rtrim(\fgets($this->input), "\r\n");
$this->lineIndex++;
if (!$nextLine) {
break;
}
if ($nextLine[0] === "\t" || $nextLine[0] === " ") {
- $line .= substr($nextLine, 1);
- $rawLine .= "\n " . substr($nextLine, 1);
+ $curLine = \substr($nextLine, 1);
+ $line .= $curLine;
+ $rawLine .= "\n " . $curLine;
} else {
$this->lineBuffer = $nextLine;
break;
diff --git a/vendor/sabre/vobject/lib/Property.php b/vendor/sabre/vobject/lib/Property.php
index 96855f1f7..3d1775fa2 100644
--- a/vendor/sabre/vobject/lib/Property.php
+++ b/vendor/sabre/vobject/lib/Property.php
@@ -246,20 +246,18 @@ abstract class Property extends Node {
$str .= ':' . $this->getRawMimeDirValue();
- $out = '';
- while (strlen($str) > 0) {
- if (strlen($str) > 75) {
- $part = mb_strcut($str, 0, 75, 'utf-8');
- $out .= $part . "\r\n";
- $str = ' ' . substr($str, strlen($part));
- } else {
- $out .= $str . "\r\n";
- $str = '';
- break;
- }
- }
+ $str = \preg_replace(
+ '/(
+ (?:^.)? # 1 additional byte in first line because of missing single space (see next line)
+ .{1,74} # max 75 bytes per line (1 byte is used for a single space added after every CRLF)
+ (?![\x80-\xbf]) # prevent splitting multibyte characters
+ )/x',
+ "$1\r\n ",
+ $str
+ );
- return $out;
+ // remove single space after last CRLF
+ return \substr($str, 0, -1);
}
diff --git a/vendor/sabre/vobject/lib/Property/Text.php b/vendor/sabre/vobject/lib/Property/Text.php
index bb7ab34ee..47a86ccc9 100644
--- a/vendor/sabre/vobject/lib/Property/Text.php
+++ b/vendor/sabre/vobject/lib/Property/Text.php
@@ -213,16 +213,16 @@ class Text extends Property {
$val = $this->getParts();
if (isset($this->minimumPropertyValues[$this->name])) {
- $val = array_pad($val, $this->minimumPropertyValues[$this->name], '');
+ $val = \array_pad($val, $this->minimumPropertyValues[$this->name], '');
}
// Imploding multiple parts into a single value, and splitting the
// values with ;.
- if (count($val) > 1) {
+ if (\count($val) > 1) {
foreach ($val as $k => $v) {
- $val[$k] = str_replace(';', '\;', $v);
+ $val[$k] = \str_replace(';', '\;', $v);
}
- $val = implode(';', $val);
+ $val = \implode(';', $val);
} else {
$val = $val[0];
}
@@ -242,7 +242,7 @@ class Text extends Property {
// If the resulting value contains a \n, we must encode it as
// quoted-printable.
- if (strpos($val, "\n") !== false) {
+ if (\strpos($val, "\n") !== false) {
$str .= ';ENCODING=QUOTED-PRINTABLE:';
$lastLine = $str;
@@ -252,40 +252,39 @@ class Text extends Property {
// encode newlines for us. Specifically, the \r\n sequence must in
// vcards be encoded as =0D=OA and we must insert soft-newlines
// every 75 bytes.
- for ($ii = 0;$ii < strlen($val);$ii++) {
- $ord = ord($val[$ii]);
+ for ($ii = 0;$ii < \strlen($val);$ii++) {
+ $ord = \ord($val[$ii]);
// These characters are encoded as themselves.
if ($ord >= 32 && $ord <= 126) {
$lastLine .= $val[$ii];
} else {
- $lastLine .= '=' . strtoupper(bin2hex($val[$ii]));
+ $lastLine .= '=' . \strtoupper(\bin2hex($val[$ii]));
}
- if (strlen($lastLine) >= 75) {
+ if (\strlen($lastLine) >= 75) {
// Soft line break
$out .= $lastLine . "=\r\n ";
$lastLine = null;
}
}
- if (!is_null($lastLine)) $out .= $lastLine . "\r\n";
+ if (!\is_null($lastLine)) $out .= $lastLine . "\r\n";
return $out;
} else {
$str .= ':' . $val;
- $out = '';
- while (strlen($str) > 0) {
- if (strlen($str) > 75) {
- $part = mb_strcut($str, 0, 75, 'utf-8');
- $out .= $part . "\r\n";
- $str = ' ' . substr($str, strlen($part));
- } else {
- $out .= $str . "\r\n";
- $str = '';
- break;
- }
- }
- return $out;
+ $str = \preg_replace(
+ '/(
+ (?:^.)? # 1 additional byte in first line because of missing single space (see next line)
+ .{1,74} # max 75 bytes per line (1 byte is used for a single space added after every CRLF)
+ (?![\x80-\xbf]) # prevent splitting multibyte characters
+ )/x',
+ "$1\r\n ",
+ $str
+ );
+
+ // remove single space after last CRLF
+ return \substr($str, 0, -1);
}
diff --git a/vendor/sabre/vobject/lib/Version.php b/vendor/sabre/vobject/lib/Version.php
index 67e8a4037..074b06c4b 100644
--- a/vendor/sabre/vobject/lib/Version.php
+++ b/vendor/sabre/vobject/lib/Version.php
@@ -14,6 +14,6 @@ class Version {
/**
* Full version number.
*/
- const VERSION = '4.1.5';
+ const VERSION = '4.1.6';
}
diff --git a/vendor/smarty/smarty/COMPOSER_RELEASE_NOTES.txt b/vendor/smarty/smarty/COMPOSER_RELEASE_NOTES.txt
index c943d9f2e..0644719c9 100644
--- a/vendor/smarty/smarty/COMPOSER_RELEASE_NOTES.txt
+++ b/vendor/smarty/smarty/COMPOSER_RELEASE_NOTES.txt
@@ -27,3 +27,5 @@ To retrieve the development and documentation folders add
"smarty/smarty-dev": "~3.1@dev"
}
+If you are using (include) the composer generated autoloader.php which is located
+in the /vendor folder it is no longer needed to require the Smarty.class.php file.
\ No newline at end of file
diff --git a/vendor/smarty/smarty/INHERITANCE_RELEASE_NOTES.txt b/vendor/smarty/smarty/INHERITANCE_RELEASE_NOTES.txt
index c415c4ccd..67936a81a 100644
--- a/vendor/smarty/smarty/INHERITANCE_RELEASE_NOTES.txt
+++ b/vendor/smarty/smarty/INHERITANCE_RELEASE_NOTES.txt
@@ -1,4 +1,11 @@
-3.1.31-dev
+3.1.3"
+New tags for inheritance parent and chilD
+{parent} == {$smarty.block.parent}
+{child} == {$smarty.block.child}
+Both tags support the assign attribute like
+{child assign=foo}
+
+3.1.31
New tags for inheritance parent and child
{block_parent} == {$smarty.block.parent}
{block_child} == {$smarty.block.child}
@@ -7,7 +14,6 @@ Since 3.1.28 you can mix inheritance by extends resource with the {extends} tag.
A template called by extends resource can extend a subtemplate or chain buy the {extends} tag.
Since 3.1.31 this feature can be turned off by setting the new Smarty property Smarty::$extends_recursion to false.
-
3.1.28
Starting with version 3.1.28 template inheritance is no longer a compile time process.
All {block} tag parent/child relations are resolved at run time.
@@ -63,7 +69,7 @@ the compiled code of {include} subtemplates gets also merged in compiled inherit
Merging the code into a single compile template has some drawbacks.
1. You could not use variable file names in {include} Smarty would use the {include} of compilation time.
2. You could not use individual compile_id in {include}
-3. Seperate caching of subtemplate was not possible
+3. Separate caching of subtemplate was not possible
4. Any change of the template directory structure between calls was not necessarily seen.
Starting with 3.1.15 some of the above conditions got checked and resulted in an exception. It turned out
@@ -75,13 +81,11 @@ With this setting all {include} subtemplate will be merge into the compiled inhe
could be rejected by exception.
-If $smarty->inheritance_merge_compiled_includes = false; {include} subtemplate will not be merged.
-You must now manually merge all {include} subtemplate which do contain {block} tags. This is done by setting the "inline" option.
+If $smarty->inheritance_merge_compiled_includes = false; {include} subtemplate will not be merged.You must now manually merge all {include} subtemplate which do contain {block} tags. This is done by setting the "inline" option.
{include file='foo.bar' inline}
1. In case of a variable file name like {include file=$foo inline} you must use the variable in a compile_id $smarty->compile_id = $foo;
-2. If you use individual compile_id in {include file='foo.tpl' compile_id=$bar inline} it must be used in the
- global compile_id as well $smarty->compile_id = $bar;
+2. If you use individual compile_id in {include file='foo.tpl' compile_id=$bar inline} it must be used in the global compile_id as well $smarty->compile_id = $bar;
3. If call templates with different template_dir configurations and a parent could same named child template from different folders
you must make the folder name part of the compile_id.
diff --git a/vendor/smarty/smarty/NEW_FEATURES.txt b/vendor/smarty/smarty/NEW_FEATURES.txt
index adbc1099b..7632b07ea 100644
--- a/vendor/smarty/smarty/NEW_FEATURES.txt
+++ b/vendor/smarty/smarty/NEW_FEATURES.txt
@@ -2,6 +2,53 @@
This file contains a brief description of new features which have been added to Smarty 3.1
+Smarty 3.1.32 New tags for inheritance parent and child
+ =========================================
+ {parent} == {$smarty.block.parent}
+ {child} == {$smarty.block.child}
+ Both tags support the assign attribute like
+ {child assign=foo}
+
+ Deprecate functions Smarty::muteExpectedErrors() and Smarty::unmuteExpectedErrors()
+ ===================================================================================
+ These functions to start a special error handler are no longer needed as Smarty does
+ no longer use error suppression like @filemtime().
+ For backward compatibility the functions still can be called.
+
+ Using literals containing Smarty's left and right delimiter
+ ===========================================================
+ New Methods
+ $smarty->setLiterals(array $literals)
+ $smarty->addLiterals(array $literals)
+ to define literals containing Smarty delimiter. This can avoid the need for extreme usage
+ of {literal} {/literal} tags.
+ A) Treat '{{' and '}}' as literal
+ If Smarty::$auto_literal is enabled
+ {{ foo }}
+ will be treated now as literal. (This does apply for any number of delimiter repeatations).
+ However {{foo}} is not an literal but will be interpreted as a recursive Smarty tag.
+ If you use
+ $smarty->setLiteral(array('{{','}}'));
+ {{foo}} is now a literal as well.
+ NOTE: In the last example nested Smarty tags starting with '{{' or ending with '}}' will not
+ work any longer, but this should be very very raw occouring restriction.
+ B) Example 2
+ Assume your delimiter are '<-' , '->' and '<--' , '-->' shall be literals
+ $smarty->setLiteral(array('<--','-->'));
+
+
+ The capture buffers can now be accessed as array
+ ================================================
+ {capture name='foo'}
+ bah
+ {\capture}
+ {capture name='buh'}
+ blar
+ {\capture}
+ {foreach $smarty.capture as $name => $buffer}
+ ....
+ {/foreach}
+
Smarty 3.1.31
New tags for inheritance parent and child
=========================================
@@ -45,8 +92,7 @@ Smarty 3.1.30
{/foreach}
The {foreach} loop is rendered while processing the compiled template, but $current is a nocache
- variable. Normally the {if $current==$item.id} would fail as the $item variable is unkown in the
- cached template. {make_nocache $item} does make the current $item value known in thee cached template.
+ variable. Normally the {if $current==$item.id} would fail as the $item variable is unknown in the cached template. {make_nocache $item} does make the current $item value known in thee cached template.
{make_nocache} is ignored when caching is disabled or the variable does exists as nocache variable.
@@ -81,8 +127,7 @@ Smarty 3.1.30
Supported scope are parent, tpl_root, smarty, global and root.
A scope used together with the {include} tag will cause that with some exceptions any variable
assignment within that sub-template will update/assign the variable in other scopes according
- to the above rules. It does include also variables assigned by plugins, tags supporting the assign=foo
- attribute and direct assignments in {if} and {while} like {if $foo=$bar}.
+ to the above rules. It does include also variables assigned by plugins, tags supporting the assign=foo attribute and direct assignments in {if} and {while} like {if $foo=$bar}.
Excluded are the key and value variables of {foreach}, {for} loop variables , variables passed by attributes
in {include} and direct increments/decrements like {$foo++}, {$foo--}
@@ -132,8 +177,8 @@ Smarty 3.1.28
as the corresponding Smarty methods to get the content of another template.
Example:
$template->display(); Does display template of template object
- $template->display('foo.tpl'); Does display template 'foo.bar'
-
+ $template->display('foo.tpl'); Does display template 'foo.bar'
+
File: resource
==============
Multiple template_dir entries can now be selected by a comma separated list of indices.
diff --git a/vendor/smarty/smarty/README b/vendor/smarty/smarty/README
index 08b397c3f..9a71519bd 100644
--- a/vendor/smarty/smarty/README
+++ b/vendor/smarty/smarty/README
@@ -176,7 +176,7 @@ backward compatible with Smarty 2, except for the following items:
There are many things that are new to Smarty 3. Here are the notable items:
-
+
LEXER/PARSER
============
@@ -197,8 +197,8 @@ is still supported for BC.
Examples:
{$x+$y} will output the sum of x and y.
{$foo = strlen($bar)} function in assignment
-{assign var=foo value= $x+$y} in attributes
-{$foo = myfunct( ($x+$y)*3 )} as function parameter
+{assign var=foo value= $x+$y} in attributes
+{$foo = myfunct( ($x+$y)*3 )} as function parameter
{$foo[$x+3]} as array index
Smarty tags can be used as values within other tags.
@@ -239,18 +239,18 @@ Examples:
The original "dot" notation stays, and with improvements.
Examples:
-{$foo.a.b.c} => $foo['a']['b']['c']
+{$foo.a.b.c} => $foo['a']['b']['c']
{$foo.a.$b.c} => $foo['a'][$b]['c'] with variable index
{$foo.a.{$b+4}.c} => $foo['a'][$b+4]['c'] with expression as index
{$foo.a.{$b.c}} => $foo['a'][$b['c']] with nested index
-note that { and } are used to address ambiguties when nesting the dot syntax.
+note that { and } are used to address ambiguties when nesting the dot syntax.
Variable names themselves can be variable and contain expressions.
Examples:
$foo normal variable
-$foo_{$bar} variable name containing other variable
-$foo_{$x+$y} variable name containing expressions
+$foo_{$bar} variable name containing other variable
+$foo_{$x+$y} variable name containing expressions
$foo_{$bar}_buh_{$blar} variable name with multiple segments
{$foo_{$x}} will output the variable $foo_1 if $x has a value of 1.
@@ -260,12 +260,12 @@ Example: {$object->method1($x)->method2($y)}
{for} tag added for looping (replacement for {section} tag):
{for $x=0, $y=count($foo); $x<$y; $x++} .... {/for}
Any number of statements can be used separated by comma as the first
-inital expression at {for}.
+initial expression at {for}.
{for $x = $start to $end step $step} ... {/for}is in the SVN now .
You can use also
{for $x = $start to $end} ... {/for}
-In this case the step value will be automaticall 1 or -1 depending on the start and end values.
+In this case the step value will be automatically 1 or -1 depending on the start and end values.
Instead of $start and $end you can use any valid expression.
Inside the loop the following special vars can be accessed:
$x@iteration = number of iteration
@@ -290,7 +290,7 @@ $var@last true on last iteration
The Smarty 2 {foreach} tag syntax is still supported.
-NOTE: {$bar[foo]} still indicates a variable inside of a {section} named foo.
+NOTE: {$bar[foo]} still indicates a variable inside of a {section} named foo.
If you want to access an array element with index foo, you must use quotes
such as {$bar['foo']}, or use the dot syntax {$bar.foo}.
@@ -377,12 +377,12 @@ $smarty->display('string:This is my template, {$foo}!'); // php
VARIABLE SCOPE / VARIABLE STORAGE
=================================
-In Smarty 2, all assigned variables were stored within the Smarty object.
-Therefore, all variables assigned in PHP were accessible by all subsequent
+In Smarty 2, all assigned variables were stored within the Smarty object.
+Therefore, all variables assigned in PHP were accessible by all subsequent
fetch and display template calls.
-In Smarty 3, we have the choice to assign variables to the main Smarty object,
-to user-created data objects, and to user-created template objects.
+In Smarty 3, we have the choice to assign variables to the main Smarty object,
+to user-created data objects, and to user-created template objects.
These objects can be chained. The object at the end of a chain can access all
variables belonging to that template and all variables within the parent objects.
The Smarty object can only be the root of a chain, but a chain can be isolated
@@ -396,7 +396,7 @@ global variables.
A Smarty data object can be created as follows:
$data = $smarty->createData(); // create root data object
$data->assign('foo','bar'); // assign variables as usual
-$data->config_load('my.conf'); // load config file
+$data->config_load('my.conf'); // load config file
$data= $smarty->createData($smarty); // create data object having a parent link to
the Smarty object
@@ -414,7 +414,7 @@ The first parameter can be a template name, a smarty object or a data object.
Examples:
$tpl = $smarty->createTemplate('mytpl.tpl'); // create template object not linked to any parent
$tpl->assign('foo','bar'); // directly assign variables
-$tpl->config_load('my.conf'); // load config file
+$tpl->config_load('my.conf'); // load config file
$tpl = $smarty->createTemplate('mytpl.tpl',$smarty); // create template having a parent link to the Smarty object
$tpl = $smarty->createTemplate('mytpl.tpl',$data); // create template having a parent link to the $data object
@@ -424,31 +424,31 @@ If the $parent parameter is not specified in these method calls, the template ob
is will link back to the Smarty object as it's parent.
If a template is called by an {include...} tag from another template, the
-subtemplate links back to the calling template as it's parent.
+subtemplate links back to the calling template as it's parent.
All variables assigned locally or from a parent template are accessible. If the
template creates or modifies a variable by using the {assign var=foo...} or
{$foo=...} tags, these new values are only known locally (local scope). When the
template exits, none of the new variables or modifications can be seen in the
-parent template(s). This is same behavior as in Smarty 2.
+parent template(s). This is same behavior as in Smarty 2.
With Smarty 3, we can assign variables with a scope attribute which allows the
availablility of these new variables or modifications globally (ie in the parent
templates.)
-Possible scopes are local, parent, root and global.
+Possible scopes are local, parent, root and global.
Examples:
{assign var=foo value='bar'} // no scope is specified, the default 'local'
{$foo='bar'} // same, local scope
{assign var=foo value='bar' scope='local'} // same, local scope
-{assign var=foo value='bar' scope='parent'} // Values will be available to the parent object
+{assign var=foo value='bar' scope='parent'} // Values will be available to the parent object
{$foo='bar' scope='parent'} // (normally the calling template)
-{assign var=foo value='bar' scope='root'} // Values will be exported up to the root object, so they can
+{assign var=foo value='bar' scope='root'} // Values will be exported up to the root object, so they can
{$foo='bar' scope='root'} // be seen from all templates using the same root.
-{assign var=foo value='bar' scope='global'} // Values will be exported to global variable storage,
+{assign var=foo value='bar' scope='global'} // Values will be exported to global variable storage,
{$foo='bar' scope='global'} // they are available to any and all templates.
@@ -460,8 +460,8 @@ included template.
PLUGINS
=======
-Smarty 3 plugins follow the same coding rules as in Smarty 2.
-The main difference is that the template object is now passed in place of the smarty object.
+Smarty 3 plugins follow the same coding rules as in Smarty 2.
+The main difference is that the template object is now passed in place of the smarty object.
The smarty object can be still be accessed through $template->smarty.
smarty_plugintype_name (array $params, Smarty_Internal_Template $template)
@@ -473,7 +473,7 @@ TEMPLATE INHERITANCE:
=====================
With template inheritance you can define blocks, which are areas that can be
-overriden by child templates, so your templates could look like this:
+overridden by child templates, so your templates could look like this:
parent.tpl:
@@ -491,14 +491,14 @@ parent.tpl:
child.tpl:
-{extends file='parent.tpl'}
+{extends file='parent.tpl'}
{block name='title'}
Child title
{/block}
grandchild.tpl:
-{extends file='child.tpl'}
-{block name='title'}Home - {$smarty.block.parent}{/block}
+{extends file='child.tpl'}
+{block name='title'}Home - {$smarty.block.parent}{/block}
{block name='page-title'}My home{/block}
{block name='content'}
{foreach $images as $img}
@@ -508,10 +508,10 @@ grandchild.tpl:
We redefined all the blocks here, however in the title block we used {$smarty.block.parent},
which tells Smarty to insert the default content from the parent template in its place.
-The content block was overriden to display the image files, and page-title has also be
-overriden to display a completely different title.
+The content block was overridden to display the image files, and page-title has also be
+overridden to display a completely different title.
-If we render grandchild.tpl we will get this:
+If we render grandchild.tpl we will get this:
Home - Child title
@@ -529,8 +529,8 @@ If we render grandchild.tpl we will get this:
NOTE: In the child templates everything outside the {extends} or {block} tag sections
is ignored.
-The inheritance tree can be as big as you want (meaning you can extend a file that
-extends another one that extends another one and so on..), but be aware that all files
+The inheritance tree can be as big as you want (meaning you can extend a file that
+extends another one that extends another one and so on..), but be aware that all files
have to be checked for modifications at runtime so the more inheritance the more overhead you add.
Instead of defining the parent/child relationships with the {extends} tag in the child template you
@@ -538,7 +538,7 @@ can use the resource as follow:
$smarty->display('extends:parent.tpl|child.tpl|grandchild.tpl');
-Child {block} tags may optionally have a append or prepend attribute. In this case the parent block content
+Child {block} tags may optionally have a append or prepend attribute. In this case the parent block content
is appended or prepended to the child block content.
{block name='title' append} My title {/block}
diff --git a/vendor/smarty/smarty/README.md b/vendor/smarty/smarty/README.md
index 5783eb3e0..24baae4c2 100644
--- a/vendor/smarty/smarty/README.md
+++ b/vendor/smarty/smarty/README.md
@@ -1,5 +1,12 @@
-#Smarty 3 template engine
-##Distribution repository
+# Smarty 3 template engine
+[smarty.net](https://www.smarty.net/)
+
+## Documentation
+
+For documentation see
+[www.smarty.net/docs/en/](https://www.smarty.net/docs/en/)
+
+## Distribution repository
> Smarty 3.1.28 introduces run time template inheritance
@@ -10,7 +17,7 @@ Smarty versions 3.1.11 or later are now on github and can be installed with Comp
The "smarty/smarty" package will start at libs/.... subfolder.
-To get the latest stable version of Smarty 3.1 use
+To get the latest stable version of Smarty 3.1 use:
```json
"require": {
@@ -20,7 +27,7 @@ To get the latest stable version of Smarty 3.1 use
in your composer.json file.
-To get the trunk version use
+To get the trunk version use:
```json
"require": {
@@ -28,7 +35,7 @@ To get the trunk version use
}
```
-For a specific version use something like
+For a specific version use something like:
```json
"require": {
@@ -36,7 +43,7 @@ For a specific version use something like
}
```
-PHPUnit test can be installed by corresponding composer entries like
+PHPUnit test can be installed by corresponding composer entries like:
```json
"require": {
@@ -44,7 +51,7 @@ PHPUnit test can be installed by corresponding composer entries like
}
```
-Similar applies for the lexer/parser generator
+Similar applies for the lexer/parser generator.
```json
"require": {
@@ -52,7 +59,7 @@ Similar applies for the lexer/parser generator
}
```
-Or you could use
+Or you could use:
```json
"require": {
@@ -60,6 +67,6 @@ Or you could use
}
```
-Which is a wrapper to install all 3 packages
+Which is a wrapper to install all 3 packages.
-Composer can also be used for Smarty2 versions 2.6.24 to 2.6.28
+Composer can also be used for Smarty2 versions 2.6.24 to 2.6.30.
diff --git a/vendor/smarty/smarty/SMARTY_2_BC_NOTES.txt b/vendor/smarty/smarty/SMARTY_2_BC_NOTES.txt
index 79a2cb1b6..fd36bd33b 100644
--- a/vendor/smarty/smarty/SMARTY_2_BC_NOTES.txt
+++ b/vendor/smarty/smarty/SMARTY_2_BC_NOTES.txt
@@ -2,8 +2,8 @@
== Syntax ==
-Smarty 3 API has a new syntax. Much of the Smarty 2 syntax is supported
-by a wrapper but deprecated. See the README that comes with Smarty 3 for more
+Smarty 3 API has a new syntax. Much of the Smarty 2 syntax is supported
+by a wrapper but deprecated. See the README that comes with Smarty 3 for more
information.
The {$array|@mod} syntax has always been a bit confusing, where an "@" is required
@@ -32,9 +32,9 @@ Makes Javascript/CSS easier to work with, eliminating the need for {literal}.
This can be disabled by setting $smarty->auto_literal = false;
== Unquoted Strings ==
-Smarty 2 was a bit more forgiving (and ambiguous) when it comes to unquoted strings
-in parameters. Smarty3 is more restrictive. You can still pass strings without quotes
-so long as they contain no special characters. (anything outside of A-Za-z0-9_)
+Smarty 2 was a bit more forgiving (and ambiguous) when it comes to unquoted strings
+in parameters. Smarty3 is more restrictive. You can still pass strings without quotes
+so long as they contain no special characters. (anything outside of A-Za-z0-9_)
For example filename strings must be quoted
@@ -42,16 +42,16 @@ For example filename strings must be quoted
== Extending the Smarty class ==
-Smarty 3 makes use of the __construct method for initialization. If you are extending
-the Smarty class, its constructor is not called implicitly if the your child class defines
-its own constructor. In order to run Smarty's constructor, a call to parent::__construct()
-within your child constructor is required.
+Smarty 3 makes use of the __construct method for initialization. If you are extending
+the Smarty class, its constructor is not called implicitly if the your child class defines
+its own constructor. In order to run Smarty's constructor, a call to parent::__construct()
+within your child constructor is required.
class MySmarty extends Smarty {
function __construct() {
parent::__construct();
-
+
// your initialization code goes here
}
@@ -59,36 +59,36 @@ class MySmarty extends Smarty {
== Autoloader ==
-Smarty 3 does register its own autoloader with spl_autoload_register. If your code has
-an existing __autoload function then this function must be explicitly registered on
-the __autoload stack. See http://us3.php.net/manual/en/function.spl-autoload-register.php
+Smarty 3 does register its own autoloader with spl_autoload_register. If your code has
+an existing __autoload function then this function must be explicitly registered on
+the __autoload stack. See http://us3.php.net/manual/en/function.spl-autoload-register.php
for further details.
== Plugin Filenames ==
-Smarty 3 optionally supports the PHP spl_autoloader. The autoloader requires filenames
-to be lower case. Because of this, Smarty plugin file names must also be lowercase.
+Smarty 3 optionally supports the PHP spl_autoloader. The autoloader requires filenames
+to be lower case. Because of this, Smarty plugin file names must also be lowercase.
In Smarty 2, mixed case file names did work.
== Scope of Special Smarty Variables ==
-In Smarty 2 the special Smarty variables $smarty.section... and $smarty.foreach...
-had global scope. If you had loops with the same name in subtemplates you could accidentally
+In Smarty 2 the special Smarty variables $smarty.section... and $smarty.foreach...
+had global scope. If you had loops with the same name in subtemplates you could accidentally
overwrite values of parent template.
-In Smarty 3 these special Smarty variable have only local scope in the template which
-is defining the loop. If you need their value in a subtemplate you have to pass them
+In Smarty 3 these special Smarty variable have only local scope in the template which
+is defining the loop. If you need their value in a subtemplate you have to pass them
as parameter.
{include file='path/foo.tpl' index=$smarty.section.foo.index}
== SMARTY_RESOURCE_CHAR_SET ==
-Smarty 3 sets the constant SMARTY_RESOURCE_CHAR_SET to utf-8 as default template charset.
-This is now used also on modifiers like escape as default charset. If your templates use
-other charsets make sure that you define the constant accordingly. Otherwise you may not
+Smarty 3 sets the constant SMARTY_RESOURCE_CHAR_SET to utf-8 as default template charset.
+This is now used also on modifiers like escape as default charset. If your templates use
+other charsets make sure that you define the constant accordingly. Otherwise you may not
get any output.
== newline at {if} tags ==
-A \n was added to the compiled code of the {if},{else},{elseif},{/if} tags to get output of newlines as expected by the template source.
+A \n was added to the compiled code of the {if},{else},{elseif},{/if} tags to get output of newlines as expected by the template source.
If one of the {if} tags is at the line end you will now get a newline in the HTML output.
== trigger_error() ==
@@ -96,7 +96,7 @@ The API function trigger_error() has been removed because it did just map to PHP
However it's still included in the Smarty2 API wrapper.
== Smarty constants ==
-The constants
+The constants
SMARTY_PHP_PASSTHRU
SMARTY_PHP_QUOTE
SMARTY_PHP_REMOVE
diff --git a/vendor/smarty/smarty/SMARTY_3.0_BC_NOTES.txt b/vendor/smarty/smarty/SMARTY_3.0_BC_NOTES.txt
index fd8b540c2..24bdec61a 100644
--- a/vendor/smarty/smarty/SMARTY_3.0_BC_NOTES.txt
+++ b/vendor/smarty/smarty/SMARTY_3.0_BC_NOTES.txt
@@ -1,14 +1,14 @@
== Smarty2 backward compatibility ==
-All Smarty2 specific API functions and deprecated functionallity has been moved
+All Smarty2 specific API functions and deprecated functionality has been moved
to the SmartyBC class.
== {php} Tag ==
-The {php} tag is no longer available in the standard Smarty calls.
-The use of {php} tags is deprecated and only available in the SmartyBC class.
+The {php} tag is no longer available in the standard Smarty calls.
+The use of {php} tags is deprecated and only available in the SmartyBC class.
== {include_php} Tag ==
-The {include_php} tag is no longer available in the standard Smarty calls.
-The use of {include_php} tags is deprecated and only available in the SmartyBC class.
+The {include_php} tag is no longer available in the standard Smarty calls.
+The use of {include_php} tags is deprecated and only available in the SmartyBC class.
== php template resource ==
The support of the php template resource is removed.
diff --git a/vendor/smarty/smarty/SMARTY_3.1_NOTES.txt b/vendor/smarty/smarty/SMARTY_3.1_NOTES.txt
index 57709f0d7..d7c23ccc4 100644
--- a/vendor/smarty/smarty/SMARTY_3.1_NOTES.txt
+++ b/vendor/smarty/smarty/SMARTY_3.1_NOTES.txt
@@ -50,7 +50,7 @@ The escape modifier now knows the $double_encode option, which will
prevent entities from being encoded again.
The capitalize modifier now know the $lc_rest option, which makes sure
-all letters following a captial letter are lower-cased.
+all letters following a capital letter are lower-cased.
The count_sentences modifier now accepts (.?!) as
legitimate endings of a sentence - previously only (.) was
@@ -62,7 +62,7 @@ entity.
default_template_handler_func
-The invocation of $smarty->$default_template_handler_func had to be
+The invocation of $smarty->$default_template_handler_func had to be
altered. Instead of a Smarty_Internal_Template, the fifth argument is
now provided with the Smarty instance. New footprint:
@@ -71,14 +71,14 @@ now provided with the Smarty instance. New footprint:
* Default Template Handler
*
* called when Smarty's file: resource is unable to load a requested file
- *
+ *
* @param string $type resource type (e.g. "file", "string", "eval", "resource")
* @param string $name resource name (e.g. "foo/bar.tpl")
* @param string &$content template's content
* @param integer &$modified template's modification time
* @param Smarty $smarty Smarty instance
- * @return string|boolean path to file or boolean true if $content and $modified
- * have been filled, boolean false if no default template
+ * @return string|boolean path to file or boolean true if $content and $modified
+ * have been filled, boolean false if no default template
* could be loaded
*/
function default_template_handler_func($type, $name, &$content, &$modified, Smarty $smarty) {
@@ -126,7 +126,7 @@ run on variable output.
SYNTAX:
{setfilter filter1|filter2|filter3....}
Smarty3 will lookup up matching filters in the following search order:
-1. varibale filter plugin in plugins_dir.
+1. variable filter plugin in plugins_dir.
2. a valid modifier. A modifier specification will also accept
additional parameter like filter2:'foo'
3. a PHP function
@@ -186,8 +186,8 @@ Note that old-fashioned registration of $cache_handler is not possible
anymore. As the functionality had not been ported to Smarty 3.0.x
properly, it has been dropped from 3.1 completely.
-Locking facilities have been implemented to avoid concurrent cache
-generation. Enable cache locking by setting
+Locking facilities have been implemented to avoid concurrent cache
+generation. Enable cache locking by setting
$smarty->cache_locking = true;
Relative Paths in Templates (File-Resource)
@@ -258,7 +258,7 @@ default_config_handler_func() has been introduced.
default_plugin_handler_func()
-An optional default_plugin_handler_func() can be defined which gets called
+An optional default_plugin_handler_func() can be defined which gets called
by the compiler on tags which can't be resolved internally or by plugins.
The default_plugin_handler() can map tags to plugins on the fly.
diff --git a/vendor/smarty/smarty/change_log.txt b/vendor/smarty/smarty/change_log.txt
index 1d42b0a76..5765a1718 100644
--- a/vendor/smarty/smarty/change_log.txt
+++ b/vendor/smarty/smarty/change_log.txt
@@ -1,4 +1,145 @@
-===== 3.1.31 ===== (14.12.2016)
+===== 3.1.32 ===== (24.04.2018)
+24.04.2018
+ - bugfix possible Security Vulnerability in Smarty_Security class.
+
+26.03.2018
+ - bugfix plugins may not be loaded if {function} or {block} tags are executed in nocache mode
+ https://github.com/smarty-php/smarty/issues/371
+
+26.03.2018
+ - new feature {parent} = {$smarty.block.parent} {child} = {$smarty.block.child}
+
+23.03.2018
+ - bugfix preg_replace could fail on large content resulting in a blank page https://github.com/smarty-php/smarty/issues/417
+
+21.03.2018
+ - bugfix {$smarty.section...} used outside {section}{/section} showed incorrect values if {section}{/section} was called inside
+ another loop https://github.com/smarty-php/smarty/issues/422
+ - bugfix short form of {section} attributes did not work https://github.com/smarty-php/smarty/issues/428
+
+17.03.2018
+ - improvement Smarty::compileAllTemplates() exit with a non-zero status code if max errors is reached https://github.com/smarty-php/smarty/pull/402
+
+16.03.2018
+ - bugfix extends resource did not work with user defined left/right delimiter https://github.com/smarty-php/smarty/issues/419
+
+22.11.2017
+ - bugfix {break} and {continue} could fail if {foreach}{/foreach} did contain other
+ looping tags like {for}, {section} and {while} https://github.com/smarty-php/smarty/issues/323
+
+20.11.2017
+ - bugfix rework of newline spacing between tag code and template text.
+ now again identical with Smarty2 (forum topic 26878)
+ - replacement of " by '
+
+05.11.2017
+ - lexer/parser optimization
+ - code cleanup and optimizations
+ - bugfix {$smarty.section.name.loop} used together with {$smarty.section.name.total} could produce
+ wrong results (forum topic 27041)
+
+26.10.2017
+ - bugfix Smarty version was not filled in header comment of compiled and cached files
+ - optimization replace internal Smarty::$ds property by DIRECTORY_SEPARATOR
+ - deprecate functions Smarty::muteExpectedErrors() and Smarty::unmuteExpectedErrors()
+ as Smarty does no longer use error suppression like @filemtime().
+ for backward compatibility code is moved from Smarty class to an external class and still can be
+ called.
+ - correction of PHPDoc blocks
+ - minor code cleanup
+
+21.10.2017
+ - bugfix custom delimiters could fail since modification of version 3.1.32-dev-23
+ https://github.com/smarty-php/smarty/issues/394
+
+18.10.2017
+ - bugfix fix implementation of unclosed block tag in double quoted string of 12.10.2017
+ https://github.com/smarty-php/smarty/issues/396 https://github.com/smarty-php/smarty/issues/397
+ https://github.com/smarty-php/smarty/issues/391 https://github.com/smarty-php/smarty/issues/392
+
+12.10.2017
+ - bugfix $smarty.block.child and $smarty.block.parent could not be used like any
+ $smarty special variable https://github.com/smarty-php/smarty/issues/393
+ - unclosed block tag in double quoted string must throw compiler exception.
+ https://github.com/smarty-php/smarty/issues/391 https://github.com/smarty-php/smarty/issues/392
+
+07.10.2017
+ - bugfix modification of 9.8.2017 did fail on some recursive
+ tag nesting. https://github.com/smarty-php/smarty/issues/389
+
+26.8.2017
+ - bugfix chained modifier failed when last modifier parameter is a signed value
+ https://github.com/smarty-php/smarty/issues/327
+ - bugfix templates filepath with multibyte characters did not work
+ https://github.com/smarty-php/smarty/issues/385
+ - bugfix {make_nocache} did display code if the template did not contain other nocache code
+ https://github.com/smarty-php/smarty/issues/369
+
+09.8.2017
+ - improvement repeated delimiter like {{ and }} will be treated as literal
+ https://groups.google.com/forum/#!topic/smarty-developers/h9r82Bx4KZw
+
+05.8.2017
+ - bugfix wordwrap modifier could fail if used in nocache code.
+ converted plugin file shared.mb_wordwrap.php into modifier.mb_wordwrap.php
+ - cleanup of _getSmartyObj()
+
+31.7.2017
+ - Call clearstatcache() after mkdir() failure https://github.com/smarty-php/smarty/pull/379
+
+30.7.2017
+ - rewrite mkdir() bugfix to retry automatically see https://github.com/smarty-php/smarty/pull/377
+ https://github.com/smarty-php/smarty/pull/379
+
+21.7.2017
+ - security possible PHP code injection on custom resources at display() or fetch()
+ calls if the resource does not sanitize the template name
+ - bugfix fix 'mkdir(): File exists' error on create directory from parallel
+ processes https://github.com/smarty-php/smarty/pull/377
+ - bugfix solve preg_match() hhvm parameter problem https://github.com/smarty-php/smarty/pull/372
+
+27.5.2017
+ - bugfix change compiled code for registered function and modifiers to called as callable to allow closures
+ https://github.com/smarty-php/smarty/pull/368, https://github.com/smarty-php/smarty/issues/273
+ - bugfix https://github.com/smarty-php/smarty/pull/368 did break the default plugin handler
+ - improvement replace phpversion() by PHP_VERSION constant.
+ https://github.com/smarty-php/smarty/pull/363
+
+21.5.2017
+ - performance store flag for already required shared plugin functions in static variable or
+ Smarty's $_cache to improve performance when plugins are often called
+ https://github.com/smarty-php/smarty/commit/51e0d5cd405d764a4ea257d1bac1fb1205f74528#commitcomment-22280086
+ - bugfix remove special treatment of classes implementing ArrayAccess in {foreach}
+ https://github.com/smarty-php/smarty/issues/332
+ - bugfix remove deleted files by clear_cache() and clear_compiled_template() from
+ ACP cache if present, add some is_file() checks to avoid possible warnings on filemtime()
+ caused by above functions.
+ https://github.com/smarty-php/smarty/issues/341
+ - bugfix version 3.1.31 did fail under PHP 5.2
+ https://github.com/smarty-php/smarty/issues/365
+
+19.5.2017
+ - change properties $accessMap and $obsoleteProperties from private to protected
+ https://github.com/smarty-php/smarty/issues/351
+ - new feature The named capture buffers can now be accessed also as array
+ See NEWS_FEATURES.txt https://github.com/smarty-php/smarty/issues/366
+ - improvement check if ini_get() and ini_set() not disabled
+ https://github.com/smarty-php/smarty/pull/362
+
+24.4.2017
+ - fix spelling https://github.com/smarty-php/smarty/commit/e3eda8a5f5653d8abb960eb1bc47e3eca679b1b4#commitcomment-21803095
+
+17.4.2017
+ - correct generated code on empty() and isset() call, observe change PHP behaviour since PHP 5.5
+ https://github.com/smarty-php/smarty/issues/347
+
+14.4.2017
+ - merge pull requests https://github.com/smarty-php/smarty/pull/349, https://github.com/smarty-php/smarty/pull/322 and https://github.com/smarty-php/smarty/pull/337 to fix spelling and annotation
+
+13.4.2017
+ - bugfix array_merge() parameter should be checked https://github.com/smarty-php/smarty/issues/350
+
+===== 3.1.31 ===== (14.12.2016)
23.11.2016
- move template object cache into static variables
@@ -36,7 +177,7 @@
19.10.2016
- bugfix {make_nocache $var} did fail when variable value did contain '\' https://github.com/smarty-php/smarty/issues/305
- bugfix {make_nocache $var} remove spaces from variable value https://github.com/smarty-php/smarty/issues/304
-
+
12.10.2016
- bugfix {include} with template names including variable or constants could fail after bugfix from
28.09.2016 https://github.com/smarty-php/smarty/issues/302
@@ -95,7 +236,7 @@
01.09.2016
- performance require_once should be called only once for shared plugins https://github.com/smarty-php/smarty/issues/280
-
+
26.08.2016
- bugfix change of 23.08.2016 failed on linux when use_include_path = true
@@ -118,47 +259,47 @@
- bugfix update of 04.08.2016 was incomplete
05.08.2016
- - bugfix compiling of templates failed when the Smarty delimiter did contain '/' https://github.com/smarty-php/smarty/issues/264
+ - bugfix compiling of templates failed when the Smarty delimiter did contain '/' https://github.com/smarty-php/smarty/issues/264
- updated error checking at template and config default handler
-
+
04.08.2016
- improvement move template function source parameter into extension
-
+
26.07.2016
- optimization unneeded loading of compiled resource
-
+
24.07.2016
- regression this->addPluginsDir('/abs/path/to/dir') adding absolute path without trailing '/' did fail https://github.com/smarty-php/smarty/issues/260
-
+
23.07.2016
- bugfix setTemplateDir('/') and setTemplateDir('') did create wrong absolute filepath https://github.com/smarty-php/smarty/issues/245
- optimization of filepath normalization
- improvement remove double function declaration in plugin shared.escape_special_cars.php https://github.com/smarty-php/smarty/issues/229
-
+
19.07.2016
- bugfix multiple {include} with relative filepath within {block}{/block} could fail https://github.com/smarty-php/smarty/issues/246
- bugfix {math} shell injection vulnerability patch provided by Tim Weber
-
+
18.07.2016
- bugfix {foreach} if key variable and item@key attribute have been used both the key variable was not updated https://github.com/smarty-php/smarty/issues/254
- bugfix modifier on plugins like {plugin|modifier ... } did fail when the plugin does return an array https://github.com/smarty-php/smarty/issues/228
- bugfix avoid opcache_invalidate to result in ErrorException when opcache.restrict_api is not empty https://github.com/smarty-php/smarty/pull/244
- bugfix multiple {include} with relative filepath within {block}{/block} could fail https://github.com/smarty-php/smarty/issues/246
-
+
14.07.2016
- bugfix wrong parameter on compileAllTemplates() and compileAllConfig() https://github.com/smarty-php/smarty/issues/231
-
+
13.07.2016
- bugfix PHP 7 compatibility on registered compiler plugins https://github.com/smarty-php/smarty/issues/241
- update testInstall() https://github.com/smarty-php/smarty/issues/248https://github.com/smarty-php/smarty/issues/248
- bugfix enable debugging could fail when template objects did already exists https://github.com/smarty-php/smarty/issues/237
- bugfix template function data should be merged when loading subtemplate https://github.com/smarty-php/smarty/issues/240
- bugfix wrong parameter on compileAllTemplates() https://github.com/smarty-php/smarty/issues/231
-
+
12.07.2016
- bugfix {foreach} item variable must be created also on empty from array https://github.com/smarty-php/smarty/issues/238 and https://github.com/smarty-php/smarty/issues/239
- bugfix enableSecurity() must init cache flags https://github.com/smarty-php/smarty/issues/247
-
+
27.05.2016
- bugfix/improvement of compileAlltemplates() follow symlinks in template folder (PHP >= 5.3.1) https://github.com/smarty-php/smarty/issues/224
clear internal cache and expension handler for each template to avoid possible conflicts https://github.com/smarty-php/smarty/issues/231
@@ -201,26 +342,26 @@
11.03.2016
- optimization of capture and security handling
- improvement $smarty->clearCompiledTemplate() should return on recompiled or uncompiled resources
-
+
10.03.2016
- optimization of resource processing
-
+
09.03.2016
- improvement rework of 'scope' attribute handling see see NEW_FEATURES.txt https://github.com/smarty-php/smarty/issues/194
https://github.com/smarty-php/smarty/issues/186 https://github.com/smarty-php/smarty/issues/179
- bugfix correct Autoloader update of 2.3.2014 https://github.com/smarty-php/smarty/issues/199
-
+
04.03.2016
- bugfix change from 01.03.2016 will cause $smarty->isCached(..) failure if called multiple time for same template
(forum topic 25935)
-
+
02.03.2016
- revert autoloader optimizations because of unexplainable warning when using plugins https://github.com/smarty-php/smarty/issues/199
-
+
01.03.2016
- bugfix template objects must be cached on $smarty->fetch('foo.tpl) calls incase the template is fetched
multiple times (forum topic 25909)
-
+
25.02.2016
- bugfix wrong _realpath with 4 or more parent-directories https://github.com/smarty-php/smarty/issues/190
- optimization of _realpath
@@ -229,10 +370,10 @@
20.02.2016
- bugfix {strip} must keep space between hmtl tags. Broken by changes of 10.2.2016 https://github.com/smarty-php/smarty/issues/184
- new feature/bugfix {foreach}{section} add 'properties' attribute to force compilation of loop properties
- see NEW_FEATURES.txt https://github.com/smarty-php/smarty/issues/189
-
+ see NEW_FEATURES.txt https://github.com/smarty-php/smarty/issues/189
+
19.02.2016
- - revert output buffer flushing on display, echo content again because possible problems when PHP files had
+ - revert output buffer flushing on display, echo content again because possible problems when PHP files had
characters (newline} after ?> at file end https://github.com/smarty-php/smarty/issues/187
14.02.2016
@@ -243,33 +384,33 @@
- optimization make compiler tag object cache static for higher compilation speed
11.02.2016
- - improvement added KnockoutJS comments to trimwhitespace outputfilter https://github.com/smarty-php/smarty/issues/82
+ - improvement added KnockoutJS comments to trimwhitespace outputfilter https://github.com/smarty-php/smarty/issues/82
https://github.com/smarty-php/smarty/pull/181
-
+
10.02.2016
- bugfix {strip} must keep space on output creating smarty tags within html tags https://github.com/smarty-php/smarty/issues/177
- bugfix wrong precedence on special if conditions like '$foo is ... by $bar' could cause wrong code https://github.com/smarty-php/smarty/issues/178
- improvement because of ambiguities the inline constant support has been removed from the $foo.bar syntax https://github.com/smarty-php/smarty/issues/149
- - bugfix other {strip} error with output tags between hmtl https://github.com/smarty-php/smarty/issues/180
+ - bugfix other {strip} error with output tags between hmtl https://github.com/smarty-php/smarty/issues/180
09.02.2016
- move some code from parser into compiler
- reformat all code for unique style
- update/bugfix scope attribute handling reworked. Read the newfeatures.txt file
-
+
05.02.2016
- improvement internal compiler changes
-
+
01.02.2016
- bugfix {foreach} compilation failed when $smarty->merge_compiled_includes = true and pre-filters are used.
29.01.2016
- bugfix implement replacement code for _tag_stack property https://github.com/smarty-php/smarty/issues/151
-
+
28.01.2016
- bugfix allow windows network filepath or wrapper (forum topic 25876) https://github.com/smarty-php/smarty/issues/170
- bugfix if fetch('foo.tpl') is called on a template object the $parent parameter should default to the calling template object https://github.com/smarty-php/smarty/issues/152
-
+
27.01.2016
- revert bugfix compiling {section} did create warning
- bugfix {$smarty.section.customer.loop} did throw compiler error https://github.com/smarty-php/smarty/issues/161
@@ -279,7 +420,7 @@
- bugfix {extends} with relative file path did not work https://github.com/smarty-php/smarty/issues/154
https://github.com/smarty-php/smarty/issues/158
- bugfix {capture} data could not been seen in other templates with {$smarty.capture.name} https://github.com/smarty-php/smarty/issues/153
-
+
26.01.2016
- improvement observe Smarty::$_CHARSET in debugging console https://github.com/smarty-php/smarty/issues/169
- bugfix compiling {section} did create warning
@@ -289,28 +430,28 @@
- update scope handling
- optimize block plugin compiler
- improvement runtime checks if registered block plugins are callable
-
+
01.01.2016
- remove Smarty::$resource_cache_mode property
-
+
31.12.2015
- optimization of {assign}, {if} and {while} compiled code
-
+
30.12.2015
- bugfix plugin names starting with "php" did not compile https://github.com/smarty-php/smarty/issues/147
29.12.2015
- bugfix Smarty::error_reporting was not observed when display() or fetch() was called on template objects https://github.com/smarty-php/smarty/issues/145
-
+
28.12.2015
- optimization of {foreach} code size and processing
-
+
27.12.2015
- improve inheritance code
- update external methods
- code fixes
- PHPdoc updates
-
+
25.12.2015
- compile {block} tag code and its processing into classes
- optimization replace hhvm extension by inline code
@@ -324,45 +465,45 @@
- optimization move internal method decodeProperties back into template object
- optimization move subtemplate processing back into template object
- new feature Caching does now observe the template_dir setting and will create separate cache files if required
-
+
22.12.2015
- change $xxx_dir properties from private to protected in case Smarty class gets extended
- code optimizations
-
+
21.12.2015
- bugfix a filepath starting with '/' or '\' on windows should normalize to the root dir
of current working drive https://github.com/smarty-php/smarty/issues/134
- optimization of filepath normalization
- bugfix {strip} must remove all blanks between html tags https://github.com/smarty-php/smarty/issues/136
-
+
===== 3.1.29 ===== (21.12.2015)
21.12.2015
- optimization improve speed of filetime checks on extends and extendsall resource
-
+
20.12.2015
- bugfix failure when the default resource type was set to 'extendsall' https://github.com/smarty-php/smarty/issues/123
- update compilation of Smarty special variables
- bugfix add addition check for OS type on normalization of file path https://github.com/smarty-php/smarty/issues/134
- bugfix the source uid of the extendsall resource must contain $template_dir settings https://github.com/smarty-php/smarty/issues/123
-
+
19.12.2015
- bugfix using $smarty.capture.foo in expressions could fail https://github.com/smarty-php/smarty/pull/138
- bugfix broken PHP 5.2 compatibility https://github.com/smarty-php/smarty/issues/139
- remove no longer used code
- improvement make sure that compiled and cache templates never can contain a trailing '?>?
-
+
18.12.2015
- bugfix regression when modifier parameter was followed by math https://github.com/smarty-php/smarty/issues/132
-
+
17.12.2015
- bugfix {$smarty.capture.nameFail} did lowercase capture name https://github.com/smarty-php/smarty/issues/135
- bugfix using {block append/prepend} on same block in multiple levels of inheritance templates could fail (forum topic 25827)
- bugfix text content consisting of just a single '0' like in {if true}0{/if} was suppressed (forum topic 25834)
-
+
16.12.2015
- bugfix {foreach} did fail if from atrribute is a Generator class https://github.com/smarty-php/smarty/issues/128
- bugfix direct access $smarty->template_dir = 'foo'; should call Smarty::setTemplateDir() https://github.com/smarty-php/smarty/issues/121
-
+
15.12.2015
- bugfix {$smarty.cookies.foo} did return the $_COOKIE array not the 'foo' value https://github.com/smarty-php/smarty/issues/122
- bugfix a call to clearAllCache() and other should clear all internal template object caches (forum topic 25828)
@@ -370,25 +511,25 @@
14.12.2015
- bugfix {$smarty.config.foo} broken in 3.1.28 https://github.com/smarty-php/smarty/issues/120
- bugfix multiple calls of {section} with same name droped E_NOTICE error https://github.com/smarty-php/smarty/issues/118
-
+
===== 3.1.28 ===== (13.12.2015)
13.12.2015
- bugfix {foreach} and {section} with uppercase characters in name attribute did not work (forum topic 25819)
- bugfix $smarty->debugging_ctrl = 'URL' did not work (forum topic 25811)
- bugfix Debug Console could display incorrect data when using subtemplates
-
+
09.12.2015
- bugfix Smarty did fail under PHP 7.0.0 with use_include_path = true;
-
+
09.12.2015
- bugfix {strip} should exclude some html tags from stripping, related to fix for https://github.com/smarty-php/smarty/issues/111
-
+
08.12.2015
- bugfix internal template function data got stored in wrong compiled file https://github.com/smarty-php/smarty/issues/114
-
+
05.12.2015
-bugfix {strip} should insert a single space https://github.com/smarty-php/smarty/issues/111
-
+
25.11.2015
-bugfix a left delimter like '[%' did fail on [%$var_[%$variable%]%] (forum topic 25798)
@@ -397,7 +538,7 @@
01.11.2015
- update config file processing
-
+
31.10.2015
- bugfix add missing $trusted_dir property to SmartyBC class (forum topic 25751)
@@ -421,7 +562,7 @@
18.09.2015
- bugfix {if $foo instanceof $bar} failed to compile if 2nd value is a variable https://github.com/smarty-php/smarty/issues/92
-
+
17.09.2015
- bugfix {foreach} first attribute was not correctly reset since commit 05a8fa2 of 02.08.2015 https://github.com/smarty-php/smarty/issues/90
@@ -435,7 +576,7 @@
- move code of {call} processing back into Smarty_Internal_Template class
- improvement invalidate OPCACHE for cleared compiled and cached template files (forum topic 25557)
- bugfix unintended multiple debug windows (forum topic 25699)
-
+
30.08.2015
- size optimization move some runtime functions into extension
- optimize inline template processing
@@ -584,10 +725,10 @@
01.06.2015
- bugfix including template variables broken since 3.1.22 https://github.com/smarty-php/smarty/issues/47
-
+
27.05.2015
- bugfix {include} with variable file name must not create by default individual cache file (since 3.1.22) https://github.com/smarty-php/smarty/issues/43
-
+
24.05.2015
- bugfix if condition string 'neq' broken due to a typo https://github.com/smarty-php/smarty/issues/42
@@ -595,11 +736,11 @@
23.05.2015
- improvement on php_handling to allow very large PHP sections, better error handling
- improvement allow extreme large comment sections (forum 25538)
-
+
21.05.2015
- bugfix broken PHP 5.2 compatibility when compiling 1 did compile into wrong code https://github.com/smarty-php/smarty/issues/41
-
+
19.05.2015
- bugfix compiler did overwrite existing variable value when setting the nocache attribute https://github.com/smarty-php/smarty/issues/39
- bugfix output filter trimwhitespace could run into the pcre.backtrack_limit on large output (code.google issue 220)
@@ -607,14 +748,14 @@
18.05.2015
- improvement introduce shortcuts in lexer/parser rules for most frequent terms for higher
- compilation speed
+ compilation speed
16.05.2015
- bugfix {php}{/php} did work just for single lines https://github.com/smarty-php/smarty/issues/33
- improvement remove not needed ?> handling from parser to new compiler module
05.05.2015
- bugfix code could be messed up when {tags} are used in multiple attributes https://github.com/smarty-php/smarty/issues/23
-
+
04.05.2015
- bugfix Smarty_Resource::parseResourceName incompatible with Google AppEngine (https://github.com/smarty-php/smarty/issues/22)
- improvement use is_file() checks to avoid errors suppressed by @ which could still cause problems (https://github.com/smarty-php/smarty/issues/24)
@@ -664,13 +805,13 @@
28.04.2015
- bugfix plugins of merged subtemplates not loaded in 3.1.22-dev (forum topic 25508)
-
- 23.04.2015
+
+ 23.04.2015
- bugfix a nocache template variable used as parameter at {insert} was by mistake cached
-
+
20.04.2015
- bugfix at a template function containing nocache code a parmeter could overwrite a template variable of same name
-
+
27.03.2015
- bugfix Smarty_Security->allow_constants=false; did also disable true, false and null (change of 16.03.2015)
- improvement added a whitelist for trusted constants to security Smarty_Security::$trusted_constants (forum topic 25471)
@@ -678,39 +819,39 @@
20.03.2015
- bugfix make sure that function properties get saved only in compiled files containing the fuction definition {forum topic 25452}
- bugfix correct update of global variable values on exit of template functions. (reported under Smarty Developers)
-
+
16.03.2015
- bugfix problems with {function}{/function} and {call} tags in different subtemplate cache files {forum topic 25452}
- bugfix Smarty_Security->allow_constants=false; did not disallow direct usage of defined constants like {SMARTY_DIR} {forum topic 25457}
- bugfix {block}{/block} tags did not work inside double quoted strings https://github.com/smarty-php/smarty/issues/18
-
-
+
+
15.03.2015
- bugfix $smarty->compile_check must be restored before rendering of a just updated cache file {forum 25452}
-
+
14.03.2015
- bugfix {nocache} {/nocache} tags corrupted code when used within a nocache section caused by a nocache template variable.
-
+
- bugfix template functions defined with {function} in an included subtemplate could not be called in nocache
mode with {call... nocache} if the subtemplate had it's own cache file {forum 25452}
-
+
10.03.2015
- bugfix {include ... nocache} whith variable file or compile_id attribute was not executed in nocache mode.
-
+
12.02.2015
- bugfix multiple Smarty::fetch() of same template when $smarty->merge_compiled_includes = true; could cause function already defined error
-
+
11.02.2015
- bugfix recursive {includes} did create E_NOTICE message when $smarty->merge_compiled_includes = true; (github issue #16)
-
+
22.01.2015
- new feature security can now control access to static methods and properties
see also NEW_FEATURES.txt
21.01.2015
- bugfix clearCompiledTemplates(), clearAll() and clear() could try to delete whole drive at wrong path permissions because realpath() fail (forum 25397)
- - bugfix 'self::' and 'parent::' was interpreted in template syntax as static class
-
+ - bugfix 'self::' and 'parent::' was interpreted in template syntax as static class
+
04.01.2015
- push last weeks changes to github
@@ -721,10 +862,10 @@
- optimization restructure config file processing
31.12.2014
- - bugfix use function_exists('mb_get_info') for setting Smarty::$_MBSTRING.
+ - bugfix use function_exists('mb_get_info') for setting Smarty::$_MBSTRING.
Function mb_split could be overloaded depending on php.ini mbstring.func_overload
-
-
+
+
29.12.2014
- new feature security can now limit the template nesting level by property $max_template_nesting
see also NEW_FEATURES.txt (forum 25370)
@@ -738,14 +879,14 @@
13.12.2014
- improvement optimization of lexer and parser resulting in a up to 30% higher compiling speed
-
+
11.12.2014
- bugfix resolve parser ambiguity between constant print tag {CONST} and other smarty tags after change of 09.12.2014
-
+
09.12.2014
- bugfix variables $null, $true and $false did not work after the change of 12.11.2014 (forum 25342)
- bugfix call of template function by a variable name did not work after latest changes (forum 25342)
-
+
23.11.2014
- bugfix a plugin with attached modifier could fail if the tag was immediately followed by another Smarty tag (since 3.1.21) (forum 25326)
@@ -763,12 +904,12 @@
04.11.2014
- new feature $smarty->debugging = true; => overwrite existing Debug Console window (old behaviour)
$smarty->debugging = 2; => individual Debug Console window by template name
-
+
03.11.2014
- bugfix Debug Console did not show included subtemplates since 3.1.17 (forum 25301)
- bugfix Modifier debug_print_var did not limit recursion or prevent recursive object display at Debug Console
(ATTENTION: parameter order has changed to be able to specify maximum recursion)
- - bugfix Debug consol did not include subtemplate information with $smarty->merge_compiled_includes = true
+ - bugfix Debug consol did not include subtemplate information with $smarty->merge_compiled_includes = true
- improvement The template variables are no longer displayed as objects on the Debug Console
- improvement $smarty->createData($parent = null, $name = null) new optional name parameter for display at Debug Console
- addition of some hooks for future extension of Debug Console
@@ -785,7 +926,7 @@
26.10.2014
- bugfix E_NOTICE message was created during compilation when ASP tags '<%' or '%>' are in template source text
- bugfix merge_compiled_includes option failed when caching enables and same subtemplate was included cached and not cached
-
+
===== 3.1.21 ===== (18.10.2014)
18.10.2014
- composer moved to github
@@ -812,143 +953,143 @@
===== 3.1.20 ===== (09.10.2014)
08.10.2014
- bugfix security mode of "';
- } elseif ($encode == 'javascript_charcode') {
+ } elseif ($encode === 'javascript_charcode') {
$string = '' . $text . '';
for ($x = 0, $y = strlen($string); $x < $y; $x ++) {
@@ -123,7 +123,7 @@ function smarty_function_mailto($params)
implode(',', $ord) . "))" . "}\n" . "\n";
return $_ret;
- } elseif ($encode == 'hex') {
+ } elseif ($encode === 'hex') {
preg_match('!^(.*)(\?.*)$!', $address, $match);
if (!empty($match[ 2 ])) {
trigger_error("mailto: hex encoding does not work with extra attributes. Try javascript.", E_USER_WARNING);
diff --git a/vendor/smarty/smarty/libs/plugins/function.math.php b/vendor/smarty/smarty/libs/plugins/function.math.php
index fc5db335c..396ad085e 100644
--- a/vendor/smarty/smarty/libs/plugins/function.math.php
+++ b/vendor/smarty/smarty/libs/plugins/function.math.php
@@ -9,8 +9,8 @@
/**
* Smarty {math} function plugin
- * Type: function
- * Name: math
+ * Type: function
+ * Name: math
* Purpose: handle math computations in template
*
* @link http://www.smarty.net/manual/en/language.function.math.php {math}
@@ -38,7 +38,7 @@ function smarty_function_math($params, $template)
$equation = $params[ 'equation' ];
// make sure parenthesis are balanced
- if (substr_count($equation, "(") != substr_count($equation, ")")) {
+ if (substr_count($equation, '(') !== substr_count($equation, ')')) {
trigger_error("math: unbalanced parenthesis", E_USER_WARNING);
return;
@@ -59,9 +59,9 @@ function smarty_function_math($params, $template)
}
foreach ($params as $key => $val) {
- if ($key != "equation" && $key != "format" && $key != "assign") {
+ if ($key !== 'equation' && $key !== 'format' && $key !== 'assign') {
// make sure value is not empty
- if (strlen($val) == 0) {
+ if (strlen($val) === 0) {
trigger_error("math: parameter '{$key}' is empty", E_USER_WARNING);
return;
@@ -86,7 +86,7 @@ function smarty_function_math($params, $template)
}
foreach ($params as $key => $val) {
- if ($key != "equation" && $key != "format" && $key != "assign") {
+ if ($key !== 'equation' && $key !== 'format' && $key !== 'assign') {
$equation = preg_replace("/\b$key\b/", " \$params['$key'] ", $equation);
}
}
diff --git a/vendor/smarty/smarty/libs/plugins/modifier.capitalize.php b/vendor/smarty/smarty/libs/plugins/modifier.capitalize.php
index 6513a0495..e354977b0 100644
--- a/vendor/smarty/smarty/libs/plugins/modifier.capitalize.php
+++ b/vendor/smarty/smarty/libs/plugins/modifier.capitalize.php
@@ -8,8 +8,8 @@
/**
* Smarty capitalize modifier plugin
- * Type: modifier
- * Name: capitalize
+ * Type: modifier
+ * Name: capitalize
* Purpose: capitalize words in the string
* {@internal {$string|capitalize:true:true} is the fastest option for MBString enabled systems }}
*
@@ -72,7 +72,7 @@ function smarty_modifier_capitalize($string, $uc_digits = false, $lc_rest = fals
return $upper_string;
}
-/*
+/*
*
* Bug: create_function() use exhausts memory when used in long loops
* Fix: use declared functions for callbacks instead of using create_function()
@@ -80,21 +80,38 @@ function smarty_modifier_capitalize($string, $uc_digits = false, $lc_rest = fals
*
* @author Kyle Renfrow
*/
+/**
+ * @param $matches
+ *
+ * @return string
+ */
function smarty_mod_cap_mbconvert_cb($matches)
{
return stripslashes($matches[ 1 ]) . mb_convert_case(stripslashes($matches[ 2 ]), MB_CASE_UPPER, Smarty::$_CHARSET);
}
-
+/**
+ * @param $matches
+ *
+ * @return string
+ */
function smarty_mod_cap_mbconvert2_cb($matches)
{
return stripslashes($matches[ 1 ]) . mb_convert_case(stripslashes($matches[ 3 ]), MB_CASE_UPPER, Smarty::$_CHARSET);
}
-
+/**
+ * @param $matches
+ *
+ * @return string
+ */
function smarty_mod_cap_ucfirst_cb($matches)
{
return stripslashes($matches[ 1 ]) . ucfirst(stripslashes($matches[ 2 ]));
}
-
+/**
+ * @param $matches
+ *
+ * @return string
+ */
function smarty_mod_cap_ucfirst2_cb($matches)
{
return stripslashes($matches[ 1 ]) . ucfirst(stripslashes($matches[ 3 ]));
diff --git a/vendor/smarty/smarty/libs/plugins/modifier.date_format.php b/vendor/smarty/smarty/libs/plugins/modifier.date_format.php
index bfe363c08..b45b2d4b8 100644
--- a/vendor/smarty/smarty/libs/plugins/modifier.date_format.php
+++ b/vendor/smarty/smarty/libs/plugins/modifier.date_format.php
@@ -8,10 +8,10 @@
/**
* Smarty date_format modifier plugin
- * Type: modifier
- * Name: date_format
- * Purpose: format datestamps via strftime
- * Input:
+ * Type: modifier
+ * Name: date_format
+ * Purpose: format datestamps via strftime
+ * Input:
* - string: input date string
* - format: strftime format for output
* - default_date: default date if $string is empty
@@ -35,20 +35,36 @@ function smarty_modifier_date_format($string, $format = null, $default_date = ''
/**
* require_once the {@link shared.make_timestamp.php} plugin
*/
- if (!is_callable('smarty_make_timestamp')) {
- require_once(SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php');
+ static $is_loaded = false;
+ if (!$is_loaded) {
+ if (!is_callable('smarty_make_timestamp')) {
+ require_once(SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php');
+ }
+ $is_loaded = true;
}
- if ($string != '' && $string != '0000-00-00' && $string != '0000-00-00 00:00:00') {
+ if ($string !== '' && $string !== '0000-00-00' && $string !== '0000-00-00 00:00:00') {
$timestamp = smarty_make_timestamp($string);
- } elseif ($default_date != '') {
+ } elseif ($default_date !== '') {
$timestamp = smarty_make_timestamp($default_date);
} else {
return;
}
- if ($formatter == 'strftime' || ($formatter == 'auto' && strpos($format, '%') !== false)) {
+ if ($formatter === 'strftime' || ($formatter === 'auto' && strpos($format, '%') !== false)) {
if (Smarty::$_IS_WINDOWS) {
- $_win_from = array('%D', '%h', '%n', '%r', '%R', '%t', '%T');
- $_win_to = array('%m/%d/%y', '%b', "\n", '%I:%M:%S %p', '%H:%M', "\t", '%H:%M:%S');
+ $_win_from = array('%D',
+ '%h',
+ '%n',
+ '%r',
+ '%R',
+ '%t',
+ '%T');
+ $_win_to = array('%m/%d/%y',
+ '%b',
+ "\n",
+ '%I:%M:%S %p',
+ '%H:%M',
+ "\t",
+ '%H:%M:%S');
if (strpos($format, '%e') !== false) {
$_win_from[] = '%e';
$_win_to[] = sprintf('%\' 2d', date('j', $timestamp));
diff --git a/vendor/smarty/smarty/libs/plugins/modifier.debug_print_var.php b/vendor/smarty/smarty/libs/plugins/modifier.debug_print_var.php
index 34f85dcd5..2bd112154 100644
--- a/vendor/smarty/smarty/libs/plugins/modifier.debug_print_var.php
+++ b/vendor/smarty/smarty/libs/plugins/modifier.debug_print_var.php
@@ -8,8 +8,8 @@
/**
* Smarty debug_print_var modifier plugin
- * Type: modifier
- * Name: debug_print_var
+ * Type: modifier
+ * Name: debug_print_var
* Purpose: formats variable contents for display in the console
*
* @author Monte Ohrt
@@ -28,7 +28,7 @@ function smarty_modifier_debug_print_var($var, $max = 10, $length = 40, $depth =
switch (gettype($var)) {
case 'array' :
$results = 'Array (' . count($var) . ')';
- if ($depth == $max) {
+ if ($depth === $max) {
break;
}
foreach ($var as $curr_key => $curr_val) {
@@ -46,7 +46,7 @@ function smarty_modifier_debug_print_var($var, $max = 10, $length = 40, $depth =
$results .= ' called recursive';
break;
}
- if ($depth == $max) {
+ if ($depth === $max) {
break;
}
$objects[] = $var;
diff --git a/vendor/smarty/smarty/libs/plugins/modifier.escape.php b/vendor/smarty/smarty/libs/plugins/modifier.escape.php
index 9c247b933..1ae87a7aa 100644
--- a/vendor/smarty/smarty/libs/plugins/modifier.escape.php
+++ b/vendor/smarty/smarty/libs/plugins/modifier.escape.php
@@ -8,8 +8,8 @@
/**
* Smarty escape modifier plugin
- * Type: modifier
- * Name: escape
+ * Type: modifier
+ * Name: escape
* Purpose: escape string for output
*
* @link http://www.smarty.net/docs/en/language.modifier.escape
@@ -25,6 +25,8 @@
function smarty_modifier_escape($string, $esc_type = 'html', $char_set = null, $double_encode = true)
{
static $_double_encode = null;
+ static $is_loaded_1 = false;
+ static $is_loaded_2 = false;
if ($_double_encode === null) {
$_double_encode = version_compare(PHP_VERSION, '5.2.3', '>=');
}
@@ -46,7 +48,9 @@ function smarty_modifier_escape($string, $esc_type = 'html', $char_set = null, $
// php <5.2.3 - prevent double encoding
$string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string);
$string = htmlspecialchars($string, ENT_QUOTES, $char_set);
- $string = str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string);
+ $string = str_replace(array('%%%SMARTY_START%%%',
+ '%%%SMARTY_END%%%'), array('&',
+ ';'), $string);
return $string;
}
@@ -67,7 +71,9 @@ function smarty_modifier_escape($string, $esc_type = 'html', $char_set = null, $
$string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string);
$string = htmlspecialchars($string, ENT_QUOTES, $char_set);
$string =
- str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string);
+ str_replace(array('%%%SMARTY_START%%%',
+ '%%%SMARTY_END%%%'), array('&',
+ ';'), $string);
return $string;
}
@@ -86,7 +92,9 @@ function smarty_modifier_escape($string, $esc_type = 'html', $char_set = null, $
} else {
$string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string);
$string = htmlentities($string, ENT_QUOTES, $char_set);
- $string = str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string);
+ $string = str_replace(array('%%%SMARTY_START%%%',
+ '%%%SMARTY_END%%%'), array('&',
+ ';'), $string);
return $string;
}
@@ -116,8 +124,11 @@ function smarty_modifier_escape($string, $esc_type = 'html', $char_set = null, $
case 'hexentity':
$return = '';
if (Smarty::$_MBSTRING) {
- if (!is_callable('smarty_mb_to_unicode')) {
- require_once(SMARTY_PLUGINS_DIR . 'shared.mb_unicode.php');
+ if (!$is_loaded_1) {
+ if (!is_callable('smarty_mb_to_unicode')) {
+ require_once(SMARTY_PLUGINS_DIR . 'shared.mb_unicode.php');
+ }
+ $is_loaded_1 = true;
}
$return = '';
foreach (smarty_mb_to_unicode($string, Smarty::$_CHARSET) as $unicode) {
@@ -137,8 +148,11 @@ function smarty_modifier_escape($string, $esc_type = 'html', $char_set = null, $
case 'decentity':
$return = '';
if (Smarty::$_MBSTRING) {
- if (!is_callable('smarty_mb_to_unicode')) {
- require_once(SMARTY_PLUGINS_DIR . 'shared.mb_unicode.php');
+ if (!$is_loaded_1) {
+ if (!is_callable('smarty_mb_to_unicode')) {
+ require_once(SMARTY_PLUGINS_DIR . 'shared.mb_unicode.php');
+ }
+ $is_loaded_1 = true;
}
$return = '';
foreach (smarty_mb_to_unicode($string, Smarty::$_CHARSET) as $unicode) {
@@ -157,25 +171,39 @@ function smarty_modifier_escape($string, $esc_type = 'html', $char_set = null, $
case 'javascript':
// escape quotes and backslashes, newlines, etc.
- return strtr($string, array('\\' => '\\\\', "'" => "\\'", '"' => '\\"', "\r" => '\\r', "\n" => '\\n',
+ return strtr($string, array('\\' => '\\\\',
+ "'" => "\\'",
+ '"' => '\\"',
+ "\r" => '\\r',
+ "\n" => '\\n',
'' => '<\/'));
case 'mail':
if (Smarty::$_MBSTRING) {
- if (!is_callable('smarty_mb_str_replace')) {
- require_once(SMARTY_PLUGINS_DIR . 'shared.mb_str_replace.php');
+ if (!$is_loaded_2) {
+ if (!is_callable('smarty_mb_str_replace')) {
+ require_once(SMARTY_PLUGINS_DIR . 'shared.mb_str_replace.php');
+ }
+ $is_loaded_2 = true;
}
- return smarty_mb_str_replace(array('@', '.'), array(' [AT] ', ' [DOT] '), $string);
+ return smarty_mb_str_replace(array('@',
+ '.'), array(' [AT] ',
+ ' [DOT] '), $string);
}
// no MBString fallback
- return str_replace(array('@', '.'), array(' [AT] ', ' [DOT] '), $string);
+ return str_replace(array('@',
+ '.'), array(' [AT] ',
+ ' [DOT] '), $string);
case 'nonstd':
// escape non-standard chars, such as ms document quotes
$return = '';
if (Smarty::$_MBSTRING) {
- if (!is_callable('smarty_mb_to_unicode')) {
- require_once(SMARTY_PLUGINS_DIR . 'shared.mb_unicode.php');
+ if (!$is_loaded_1) {
+ if (!is_callable('smarty_mb_to_unicode')) {
+ require_once(SMARTY_PLUGINS_DIR . 'shared.mb_unicode.php');
+ }
+ $is_loaded_1 = true;
}
foreach (smarty_mb_to_unicode($string, Smarty::$_CHARSET) as $unicode) {
if ($unicode >= 126) {
diff --git a/vendor/smarty/smarty/libs/plugins/modifier.mb_wordwrap.php b/vendor/smarty/smarty/libs/plugins/modifier.mb_wordwrap.php
new file mode 100644
index 000000000..93c6241ec
--- /dev/null
+++ b/vendor/smarty/smarty/libs/plugins/modifier.mb_wordwrap.php
@@ -0,0 +1,75 @@
+ $width) {
+ if ($cut) {
+ $_tokens = preg_split('!(.{' . $width . '})!S' . Smarty::$_UTF8_MODIFIER,
+ $_token,
+ -1,
+ PREG_SPLIT_NO_EMPTY + PREG_SPLIT_DELIM_CAPTURE);
+ }
+ }
+
+ foreach ($_tokens as $token) {
+ $_space = !!preg_match('!^\s$!S' . Smarty::$_UTF8_MODIFIER, $token);
+ $token_length = mb_strlen($token, Smarty::$_CHARSET);
+ $length += $token_length;
+
+ if ($length > $width) {
+ // remove space before inserted break
+ if ($_previous) {
+ $t = mb_substr($t, 0, -1, Smarty::$_CHARSET);
+ }
+
+ if (!$_space) {
+ // add the break before the token
+ if (!empty($t)) {
+ $t .= $break;
+ }
+ $length = $token_length;
+ }
+ } else if ($token === "\n") {
+ // hard break must reset counters
+ $length = 0;
+ }
+ $_previous = $_space;
+ // add the token
+ $t .= $token;
+ }
+ }
+
+ return $t;
+}
diff --git a/vendor/smarty/smarty/libs/plugins/modifier.regex_replace.php b/vendor/smarty/smarty/libs/plugins/modifier.regex_replace.php
index 85f41fdda..479aba875 100644
--- a/vendor/smarty/smarty/libs/plugins/modifier.regex_replace.php
+++ b/vendor/smarty/smarty/libs/plugins/modifier.regex_replace.php
@@ -8,8 +8,8 @@
/**
* Smarty regex_replace modifier plugin
- * Type: modifier
- * Name: regex_replace
+ * Type: modifier
+ * Name: regex_replace
* Purpose: regular expression search/replace
*
* @link http://smarty.php.net/manual/en/language.modifier.regex.replace.php
diff --git a/vendor/smarty/smarty/libs/plugins/modifier.replace.php b/vendor/smarty/smarty/libs/plugins/modifier.replace.php
index 9dca259d5..a1b043b64 100644
--- a/vendor/smarty/smarty/libs/plugins/modifier.replace.php
+++ b/vendor/smarty/smarty/libs/plugins/modifier.replace.php
@@ -8,8 +8,8 @@
/**
* Smarty replace modifier plugin
- * Type: modifier
- * Name: replace
+ * Type: modifier
+ * Name: replace
* Purpose: simple search/replace
*
* @link http://smarty.php.net/manual/en/language.modifier.replace.php replace (Smarty online manual)
@@ -24,11 +24,15 @@
*/
function smarty_modifier_replace($string, $search, $replace)
{
+ static $is_loaded = false;
if (Smarty::$_MBSTRING) {
- if (!is_callable('smarty_mb_str_replace')) {
- require_once(SMARTY_PLUGINS_DIR . 'shared.mb_str_replace.php');
+ if (!$is_loaded) {
+ if (!is_callable('smarty_mb_str_replace')) {
+ require_once(SMARTY_PLUGINS_DIR . 'shared.mb_str_replace.php');
+ }
+ $is_loaded = true;
}
- return smarty_mb_str_replace($search, $replace, $string);
+ return smarty_mb_str_replace($search, $replace, $string);
}
return str_replace($search, $replace, $string);
diff --git a/vendor/smarty/smarty/libs/plugins/modifier.spacify.php b/vendor/smarty/smarty/libs/plugins/modifier.spacify.php
index e5c41ad8b..1e29fd553 100644
--- a/vendor/smarty/smarty/libs/plugins/modifier.spacify.php
+++ b/vendor/smarty/smarty/libs/plugins/modifier.spacify.php
@@ -8,8 +8,8 @@
/**
* Smarty spacify modifier plugin
- * Type: modifier
- * Name: spacify
+ * Type: modifier
+ * Name: spacify
* Purpose: add spaces between characters in a string
*
* @link http://smarty.php.net/manual/en/language.modifier.spacify.php spacify (Smarty online manual)
diff --git a/vendor/smarty/smarty/libs/plugins/modifier.truncate.php b/vendor/smarty/smarty/libs/plugins/modifier.truncate.php
index 6fe844259..bb9df92d7 100644
--- a/vendor/smarty/smarty/libs/plugins/modifier.truncate.php
+++ b/vendor/smarty/smarty/libs/plugins/modifier.truncate.php
@@ -8,8 +8,8 @@
/**
* Smarty truncate modifier plugin
- * Type: modifier
- * Name: truncate
+ * Type: modifier
+ * Name: truncate
* Purpose: Truncate a string to a certain length if necessary,
* optionally splitting in the middle of a word, and
* appending the $etc string or inserting $etc into the middle.
@@ -27,7 +27,7 @@
*/
function smarty_modifier_truncate($string, $length = 80, $etc = '...', $break_words = false, $middle = false)
{
- if ($length == 0) {
+ if ($length === 0) {
return '';
}
diff --git a/vendor/smarty/smarty/libs/plugins/modifiercompiler.cat.php b/vendor/smarty/smarty/libs/plugins/modifiercompiler.cat.php
index db9d81fbf..919b03c39 100644
--- a/vendor/smarty/smarty/libs/plugins/modifiercompiler.cat.php
+++ b/vendor/smarty/smarty/libs/plugins/modifiercompiler.cat.php
@@ -8,11 +8,11 @@
/**
* Smarty cat modifier plugin
- * Type: modifier
- * Name: cat
- * Date: Feb 24, 2003
- * Purpose: catenate a value to a variable
- * Input: string to catenate
+ * Type: modifier
+ * Name: cat
+ * Date: Feb 24, 2003
+ * Purpose: catenate a value to a variable
+ * Input: string to catenate
* Example: {$var|cat:"foo"}
*
* @link http://smarty.php.net/manual/en/language.modifier.cat.php cat
diff --git a/vendor/smarty/smarty/libs/plugins/modifiercompiler.count_characters.php b/vendor/smarty/smarty/libs/plugins/modifiercompiler.count_characters.php
index 0a3ce257b..8116aa327 100644
--- a/vendor/smarty/smarty/libs/plugins/modifiercompiler.count_characters.php
+++ b/vendor/smarty/smarty/libs/plugins/modifiercompiler.count_characters.php
@@ -8,8 +8,8 @@
/**
* Smarty count_characters modifier plugin
- * Type: modifier
- * Name: count_characteres
+ * Type: modifier
+ * Name: count_characters
* Purpose: count the number of characters in a text
*
* @link http://www.smarty.net/manual/en/language.modifier.count.characters.php count_characters (Smarty online manual)
@@ -21,7 +21,7 @@
*/
function smarty_modifiercompiler_count_characters($params)
{
- if (!isset($params[ 1 ]) || $params[ 1 ] != 'true') {
+ if (!isset($params[ 1 ]) || $params[ 1 ] !== 'true') {
return 'preg_match_all(\'/[^\s]/' . Smarty::$_UTF8_MODIFIER . '\',' . $params[ 0 ] . ', $tmp)';
}
if (Smarty::$_MBSTRING) {
diff --git a/vendor/smarty/smarty/libs/plugins/modifiercompiler.count_paragraphs.php b/vendor/smarty/smarty/libs/plugins/modifiercompiler.count_paragraphs.php
index f7f447763..1917d290a 100644
--- a/vendor/smarty/smarty/libs/plugins/modifiercompiler.count_paragraphs.php
+++ b/vendor/smarty/smarty/libs/plugins/modifiercompiler.count_paragraphs.php
@@ -8,8 +8,8 @@
/**
* Smarty count_paragraphs modifier plugin
- * Type: modifier
- * Name: count_paragraphs
+ * Type: modifier
+ * Name: count_paragraphs
* Purpose: count the number of paragraphs in a text
*
* @link http://www.smarty.net/manual/en/language.modifier.count.paragraphs.php
diff --git a/vendor/smarty/smarty/libs/plugins/modifiercompiler.count_sentences.php b/vendor/smarty/smarty/libs/plugins/modifiercompiler.count_sentences.php
index 20032925e..a782d8e0b 100644
--- a/vendor/smarty/smarty/libs/plugins/modifiercompiler.count_sentences.php
+++ b/vendor/smarty/smarty/libs/plugins/modifiercompiler.count_sentences.php
@@ -8,7 +8,7 @@
/**
* Smarty count_sentences modifier plugin
- * Type: modifier
+ * Type: modifier
* Name: count_sentences
* Purpose: count the number of sentences in a text
*
diff --git a/vendor/smarty/smarty/libs/plugins/modifiercompiler.count_words.php b/vendor/smarty/smarty/libs/plugins/modifiercompiler.count_words.php
index f20a197cd..dc8500c75 100644
--- a/vendor/smarty/smarty/libs/plugins/modifiercompiler.count_words.php
+++ b/vendor/smarty/smarty/libs/plugins/modifiercompiler.count_words.php
@@ -8,8 +8,8 @@
/**
* Smarty count_words modifier plugin
- * Type: modifier
- * Name: count_words
+ * Type: modifier
+ * Name: count_words
* Purpose: count the number of words in a text
*
* @link http://www.smarty.net/manual/en/language.modifier.count.words.php count_words (Smarty online manual)
diff --git a/vendor/smarty/smarty/libs/plugins/modifiercompiler.default.php b/vendor/smarty/smarty/libs/plugins/modifiercompiler.default.php
index 2c4c00a37..9fe5d4da2 100644
--- a/vendor/smarty/smarty/libs/plugins/modifiercompiler.default.php
+++ b/vendor/smarty/smarty/libs/plugins/modifiercompiler.default.php
@@ -8,8 +8,8 @@
/**
* Smarty default modifier plugin
- * Type: modifier
- * Name: default
+ * Type: modifier
+ * Name: default
* Purpose: designate default value for empty variables
*
* @link http://www.smarty.net/manual/en/language.modifier.default.php default (Smarty online manual)
diff --git a/vendor/smarty/smarty/libs/plugins/modifiercompiler.escape.php b/vendor/smarty/smarty/libs/plugins/modifiercompiler.escape.php
index 11565c2d9..6a6e01637 100644
--- a/vendor/smarty/smarty/libs/plugins/modifiercompiler.escape.php
+++ b/vendor/smarty/smarty/libs/plugins/modifiercompiler.escape.php
@@ -5,27 +5,27 @@
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
-
/**
* Smarty escape modifier plugin
- * Type: modifier
- * Name: escape
+ * Type: modifier
+ * Name: escape
* Purpose: escape string for output
*
* @link http://www.smarty.net/docsv2/en/language.modifier.escape count_characters (Smarty online manual)
* @author Rodney Rehm
*
- * @param array $params parameters
- * @param $compiler
+ * @param array $params parameters
+ * @param Smarty_Internal_TemplateCompilerBase $compiler
*
* @return string with compiled code
+ * @throws \SmartyException
*/
-function smarty_modifiercompiler_escape($params, $compiler)
+function smarty_modifiercompiler_escape($params, Smarty_Internal_TemplateCompilerBase $compiler)
{
static $_double_encode = null;
- if (!is_callable('smarty_literal_compiler_param')) {
- require_once(SMARTY_PLUGINS_DIR . 'shared.literal_compiler_param.php');
- }
+ static $is_loaded = false;
+ $compiler->template->_checkPlugins(array(array('function' => 'smarty_literal_compiler_param',
+ 'file' => SMARTY_PLUGINS_DIR . 'shared.literal_compiler_param.php')));
if ($_double_encode === null) {
$_double_encode = version_compare(PHP_VERSION, '5.2.3', '>=');
}
@@ -100,14 +100,14 @@ function smarty_modifiercompiler_escape($params, $compiler)
// could not optimize |escape call, so fallback to regular plugin
if ($compiler->template->caching && ($compiler->tag_nocache | $compiler->nocache)) {
- $compiler->parent_compiler->template->compiled->required_plugins[ 'nocache' ][ 'escape' ][ 'modifier' ][ 'file' ] =
+ $compiler->required_plugins[ 'nocache' ][ 'escape' ][ 'modifier' ][ 'file' ] =
SMARTY_PLUGINS_DIR . 'modifier.escape.php';
- $compiler->parent_compiler->template->compiled->required_plugins[ 'nocache' ][ 'escape' ][ 'modifier' ][ 'function' ] =
+ $compiler->required_plugins[ 'nocache' ][ 'escape' ][ 'modifier' ][ 'function' ] =
'smarty_modifier_escape';
} else {
- $compiler->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ 'escape' ][ 'modifier' ][ 'file' ] =
+ $compiler->required_plugins[ 'compiled' ][ 'escape' ][ 'modifier' ][ 'file' ] =
SMARTY_PLUGINS_DIR . 'modifier.escape.php';
- $compiler->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ 'escape' ][ 'modifier' ][ 'function' ] =
+ $compiler->required_plugins[ 'compiled' ][ 'escape' ][ 'modifier' ][ 'function' ] =
'smarty_modifier_escape';
}
diff --git a/vendor/smarty/smarty/libs/plugins/modifiercompiler.from_charset.php b/vendor/smarty/smarty/libs/plugins/modifiercompiler.from_charset.php
index e25a95749..b5732db42 100644
--- a/vendor/smarty/smarty/libs/plugins/modifiercompiler.from_charset.php
+++ b/vendor/smarty/smarty/libs/plugins/modifiercompiler.from_charset.php
@@ -8,8 +8,8 @@
/**
* Smarty from_charset modifier plugin
- * Type: modifier
- * Name: from_charset
+ * Type: modifier
+ * Name: from_charset
* Purpose: convert character encoding from $charset to internal encoding
*
* @author Rodney Rehm
diff --git a/vendor/smarty/smarty/libs/plugins/modifiercompiler.indent.php b/vendor/smarty/smarty/libs/plugins/modifiercompiler.indent.php
index 851f18448..fede8aa74 100644
--- a/vendor/smarty/smarty/libs/plugins/modifiercompiler.indent.php
+++ b/vendor/smarty/smarty/libs/plugins/modifiercompiler.indent.php
@@ -8,8 +8,8 @@
/**
* Smarty indent modifier plugin
- * Type: modifier
- * Name: indent
+ * Type: modifier
+ * Name: indent
* Purpose: indent lines of text
*
* @link http://www.smarty.net/manual/en/language.modifier.indent.php indent (Smarty online manual)
diff --git a/vendor/smarty/smarty/libs/plugins/modifiercompiler.lower.php b/vendor/smarty/smarty/libs/plugins/modifiercompiler.lower.php
index a335eff7f..8c6c26a89 100644
--- a/vendor/smarty/smarty/libs/plugins/modifiercompiler.lower.php
+++ b/vendor/smarty/smarty/libs/plugins/modifiercompiler.lower.php
@@ -8,8 +8,8 @@
/**
* Smarty lower modifier plugin
- * Type: modifier
- * Name: lower
+ * Type: modifier
+ * Name: lower
* Purpose: convert string to lowercase
*
* @link http://www.smarty.net/manual/en/language.modifier.lower.php lower (Smarty online manual)
diff --git a/vendor/smarty/smarty/libs/plugins/modifiercompiler.noprint.php b/vendor/smarty/smarty/libs/plugins/modifiercompiler.noprint.php
index 4906908b4..455cfe14b 100644
--- a/vendor/smarty/smarty/libs/plugins/modifiercompiler.noprint.php
+++ b/vendor/smarty/smarty/libs/plugins/modifiercompiler.noprint.php
@@ -8,8 +8,8 @@
/**
* Smarty noprint modifier plugin
- * Type: modifier
- * Name: noprint
+ * Type: modifier
+ * Name: noprint
* Purpose: return an empty string
*
* @author Uwe Tews
diff --git a/vendor/smarty/smarty/libs/plugins/modifiercompiler.string_format.php b/vendor/smarty/smarty/libs/plugins/modifiercompiler.string_format.php
index bcf9883db..8d3bfa4e2 100644
--- a/vendor/smarty/smarty/libs/plugins/modifiercompiler.string_format.php
+++ b/vendor/smarty/smarty/libs/plugins/modifiercompiler.string_format.php
@@ -8,8 +8,8 @@
/**
* Smarty string_format modifier plugin
- * Type: modifier
- * Name: string_format
+ * Type: modifier
+ * Name: string_format
* Purpose: format strings via sprintf
*
* @link http://www.smarty.net/manual/en/language.modifier.string.format.php string_format (Smarty online manual)
diff --git a/vendor/smarty/smarty/libs/plugins/modifiercompiler.strip.php b/vendor/smarty/smarty/libs/plugins/modifiercompiler.strip.php
index 8173eed8f..3b7ade5ed 100644
--- a/vendor/smarty/smarty/libs/plugins/modifiercompiler.strip.php
+++ b/vendor/smarty/smarty/libs/plugins/modifiercompiler.strip.php
@@ -8,11 +8,11 @@
/**
* Smarty strip modifier plugin
- * Type: modifier
- * Name: strip
+ * Type: modifier
+ * Name: strip
* Purpose: Replace all repeated spaces, newlines, tabs
- * with a single space or supplied replacement string.
- * Example: {$var|strip} {$var|strip:" "}
+ * with a single space or supplied replacement string.
+ * Example: {$var|strip} {$var|strip:" "}
* Date: September 25th, 2002
*
* @link http://www.smarty.net/manual/en/language.modifier.strip.php strip (Smarty online manual)
diff --git a/vendor/smarty/smarty/libs/plugins/modifiercompiler.strip_tags.php b/vendor/smarty/smarty/libs/plugins/modifiercompiler.strip_tags.php
index e56bf9315..5ddca7a94 100644
--- a/vendor/smarty/smarty/libs/plugins/modifiercompiler.strip_tags.php
+++ b/vendor/smarty/smarty/libs/plugins/modifiercompiler.strip_tags.php
@@ -8,8 +8,8 @@
/**
* Smarty strip_tags modifier plugin
- * Type: modifier
- * Name: strip_tags
+ * Type: modifier
+ * Name: strip_tags
* Purpose: strip html tags from text
*
* @link http://www.smarty.net/docs/en/language.modifier.strip.tags.tpl strip_tags (Smarty online manual)
@@ -21,7 +21,7 @@
*/
function smarty_modifiercompiler_strip_tags($params)
{
- if (!isset($params[ 1 ]) || $params[ 1 ] === true || trim($params[ 1 ], '"') == 'true') {
+ if (!isset($params[ 1 ]) || $params[ 1 ] === true || trim($params[ 1 ], '"') === 'true') {
return "preg_replace('!<[^>]*?>!', ' ', {$params[0]})";
} else {
return 'strip_tags(' . $params[ 0 ] . ')';
diff --git a/vendor/smarty/smarty/libs/plugins/modifiercompiler.to_charset.php b/vendor/smarty/smarty/libs/plugins/modifiercompiler.to_charset.php
index fea8d8273..889005712 100644
--- a/vendor/smarty/smarty/libs/plugins/modifiercompiler.to_charset.php
+++ b/vendor/smarty/smarty/libs/plugins/modifiercompiler.to_charset.php
@@ -8,8 +8,8 @@
/**
* Smarty to_charset modifier plugin
- * Type: modifier
- * Name: to_charset
+ * Type: modifier
+ * Name: to_charset
* Purpose: convert character encoding from internal encoding to $charset
*
* @author Rodney Rehm
diff --git a/vendor/smarty/smarty/libs/plugins/modifiercompiler.unescape.php b/vendor/smarty/smarty/libs/plugins/modifiercompiler.unescape.php
index a3409bc73..5a94e0727 100644
--- a/vendor/smarty/smarty/libs/plugins/modifiercompiler.unescape.php
+++ b/vendor/smarty/smarty/libs/plugins/modifiercompiler.unescape.php
@@ -8,8 +8,8 @@
/**
* Smarty unescape modifier plugin
- * Type: modifier
- * Name: unescape
+ * Type: modifier
+ * Name: unescape
* Purpose: unescape html entities
*
* @author Rodney Rehm
@@ -26,7 +26,7 @@ function smarty_modifiercompiler_unescape($params)
if (!isset($params[ 2 ])) {
$params[ 2 ] = '\'' . addslashes(Smarty::$_CHARSET) . '\'';
} else {
- $params[ 2 ] = "'" . $params[ 2 ] . "'";
+ $params[ 2 ] = "'{$params[ 2 ]}'";
}
switch (trim($params[ 1 ], '"\'')) {
diff --git a/vendor/smarty/smarty/libs/plugins/modifiercompiler.upper.php b/vendor/smarty/smarty/libs/plugins/modifiercompiler.upper.php
index a083c4f7e..d0d5cc7c3 100644
--- a/vendor/smarty/smarty/libs/plugins/modifiercompiler.upper.php
+++ b/vendor/smarty/smarty/libs/plugins/modifiercompiler.upper.php
@@ -8,8 +8,8 @@
/**
* Smarty upper modifier plugin
- * Type: modifier
- * Name: lower
+ * Type: modifier
+ * Name: lower
* Purpose: convert string to uppercase
*
* @link http://smarty.php.net/manual/en/language.modifier.upper.php lower (Smarty online manual)
diff --git a/vendor/smarty/smarty/libs/plugins/modifiercompiler.wordwrap.php b/vendor/smarty/smarty/libs/plugins/modifiercompiler.wordwrap.php
index 91849738e..94a0cf602 100644
--- a/vendor/smarty/smarty/libs/plugins/modifiercompiler.wordwrap.php
+++ b/vendor/smarty/smarty/libs/plugins/modifiercompiler.wordwrap.php
@@ -5,22 +5,22 @@
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
-
/**
* Smarty wordwrap modifier plugin
- * Type: modifier
- * Name: wordwrap
+ * Type: modifier
+ * Name: wordwrap
* Purpose: wrap a string of text at a given length
*
* @link http://smarty.php.net/manual/en/language.modifier.wordwrap.php wordwrap (Smarty online manual)
* @author Uwe Tews
*
- * @param array $params parameters
- * @param $compiler
+ * @param array $params parameters
+ * @param \Smarty_Internal_TemplateCompilerBase $compiler
*
* @return string with compiled code
+ * @throws \SmartyException
*/
-function smarty_modifiercompiler_wordwrap($params, $compiler)
+function smarty_modifiercompiler_wordwrap($params, Smarty_Internal_TemplateCompilerBase $compiler)
{
if (!isset($params[ 1 ])) {
$params[ 1 ] = 80;
@@ -33,19 +33,7 @@ function smarty_modifiercompiler_wordwrap($params, $compiler)
}
$function = 'wordwrap';
if (Smarty::$_MBSTRING) {
- if ($compiler->template->caching && ($compiler->tag_nocache | $compiler->nocache)) {
- $compiler->parent_compiler->template->compiled->required_plugins[ 'nocache' ][ 'wordwrap' ][ 'modifier' ][ 'file' ] =
- SMARTY_PLUGINS_DIR . 'shared.mb_wordwrap.php';
- $compiler->template->required_plugins[ 'nocache' ][ 'wordwrap' ][ 'modifier' ][ 'function' ] =
- 'smarty_mb_wordwrap';
- } else {
- $compiler->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ 'wordwrap' ][ 'modifier' ][ 'file' ] =
- SMARTY_PLUGINS_DIR . 'shared.mb_wordwrap.php';
- $compiler->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ 'wordwrap' ][ 'modifier' ][ 'function' ] =
- 'smarty_mb_wordwrap';
- }
- $function = 'smarty_mb_wordwrap';
+ $function = $compiler->getPlugin('mb_wordwrap','modifier');
}
-
return $function . '(' . $params[ 0 ] . ',' . $params[ 1 ] . ',' . $params[ 2 ] . ',' . $params[ 3 ] . ')';
}
diff --git a/vendor/smarty/smarty/libs/plugins/outputfilter.trimwhitespace.php b/vendor/smarty/smarty/libs/plugins/outputfilter.trimwhitespace.php
index 1a67123a4..70a66d3da 100644
--- a/vendor/smarty/smarty/libs/plugins/outputfilter.trimwhitespace.php
+++ b/vendor/smarty/smarty/libs/plugins/outputfilter.trimwhitespace.php
@@ -24,7 +24,7 @@ function smarty_outputfilter_trimwhitespace($source)
$_offset = 0;
// Unify Line-Breaks to \n
- $source = preg_replace("/\015\012|\015|\012/", "\n", $source);
+ $source = preg_replace('/\015\012|\015|\012/', "\n", $source);
// capture Internet Explorer and KnockoutJS Conditional Comments
if (preg_match_all('##is', $source, $matches,
diff --git a/vendor/smarty/smarty/libs/plugins/shared.escape_special_chars.php b/vendor/smarty/smarty/libs/plugins/shared.escape_special_chars.php
index b68fe4b9d..1d4c7284b 100644
--- a/vendor/smarty/smarty/libs/plugins/shared.escape_special_chars.php
+++ b/vendor/smarty/smarty/libs/plugins/shared.escape_special_chars.php
@@ -8,7 +8,7 @@
/**
* escape_special_chars common function
- * Function: smarty_function_escape_special_chars
+ * Function: smarty_function_escape_special_chars
* Purpose: used by other smarty functions to escape
* special chars except for already escaped ones
*
diff --git a/vendor/smarty/smarty/libs/plugins/shared.make_timestamp.php b/vendor/smarty/smarty/libs/plugins/shared.make_timestamp.php
index 67f862441..eb064607d 100644
--- a/vendor/smarty/smarty/libs/plugins/shared.make_timestamp.php
+++ b/vendor/smarty/smarty/libs/plugins/shared.make_timestamp.php
@@ -7,7 +7,7 @@
*/
/**
- * Function: smarty_make_timestamp
+ * Function: smarty_make_timestamp
* Purpose: used by other smarty functions to make a timestamp from a string.
*
* @author Monte Ohrt
@@ -25,7 +25,7 @@ function smarty_make_timestamp($string)
(interface_exists('DateTimeInterface', false) && $string instanceof DateTimeInterface)
) {
return (int) $string->format('U'); // PHP 5.2 BC
- } elseif (strlen($string) == 14 && ctype_digit($string)) {
+ } elseif (strlen($string) === 14 && ctype_digit($string)) {
// it is mysql timestamp format of YYYYMMDDHHMMSS?
return mktime(substr($string, 8, 2), substr($string, 10, 2), substr($string, 12, 2), substr($string, 4, 2),
substr($string, 6, 2), substr($string, 0, 4));
@@ -35,7 +35,7 @@ function smarty_make_timestamp($string)
} else {
// strtotime should handle it
$time = strtotime($string);
- if ($time == - 1 || $time === false) {
+ if ($time === - 1 || $time === false) {
// strtotime() was not able to parse $string, use "now":
return time();
}
diff --git a/vendor/smarty/smarty/libs/plugins/shared.mb_str_replace.php b/vendor/smarty/smarty/libs/plugins/shared.mb_str_replace.php
index 0c3ffe258..300702933 100644
--- a/vendor/smarty/smarty/libs/plugins/shared.mb_str_replace.php
+++ b/vendor/smarty/smarty/libs/plugins/shared.mb_str_replace.php
@@ -6,14 +6,13 @@
* @subpackage PluginsShared
*/
if (!function_exists('smarty_mb_str_replace')) {
-
/**
* Multibyte string replace
*
- * @param string $search the string to be searched
- * @param string $replace the replacement string
- * @param string $subject the source string
- * @param int &$count number of matches found
+ * @param string|string[] $search the string to be searched
+ * @param string|string[] $replace the replacement string
+ * @param string $subject the source string
+ * @param int &$count number of matches found
*
* @return string replaced string
* @author Rodney Rehm
@@ -29,7 +28,7 @@ if (!function_exists('smarty_mb_str_replace')) {
$string = smarty_mb_str_replace($search, $replace, $string, $c);
$count += $c;
}
- } elseif (is_array($search)) {
+ } else if (is_array($search)) {
if (!is_array($replace)) {
foreach ($search as &$string) {
$subject = smarty_mb_str_replace($string, $replace, $subject, $c);
@@ -37,7 +36,7 @@ if (!function_exists('smarty_mb_str_replace')) {
}
} else {
$n = max(count($search), count($replace));
- while ($n --) {
+ while ($n--) {
$subject = smarty_mb_str_replace(current($search), current($replace), $subject, $c);
$count += $c;
next($search);
@@ -49,7 +48,6 @@ if (!function_exists('smarty_mb_str_replace')) {
$count = count($parts) - 1;
$subject = implode($replace, $parts);
}
-
return $subject;
}
}
diff --git a/vendor/smarty/smarty/libs/plugins/shared.mb_unicode.php b/vendor/smarty/smarty/libs/plugins/shared.mb_unicode.php
index 0f790b56a..7450148a4 100644
--- a/vendor/smarty/smarty/libs/plugins/shared.mb_unicode.php
+++ b/vendor/smarty/smarty/libs/plugins/shared.mb_unicode.php
@@ -20,12 +20,12 @@
function smarty_mb_to_unicode($string, $encoding = null)
{
if ($encoding) {
- $expanded = mb_convert_encoding($string, "UTF-32BE", $encoding);
+ $expanded = mb_convert_encoding($string, 'UTF-32BE', $encoding);
} else {
- $expanded = mb_convert_encoding($string, "UTF-32BE");
+ $expanded = mb_convert_encoding($string, 'UTF-32BE');
}
- return unpack("N*", $expanded);
+ return unpack('N*', $expanded);
}
/**
@@ -46,8 +46,8 @@ function smarty_mb_from_unicode($unicode, $encoding = null)
$encoding = mb_internal_encoding();
}
foreach ((array) $unicode as $utf32be) {
- $character = pack("N*", $utf32be);
- $t .= mb_convert_encoding($character, $encoding, "UTF-32BE");
+ $character = pack('N*', $utf32be);
+ $t .= mb_convert_encoding($character, $encoding, 'UTF-32BE');
}
return $t;
diff --git a/vendor/smarty/smarty/libs/plugins/shared.mb_wordwrap.php b/vendor/smarty/smarty/libs/plugins/shared.mb_wordwrap.php
deleted file mode 100644
index 21632a1c0..000000000
--- a/vendor/smarty/smarty/libs/plugins/shared.mb_wordwrap.php
+++ /dev/null
@@ -1,75 +0,0 @@
- $width) {
- if ($cut) {
- $_tokens = preg_split('!(.{' . $width . '})!S' . Smarty::$_UTF8_MODIFIER, $_token, - 1,
- PREG_SPLIT_NO_EMPTY + PREG_SPLIT_DELIM_CAPTURE);
- }
- }
-
- foreach ($_tokens as $token) {
- $_space = !!preg_match('!^\s$!S' . Smarty::$_UTF8_MODIFIER, $token);
- $token_length = mb_strlen($token, Smarty::$_CHARSET);
- $length += $token_length;
-
- if ($length > $width) {
- // remove space before inserted break
- if ($_previous) {
- $t = mb_substr($t, 0, - 1, Smarty::$_CHARSET);
- }
-
- if (!$_space) {
- // add the break before the token
- if (!empty($t)) {
- $t .= $break;
- }
- $length = $token_length;
- }
- } elseif ($token == "\n") {
- // hard break must reset counters
- $_previous = 0;
- $length = 0;
- }
- $_previous = $_space;
- // add the token
- $t .= $token;
- }
- }
-
- return $t;
- }
-}
diff --git a/vendor/smarty/smarty/libs/plugins/variablefilter.htmlspecialchars.php b/vendor/smarty/smarty/libs/plugins/variablefilter.htmlspecialchars.php
index aecd1e7e7..3c85295db 100644
--- a/vendor/smarty/smarty/libs/plugins/variablefilter.htmlspecialchars.php
+++ b/vendor/smarty/smarty/libs/plugins/variablefilter.htmlspecialchars.php
@@ -5,15 +5,15 @@
* @package Smarty
* @subpackage PluginsFilter
*/
-
/**
* Smarty htmlspecialchars variablefilter plugin
*
- * @param string $source input string
+ * @param string $source input string
+ * @param \Smarty_Internal_Template $template
*
* @return string filtered output
*/
-function smarty_variablefilter_htmlspecialchars($source)
+function smarty_variablefilter_htmlspecialchars($source, Smarty_Internal_Template $template)
{
return htmlspecialchars($source, ENT_QUOTES, Smarty::$_CHARSET);
}
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_cacheresource_custom.php b/vendor/smarty/smarty/libs/sysplugins/smarty_cacheresource_custom.php
index 8f1290e49..7a5920f43 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_cacheresource_custom.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_cacheresource_custom.php
@@ -138,7 +138,7 @@ abstract class Smarty_CacheResource_Custom extends Smarty_CacheResource
$_smarty_tpl->compile_id, $content, $timestamp);
}
if (isset($content)) {
- eval("?>" . $content);
+ eval('?>' . $content);
$cached->content = null;
return true;
}
@@ -204,7 +204,8 @@ abstract class Smarty_CacheResource_Custom extends Smarty_CacheResource
* @param string $compile_id compile id
* @param integer $exp_time expiration time (number of seconds, not timestamp)
*
- * @return integer number of cache files deleted
+ * @return int number of cache files deleted
+ * @throws \SmartyException
*/
public function clear(Smarty $smarty, $resource_name, $cache_id, $compile_id, $exp_time)
{
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_cacheresource_keyvaluestore.php b/vendor/smarty/smarty/libs/sysplugins/smarty_cacheresource_keyvaluestore.php
index bab1b5c09..ff065a278 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_cacheresource_keyvaluestore.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_cacheresource_keyvaluestore.php
@@ -104,7 +104,7 @@ abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource
}
}
if (isset($content)) {
- eval("?>" . $content);
+ eval('?>' . $content);
return true;
}
@@ -180,7 +180,8 @@ abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource
* @param string $compile_id compile id
* @param integer $exp_time expiration time [being ignored]
*
- * @return integer number of cache files deleted [always -1]
+ * @return int number of cache files deleted [always -1]
+ * @throws \SmartyException
* @uses buildCachedFilepath() to generate the CacheID
* @uses invalidate() to mark CacheIDs parent chain as outdated
* @uses delete() to remove CacheID from cache
@@ -272,8 +273,8 @@ abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource
*/
protected function addMetaTimestamp(&$content)
{
- $mt = explode(" ", microtime());
- $ts = pack("NN", $mt[ 1 ], (int) ($mt[ 0 ] * 100000000));
+ $mt = explode(' ', microtime());
+ $ts = pack('NN', $mt[ 1 ], (int) ($mt[ 0 ] * 100000000));
$content = $ts . $content;
}
@@ -370,7 +371,7 @@ abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource
/**
* Translate a CacheID into the list of applicable InvalidationKeys.
- * Splits "some|chain|into|an|array" into array( '#clearAll#', 'some', 'some|chain', 'some|chain|into', ... )
+ * Splits 'some|chain|into|an|array' into array( '#clearAll#', 'some', 'some|chain', 'some|chain|into', ... )
*
* @param string $cid CacheID to translate
* @param string $resource_name template name
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_data.php b/vendor/smarty/smarty/libs/sysplugins/smarty_data.php
index b9f5de9a5..743b117bf 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_data.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_data.php
@@ -61,8 +61,8 @@ class Smarty_Data extends Smarty_Internal_Data
foreach ($_parent as $_key => $_val) {
$this->tpl_vars[ $_key ] = new Smarty_Variable($_val);
}
- } elseif ($_parent != null) {
- throw new SmartyException("Wrong type for template variables");
+ } elseif ($_parent !== null) {
+ throw new SmartyException('Wrong type for template variables');
}
}
}
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_block.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_block.php
index a33ad1b11..780319f11 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_block.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_block.php
@@ -38,7 +38,7 @@ class Smarty_Internal_Block
public $prepend = false;
/**
- * Block calls {$smarty.block.child}
+ * Block calls $smarty.block.child
*
* @var bool
*/
@@ -67,7 +67,7 @@ class Smarty_Internal_Block
/**
* Smarty_Internal_Block constructor.
- * - if outer level {block} of child template ($state == 1) save it as child root block
+ * - if outer level {block} of child template ($state === 1) save it as child root block
* - otherwise process inheritance and render
*
* @param string $name block name
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_cacheresource_file.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_cacheresource_file.php
index 7df4ddffb..f6ef09306 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_cacheresource_file.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_cacheresource_file.php
@@ -7,7 +7,6 @@
* @author Uwe Tews
* @author Rodney Rehm
*/
-
/**
* This class does contain all necessary methods for the HTML cache on file system
* Implements the file system as resource for the HTML cache Version ussing nocache inserts.
@@ -29,11 +28,14 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource
{
$source = &$_template->source;
$smarty = &$_template->smarty;
- $_compile_dir_sep = $smarty->use_sub_dirs ? $smarty->ds : '^';
+ $_compile_dir_sep = $smarty->use_sub_dirs ? DIRECTORY_SEPARATOR : '^';
$_filepath = sha1($source->uid . $smarty->_joined_template_dir);
$cached->filepath = $smarty->getCacheDir();
if (isset($_template->cache_id)) {
- $cached->filepath .= preg_replace(array('![^\w|]+!', '![|]+!'), array('_', $_compile_dir_sep),
+ $cached->filepath .= preg_replace(array('![^\w|]+!',
+ '![|]+!'),
+ array('_',
+ $_compile_dir_sep),
$_template->cache_id) . $_compile_dir_sep;
}
if (isset($_template->compile_id)) {
@@ -41,8 +43,10 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource
}
// if use_sub_dirs, break file into directories
if ($smarty->use_sub_dirs) {
- $cached->filepath .= $_filepath[ 0 ] . $_filepath[ 1 ] . $smarty->ds . $_filepath[ 2 ] . $_filepath[ 3 ] . $smarty->ds .
- $_filepath[ 4 ] . $_filepath[ 5 ] . $smarty->ds;
+ $cached->filepath .= $_filepath[ 0 ] . $_filepath[ 1 ] . DIRECTORY_SEPARATOR . $_filepath[ 2 ] .
+ $_filepath[ 3 ] .
+ DIRECTORY_SEPARATOR .
+ $_filepath[ 4 ] . $_filepath[ 5 ] . DIRECTORY_SEPARATOR;
}
$cached->filepath .= $_filepath;
$basename = $source->handler->getBasename($source);
@@ -83,12 +87,13 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource
*
* @return boolean true or false if the cached content does not exist
*/
- public function process(Smarty_Internal_Template $_smarty_tpl, Smarty_Template_Cached $cached = null,
+ public function process(Smarty_Internal_Template $_smarty_tpl,
+ Smarty_Template_Cached $cached = null,
$update = false)
{
$_smarty_tpl->cached->valid = false;
if ($update && defined('HHVM_VERSION')) {
- eval("?>" . file_get_contents($_smarty_tpl->cached->filepath));
+ eval('?>' . file_get_contents($_smarty_tpl->cached->filepath));
return true;
} else {
return @include $_smarty_tpl->cached->filepath;
@@ -101,16 +106,20 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource
* @param Smarty_Internal_Template $_template template object
* @param string $content content to cache
*
- * @return boolean success
+ * @return bool success
+ * @throws \SmartyException
*/
public function writeCachedContent(Smarty_Internal_Template $_template, $content)
{
- if ($_template->smarty->ext->_writeFile->writeFile($_template->cached->filepath, $content,
+ if ($_template->smarty->ext->_writeFile->writeFile($_template->cached->filepath,
+ $content,
$_template->smarty) === true
) {
- if (function_exists('opcache_invalidate') && strlen(ini_get("opcache.restrict_api")) < 1) {
+ if (function_exists('opcache_invalidate') &&
+ (!function_exists('ini_get') || strlen(ini_get('opcache.restrict_api'))) < 1
+ ) {
opcache_invalidate($_template->cached->filepath, true);
- } elseif (function_exists('apc_compile_file')) {
+ } else if (function_exists('apc_compile_file')) {
apc_compile_file($_template->cached->filepath);
}
$cached = $_template->cached;
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_append.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_append.php
index 8539d6b2a..b3689e918 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_append.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_append.php
@@ -24,6 +24,7 @@ class Smarty_Internal_Compile_Append extends Smarty_Internal_Compile_Assign
* @param array $parameter array with compilation parameter
*
* @return string compiled code
+ * @throws \SmartyCompilerException
*/
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
{
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_assign.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_assign.php
index 3bd33847b..cb2ea4257 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_assign.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_assign.php
@@ -71,7 +71,7 @@ class Smarty_Internal_Compile_Assign extends Smarty_Internal_CompileBase
$_scope = $compiler->convertScope($_attr, $this->valid_scopes);
}
// optional parameter
- $_params = "";
+ $_params = '';
if ($_nocache || $_scope) {
$_params .= ' ,' . var_export($_nocache, true);
}
@@ -85,9 +85,9 @@ class Smarty_Internal_Compile_Assign extends Smarty_Internal_CompileBase
$output .= "settype(\$_tmp_array, 'array');\n";
$output .= "}\n";
$output .= "\$_tmp_array{$parameter['smarty_internal_index']} = {$_attr['value']};\n";
- $output .= "\$_smarty_tpl->_assignInScope({$_var}, \$_tmp_array{$_params});\n?>";
+ $output .= "\$_smarty_tpl->_assignInScope({$_var}, \$_tmp_array{$_params});?>";
} else {
- $output = "_assignInScope({$_var}, {$_attr['value']}{$_params});\n?>";
+ $output = "_assignInScope({$_var}, {$_attr['value']}{$_params});?>";
}
return $output;
}
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_block.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_block.php
index 5098d62fe..88d6f37e9 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_block.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_block.php
@@ -22,7 +22,6 @@ class Smarty_Internal_Compile_Block extends Smarty_Internal_Compile_Shared_Inher
* @see Smarty_Internal_CompileBase
*/
public $required_attributes = array('name');
-
/**
* Attribute definition: Overwrites base class.
*
@@ -30,7 +29,6 @@ class Smarty_Internal_Compile_Block extends Smarty_Internal_Compile_Shared_Inher
* @see Smarty_Internal_CompileBase
*/
public $shorttag_order = array('name');
-
/**
* Attribute definition: Overwrites base class.
*
@@ -38,7 +36,6 @@ class Smarty_Internal_Compile_Block extends Smarty_Internal_Compile_Shared_Inher
* @see Smarty_Internal_CompileBase
*/
public $option_flags = array('hide', 'nocache');
-
/**
* Attribute definition: Overwrites base class.
*
@@ -47,13 +44,6 @@ class Smarty_Internal_Compile_Block extends Smarty_Internal_Compile_Shared_Inher
*/
public $optional_attributes = array('assign');
- /**
- * Saved compiler object
- *
- * @var Smarty_Internal_TemplateCompilerBase
- */
- public $compiler = null;
-
/**
* Compiles code for the {block} tag
*
@@ -61,14 +51,13 @@ class Smarty_Internal_Compile_Block extends Smarty_Internal_Compile_Shared_Inher
* @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
* @param array $parameter array with compilation parameter
*
- * @return bool true
*/
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
{
if (!isset($compiler->_cache[ 'blockNesting' ])) {
$compiler->_cache[ 'blockNesting' ] = 0;
}
- if ($compiler->_cache[ 'blockNesting' ] == 0) {
+ if ($compiler->_cache[ 'blockNesting' ] === 0) {
// make sure that inheritance gets initialized in template code
$this->registerInit($compiler);
$this->option_flags = array('hide', 'nocache', 'append', 'prepend');
@@ -77,30 +66,24 @@ class Smarty_Internal_Compile_Block extends Smarty_Internal_Compile_Shared_Inher
}
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
- $compiler->_cache[ 'blockNesting' ] ++;
+ ++$compiler->_cache[ 'blockNesting' ];
$_className = 'Block_' . preg_replace('![^\w]+!', '_', uniqid(rand(), true));
$compiler->_cache[ 'blockName' ][ $compiler->_cache[ 'blockNesting' ] ] = $_attr[ 'name' ];
$compiler->_cache[ 'blockClass' ][ $compiler->_cache[ 'blockNesting' ] ] = $_className;
$compiler->_cache[ 'blockParams' ][ $compiler->_cache[ 'blockNesting' ] ] = array();
$compiler->_cache[ 'blockParams' ][ 1 ][ 'subBlocks' ][ trim($_attr[ 'name' ], '"\'') ][] = $_className;
- $this->openTag($compiler, 'block', array($_attr, $compiler->nocache, $compiler->parser->current_buffer,
- $compiler->template->compiled->has_nocache_code,
- $compiler->template->caching));
- // must whole block be nocache ?
- if ($compiler->tag_nocache) {
- $i = 0;
- }
+ $this->openTag($compiler,
+ 'block',
+ array($_attr, $compiler->nocache, $compiler->parser->current_buffer,
+ $compiler->template->compiled->has_nocache_code,
+ $compiler->template->caching));
+ $compiler->saveRequiredPlugins(true);
$compiler->nocache = $compiler->nocache | $compiler->tag_nocache;
- // $compiler->suppressNocacheProcessing = true;
- if ($_attr[ 'nocache' ] === true) {
- //$compiler->trigger_template_error('nocache option not allowed', $compiler->parser->lex->taglineno);
- }
$compiler->parser->current_buffer = new Smarty_Internal_ParseTree_Template();
$compiler->template->compiled->has_nocache_code = false;
$compiler->suppressNocacheProcessing = true;
}
}
-
/**
* Smarty Internal Plugin Compile BlockClose Class
*
@@ -126,7 +109,7 @@ class Smarty_Internal_Compile_Blockclose extends Smarty_Internal_Compile_Shared_
$_assign = isset($_attr[ 'assign' ]) ? $_attr[ 'assign' ] : null;
unset($_attr[ 'assign' ], $_attr[ 'name' ]);
foreach ($_attr as $name => $stat) {
- if ((is_bool($stat) && $stat !== false) || (!is_bool($stat) && $stat != 'false')) {
+ if ((is_bool($stat) && $stat !== false) || (!is_bool($stat) && $stat !== 'false')) {
$_block[ $name ] = 'true';
}
}
@@ -144,7 +127,8 @@ class Smarty_Internal_Compile_Blockclose extends Smarty_Internal_Compile_Shared_
$output .= "public \${$property} = " . var_export($value,true) .";\n";
}
$output .= "public function callBlock(Smarty_Internal_Template \$_smarty_tpl) {\n";
- //$output .= "/*/%%SmartyNocache:{$compiler->template->compiled->nocache_hash}%%*/\n";
+ $output .= $compiler->compileRequiredPlugins();
+ $compiler->restoreRequiredPlugins();
if ($compiler->template->compiled->has_nocache_code) {
$output .= "\$_smarty_tpl->cached->hashes['{$compiler->template->compiled->nocache_hash}'] = true;\n";
}
@@ -167,32 +151,22 @@ class Smarty_Internal_Compile_Blockclose extends Smarty_Internal_Compile_Shared_
$compiler->parser->current_buffer->append_subtree($compiler->parser,
new Smarty_Internal_ParseTree_Tag($compiler->parser,
$output));
- $compiler->blockOrFunctionCode .= $f = $compiler->parser->current_buffer->to_smarty_php($compiler->parser);
+ $compiler->blockOrFunctionCode .= $compiler->parser->current_buffer->to_smarty_php($compiler->parser);
$compiler->parser->current_buffer = new Smarty_Internal_ParseTree_Template();
- // nocache plugins must be copied
- if (!empty($compiler->template->compiled->required_plugins[ 'nocache' ])) {
- foreach ($compiler->template->compiled->required_plugins[ 'nocache' ] as $plugin => $tmp) {
- foreach ($tmp as $type => $data) {
- $compiler->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ $plugin ][ $type ] =
- $data;
- }
- }
- }
-
// restore old status
$compiler->template->compiled->has_nocache_code = $_has_nocache_code;
$compiler->tag_nocache = $compiler->nocache;
$compiler->nocache = $_nocache;
$compiler->parser->current_buffer = $_buffer;
$output = "_cache[ 'blockNesting' ] == 1) {
+ if ($compiler->_cache[ 'blockNesting' ] === 1) {
$output .= "\$_smarty_tpl->inheritance->instanceBlock(\$_smarty_tpl, '$_className', $_name);\n";
} else {
$output .= "\$_smarty_tpl->inheritance->instanceBlock(\$_smarty_tpl, '$_className', $_name, \$this->tplIndex);\n";
}
$output .= "?>\n";
- $compiler->_cache[ 'blockNesting' ] --;
- if ($compiler->_cache[ 'blockNesting' ] == 0) {
+ --$compiler->_cache[ 'blockNesting' ];
+ if ($compiler->_cache[ 'blockNesting' ] === 0) {
unset($compiler->_cache[ 'blockNesting' ]);
}
$compiler->has_code = true;
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_block_child.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_block_child.php
index bb070ebe3..1708f6482 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_block_child.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_block_child.php
@@ -9,46 +9,16 @@
*/
/**
- * Smarty Internal Plugin Compile Block Parent Class
+ * Smarty Internal Plugin Compile Block Child Class
*
* @author Uwe Tews
*/
-class Smarty_Internal_Compile_Block_Child extends Smarty_Internal_CompileBase
+class Smarty_Internal_Compile_Block_Child extends Smarty_Internal_Compile_Child
{
/**
- * Attribute definition: Overwrites base class.
+ * Tag name
*
- * @var array
- * @see Smarty_Internal_CompileBase
+ * @var string
*/
- public $option_flags = array();
-
- /**
- * Saved compiler object
- *
- * @var Smarty_Internal_TemplateCompilerBase
- */
- public $compiler = null;
-
- /**
- * Compiles code for the {block_parent} tag
- *
- * @param array $args array with attributes from parser
- * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
- *
- * @return bool true
- */
- public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
- {
- if (!isset($compiler->_cache[ 'blockNesting' ])) {
- $compiler->trigger_template_error(' tag {$smarty.block.child} used outside {block} tags ',
- $compiler->parser->lex->taglineno);
- }
- $compiler->has_code = true;
- $compiler->suppressNocacheProcessing = true;
- $compiler->_cache[ 'blockParams' ][ $compiler->_cache[ 'blockNesting' ] ][ 'callsChild' ] = 'true';
- $output = "inheritance->callChild(\$_smarty_tpl, \$this);\n?>\n";
- return $output;
- }
+ public $tag = 'block_child';
}
\ No newline at end of file
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_block_parent.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_block_parent.php
index 0ec1e8485..4f094ad61 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_block_parent.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_block_parent.php
@@ -13,61 +13,19 @@
*
* @author Uwe Tews
*/
-class Smarty_Internal_Compile_Block_Parent extends Smarty_Internal_Compile_Shared_Inheritance
+class Smarty_Internal_Compile_Block_Parent extends Smarty_Internal_Compile_Child
{
+ /**
+ * Tag name
+ *
+ * @var string
+ */
+ public $tag = 'block_parent';
/**
- * Attribute definition: Overwrites base class.
+ * Block type
*
- * @var array
- * @see Smarty_Internal_CompileBase
+ * @var string
*/
- public $optional_attributes = array('name');
-
- /**
- * Attribute definition: Overwrites base class.
- *
- * @var array
- * @see Smarty_Internal_CompileBase
- */
- public $shorttag_order = array('name');
-
- /**
- * Attribute definition: Overwrites base class.
- *
- * @var array
- * @see Smarty_Internal_CompileBase
- */
- public $option_flags = array();
-
- /**
- * Saved compiler object
- *
- * @var Smarty_Internal_TemplateCompilerBase
- */
- public $compiler = null;
-
- /**
- * Compiles code for the {block_parent} tag
- *
- * @param array $args array with attributes from parser
- * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
- *
- * @return bool true
- */
- public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
- {
- // check and get attributes
- $_attr = $this->getAttributes($compiler, $args);
- if (!isset($compiler->_cache[ 'blockNesting' ])) {
- $compiler->trigger_template_error(' tag {$smarty.block.parent} used outside {block} tags ',
- $compiler->parser->lex->taglineno);
- }
- $compiler->suppressNocacheProcessing = true;
- $compiler->has_code = true;
- $output = "inheritance->callParent(\$_smarty_tpl, \$this" .
- (isset($_attr[ 'name' ]) ? ", {$_attr[ 'name' ]}" : '') . ");\n?>\n";
- return $output;
- }
+ public $blockType = 'Parent';
}
\ No newline at end of file
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_break.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_break.php
index 50157382a..09c25d238 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_break.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_break.php
@@ -32,25 +32,35 @@ class Smarty_Internal_Compile_Break extends Smarty_Internal_CompileBase
*/
public $shorttag_order = array('levels');
+ /**
+ * Tag name may be overloaded by Smarty_Internal_Compile_Continue
+ *
+ * @var string
+ */
+ public $tag = 'break';
+
/**
* Compiles code for the {break} tag
*
- * @param array $args array with attributes from parser
- * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
+ * @param array $args array with attributes from parser
+ * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
*
* @return string compiled code
+ * @throws \SmartyCompilerException
*/
- public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
+ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
list($levels, $foreachLevels) = $this->checkLevels($args, $compiler);
- $output = " 0 && $this->tag === 'continue') {
+ $foreachLevels--;
+ }
+ if ($foreachLevels > 0) {
/* @var Smarty_Internal_Compile_Foreach $foreachCompiler */
$foreachCompiler = $compiler->getTagCompiler('foreach');
$output .= $foreachCompiler->compileRestore($foreachLevels);
}
- $output .= "break {$levels};?>";
+ $output .= "{$this->tag} {$levels};?>";
return $output;
}
@@ -59,12 +69,11 @@ class Smarty_Internal_Compile_Break extends Smarty_Internal_CompileBase
*
* @param array $args array with attributes from parser
* @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param string $tag tag name
*
* @return array
* @throws \SmartyCompilerException
*/
- public function checkLevels($args, Smarty_Internal_TemplateCompilerBase $compiler, $tag = 'break')
+ public function checkLevels($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
static $_is_loopy = array('for' => true, 'foreach' => true, 'while' => true, 'section' => true);
// check and get attributes
@@ -86,7 +95,7 @@ class Smarty_Internal_Compile_Break extends Smarty_Internal_CompileBase
$stack_count = count($compiler->_tag_stack) - 1;
$foreachLevels = 0;
$lastTag = '';
- while ($level_count >= 0 && $stack_count >= 0) {
+ while ($level_count > 0 && $stack_count >= 0) {
if (isset($_is_loopy[ $compiler->_tag_stack[ $stack_count ][ 0 ] ])) {
$lastTag = $compiler->_tag_stack[ $stack_count ][ 0 ];
if ($level_count === 0) {
@@ -99,10 +108,10 @@ class Smarty_Internal_Compile_Break extends Smarty_Internal_CompileBase
}
$stack_count --;
}
- if ($level_count != 0) {
- $compiler->trigger_template_error("cannot {$tag} {$levels} level(s)", null, true);
+ if ($level_count !== 0) {
+ $compiler->trigger_template_error("cannot {$this->tag} {$levels} level(s)", null, true);
}
- if ($lastTag === 'foreach' && $tag === 'break') {
+ if ($lastTag === 'foreach' && $this->tag === 'break' && $foreachLevels > 0) {
$foreachLevels --;
}
return array($levels, $foreachLevels);
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_call.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_call.php
index 739df5eca..eb444d357 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_call.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_call.php
@@ -57,7 +57,7 @@ class Smarty_Internal_Compile_Call extends Smarty_Internal_CompileBase
// output will be stored in a smarty variable instead of being displayed
$_assign = $_attr[ 'assign' ];
}
- //$_name = trim($_attr['name'], "'\"");
+ //$_name = trim($_attr['name'], "''");
$_name = $_attr[ 'name' ];
unset($_attr[ 'name' ], $_attr[ 'assign' ], $_attr[ 'nocache' ]);
// set flag (compiled code of {function} must be included in cache file
@@ -74,7 +74,7 @@ class Smarty_Internal_Compile_Call extends Smarty_Internal_CompileBase
$_paramsArray[] = "'$_key'=>$_value";
}
}
- $_params = 'array(' . implode(",", $_paramsArray) . ')';
+ $_params = 'array(' . implode(',', $_paramsArray) . ')';
//$compiler->suppressNocacheProcessing = true;
// was there an assign attribute
if (isset($_assign)) {
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_capture.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_capture.php
index 34fc55f9d..564b1f63e 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_capture.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_capture.php
@@ -45,11 +45,11 @@ class Smarty_Internal_Compile_Capture extends Smarty_Internal_CompileBase
public static function compileSpecialVariable($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter = null)
{
$tag = trim($parameter[ 0 ], '"\'');
- $name = isset($parameter[ 1 ]) ? $compiler->getId($parameter[ 1 ]) : false;
+ $name = isset($parameter[ 1 ]) ? $compiler->getId($parameter[ 1 ]) : null;
if (!$name) {
- $compiler->trigger_template_error("missing or illegal \$smarty.{$tag} name attribute", null, true);
+ //$compiler->trigger_template_error("missing or illegal \$smarty.{$tag} name attribute", null, true);
}
- return "\$_smarty_tpl->smarty->ext->_capture->getBuffer(\$_smarty_tpl, '{$name}')";
+ return '$_smarty_tpl->smarty->ext->_capture->getBuffer($_smarty_tpl'.(isset($name)?", '{$name}')":')');
}
/**
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_child.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_child.php
new file mode 100644
index 000000000..8c7bbdf05
--- /dev/null
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_child.php
@@ -0,0 +1,77 @@
+
+ */
+class Smarty_Internal_Compile_Child extends Smarty_Internal_CompileBase
+{
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $optional_attributes = array('assign');
+
+ /**
+ * Tag name
+ *
+ * @var string
+ */
+ public $tag = 'child';
+
+ /**
+ * Block type
+ *
+ * @var string
+ */
+ public $blockType = 'Child';
+
+ /**
+ * Compiles code for the {child} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ *
+ * @return string compiled code
+ * @throws \SmartyCompilerException
+ */
+ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
+ {
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+ $tag = isset($parameter[0]) ? "'{$parameter[0]}'" : "'{{$this->tag}}'";
+ if (!isset($compiler->_cache[ 'blockNesting' ])) {
+ $compiler->trigger_template_error("{$tag} used outside {block} tags ",
+ $compiler->parser->lex->taglineno);
+ }
+ $compiler->has_code = true;
+ $compiler->suppressNocacheProcessing = true;
+ if ($this->blockType === 'Child') {
+ $compiler->_cache[ 'blockParams' ][ $compiler->_cache[ 'blockNesting' ] ][ 'callsChild' ] = 'true';
+ }
+ $_assign = isset($_attr[ 'assign' ]) ? $_attr[ 'assign' ] : null;
+ $output = "inheritance->call' . $this->blockType . '($_smarty_tpl, $this' .
+ ($this->blockType === 'Child' ? '' : ", {$tag}"). ");\n";
+ if (isset($_assign)) {
+ $output .= "\$_smarty_tpl->assign({$_assign}, ob_get_clean());\n";
+ }
+ $output .="?>\n";
+ return $output;
+ }
+}
\ No newline at end of file
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_continue.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_continue.php
index 7492c7df2..19e5d4bee 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_continue.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_continue.php
@@ -16,27 +16,10 @@
*/
class Smarty_Internal_Compile_Continue extends Smarty_Internal_Compile_Break
{
-
/**
- * Compiles code for the {continue} tag
- *
- * @param array $args array with attributes from parser
- * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
- *
- * @return string compiled code
- * @throws \SmartyCompilerException
- */
- public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
- {
- list($levels, $foreachLevels) = $this->checkLevels($args, $compiler, 'continue');
- $output = " 1) {
- /* @var Smarty_Internal_Compile_Foreach $foreachCompiler */
- $foreachCompiler = $compiler->getTagCompiler('foreach');
- $output .= $foreachCompiler->compileRestore($foreachLevels - 1);
- }
- $output .= "continue {$levels};?>";
- return $output;
- }
+ * Tag name
+ *
+ * @var string
+ */
+ public $tag = 'continue';
}
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_eval.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_eval.php
index 97a3c29c5..550f194e0 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_eval.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_eval.php
@@ -58,13 +58,12 @@ class Smarty_Internal_Compile_Eval extends Smarty_Internal_CompileBase
}
// create template object
- $_output = "\$_template = new {$compiler->smarty->template_class}('eval:'." . $_attr[ 'var' ] .
- ", \$_smarty_tpl->smarty, \$_smarty_tpl);";
+ $_output = "\$_template = new {$compiler->smarty->template_class}('eval:'.{$_attr[ 'var' ]}, \$_smarty_tpl->smarty, \$_smarty_tpl);";
//was there an assign attribute?
if (isset($_assign)) {
$_output .= "\$_smarty_tpl->assign($_assign,\$_template->fetch());";
} else {
- $_output .= "echo \$_template->fetch();";
+ $_output .= 'echo $_template->fetch();';
}
return "";
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_extends.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_extends.php
index 83cb80500..37bf8dd3f 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_extends.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_extends.php
@@ -64,18 +64,18 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_Compile_Shared_Inh
// add code to initialize inheritance
$this->registerInit($compiler, true);
$file = trim($_attr[ 'file' ], '\'"');
- if (strlen($file) > 8 && substr($file, 0, 8) == 'extends:') {
+ if (strlen($file) > 8 && substr($file, 0, 8) === 'extends:') {
// generate code for each template
$files = array_reverse(explode('|', substr($file, 8)));
$i = 0;
foreach ($files as $file) {
- if ($file[ 0 ] == '"') {
+ if ($file[ 0 ] === '"') {
$file = trim($file, '".');
} else {
$file = "'{$file}'";
}
$i ++;
- if ($i == count($files) && isset($_attr[ 'extends_resource' ])) {
+ if ($i === count($files) && isset($_attr[ 'extends_resource' ])) {
$this->compileEndChild($compiler);
}
$this->compileInclude($compiler, $file);
@@ -95,21 +95,24 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_Compile_Shared_Inh
*
* @param \Smarty_Internal_TemplateCompilerBase $compiler
* @param null|string $template optional inheritance parent template
+ *
+ * @throws \SmartyCompilerException
+ * @throws \SmartyException
*/
private function compileEndChild(Smarty_Internal_TemplateCompilerBase $compiler, $template = null)
{
$inlineUids = '';
if (isset($template) && $compiler->smarty->merge_compiled_includes) {
$code = $compiler->compileTag('include', array($template, array('scope' => 'parent')));
- if (preg_match("/([,][\s]*['][a-z0-9]+['][,][\s]*[']content.*['])[)]/", $code, $match)) {
+ if (preg_match('/([,][\s]*[\'][a-z0-9]+[\'][,][\s]*[\']content.*[\'])[)]/', $code, $match)) {
$inlineUids = $match[ 1 ];
}
}
$compiler->parser->template_postfix[] = new Smarty_Internal_ParseTree_Tag($compiler->parser,
- "inheritance->endChild(\$_smarty_tpl" .
+ 'inheritance->endChild($_smarty_tpl' .
(isset($template) ?
- ', ' . $template . $inlineUids :
- '') . ");\n?>\n");
+ ", {$template}{$inlineUids}" :
+ '') . ");\n?>");
}
/**
@@ -117,6 +120,9 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_Compile_Shared_Inh
*
* @param \Smarty_Internal_TemplateCompilerBase $compiler
* @param string $template subtemplate name
+ *
+ * @throws \SmartyCompilerException
+ * @throws \SmartyException
*/
private function compileInclude(Smarty_Internal_TemplateCompilerBase $compiler, $template)
{
@@ -129,16 +135,17 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_Compile_Shared_Inh
/**
* Create source code for {extends} from source components array
*
- * @param []\Smarty_Internal_Template_Source $components
+ * @param \Smarty_Internal_Template $template
*
* @return string
*/
- public static function extendsSourceArrayCode($components)
+ public static function extendsSourceArrayCode(Smarty_Internal_Template $template)
{
$resources = array();
- foreach ($components as $source) {
+ foreach ($template->source->components as $source) {
$resources[] = $source->resource;
}
- return '{extends file=\'extends:' . join('|', $resources) . '\' extends_resource=true}';
+ return $template->smarty->left_delimiter . 'extends file=\'extends:' . join('|', $resources) .
+ '\' extends_resource=true' . $template->smarty->right_delimiter;
}
}
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_for.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_for.php
index e5e7c61c3..79848e521 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_for.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_for.php
@@ -35,7 +35,7 @@ class Smarty_Internal_Compile_For extends Smarty_Internal_CompileBase
public function compile($args, $compiler, $parameter)
{
$compiler->loopNesting ++;
- if ($parameter == 0) {
+ if ($parameter === 0) {
$this->required_attributes = array('start', 'to');
$this->optional_attributes = array('max', 'step');
} else {
@@ -47,7 +47,7 @@ class Smarty_Internal_Compile_For extends Smarty_Internal_CompileBase
$_attr = $this->getAttributes($compiler, $args);
$output = "tpl_vars[$var]->total > 0) {\n";
$output .= "for (\$_smarty_tpl->tpl_vars[$var]->value{$index} = $_statement[value], \$_smarty_tpl->tpl_vars[$var]->iteration = 1;\$_smarty_tpl->tpl_vars[$var]->iteration <= \$_smarty_tpl->tpl_vars[$var]->total;\$_smarty_tpl->tpl_vars[$var]->value{$index} += \$_smarty_tpl->tpl_vars[$var]->step, \$_smarty_tpl->tpl_vars[$var]->iteration++) {\n";
- $output .= "\$_smarty_tpl->tpl_vars[$var]->first = \$_smarty_tpl->tpl_vars[$var]->iteration == 1;";
- $output .= "\$_smarty_tpl->tpl_vars[$var]->last = \$_smarty_tpl->tpl_vars[$var]->iteration == \$_smarty_tpl->tpl_vars[$var]->total;";
+ $output .= "\$_smarty_tpl->tpl_vars[$var]->first = \$_smarty_tpl->tpl_vars[$var]->iteration === 1;";
+ $output .= "\$_smarty_tpl->tpl_vars[$var]->last = \$_smarty_tpl->tpl_vars[$var]->iteration === \$_smarty_tpl->tpl_vars[$var]->total;";
}
- $output .= "?>";
+ $output .= '?>';
$this->openTag($compiler, 'for', array('for', $compiler->nocache));
// maybe nocache because of nocache variables
@@ -161,10 +161,10 @@ class Smarty_Internal_Compile_Forclose extends Smarty_Internal_CompileBase
list($openTag, $compiler->nocache) = $this->closeTag($compiler, array('for', 'forelse'));
$output = "\n";
+ $output .= "?>";
return $output;
}
}
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_foreach.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_foreach.php
index 5ddd42d8a..471e92c3e 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_foreach.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_foreach.php
@@ -78,14 +78,14 @@ class Smarty_Internal_Compile_Foreach extends Smarty_Internal_Compile_Private_Fo
/**
* Compiles code for the {foreach} tag
*
- * @param array $args array with attributes from parser
- * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
+ * @param array $args array with attributes from parser
+ * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
*
* @return string compiled code
* @throws \SmartyCompilerException
+ * @throws \SmartyException
*/
- public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
+ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
$compiler->loopNesting ++;
// init
@@ -118,7 +118,7 @@ class Smarty_Internal_Compile_Foreach extends Smarty_Internal_Compile_Private_Fo
$fromName = $compiler->getVariableName($_attr[ 'from' ]);
if ($fromName) {
foreach (array('item', 'key') as $a) {
- if (isset($attributes[ $a ]) && $attributes[ $a ] == $fromName) {
+ if (isset($attributes[ $a ]) && $attributes[ $a ] === $fromName) {
$compiler->trigger_template_error("'{$a}' and 'from' may not have same variable name '{$fromName}'",
null, true);
}
@@ -137,7 +137,7 @@ class Smarty_Internal_Compile_Foreach extends Smarty_Internal_Compile_Private_Fo
if (!empty($this->matchResults[ 'named' ])) {
$namedAttr = $this->matchResults[ 'named' ];
}
- if (isset($_attr[ 'properties' ]) && preg_match_all("/['](.*?)[']/", $_attr[ 'properties' ], $match)) {
+ if (isset($_attr[ 'properties' ]) && preg_match_all('/[\'](.*?)[\']/', $_attr[ 'properties' ], $match)) {
foreach ($match[ 1 ] as $prop) {
if (in_array($prop, $this->itemProperties)) {
$itemAttr[ $prop ] = true;
@@ -229,7 +229,7 @@ class Smarty_Internal_Compile_Foreach extends Smarty_Internal_Compile_Private_Fo
$output .= "{$itemVar}->first = !{$itemVar}->index;\n";
}
if (isset($itemAttr[ 'last' ])) {
- $output .= "{$itemVar}->last = {$itemVar}->iteration == {$itemVar}->total;\n";
+ $output .= "{$itemVar}->last = {$itemVar}->iteration === {$itemVar}->total;\n";
}
if (isset($foreachVar)) {
if (isset($namedAttr[ 'iteration' ])) {
@@ -242,13 +242,13 @@ class Smarty_Internal_Compile_Foreach extends Smarty_Internal_Compile_Private_Fo
$output .= "{$foreachVar}->value['first'] = !{$foreachVar}->value['index'];\n";
}
if (isset($namedAttr[ 'last' ])) {
- $output .= "{$foreachVar}->value['last'] = {$foreachVar}->value['iteration'] == {$foreachVar}->value['total'];\n";
+ $output .= "{$foreachVar}->value['last'] = {$foreachVar}->value['iteration'] === {$foreachVar}->value['total'];\n";
}
}
if (!empty($itemAttr)) {
$output .= "{$local}saved = {$itemVar};\n";
}
- $output .= "?>";
+ $output .= '?>';
return $output;
}
@@ -262,7 +262,7 @@ class Smarty_Internal_Compile_Foreach extends Smarty_Internal_Compile_Private_Fo
*/
public function compileRestore($levels)
{
- return "\$_smarty_tpl->smarty->ext->_foreach->restore(\$_smarty_tpl, {$levels});\n";
+ return "\$_smarty_tpl->smarty->ext->_foreach->restore(\$_smarty_tpl, {$levels});";
}
}
@@ -277,13 +277,12 @@ class Smarty_Internal_Compile_Foreachelse extends Smarty_Internal_CompileBase
/**
* Compiles code for the {foreachelse} tag
*
- * @param array $args array with attributes from parser
- * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
+ * @param array $args array with attributes from parser
+ * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
*
* @return string compiled code
*/
- public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
+ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
@@ -291,10 +290,10 @@ class Smarty_Internal_Compile_Foreachelse extends Smarty_Internal_CompileBase
list($openTag, $nocache, $local, $itemVar, $restore) = $this->closeTag($compiler, array('foreach'));
$this->openTag($compiler, 'foreachelse', array('foreachelse', $nocache, $local, $itemVar, 0));
$output = "\n";
+ $output .= "}\n} else {\n?>";
return $output;
}
}
@@ -310,13 +309,13 @@ class Smarty_Internal_Compile_Foreachclose extends Smarty_Internal_CompileBase
/**
* Compiles code for the {/foreach} tag
*
- * @param array $args array with attributes from parser
- * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
+ * @param array $args array with attributes from parser
+ * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
*
* @return string compiled code
- */
- public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
+ * @throws \SmartyCompilerException
+ */
+ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
$compiler->loopNesting --;
// must endblock be nocache?
@@ -328,7 +327,7 @@ class Smarty_Internal_Compile_Foreachclose extends Smarty_Internal_CompileBase
$this->closeTag($compiler, array('foreach', 'foreachelse'));
$output = " 0) {
@@ -338,7 +337,7 @@ class Smarty_Internal_Compile_Foreachclose extends Smarty_Internal_CompileBase
/* @var Smarty_Internal_Compile_Foreach $foreachCompiler */
$foreachCompiler = $compiler->getTagCompiler('foreach');
$output .= $foreachCompiler->compileRestore(1);
- $output .= "?>\n";
+ $output .= "?>";
return $output;
}
}
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_function.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_function.php
index b7cd9e1c0..909b767c8 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_function.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_function.php
@@ -44,14 +44,13 @@ class Smarty_Internal_Compile_Function extends Smarty_Internal_CompileBase
/**
* Compiles code for the {function} tag
*
- * @param array $args array with attributes from parser
- * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
+ * @param array $args array with attributes from parser
+ * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
*
* @return bool true
* @throws \SmartyCompilerException
*/
- public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
+ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
@@ -60,7 +59,7 @@ class Smarty_Internal_Compile_Function extends Smarty_Internal_CompileBase
$compiler->trigger_template_error('nocache option not allowed', null, true);
}
unset($_attr[ 'nocache' ]);
- $_name = trim($_attr[ 'name' ], "'\"");
+ $_name = trim($_attr[ 'name' ], '\'"');
$compiler->parent_compiler->tpl_function[ $_name ] = array();
$save = array($_attr, $compiler->parser->current_buffer, $compiler->template->compiled->has_nocache_code,
$compiler->template->caching);
@@ -68,6 +67,7 @@ class Smarty_Internal_Compile_Function extends Smarty_Internal_CompileBase
// Init temporary context
$compiler->parser->current_buffer = new Smarty_Internal_ParseTree_Template();
$compiler->template->compiled->has_nocache_code = false;
+ $compiler->saveRequiredPlugins(true);
return true;
}
}
@@ -91,18 +91,17 @@ class Smarty_Internal_Compile_Functionclose extends Smarty_Internal_CompileBase
/**
* Compiles code for the {/function} tag
*
- * @param array $args array with attributes from parser
- * @param object|\Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
+ * @param array $args array with attributes from parser
+ * @param object|\Smarty_Internal_TemplateCompilerBase $compiler compiler object
*
* @return bool true
*/
- public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
+ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
$this->compiler = $compiler;
$saved_data = $this->closeTag($compiler, array('function'));
$_attr = $saved_data[ 0 ];
- $_name = trim($_attr[ 'name' ], "'\"");
+ $_name = trim($_attr[ 'name' ], '\'"');
$compiler->parent_compiler->tpl_function[ $_name ][ 'compiled_filepath' ] =
$compiler->parent_compiler->template->compiled->filepath;
$compiler->parent_compiler->tpl_function[ $_name ][ 'uid' ] = $compiler->template->source->uid;
@@ -118,7 +117,7 @@ class Smarty_Internal_Compile_Functionclose extends Smarty_Internal_CompileBase
}
}
if (!empty($_paramsArray)) {
- $_params = 'array(' . implode(",", $_paramsArray) . ')';
+ $_params = 'array(' . implode(',', $_paramsArray) . ')';
$_paramsCode = "\$params = array_merge($_params, \$params);\n";
} else {
$_paramsCode = '';
@@ -134,15 +133,16 @@ class Smarty_Internal_Compile_Functionclose extends Smarty_Internal_CompileBase
$output = "compileRequiredPlugins();
$output .= "\$_smarty_tpl->compiled->has_nocache_code = true;\n";
$output .= $_paramsCode;
- $output .= "foreach (\$params as \$key => \$value) {\n\$_smarty_tpl->tpl_vars[\$key] = new Smarty_Variable(\$value, \$_smarty_tpl->isRenderingCache);\n}";
+ $output .= "foreach (\$params as \$key => \$value) {\n\$_smarty_tpl->tpl_vars[\$key] = new Smarty_Variable(\$value, \$_smarty_tpl->isRenderingCache);\n}\n";
$output .= "\$params = var_export(\$params, true);\n";
$output .= "echo \"/*%%SmartyNocache:{$compiler->template->compiled->nocache_hash}%%*/smarty->ext->_tplFunction->saveTemplateVariables(\\\$_smarty_tpl, '{$_name}');\nforeach (\$params as \\\$key => \\\$value) {\n\\\$_smarty_tpl->tpl_vars[\\\$key] = new Smarty_Variable(\\\$value, \\\$_smarty_tpl->isRenderingCache);\n}\n?>";
- $output .= "/*/%%SmartyNocache:{$compiler->template->compiled->nocache_hash}%%*/\n\";?>";
+ $output .= "/*/%%SmartyNocache:{$compiler->template->compiled->nocache_hash}%%*/\";?>";
$compiler->parser->current_buffer->append_subtree($compiler->parser,
new Smarty_Internal_ParseTree_Tag($compiler->parser,
$output));
@@ -166,9 +166,11 @@ class Smarty_Internal_Compile_Functionclose extends Smarty_Internal_CompileBase
$output = " \$value) {\n\$_smarty_tpl->tpl_vars[\$key] = new Smarty_Variable(\$value, \$_smarty_tpl->isRenderingCache);\n}?>";
+ $output .= "foreach (\$params as \$key => \$value) {\n\$_smarty_tpl->tpl_vars[\$key] = new Smarty_Variable(\$value, \$_smarty_tpl->isRenderingCache);\n}\n";
+ $output .= $compiler->compileCheckPlugins(array_merge($compiler->required_plugins[ 'compiled' ], $compiler->required_plugins[ 'nocache' ]));
+ $output .= "?>\n";
$compiler->parser->current_buffer->append_subtree($compiler->parser,
new Smarty_Internal_ParseTree_Tag($compiler->parser,
$output));
@@ -180,19 +182,10 @@ class Smarty_Internal_Compile_Functionclose extends Smarty_Internal_CompileBase
new Smarty_Internal_ParseTree_Tag($compiler->parser,
$output));
$compiler->parent_compiler->blockOrFunctionCode .= $compiler->parser->current_buffer->to_smarty_php($compiler->parser);
- // nocache plugins must be copied
- if (!empty($compiler->template->compiled->required_plugins[ 'nocache' ])) {
- foreach ($compiler->template->compiled->required_plugins[ 'nocache' ] as $plugin => $tmp) {
- foreach ($tmp as $type => $data) {
- $compiler->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ $plugin ][ $type ] =
- $data;
- }
- }
- }
- // restore old buffer
-
+ // restore old buffer
$compiler->parser->current_buffer = $saved_data[ 1 ];
// restore old status
+ $compiler->restoreRequiredPlugins();
$compiler->template->compiled->has_nocache_code = $saved_data[ 2 ];
$compiler->template->caching = $saved_data[ 3 ];
return true;
@@ -200,7 +193,7 @@ class Smarty_Internal_Compile_Functionclose extends Smarty_Internal_CompileBase
/**
* Remove nocache code
- *
+ *
* @param $match
*
* @return string
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_if.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_if.php
index 14db55d4f..82436c266 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_if.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_if.php
@@ -34,8 +34,8 @@ class Smarty_Internal_Compile_If extends Smarty_Internal_CompileBase
// must whole block be nocache ?
$compiler->nocache = $compiler->nocache | $compiler->tag_nocache;
- if (!array_key_exists("if condition", $parameter)) {
- $compiler->trigger_template_error("missing if condition", null, true);
+ if (!isset($parameter['if condition'])) {
+ $compiler->trigger_template_error('missing if condition', null, true);
}
if (is_array($parameter[ 'if condition' ])) {
@@ -49,9 +49,9 @@ class Smarty_Internal_Compile_If extends Smarty_Internal_CompileBase
$compiler->setNocacheInVariable($var);
}
$prefixVar = $compiler->getNewPrefixVariable();
- $_output = "\n";
+ $_output = "\n";
$assignAttr = array();
- $assignAttr[][ 'value' ] = "{$prefixVar}";
+ $assignAttr[][ 'value' ] = $prefixVar;
$assignCompiler = new Smarty_Internal_Compile_Assign();
if (is_array($parameter[ 'if condition' ][ 'var' ])) {
$assignAttr[][ 'var' ] = $parameter[ 'if condition' ][ 'var' ][ 'var' ];
@@ -80,18 +80,17 @@ class Smarty_Internal_Compile_Else extends Smarty_Internal_CompileBase
/**
* Compiles code for the {else} tag
*
- * @param array $args array with attributes from parser
- * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
+ * @param array $args array with attributes from parser
+ * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
*
* @return string compiled code
- */
- public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
+ */
+ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
list($nesting, $compiler->tag_nocache) = $this->closeTag($compiler, array('if', 'elseif'));
$this->openTag($compiler, 'else', array($nesting, $compiler->tag_nocache));
- return "";
+ return '';
}
}
@@ -120,8 +119,8 @@ class Smarty_Internal_Compile_Elseif extends Smarty_Internal_CompileBase
list($nesting, $compiler->tag_nocache) = $this->closeTag($compiler, array('if', 'elseif'));
- if (!array_key_exists("if condition", $parameter)) {
- $compiler->trigger_template_error("missing elseif condition", null, true);
+ if (!isset($parameter['if condition'])) {
+ $compiler->trigger_template_error('missing elseif condition', null, true);
}
$assignCode = '';
@@ -138,10 +137,10 @@ class Smarty_Internal_Compile_Elseif extends Smarty_Internal_CompileBase
$compiler->setNocacheInVariable($var);
}
$prefixVar = $compiler->getNewPrefixVariable();
- $assignCode = "\n";
+ $assignCode = "\n";
$assignCompiler = new Smarty_Internal_Compile_Assign();
$assignAttr = array();
- $assignAttr[][ 'value' ] = "{$prefixVar}";
+ $assignAttr[][ 'value' ] = $prefixVar;
if (is_array($parameter[ 'if condition' ][ 'var' ])) {
$assignAttr[][ 'var' ] = $parameter[ 'if condition' ][ 'var' ][ 'var' ];
$assignCode .= $assignCompiler->compile($assignAttr, $compiler,
@@ -188,13 +187,12 @@ class Smarty_Internal_Compile_Ifclose extends Smarty_Internal_CompileBase
/**
* Compiles code for the {/if} tag
*
- * @param array $args array with attributes from parser
- * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
+ * @param array $args array with attributes from parser
+ * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
*
* @return string compiled code
*/
- public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
+ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
// must endblock be nocache?
if ($compiler->nocache) {
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_include.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_include.php
index a81b0c740..70f22546c 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_include.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_include.php
@@ -7,7 +7,6 @@
* @subpackage Compiler
* @author Uwe Tews
*/
-
/**
* Smarty Internal Plugin Compile Include Class
*
@@ -20,7 +19,6 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
* caching mode to create nocache code but no cache file
*/
const CACHING_NOCACHE_CODE = 9999;
-
/**
* Attribute definition: Overwrites base class.
*
@@ -28,7 +26,6 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
* @see Smarty_Internal_CompileBase
*/
public $required_attributes = array('file');
-
/**
* Attribute definition: Overwrites base class.
*
@@ -36,7 +33,6 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
* @see Smarty_Internal_CompileBase
*/
public $shorttag_order = array('file');
-
/**
* Attribute definition: Overwrites base class.
*
@@ -44,7 +40,6 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
* @see Smarty_Internal_CompileBase
*/
public $option_flags = array('nocache', 'inline', 'caching');
-
/**
* Attribute definition: Overwrites base class.
*
@@ -52,7 +47,6 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
* @see Smarty_Internal_CompileBase
*/
public $optional_attributes = array('_any');
-
/**
* Valid scope names
*
@@ -65,19 +59,19 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
/**
* Compiles code for the {include} tag
*
- * @param array $args array with attributes from parser
- * @param Smarty_Internal_SmartyTemplateCompiler $compiler compiler object
- * @param array $parameter array with compilation parameter
+ * @param array $args array with attributes from parser
+ * @param Smarty_Internal_SmartyTemplateCompiler $compiler compiler object
*
- * @throws SmartyCompilerException
- * @return string compiled code
+ * @return string
+ * @throws \Exception
+ * @throws \SmartyCompilerException
+ * @throws \SmartyException
*/
- public function compile($args, Smarty_Internal_SmartyTemplateCompiler $compiler, $parameter)
+ public function compile($args, Smarty_Internal_SmartyTemplateCompiler $compiler)
{
$uid = $t_hash = null;
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
-
$fullResourceName = $source_resource = $_attr[ 'file' ];
$variable_template = false;
$cache_tpl = false;
@@ -90,11 +84,11 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
$variable_template = true;
}
if (!$variable_template) {
- if ($type != 'string') {
+ if ($type !== 'string') {
$fullResourceName = "{$type}:{$name}";
$compiled = $compiler->parent_compiler->template->compiled;
if (isset($compiled->includes[ $fullResourceName ])) {
- $compiled->includes[ $fullResourceName ] ++;
+ $compiled->includes[ $fullResourceName ]++;
$cache_tpl = true;
} else {
if ("{$compiler->template->source->type}:{$compiler->template->source->name}" ==
@@ -116,10 +110,8 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
} else {
$variable_template = true;
}
-
// scope setup
$_scope = $compiler->convertScope($_attr, $this->valid_scopes);
-
// set flag to cache subtemplate object when called within loop or template name is variable.
if ($cache_tpl || $variable_template || $compiler->loopNesting > 0) {
$_cache_tpl = 'true';
@@ -128,18 +120,14 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
}
// assume caching is off
$_caching = Smarty::CACHING_OFF;
-
$call_nocache = $compiler->tag_nocache || $compiler->nocache;
-
// caching was on and {include} is not in nocache mode
if ($compiler->template->caching && !$compiler->nocache && !$compiler->tag_nocache) {
$_caching = self::CACHING_NOCACHE_CODE;
}
-
// flag if included template code should be merged into caller
$merge_compiled_includes = ($compiler->smarty->merge_compiled_includes || $_attr[ 'inline' ] === true) &&
!$compiler->template->source->handler->recompiled;
-
if ($merge_compiled_includes) {
// variable template name ?
if ($variable_template) {
@@ -150,7 +138,6 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
$merge_compiled_includes = false;
}
}
-
/*
* if the {include} tag provides individual parameter for caching or compile_id
* the subtemplate must not be included into the common cache file and is treated like
@@ -158,7 +145,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
*
*/
if ($_attr[ 'nocache' ] !== true && $_attr[ 'caching' ]) {
- $_caching = $_new_caching = (int) $_attr[ 'caching' ];
+ $_caching = $_new_caching = (int)$_attr[ 'caching' ];
$call_nocache = true;
} else {
$_new_caching = Smarty::CACHING_LIFETIME_CURRENT;
@@ -182,7 +169,6 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
} else {
$_compile_id = '$_smarty_tpl->compile_id';
}
-
// if subtemplate will be called in nocache mode do not merge
if ($compiler->template->caching && $call_nocache) {
$merge_compiled_includes = false;
@@ -200,7 +186,6 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
$_assign = $_attr[ 'assign' ];
}
}
-
$has_compiled_template = false;
if ($merge_compiled_includes) {
$c_id = isset($_attr[ 'compile_id' ]) ? $_attr[ 'compile_id' ] : $compiler->template->compile_id;
@@ -232,17 +217,17 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
$_vars = 'array(' . join(',', $_pairs) . ')';
}
$update_compile_id = $compiler->template->caching && !$compiler->tag_nocache && !$compiler->nocache &&
- $_compile_id != '$_smarty_tpl->compile_id';
+ $_compile_id !== '$_smarty_tpl->compile_id';
if ($has_compiled_template && !$call_nocache) {
$_output = "makeNocacheCode("\$_compile_id_save[] = \$_smarty_tpl->compile_id;\n\$_smarty_tpl->compile_id = {$_compile_id};\n");
}
- if (!empty($_attr) && $_caching == 9999 && $compiler->template->caching) {
+ if (!empty($_attr) && $_caching === 9999 && $compiler->template->caching) {
$_vars_nc = "foreach ($_vars as \$ik => \$iv) {\n";
$_vars_nc .= "\$_smarty_tpl->tpl_vars[\$ik] = new Smarty_Variable(\$iv);\n";
$_vars_nc .= "}\n";
- $_output .= substr($compiler->processNocacheCode('\n", true), 6, - 3);
+ $_output .= substr($compiler->processNocacheCode('\n", true), 6, -3);
}
if (isset($_assign)) {
$_output .= "ob_start();\n";
@@ -254,11 +239,9 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
if ($update_compile_id) {
$_output .= $compiler->makeNocacheCode("\$_smarty_tpl->compile_id = array_pop(\$_compile_id_save);\n");
}
- $_output .= "?>\n";
-
+ $_output .= "?>";
return $_output;
}
-
if ($call_nocache) {
$compiler->tag_nocache = true;
}
@@ -277,7 +260,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
if ($update_compile_id) {
$_output .= "\$_smarty_tpl->compile_id = array_pop(\$_compile_id_save);\n";
}
- $_output .= "?>\n";
+ $_output .= "?>";
return $_output;
}
@@ -289,9 +272,12 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
* @param string $t_hash
*
* @return bool
+ * @throws \Exception
+ * @throws \SmartyException
*/
public function compileInlineTemplate(Smarty_Internal_SmartyTemplateCompiler $compiler,
- Smarty_Internal_Template $tpl, $t_hash)
+ Smarty_Internal_Template $tpl,
+ $t_hash)
{
$uid = $tpl->source->type . $tpl->source->uid;
if (!($tpl->source->handler->uncompiled) && $tpl->source->exists) {
@@ -309,29 +295,30 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
$tpl->mustCompile = true;
$compiler->parent_compiler->mergedSubTemplatesData[ $uid ][ $t_hash ][ 'nocache_hash' ] =
$tpl->compiled->nocache_hash;
- if ($compiler->template->source->type == 'file') {
- $sourceInfo = $compiler->template->source->filepath;
+ if ($tpl->source->type === 'file') {
+ $sourceInfo = $tpl->source->filepath;
} else {
- $basename = $compiler->template->source->handler->getBasename($compiler->template->source);
- $sourceInfo = $compiler->template->source->type . ':' .
- ($basename ? $basename : $compiler->template->source->name);
+ $basename = $tpl->source->handler->getBasename($tpl->source);
+ $sourceInfo = $tpl->source->type . ':' .
+ ($basename ? $basename : $tpl->source->name);
}
// get compiled code
$compiled_code = "compiled->unifunc} (\$_smarty_tpl) {\n";
+ $compiled_code .= "function {$tpl->compiled->unifunc} (Smarty_Internal_Template \$_smarty_tpl) {\n";
$compiled_code .= "?>\n" . $tpl->compiler->compileTemplateSource($tpl, null, $compiler->parent_compiler);
$compiled_code .= "\n";
$compiled_code .= $tpl->compiler->postFilter($tpl->compiler->blockOrFunctionCode);
$compiled_code .= "";
+ $compiled_code .= '?>';
unset($tpl->compiler);
if ($tpl->compiled->has_nocache_code) {
// replace nocache_hash
$compiled_code =
- str_replace("{$tpl->compiled->nocache_hash}", $compiler->template->compiled->nocache_hash,
+ str_replace("{$tpl->compiled->nocache_hash}",
+ $compiler->template->compiled->nocache_hash,
$compiled_code);
$compiler->template->compiled->has_nocache_code = true;
}
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_include_php.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_include_php.php
index 77586da8b..e0aca93b3 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_include_php.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_include_php.php
@@ -7,7 +7,6 @@
* @subpackage Compiler
* @author Uwe Tews
*/
-
/**
* Smarty Internal Plugin Compile Insert Class
*
@@ -57,7 +56,6 @@ class Smarty_Internal_Compile_Include_Php extends Smarty_Internal_CompileBase
}
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
-
/** @var Smarty_Internal_Template $_smarty_tpl
* used in evaluated code
*/
@@ -74,8 +72,8 @@ class Smarty_Internal_Compile_Include_Php extends Smarty_Internal_CompileBase
$_dir = $compiler->smarty->trusted_dir;
}
if (!empty($_dir)) {
- foreach ((array) $_dir as $_script_dir) {
- $_path = $compiler->smarty->_realpath($_script_dir . $compiler->smarty->ds . $_file, true);
+ foreach ((array)$_dir as $_script_dir) {
+ $_path = $compiler->smarty->_realpath($_script_dir . DIRECTORY_SEPARATOR . $_file, true);
if (file_exists($_path)) {
$_filepath = $_path;
break;
@@ -83,25 +81,22 @@ class Smarty_Internal_Compile_Include_Php extends Smarty_Internal_CompileBase
}
}
}
- if ($_filepath == false) {
+ if ($_filepath === false) {
$compiler->trigger_template_error("{include_php} file '{$_file}' is not readable", null, true);
}
-
if (isset($compiler->smarty->security_policy)) {
$compiler->smarty->security_policy->isTrustedPHPDir($_filepath);
}
-
if (isset($_attr[ 'assign' ])) {
// output will be stored in a smarty variable instead of being displayed
$_assign = $_attr[ 'assign' ];
}
$_once = '_once';
if (isset($_attr[ 'once' ])) {
- if ($_attr[ 'once' ] == 'false') {
+ if ($_attr[ 'once' ] === 'false') {
$_once = '';
}
}
-
if (isset($_assign)) {
return "assign({$_assign},ob_get_clean());\n?>";
} else {
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_insert.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_insert.php
index 02ef67c3a..e71abdce3 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_insert.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_insert.php
@@ -1,5 +1,4 @@
getAttributes($compiler, $args);
- //Does tag create output
- $compiler->has_output = isset($_attr[ 'assign' ]) ? false : true;
-
$nocacheParam = $compiler->template->caching && ($compiler->tag_nocache || $compiler->nocache);
if (!$nocacheParam) {
// do not compile as nocache code
@@ -66,7 +61,6 @@ class Smarty_Internal_Compile_Insert extends Smarty_Internal_CompileBase
$_smarty_tpl = $compiler->template;
$_name = null;
$_script = null;
-
$_output = 'template->tpl_vars[ $var ])) {
$compiler->template->tpl_vars[ $var ]->nocache = true;
} else {
@@ -96,8 +90,8 @@ class Smarty_Internal_Compile_Insert extends Smarty_Internal_CompileBase
$_dir = $compiler->smarty instanceof SmartyBC ? $compiler->smarty->trusted_dir : null;
}
if (!empty($_dir)) {
- foreach ((array) $_dir as $_script_dir) {
- $_script_dir = rtrim($_script_dir, '/\\') . $compiler->smarty->ds;
+ foreach ((array)$_dir as $_script_dir) {
+ $_script_dir = rtrim($_script_dir, '/\\') . DIRECTORY_SEPARATOR;
if (file_exists($_script_dir . $_script)) {
$_filepath = $_script_dir . $_script;
break;
@@ -105,7 +99,7 @@ class Smarty_Internal_Compile_Insert extends Smarty_Internal_CompileBase
}
}
}
- if ($_filepath == false) {
+ if ($_filepath === false) {
$compiler->trigger_template_error("{insert} missing script file '{$_script}'", null, true);
}
// code for script file loading
@@ -113,7 +107,8 @@ class Smarty_Internal_Compile_Insert extends Smarty_Internal_CompileBase
require_once $_filepath;
if (!is_callable($_function)) {
$compiler->trigger_template_error(" {insert} function '{$_function}' is not callable in script file '{$_script}'",
- null, true);
+ null,
+ true);
}
} else {
$_filepath = 'null';
@@ -122,7 +117,8 @@ class Smarty_Internal_Compile_Insert extends Smarty_Internal_CompileBase
if (!is_callable($_function)) {
// try plugin
if (!$_function = $compiler->getPlugin($_name, 'insert')) {
- $compiler->trigger_template_error("{insert} no function or plugin found for '{$_name}'", null,
+ $compiler->trigger_template_error("{insert} no function or plugin found for '{$_name}'",
+ null,
true);
}
}
@@ -149,7 +145,6 @@ class Smarty_Internal_Compile_Insert extends Smarty_Internal_CompileBase
$_output .= "echo {$_function}({$_params},\$_smarty_tpl);?>";
}
}
-
return $_output;
}
}
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_ldelim.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_ldelim.php
index 7251dcd6c..c22e1a637 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_ldelim.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_ldelim.php
@@ -16,7 +16,7 @@
*/
class Smarty_Internal_Compile_Ldelim extends Smarty_Internal_CompileBase
{
- /**
+ /**
* Compiles code for the {ldelim} tag
* This tag does output the left delimiter
*
@@ -32,9 +32,6 @@ class Smarty_Internal_Compile_Ldelim extends Smarty_Internal_CompileBase
if ($_attr[ 'nocache' ] === true) {
$compiler->trigger_template_error('nocache option not allowed', null, true);
}
- // this tag does not return compiled code
- $compiler->has_code = true;
-
return $compiler->smarty->left_delimiter;
}
}
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_make_nocache.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_make_nocache.php
index 720dd68b3..f793ecbbf 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_make_nocache.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_make_nocache.php
@@ -41,20 +41,18 @@ class Smarty_Internal_Compile_Make_Nocache extends Smarty_Internal_CompileBase
/**
* Compiles code for the {make_nocache} tag
*
- * @param array $args array with attributes from parser
- * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
+ * @param array $args array with attributes from parser
+ * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
*
* @return string compiled code
- * @throws \SmartyCompilerException
- */
- public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
+ */
+ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
if ($compiler->template->caching) {
$output = "smarty->ext->_make_nocache->save(\$_smarty_tpl, {$_attr[ 'var' ]});\n?>\n";
- $compiler->has_code = true;
+ $compiler->template->compiled->has_nocache_code = true;
$compiler->suppressNocacheProcessing = true;
return $output;
} else {
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_parent.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_parent.php
new file mode 100644
index 000000000..052479aef
--- /dev/null
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_parent.php
@@ -0,0 +1,32 @@
+
+ */
+class Smarty_Internal_Compile_Parent extends Smarty_Internal_Compile_Child
+{
+
+ /**
+ * Tag name
+ *
+ * @var string
+ */
+ public $tag = 'parent';
+
+ /**
+ * Block type
+ *
+ * @var string
+ */
+ public $blockType = 'Parent';
+}
\ No newline at end of file
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_block_plugin.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_block_plugin.php
index 617564276..6c3f05aaa 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_block_plugin.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_block_plugin.php
@@ -41,17 +41,19 @@ class Smarty_Internal_Compile_Private_Block_Plugin extends Smarty_Internal_Compi
* @param string $function PHP function name
*
* @return string compiled code
+ * @throws \SmartyCompilerException
+ * @throws \SmartyException
*/
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter, $tag, $function = null)
{
- if (!isset($tag[ 5 ]) || substr($tag, - 5) != 'close') {
+ if (!isset($tag[ 5 ]) || substr($tag, - 5) !== 'close') {
// opening tag of block plugin
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
$this->nesting ++;
unset($_attr[ 'nocache' ]);
list($callback, $_paramsArray, $callable) = $this->setup($compiler, $_attr, $tag, $function);
- $_params = 'array(' . implode(",", $_paramsArray) . ')';
+ $_params = 'array(' . implode(',', $_paramsArray) . ')';
// compile code
$output = "smarty->_cache['_tag_stack'][] = array('{$tag}', {$_params});\n";
- $output .= "\$_block_repeat=true;\necho {$callback}({$_params}, null, \$_smarty_tpl, \$_block_repeat);\nwhile (\$_block_repeat) {\nob_start();\n?>";
+ $output .= "\$_block_repeat=true;\necho {$callback}({$_params}, null, \$_smarty_tpl, \$_block_repeat);\nwhile (\$_block_repeat) {\nob_start();?>";
$this->openTag($compiler, $tag, array($_params, $compiler->nocache, $callback));
// maybe nocache because of nocache variables or nocache plugin
$compiler->nocache = $compiler->nocache | $compiler->tag_nocache;
@@ -74,8 +76,6 @@ class Smarty_Internal_Compile_Private_Block_Plugin extends Smarty_Internal_Compi
}
// closing tag of block plugin, restore nocache
list($_params, $compiler->nocache, $callback) = $this->closeTag($compiler, substr($tag, 0, - 5));
- //Does tag create output
- $compiler->has_output = isset($_params[ 'assign' ]) ? false : true;
// compile code
if (!isset($parameter[ 'modifier_list' ])) {
$mod_pre = $mod_post = $mod_content = '';
@@ -88,13 +88,10 @@ class Smarty_Internal_Compile_Private_Block_Plugin extends Smarty_Internal_Compi
array('modifierlist' => $parameter[ 'modifier_list' ],
'value' => 'ob_get_clean()')) . ";\n";
}
- $output = "smarty->_cache['_tag_stack']);";
- $output .= "?>";
+ $output = "smarty->_cache[\'_tag_stack\']);?>';
}
- return $output . "\n";
+ return $output;
}
/**
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_foreachsection.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_foreachsection.php
index bf569be3a..5161da645 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_foreachsection.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_foreachsection.php
@@ -76,6 +76,8 @@ class Smarty_Internal_Compile_Private_ForeachSection extends Smarty_Internal_Com
*
* @param array $attributes
* @param \Smarty_Internal_TemplateCompilerBase $compiler
+ *
+ * @throws \SmartyException
*/
public function scanForProperties($attributes, Smarty_Internal_TemplateCompilerBase $compiler)
{
@@ -110,8 +112,9 @@ class Smarty_Internal_Compile_Private_ForeachSection extends Smarty_Internal_Com
public function buildPropertyPreg($named, $attributes)
{
if ($named) {
- $this->resultOffsets[ 'named' ] = $this->startOffset + 3;
- $this->propertyPreg .= "([\$]smarty[.]{$this->tagName}[.]{$attributes['name']}[.](";
+ $this->resultOffsets[ 'named' ] = $this->startOffset + 4;
+ $this->propertyPreg .= "(([\$]smarty[.]{$this->tagName}[.]" . ($this->tagName === 'section' ? "|[\[]\s*" : '')
+ . "){$attributes['name']}[.](";
$properties = $this->nameProperties;
} else {
$this->resultOffsets[ 'item' ] = $this->startOffset + 3;
@@ -161,6 +164,8 @@ class Smarty_Internal_Compile_Private_ForeachSection extends Smarty_Internal_Com
* Find matches in all parent template source
*
* @param \Smarty_Internal_TemplateCompilerBase $compiler
+ *
+ * @throws \SmartyException
*/
public function matchParentTemplateSource(Smarty_Internal_TemplateCompilerBase $compiler)
{
@@ -171,7 +176,7 @@ class Smarty_Internal_Compile_Private_ForeachSection extends Smarty_Internal_Com
if ($compiler !== $nextCompiler) {
// get template source
$_content = $nextCompiler->template->source->getContent();
- if ($_content != '') {
+ if ($_content !== '') {
// run pre filter if required
if ((isset($nextCompiler->smarty->autoload_filters[ 'pre' ]) ||
isset($nextCompiler->smarty->registered_filters[ 'pre' ]))
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_function_plugin.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_function_plugin.php
index 26529bb68..9e9c65f59 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_function_plugin.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_function_plugin.php
@@ -42,6 +42,8 @@ class Smarty_Internal_Compile_Private_Function_Plugin extends Smarty_Internal_Co
* @param string $function PHP function name
*
* @return string compiled code
+ * @throws \SmartyCompilerException
+ * @throws \SmartyException
*/
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter, $tag, $function)
{
@@ -58,7 +60,7 @@ class Smarty_Internal_Compile_Private_Function_Plugin extends Smarty_Internal_Co
$_paramsArray[] = "'$_key'=>$_value";
}
}
- $_params = 'array(' . implode(",", $_paramsArray) . ')';
+ $_params = 'array(' . implode(',', $_paramsArray) . ')';
// compile code
$output = "{$function}({$_params},\$_smarty_tpl)";
if (!empty($parameter[ 'modifierlist' ])) {
@@ -66,8 +68,6 @@ class Smarty_Internal_Compile_Private_Function_Plugin extends Smarty_Internal_Co
array('modifierlist' => $parameter[ 'modifierlist' ],
'value' => $output));
}
- //Does tag create output
- $compiler->has_output = true;
$output = "\n";
return $output;
}
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_modifier.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_modifier.php
index 2ee88db48..e83b7a243 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_modifier.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_modifier.php
@@ -26,6 +26,7 @@ class Smarty_Internal_Compile_Private_Modifier extends Smarty_Internal_CompileBa
*
* @return string compiled code
* @throws \SmartyCompilerException
+ * @throws \SmartyException
*/
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
{
@@ -34,6 +35,7 @@ class Smarty_Internal_Compile_Private_Modifier extends Smarty_Internal_CompileBa
$output = $parameter[ 'value' ];
// loop over list of modifiers
foreach ($parameter[ 'modifierlist' ] as $single_modifier) {
+ /* @var string $modifier */
$modifier = $single_modifier[ 0 ];
$single_modifier[ 0 ] = $output;
$params = implode(',', $single_modifier);
@@ -48,20 +50,13 @@ class Smarty_Internal_Compile_Private_Modifier extends Smarty_Internal_CompileBa
case 1:
// registered modifier
if (isset($compiler->smarty->registered_plugins[ Smarty::PLUGIN_MODIFIER ][ $modifier ])) {
- $function =
- $compiler->smarty->registered_plugins[ Smarty::PLUGIN_MODIFIER ][ $modifier ][ 0 ];
- if (!is_array($function)) {
- $output = "{$function}({$params})";
- } else {
- if (is_object($function[ 0 ])) {
- $output = '$_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][\'' .
- $modifier . '\'][0][0]->' . $function[ 1 ] . '(' . $params . ')';
- } else {
- $output = $function[ 0 ] . '::' . $function[ 1 ] . '(' . $params . ')';
- }
+ if (is_callable($compiler->smarty->registered_plugins[ Smarty::PLUGIN_MODIFIER ][ $modifier ][ 0 ])) {
+ $output =
+ sprintf('call_user_func_array($_smarty_tpl->registered_plugins[ \'%s\' ][ %s ][ 0 ], array( %s ))',
+ Smarty::PLUGIN_MODIFIER, var_export($modifier, true), $params);
+ $compiler->known_modifier_type[ $modifier ] = $type;
+ break 2;
}
- $compiler->known_modifier_type[ $modifier ] = $type;
- break 2;
}
break;
case 2:
@@ -135,8 +130,8 @@ class Smarty_Internal_Compile_Private_Modifier extends Smarty_Internal_CompileBa
}
}
}
- if (isset($compiler->parent_compiler->template->compiled->required_plugins[ 'nocache' ][ $modifier ][ Smarty::PLUGIN_MODIFIER ][ 'file' ]) ||
- isset($compiler->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ $modifier ][ Smarty::PLUGIN_MODIFIER ][ 'file' ])
+ if (isset($compiler->required_plugins[ 'nocache' ][ $modifier ][ Smarty::PLUGIN_MODIFIER ][ 'file' ]) ||
+ isset($compiler->required_plugins[ 'compiled' ][ $modifier ][ Smarty::PLUGIN_MODIFIER ][ 'file' ])
) {
// was a plugin
$compiler->known_modifier_type[ $modifier ] = 4;
@@ -148,10 +143,10 @@ class Smarty_Internal_Compile_Private_Modifier extends Smarty_Internal_CompileBa
}
}
if (!isset($compiler->known_modifier_type[ $modifier ])) {
- $compiler->trigger_template_error("unknown modifier \"" . $modifier . "\"", null, true);
+ $compiler->trigger_template_error("unknown modifier '{$modifier}'", null, true);
}
}
return $output;
}
-}
+}
\ No newline at end of file
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_object_function.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_object_function.php
index 7f78a421e..8d6c7e397 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_object_function.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_object_function.php
@@ -34,14 +34,13 @@ class Smarty_Internal_Compile_Private_Object_Function extends Smarty_Internal_Co
* @param string $method name of method to call
*
* @return string compiled code
+ * @throws \SmartyCompilerException
+ * @throws \SmartyException
*/
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter, $tag, $method)
{
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
- //Does tag create output
- $compiler->has_output = isset($_attr[ 'assign' ]) ? false : true;
-
unset($_attr[ 'nocache' ]);
$_assign = null;
if (isset($_attr[ 'assign' ])) {
@@ -60,10 +59,10 @@ class Smarty_Internal_Compile_Private_Object_Function extends Smarty_Internal_Co
$_paramsArray[] = "'$_key'=>$_value";
}
}
- $_params = 'array(' . implode(",", $_paramsArray) . ')';
+ $_params = 'array(' . implode(',', $_paramsArray) . ')';
$output = "\$_smarty_tpl->smarty->registered_objects['{$tag}'][0]->{$method}({$_params},\$_smarty_tpl)";
} else {
- $_params = implode(",", $_attr);
+ $_params = implode(',', $_attr);
$output = "\$_smarty_tpl->smarty->registered_objects['{$tag}'][0]->{$method}({$_params})";
}
} else {
@@ -74,9 +73,6 @@ class Smarty_Internal_Compile_Private_Object_Function extends Smarty_Internal_Co
$output = $compiler->compileTag('private_modifier', array(),
array('modifierlist' => $parameter[ 'modifierlist' ], 'value' => $output));
}
- //Does tag create output
- $compiler->has_output = isset($_attr[ 'assign' ]) ? false : true;
-
if (empty($_assign)) {
return "\n";
} else {
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_php.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_php.php
index 8bff8499f..1d100f0d2 100644
--- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_php.php
+++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_php.php
@@ -40,38 +40,34 @@ class Smarty_Internal_Compile_Private_Php extends Smarty_Internal_CompileBase
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
$compiler->has_code = false;
- if ($_attr[ 'type' ] == 'xml') {
+ if ($_attr[ 'type' ] === 'xml') {
$compiler->tag_nocache = true;
$output = addcslashes($_attr[ 'code' ], "'\\");
$compiler->parser->current_buffer->append_subtree($compiler->parser,
new Smarty_Internal_ParseTree_Tag($compiler->parser,
- $compiler->processNocacheCode("",
+ $compiler->processNocacheCode("",
true)));
return '';
}
- if ($_attr[ 'type' ] != 'tag') {
- if ($compiler->php_handling == Smarty::PHP_REMOVE) {
+ if ($_attr[ 'type' ] !== 'tag') {
+ if ($compiler->php_handling === Smarty::PHP_REMOVE) {
return '';
- } elseif ($compiler->php_handling == Smarty::PHP_QUOTE) {
+ } elseif ($compiler->php_handling === Smarty::PHP_QUOTE) {
$output =
preg_replace_callback('#(<\?(?:php|=)?)|(<%)|(]*>)|(]*>)|(