From 0d2c3be367835e09fae0e3e12ab7f0af86f8465c Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 29 Oct 2018 22:55:24 +0100 Subject: allow wiki_list widget to be used in any page --- Zotlabs/Widget/Wiki_list.php | 4 ---- view/pdl/mod_wiki.pdl | 1 - 2 files changed, 5 deletions(-) diff --git a/Zotlabs/Widget/Wiki_list.php b/Zotlabs/Widget/Wiki_list.php index c8d83cbe8..64c988ee7 100644 --- a/Zotlabs/Widget/Wiki_list.php +++ b/Zotlabs/Widget/Wiki_list.php @@ -6,10 +6,6 @@ class Wiki_list { function widget($arr) { - if(argc() < 3) { - return; - } - $channel = channelx_by_n(\App::$profile_uid); $wikis = \Zotlabs\Lib\NativeWiki::listwikis($channel,get_observer_hash()); diff --git a/view/pdl/mod_wiki.pdl b/view/pdl/mod_wiki.pdl index 2e99ea36b..be86be7e3 100644 --- a/view/pdl/mod_wiki.pdl +++ b/view/pdl/mod_wiki.pdl @@ -1,6 +1,5 @@ [region=aside] [widget=vcard][/widget] -[widget=wiki_list][/widget] [widget=wiki_pages][/widget] [/region] [region=right_aside] -- cgit v1.2.3 From 1eac4db491e6c597b56752b7915fdcafc529ed5e Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 29 Oct 2018 23:01:13 +0100 Subject: fix forum ping results - the term query requires xchan_name instead of xchan_hash. also improve the query itself - item_permission_sql() is redundant here since we always deal with local_channel() and use count(id) instead of sum(item_unseen) to get the unseen count --- Zotlabs/Module/Ping.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Zotlabs/Module/Ping.php b/Zotlabs/Module/Ping.php index 75e8843d6..cf5b2e004 100644 --- a/Zotlabs/Module/Ping.php +++ b/Zotlabs/Module/Ping.php @@ -635,7 +635,6 @@ class Ping extends \Zotlabs\Web\Controller { $forums = get_forum_channels(local_channel()); if($forums) { - $perms_sql = item_permissions_sql(local_channel()); $item_normal = item_normal(); $fcount = count($forums); $forums['total'] = 0; @@ -644,14 +643,14 @@ class Ping extends \Zotlabs\Web\Controller { $p = q("SELECT oid AS parent FROM term WHERE uid = %d AND ttype = %d AND term = '%s'", intval(local_channel()), intval(TERM_FORUM), - dbesc($forums[$x]['xchan_hash']) + dbesc($forums[$x]['xchan_name']) ); $p_str = ids_to_querystr($p, 'parent'); $p_sql = (($p_str) ? "OR parent IN ( $p_str )" : ''); - $r = q("select sum(item_unseen) as unseen from item - where uid = %d and ( owner_xchan = '%s' OR author_xchan = '%s' $p_sql ) and item_unseen = 1 $perms_sql $item_normal", + $r = q("select count(id) as unseen from item + where uid = %d and ( owner_xchan = '%s' OR author_xchan = '%s' $p_sql ) and item_unseen = 1 $item_normal", intval(local_channel()), dbesc($forums[$x]['xchan_hash']), dbesc($forums[$x]['xchan_hash']) -- cgit v1.2.3 From 2192ea6fdf21a00ccf44d626a01b756d194d6cbe Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 30 Oct 2018 12:12:07 +0100 Subject: update html_to_markdown, smarty and sabredav libs via composer --- composer.lock | 215 +- vendor/composer/autoload_classmap.php | 1 + vendor/composer/autoload_static.php | 1 + vendor/composer/installed.json | 50 +- vendor/league/html-to-markdown/CHANGELOG.md | 21 +- vendor/league/html-to-markdown/composer.json | 4 +- .../league/html-to-markdown/src/Configuration.php | 16 + .../src/Converter/CodeConverter.php | 37 +- .../src/Converter/HeaderConverter.php | 4 + .../src/Converter/LinkConverter.php | 13 + .../src/Converter/PreformattedConverter.php | 18 +- .../src/Converter/TextConverter.php | 4 +- .../league/html-to-markdown/src/HtmlConverter.php | 6 +- .../src/HtmlConverterInterface.php | 26 + vendor/sabre/dav/CHANGELOG.md | 6 + vendor/sabre/dav/bin/build.php | 0 vendor/sabre/dav/bin/googlecode_upload.py | 0 vendor/sabre/dav/bin/migrateto20.php | 0 vendor/sabre/dav/bin/migrateto21.php | 0 vendor/sabre/dav/bin/migrateto30.php | 0 vendor/sabre/dav/bin/migrateto32.php | 0 vendor/sabre/dav/bin/sabredav.php | 0 .../dav/lib/CardDAV/Xml/Filter/AddressData.php | 5 +- vendor/sabre/dav/lib/DAV/Server.php | 7 +- vendor/sabre/dav/lib/DAV/Tree.php | 4 +- .../Sabre/DAV/Auth/Backend/AbstractBasicTest.php | 2 +- vendor/sabre/dav/tests/Sabre/DAV/TreeTest.php | 16 + vendor/smarty/smarty/NEW_FEATURES.txt | 9 +- vendor/smarty/smarty/change_log.txt | 44 +- vendor/smarty/smarty/composer.json | 11 +- vendor/smarty/smarty/demo/index.php | 27 +- .../smarty/demo/plugins/cacheresource.apc.php | 16 +- .../smarty/demo/plugins/cacheresource.memcache.php | 16 +- .../smarty/demo/plugins/cacheresource.mysql.php | 93 +- .../smarty/demo/plugins/cacheresource.pdo.php | 195 +- .../smarty/demo/plugins/cacheresource.pdo_gzip.php | 33 +- .../smarty/demo/plugins/resource.extendsall.php | 13 +- .../smarty/smarty/demo/plugins/resource.mysql.php | 42 +- .../smarty/smarty/demo/plugins/resource.mysqls.php | 30 +- vendor/smarty/smarty/libs/Autoloader.php | 12 +- vendor/smarty/smarty/libs/Smarty.class.php | 229 +- vendor/smarty/smarty/libs/SmartyBC.class.php | 45 +- vendor/smarty/smarty/libs/bootstrap.php | 7 +- vendor/smarty/smarty/libs/debug.tpl | 6 +- .../smarty/libs/plugins/block.textformat.php | 40 +- .../smarty/libs/plugins/function.counter.php | 15 +- .../smarty/smarty/libs/plugins/function.cycle.php | 33 +- .../smarty/smarty/libs/plugins/function.fetch.php | 21 +- .../libs/plugins/function.html_checkboxes.php | 168 +- .../smarty/libs/plugins/function.html_image.php | 39 +- .../smarty/libs/plugins/function.html_options.php | 101 +- .../smarty/libs/plugins/function.html_radios.php | 147 +- .../libs/plugins/function.html_select_date.php | 129 +- .../libs/plugins/function.html_select_time.php | 142 +- .../smarty/libs/plugins/function.html_table.php | 44 +- .../smarty/smarty/libs/plugins/function.mailto.php | 42 +- .../smarty/smarty/libs/plugins/function.math.php | 49 +- .../smarty/libs/plugins/modifier.capitalize.php | 61 +- .../smarty/libs/plugins/modifier.date_format.php | 36 +- .../libs/plugins/modifier.debug_print_var.php | 43 +- .../smarty/smarty/libs/plugins/modifier.escape.php | 132 +- .../smarty/libs/plugins/modifier.mb_wordwrap.php | 26 +- .../smarty/libs/plugins/modifier.regex_replace.php | 11 +- .../smarty/libs/plugins/modifier.replace.php | 6 +- .../smarty/libs/plugins/modifier.spacify.php | 3 +- .../smarty/libs/plugins/modifier.truncate.php | 18 +- .../smarty/libs/plugins/modifiercompiler.cat.php | 5 +- .../plugins/modifiercompiler.count_characters.php | 4 +- .../plugins/modifiercompiler.count_paragraphs.php | 5 +- .../plugins/modifiercompiler.count_sentences.php | 5 +- .../libs/plugins/modifiercompiler.count_words.php | 1 - .../libs/plugins/modifiercompiler.default.php | 3 - .../libs/plugins/modifiercompiler.escape.php | 33 +- .../libs/plugins/modifiercompiler.from_charset.php | 3 - .../libs/plugins/modifiercompiler.indent.php | 3 - .../smarty/libs/plugins/modifiercompiler.lower.php | 2 - .../libs/plugins/modifiercompiler.noprint.php | 3 +- .../plugins/modifiercompiler.string_format.php | 1 - .../smarty/libs/plugins/modifiercompiler.strip.php | 3 - .../libs/plugins/modifiercompiler.strip_tags.php | 1 - .../libs/plugins/modifiercompiler.to_charset.php | 3 - .../libs/plugins/modifiercompiler.unescape.php | 6 - .../smarty/libs/plugins/modifiercompiler.upper.php | 1 - .../libs/plugins/modifiercompiler.wordwrap.php | 2 +- .../libs/plugins/outputfilter.trimwhitespace.php | 46 +- .../libs/plugins/shared.escape_special_chars.php | 6 +- .../libs/plugins/shared.literal_compiler_param.php | 9 +- .../smarty/libs/plugins/shared.make_timestamp.php | 24 +- .../smarty/libs/plugins/shared.mb_str_replace.php | 10 +- .../smarty/libs/plugins/shared.mb_unicode.php | 5 +- .../libs/sysplugins/smarty_cacheresource.php | 19 +- .../sysplugins/smarty_cacheresource_custom.php | 123 +- .../smarty_cacheresource_keyvaluestore.php | 208 +- .../smarty/smarty/libs/sysplugins/smarty_data.php | 4 +- .../libs/sysplugins/smarty_internal_block.php | 2 +- .../smarty_internal_cacheresource_file.php | 42 +- .../sysplugins/smarty_internal_compile_append.php | 4 +- .../sysplugins/smarty_internal_compile_assign.php | 16 +- .../sysplugins/smarty_internal_compile_block.php | 57 +- .../smarty_internal_compile_block_child.php | 4 +- .../smarty_internal_compile_block_parent.php | 4 +- .../sysplugins/smarty_internal_compile_break.php | 22 +- .../sysplugins/smarty_internal_compile_call.php | 4 +- .../sysplugins/smarty_internal_compile_capture.php | 35 +- .../sysplugins/smarty_internal_compile_child.php | 22 +- .../smarty_internal_compile_config_load.php | 16 +- .../smarty_internal_compile_continue.php | 8 +- .../sysplugins/smarty_internal_compile_debug.php | 6 +- .../sysplugins/smarty_internal_compile_eval.php | 9 +- .../sysplugins/smarty_internal_compile_extends.php | 31 +- .../sysplugins/smarty_internal_compile_for.php | 28 +- .../sysplugins/smarty_internal_compile_foreach.php | 38 +- .../smarty_internal_compile_function.php | 80 +- .../libs/sysplugins/smarty_internal_compile_if.php | 30 +- .../sysplugins/smarty_internal_compile_include.php | 48 +- .../smarty_internal_compile_include_php.php | 8 +- .../sysplugins/smarty_internal_compile_insert.php | 22 +- .../sysplugins/smarty_internal_compile_ldelim.php | 4 +- .../smarty_internal_compile_make_nocache.php | 4 +- .../sysplugins/smarty_internal_compile_nocache.php | 6 +- .../sysplugins/smarty_internal_compile_parent.php | 5 +- ...marty_internal_compile_private_block_plugin.php | 35 +- ...rty_internal_compile_private_foreachsection.php | 82 +- ...ty_internal_compile_private_function_plugin.php | 20 +- .../smarty_internal_compile_private_modifier.php | 50 +- ...ernal_compile_private_object_block_function.php | 6 +- ...ty_internal_compile_private_object_function.php | 15 +- .../smarty_internal_compile_private_php.php | 89 +- ...y_internal_compile_private_print_expression.php | 56 +- ...y_internal_compile_private_registered_block.php | 6 +- ...nternal_compile_private_registered_function.php | 23 +- ...y_internal_compile_private_special_variable.php | 36 +- .../sysplugins/smarty_internal_compile_rdelim.php | 4 +- .../sysplugins/smarty_internal_compile_section.php | 111 +- .../smarty_internal_compile_setfilter.php | 8 +- .../smarty_internal_compile_shared_inheritance.php | 19 +- .../sysplugins/smarty_internal_compile_while.php | 20 +- .../sysplugins/smarty_internal_compilebase.php | 30 +- .../smarty_internal_config_file_compiler.php | 27 +- .../sysplugins/smarty_internal_configfilelexer.php | 208 +- .../smarty_internal_configfileparser.php | 279 +- .../libs/sysplugins/smarty_internal_data.php | 64 +- .../libs/sysplugins/smarty_internal_debug.php | 24 +- .../sysplugins/smarty_internal_errorhandler.php | 29 +- .../smarty_internal_extension_handler.php | 119 +- .../smarty_internal_method_addautoloadfilters.php | 23 +- .../smarty_internal_method_adddefaultmodifiers.php | 4 +- .../sysplugins/smarty_internal_method_append.php | 14 +- .../smarty_internal_method_appendbyref.php | 9 +- .../smarty_internal_method_assignbyref.php | 6 +- .../smarty_internal_method_assignglobal.php | 9 +- .../smarty_internal_method_clearallassign.php | 3 +- .../smarty_internal_method_clearallcache.php | 8 +- .../smarty_internal_method_clearassign.php | 5 +- .../smarty_internal_method_clearcache.php | 25 +- ...marty_internal_method_clearcompiledtemplate.php | 43 +- .../smarty_internal_method_clearconfig.php | 4 +- .../smarty_internal_method_compileallconfig.php | 23 +- .../smarty_internal_method_compilealltemplates.php | 61 +- .../smarty_internal_method_configload.php | 22 +- .../smarty_internal_method_createdata.php | 4 +- .../smarty_internal_method_getautoloadfilters.php | 4 +- .../smarty_internal_method_getconfigvariable.php | 2 +- .../smarty_internal_method_getconfigvars.php | 6 +- .../smarty_internal_method_getdebugtemplate.php | 2 +- .../smarty_internal_method_getdefaultmodifiers.php | 2 +- .../smarty_internal_method_getglobal.php | 8 +- .../smarty_internal_method_getregisteredobject.php | 4 +- .../smarty_internal_method_getstreamvariable.php | 5 +- .../sysplugins/smarty_internal_method_gettags.php | 2 +- .../smarty_internal_method_gettemplatevars.php | 30 +- .../sysplugins/smarty_internal_method_literals.php | 18 +- .../smarty_internal_method_loadfilter.php | 6 +- .../smarty_internal_method_loadplugin.php | 12 +- .../smarty_internal_method_mustcompile.php | 3 +- ...marty_internal_method_registercacheresource.php | 12 +- .../smarty_internal_method_registerclass.php | 6 +- ...nternal_method_registerdefaultconfighandler.php | 6 +- ...nternal_method_registerdefaultpluginhandler.php | 4 +- ...ernal_method_registerdefaulttemplatehandler.php | 26 +- .../smarty_internal_method_registerfilter.php | 11 +- .../smarty_internal_method_registerobject.php | 42 +- .../smarty_internal_method_registerplugin.php | 25 +- .../smarty_internal_method_registerresource.php | 14 +- .../smarty_internal_method_setautoloadfilters.php | 19 +- .../smarty_internal_method_setdebugtemplate.php | 4 +- .../smarty_internal_method_setdefaultmodifiers.php | 6 +- .../smarty_internal_method_unloadfilter.php | 8 +- ...rty_internal_method_unregistercacheresource.php | 6 +- .../smarty_internal_method_unregisterfilter.php | 6 +- .../smarty_internal_method_unregisterobject.php | 4 +- .../smarty_internal_method_unregisterplugin.php | 6 +- .../smarty_internal_method_unregisterresource.php | 4 +- .../sysplugins/smarty_internal_nocache_insert.php | 11 +- .../libs/sysplugins/smarty_internal_parsetree.php | 4 - .../sysplugins/smarty_internal_parsetree_dq.php | 20 +- .../sysplugins/smarty_internal_parsetree_tag.php | 2 - .../smarty_internal_parsetree_template.php | 21 +- .../sysplugins/smarty_internal_resource_eval.php | 17 +- .../smarty_internal_resource_extends.php | 2 - .../sysplugins/smarty_internal_resource_file.php | 160 +- .../sysplugins/smarty_internal_resource_php.php | 29 +- .../smarty_internal_resource_registered.php | 28 +- .../sysplugins/smarty_internal_resource_stream.php | 9 +- .../sysplugins/smarty_internal_resource_string.php | 18 +- .../smarty_internal_runtime_cachemodify.php | 11 +- .../smarty_internal_runtime_cacheresourcefile.php | 11 +- .../sysplugins/smarty_internal_runtime_capture.php | 29 +- .../smarty_internal_runtime_codeframe.php | 41 +- .../smarty_internal_runtime_filterhandler.php | 8 +- .../sysplugins/smarty_internal_runtime_foreach.php | 49 +- .../smarty_internal_runtime_getincludepath.php | 14 +- .../smarty_internal_runtime_inheritance.php | 45 +- .../smarty_internal_runtime_make_nocache.php | 6 +- .../smarty_internal_runtime_tplfunction.php | 34 +- .../smarty_internal_runtime_updatecache.php | 52 +- .../smarty_internal_runtime_updatescope.php | 28 +- .../smarty_internal_runtime_writefile.php | 7 +- .../smarty_internal_smartytemplatecompiler.php | 32 +- .../libs/sysplugins/smarty_internal_template.php | 209 +- .../sysplugins/smarty_internal_templatebase.php | 93 +- .../smarty_internal_templatecompilerbase.php | 505 ++-- .../sysplugins/smarty_internal_templatelexer.php | 310 ++- .../sysplugins/smarty_internal_templateparser.php | 2878 ++++++++++---------- .../sysplugins/smarty_internal_testinstall.php | 336 +-- .../libs/sysplugins/smarty_internal_undefined.php | 9 +- .../smarty/libs/sysplugins/smarty_resource.php | 72 +- .../libs/sysplugins/smarty_resource_custom.php | 12 +- .../libs/sysplugins/smarty_resource_recompiled.php | 7 +- .../smarty/libs/sysplugins/smarty_security.php | 228 +- .../libs/sysplugins/smarty_template_cached.php | 20 +- .../libs/sysplugins/smarty_template_compiled.php | 21 +- .../libs/sysplugins/smarty_template_config.php | 19 +- .../sysplugins/smarty_template_resource_base.php | 3 +- .../libs/sysplugins/smarty_template_source.php | 17 +- .../libs/sysplugins/smarty_undefined_variable.php | 4 +- .../smarty/libs/sysplugins/smarty_variable.php | 3 +- 237 files changed, 5891 insertions(+), 5162 deletions(-) create mode 100644 vendor/league/html-to-markdown/src/HtmlConverterInterface.php mode change 100755 => 100644 vendor/sabre/dav/bin/build.php mode change 100755 => 100644 vendor/sabre/dav/bin/googlecode_upload.py mode change 100755 => 100644 vendor/sabre/dav/bin/migrateto20.php mode change 100755 => 100644 vendor/sabre/dav/bin/migrateto21.php mode change 100755 => 100644 vendor/sabre/dav/bin/migrateto30.php mode change 100755 => 100644 vendor/sabre/dav/bin/migrateto32.php mode change 100755 => 100644 vendor/sabre/dav/bin/sabredav.php diff --git a/composer.lock b/composer.lock index d352ad29a..edeba994d 100644 --- a/composer.lock +++ b/composer.lock @@ -157,16 +157,16 @@ }, { "name": "league/html-to-markdown", - "version": "4.7.0", + "version": "4.8.0", "source": { "type": "git", "url": "https://github.com/thephpleague/html-to-markdown.git", - "reference": "76c076483cef89860d32a3fd25312f5a42848a8c" + "reference": "f9a879a068c68ff47b722de63f58bec79e448f9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/html-to-markdown/zipball/76c076483cef89860d32a3fd25312f5a42848a8c", - "reference": "76c076483cef89860d32a3fd25312f5a42848a8c", + "url": "https://api.github.com/repos/thephpleague/html-to-markdown/zipball/f9a879a068c68ff47b722de63f58bec79e448f9d", + "reference": "f9a879a068c68ff47b722de63f58bec79e448f9d", "shasum": "" }, "require": { @@ -185,7 +185,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.8-dev" + "dev-master": "4.9-dev" } }, "autoload": { @@ -198,17 +198,17 @@ "MIT" ], "authors": [ - { - "name": "Colin O'Dell", - "email": "colinodell@gmail.com", - "homepage": "http://www.colinodell.com", - "role": "Lead Developer" - }, { "name": "Nick Cernis", "email": "nick@cern.is", "homepage": "http://modernnerd.net", "role": "Original Author" + }, + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Lead Developer" } ], "description": "An HTML-to-markdown conversion helper for PHP", @@ -217,7 +217,7 @@ "html", "markdown" ], - "time": "2018-05-19T23:47:12+00:00" + "time": "2018-09-18T12:18:08+00:00" }, { "name": "lukasreschke/id3parser", @@ -520,16 +520,16 @@ }, { "name": "sabre/dav", - "version": "3.2.2", + "version": "3.2.3", "source": { "type": "git", "url": "https://github.com/sabre-io/dav.git", - "reference": "e987775e619728f12205606c9cc3ee565ffb1516" + "reference": "a9780ce4f35560ecbd0af524ad32d9d2c8954b80" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sabre-io/dav/zipball/e987775e619728f12205606c9cc3ee565ffb1516", - "reference": "e987775e619728f12205606c9cc3ee565ffb1516", + "url": "https://api.github.com/repos/sabre-io/dav/zipball/a9780ce4f35560ecbd0af524ad32d9d2c8954b80", + "reference": "a9780ce4f35560ecbd0af524ad32d9d2c8954b80", "shasum": "" }, "require": { @@ -599,7 +599,7 @@ "framework", "iCalendar" ], - "time": "2017-02-15T03:06:08+00:00" + "time": "2018-10-19T09:58:27+00:00" }, { "name": "sabre/event", @@ -1002,16 +1002,16 @@ }, { "name": "smarty/smarty", - "version": "v3.1.32", + "version": "v3.1.33", "source": { "type": "git", "url": "https://github.com/smarty-php/smarty.git", - "reference": "ac9d4b587e5bf53381e21881820a9830765cb459" + "reference": "dd55b23121e55a3b4f1af90a707a6c4e5969530f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/smarty-php/smarty/zipball/ac9d4b587e5bf53381e21881820a9830765cb459", - "reference": "ac9d4b587e5bf53381e21881820a9830765cb459", + "url": "https://api.github.com/repos/smarty-php/smarty/zipball/dd55b23121e55a3b4f1af90a707a6c4e5969530f", + "reference": "dd55b23121e55a3b4f1af90a707a6c4e5969530f", "shasum": "" }, "require": { @@ -1051,7 +1051,7 @@ "keywords": [ "templating" ], - "time": "2018-04-24T14:53:33+00:00" + "time": "2018-09-12T20:54:16+00:00" }, { "name": "symfony/polyfill-ctype", @@ -2160,16 +2160,16 @@ }, { "name": "php-mock/php-mock-phpunit", - "version": "2.1.1", + "version": "2.1.2", "source": { "type": "git", "url": "https://github.com/php-mock/php-mock-phpunit.git", - "reference": "ff1cc1d4e7478ce74221e05742588619bee84f69" + "reference": "57b92e621f14c2c07a4567cd29ed4e87de0d2912" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-mock/php-mock-phpunit/zipball/ff1cc1d4e7478ce74221e05742588619bee84f69", - "reference": "ff1cc1d4e7478ce74221e05742588619bee84f69", + "url": "https://api.github.com/repos/php-mock/php-mock-phpunit/zipball/57b92e621f14c2c07a4567cd29ed4e87de0d2912", + "reference": "57b92e621f14c2c07a4567cd29ed4e87de0d2912", "shasum": "" }, "require": { @@ -2210,7 +2210,7 @@ "test", "test double" ], - "time": "2018-04-06T13:54:43+00:00" + "time": "2018-10-07T14:38:37+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -2481,16 +2481,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "6.0.7", + "version": "6.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "865662550c384bc1db7e51d29aeda1c2c161d69a" + "reference": "4d3ae9b21a7d7e440bd0cf65565533117976859f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/865662550c384bc1db7e51d29aeda1c2c161d69a", - "reference": "865662550c384bc1db7e51d29aeda1c2c161d69a", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/4d3ae9b21a7d7e440bd0cf65565533117976859f", + "reference": "4d3ae9b21a7d7e440bd0cf65565533117976859f", "shasum": "" }, "require": { @@ -2501,7 +2501,7 @@ "phpunit/php-text-template": "^1.2.1", "phpunit/php-token-stream": "^3.0", "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.1", + "sebastian/environment": "^3.1 || ^4.0", "sebastian/version": "^2.0.1", "theseer/tokenizer": "^1.1" }, @@ -2514,7 +2514,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "6.0-dev" + "dev-master": "6.1-dev" } }, "autoload": { @@ -2540,25 +2540,28 @@ "testing", "xunit" ], - "time": "2018-06-01T07:51:50+00:00" + "time": "2018-10-23T05:59:32+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cecbc684605bb0cc288828eb5d65d93d5c676d3c" + "reference": "050bedf145a257b1ff02746c31894800e5122946" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cecbc684605bb0cc288828eb5d65d93d5c676d3c", - "reference": "cecbc684605bb0cc288828eb5d65d93d5c676d3c", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", + "reference": "050bedf145a257b1ff02746c31894800e5122946", "shasum": "" }, "require": { "php": "^7.1" }, + "require-dev": { + "phpunit/phpunit": "^7.1" + }, "type": "library", "extra": { "branch-alias": { @@ -2587,7 +2590,7 @@ "filesystem", "iterator" ], - "time": "2018-06-11T11:44:00+00:00" + "time": "2018-09-13T20:33:42+00:00" }, { "name": "phpunit/php-text-template", @@ -2681,16 +2684,16 @@ }, { "name": "phpunit/php-token-stream", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace" + "reference": "c99e3be9d3e85f60646f152f9002d46ed7770d18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/21ad88bbba7c3d93530d93994e0a33cd45f02ace", - "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/c99e3be9d3e85f60646f152f9002d46ed7770d18", + "reference": "c99e3be9d3e85f60646f152f9002d46ed7770d18", "shasum": "" }, "require": { @@ -2726,20 +2729,20 @@ "keywords": [ "tokenizer" ], - "time": "2018-02-01T13:16:43+00:00" + "time": "2018-10-30T05:52:18+00:00" }, { "name": "phpunit/phpunit", - "version": "7.3.2", + "version": "7.4.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "34705f81bddc3f505b9599a2ef96e2b4315ba9b8" + "reference": "c151651fb6ed264038d486ea262e243af72e5e64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/34705f81bddc3f505b9599a2ef96e2b4315ba9b8", - "reference": "34705f81bddc3f505b9599a2ef96e2b4315ba9b8", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c151651fb6ed264038d486ea262e243af72e5e64", + "reference": "c151651fb6ed264038d486ea262e243af72e5e64", "shasum": "" }, "require": { @@ -2760,11 +2763,11 @@ "phpunit/php-timer": "^2.0", "sebastian/comparator": "^3.0", "sebastian/diff": "^3.0", - "sebastian/environment": "^3.1", + "sebastian/environment": "^3.1 || ^4.0", "sebastian/exporter": "^3.1", "sebastian/global-state": "^2.0", "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^1.0", + "sebastian/resource-operations": "^2.0", "sebastian/version": "^2.0.1" }, "conflict": { @@ -2784,7 +2787,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.3-dev" + "dev-master": "7.4-dev" } }, "autoload": { @@ -2810,7 +2813,7 @@ "testing", "xunit" ], - "time": "2018-08-22T06:39:21+00:00" + "time": "2018-10-23T05:57:41+00:00" }, { "name": "psr/container", @@ -3391,25 +3394,25 @@ }, { "name": "sebastian/resource-operations", - "version": "1.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", "shasum": "" }, "require": { - "php": ">=5.6.0" + "php": "^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -3429,7 +3432,7 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28T20:34:47+00:00" + "time": "2018-10-04T04:07:39+00:00" }, { "name": "sebastian/version", @@ -3476,7 +3479,7 @@ }, { "name": "symfony/browser-kit", - "version": "v4.1.4", + "version": "v4.1.6", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", @@ -3533,16 +3536,16 @@ }, { "name": "symfony/class-loader", - "version": "v3.4.15", + "version": "v3.4.17", "source": { "type": "git", "url": "https://github.com/symfony/class-loader.git", - "reference": "31db283fc86d3143e7ff87e922177b457d909c30" + "reference": "f31333bdff54c7595f834d510a6d2325573ddb36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/class-loader/zipball/31db283fc86d3143e7ff87e922177b457d909c30", - "reference": "31db283fc86d3143e7ff87e922177b457d909c30", + "url": "https://api.github.com/repos/symfony/class-loader/zipball/f31333bdff54c7595f834d510a6d2325573ddb36", + "reference": "f31333bdff54c7595f834d510a6d2325573ddb36", "shasum": "" }, "require": { @@ -3585,20 +3588,20 @@ ], "description": "Symfony ClassLoader Component", "homepage": "https://symfony.com", - "time": "2018-07-26T11:19:56+00:00" + "time": "2018-10-02T12:28:39+00:00" }, { "name": "symfony/config", - "version": "v4.1.4", + "version": "v4.1.6", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "76015a3cc372b14d00040ff58e18e29f69eba717" + "reference": "b3d4d7b567d7a49e6dfafb6d4760abc921177c96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/76015a3cc372b14d00040ff58e18e29f69eba717", - "reference": "76015a3cc372b14d00040ff58e18e29f69eba717", + "url": "https://api.github.com/repos/symfony/config/zipball/b3d4d7b567d7a49e6dfafb6d4760abc921177c96", + "reference": "b3d4d7b567d7a49e6dfafb6d4760abc921177c96", "shasum": "" }, "require": { @@ -3648,20 +3651,20 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2018-08-08T06:37:38+00:00" + "time": "2018-09-08T13:24:10+00:00" }, { "name": "symfony/console", - "version": "v4.1.4", + "version": "v4.1.6", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "ca80b8ced97cf07390078b29773dc384c39eee1f" + "reference": "dc7122fe5f6113cfaba3b3de575d31112c9aa60b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/ca80b8ced97cf07390078b29773dc384c39eee1f", - "reference": "ca80b8ced97cf07390078b29773dc384c39eee1f", + "url": "https://api.github.com/repos/symfony/console/zipball/dc7122fe5f6113cfaba3b3de575d31112c9aa60b", + "reference": "dc7122fe5f6113cfaba3b3de575d31112c9aa60b", "shasum": "" }, "require": { @@ -3716,20 +3719,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-07-26T11:24:31+00:00" + "time": "2018-10-03T08:15:46+00:00" }, { "name": "symfony/css-selector", - "version": "v3.4.15", + "version": "v3.4.17", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "edda5a6155000ff8c3a3f85ee5c421af93cca416" + "reference": "3503415d4aafabc31cd08c3a4ebac7f43fde8feb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/edda5a6155000ff8c3a3f85ee5c421af93cca416", - "reference": "edda5a6155000ff8c3a3f85ee5c421af93cca416", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/3503415d4aafabc31cd08c3a4ebac7f43fde8feb", + "reference": "3503415d4aafabc31cd08c3a4ebac7f43fde8feb", "shasum": "" }, "require": { @@ -3769,20 +3772,20 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2018-07-26T09:06:28+00:00" + "time": "2018-10-02T16:33:53+00:00" }, { "name": "symfony/dependency-injection", - "version": "v4.1.4", + "version": "v4.1.6", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "bae4983003c9d451e278504d7d9b9d7fc1846873" + "reference": "f6b9d893ad28aefd8942dc0469c8397e2216fe30" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/bae4983003c9d451e278504d7d9b9d7fc1846873", - "reference": "bae4983003c9d451e278504d7d9b9d7fc1846873", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/f6b9d893ad28aefd8942dc0469c8397e2216fe30", + "reference": "f6b9d893ad28aefd8942dc0469c8397e2216fe30", "shasum": "" }, "require": { @@ -3840,20 +3843,20 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "time": "2018-08-08T11:48:58+00:00" + "time": "2018-10-02T12:40:59+00:00" }, { "name": "symfony/dom-crawler", - "version": "v4.1.4", + "version": "v4.1.6", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "1c4519d257e652404c3aa550207ccd8ada66b38e" + "reference": "80e60271bb288de2a2259662cff125cff4f93f95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/1c4519d257e652404c3aa550207ccd8ada66b38e", - "reference": "1c4519d257e652404c3aa550207ccd8ada66b38e", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/80e60271bb288de2a2259662cff125cff4f93f95", + "reference": "80e60271bb288de2a2259662cff125cff4f93f95", "shasum": "" }, "require": { @@ -3897,11 +3900,11 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2018-07-26T11:00:49+00:00" + "time": "2018-10-02T12:40:59+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.1.4", + "version": "v4.1.6", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", @@ -3964,16 +3967,16 @@ }, { "name": "symfony/filesystem", - "version": "v4.1.4", + "version": "v4.1.6", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "c0f5f62db218fa72195b8b8700e4b9b9cf52eb5e" + "reference": "596d12b40624055c300c8b619755b748ca5cf0b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/c0f5f62db218fa72195b8b8700e4b9b9cf52eb5e", - "reference": "c0f5f62db218fa72195b8b8700e4b9b9cf52eb5e", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/596d12b40624055c300c8b619755b748ca5cf0b5", + "reference": "596d12b40624055c300c8b619755b748ca5cf0b5", "shasum": "" }, "require": { @@ -4010,7 +4013,7 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2018-08-18T16:52:46+00:00" + "time": "2018-10-02T12:40:59+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -4073,16 +4076,16 @@ }, { "name": "symfony/translation", - "version": "v4.1.4", + "version": "v4.1.6", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "fa2182669f7983b7aa5f1a770d053f79f0ef144f" + "reference": "9f0b61e339160a466ebcde167a6c5521c810e304" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/fa2182669f7983b7aa5f1a770d053f79f0ef144f", - "reference": "fa2182669f7983b7aa5f1a770d053f79f0ef144f", + "url": "https://api.github.com/repos/symfony/translation/zipball/9f0b61e339160a466ebcde167a6c5521c810e304", + "reference": "9f0b61e339160a466ebcde167a6c5521c810e304", "shasum": "" }, "require": { @@ -4138,20 +4141,20 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2018-08-07T12:45:11+00:00" + "time": "2018-10-02T16:36:10+00:00" }, { "name": "symfony/yaml", - "version": "v4.1.4", + "version": "v4.1.6", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "b832cc289608b6d305f62149df91529a2ab3c314" + "reference": "367e689b2fdc19965be435337b50bc8adf2746c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/b832cc289608b6d305f62149df91529a2ab3c314", - "reference": "b832cc289608b6d305f62149df91529a2ab3c314", + "url": "https://api.github.com/repos/symfony/yaml/zipball/367e689b2fdc19965be435337b50bc8adf2746c9", + "reference": "367e689b2fdc19965be435337b50bc8adf2746c9", "shasum": "" }, "require": { @@ -4197,7 +4200,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2018-08-18T16:52:46+00:00" + "time": "2018-10-02T16:36:10+00:00" }, { "name": "theseer/tokenizer", diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 4b8316c37..065aceee8 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -300,6 +300,7 @@ return array( 'League\\HTMLToMarkdown\\ElementInterface' => $vendorDir . '/league/html-to-markdown/src/ElementInterface.php', 'League\\HTMLToMarkdown\\Environment' => $vendorDir . '/league/html-to-markdown/src/Environment.php', 'League\\HTMLToMarkdown\\HtmlConverter' => $vendorDir . '/league/html-to-markdown/src/HtmlConverter.php', + 'League\\HTMLToMarkdown\\HtmlConverterInterface' => $vendorDir . '/league/html-to-markdown/src/HtmlConverterInterface.php', 'Michelf\\Markdown' => $vendorDir . '/michelf/php-markdown/Michelf/Markdown.php', 'Michelf\\MarkdownExtra' => $vendorDir . '/michelf/php-markdown/Michelf/MarkdownExtra.php', 'Michelf\\MarkdownInterface' => $vendorDir . '/michelf/php-markdown/Michelf/MarkdownInterface.php', diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 0202e148c..4b8c414e0 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -468,6 +468,7 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d 'League\\HTMLToMarkdown\\ElementInterface' => __DIR__ . '/..' . '/league/html-to-markdown/src/ElementInterface.php', 'League\\HTMLToMarkdown\\Environment' => __DIR__ . '/..' . '/league/html-to-markdown/src/Environment.php', 'League\\HTMLToMarkdown\\HtmlConverter' => __DIR__ . '/..' . '/league/html-to-markdown/src/HtmlConverter.php', + 'League\\HTMLToMarkdown\\HtmlConverterInterface' => __DIR__ . '/..' . '/league/html-to-markdown/src/HtmlConverterInterface.php', 'Michelf\\Markdown' => __DIR__ . '/..' . '/michelf/php-markdown/Michelf/Markdown.php', 'Michelf\\MarkdownExtra' => __DIR__ . '/..' . '/michelf/php-markdown/Michelf/MarkdownExtra.php', 'Michelf\\MarkdownInterface' => __DIR__ . '/..' . '/michelf/php-markdown/Michelf/MarkdownInterface.php', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index eac4cebde..b51c4160f 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -156,17 +156,17 @@ }, { "name": "league/html-to-markdown", - "version": "4.7.0", - "version_normalized": "4.7.0.0", + "version": "4.8.0", + "version_normalized": "4.8.0.0", "source": { "type": "git", "url": "https://github.com/thephpleague/html-to-markdown.git", - "reference": "76c076483cef89860d32a3fd25312f5a42848a8c" + "reference": "f9a879a068c68ff47b722de63f58bec79e448f9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/html-to-markdown/zipball/76c076483cef89860d32a3fd25312f5a42848a8c", - "reference": "76c076483cef89860d32a3fd25312f5a42848a8c", + "url": "https://api.github.com/repos/thephpleague/html-to-markdown/zipball/f9a879a068c68ff47b722de63f58bec79e448f9d", + "reference": "f9a879a068c68ff47b722de63f58bec79e448f9d", "shasum": "" }, "require": { @@ -179,14 +179,14 @@ "phpunit/phpunit": "4.*", "scrutinizer/ocular": "~1.1" }, - "time": "2018-05-19T23:47:12+00:00", + "time": "2018-09-18T12:18:08+00:00", "bin": [ "bin/html-to-markdown" ], "type": "library", "extra": { "branch-alias": { - "dev-master": "4.8-dev" + "dev-master": "4.9-dev" } }, "installation-source": "dist", @@ -200,17 +200,17 @@ "MIT" ], "authors": [ - { - "name": "Colin O'Dell", - "email": "colinodell@gmail.com", - "homepage": "http://www.colinodell.com", - "role": "Lead Developer" - }, { "name": "Nick Cernis", "email": "nick@cern.is", "homepage": "http://modernnerd.net", "role": "Original Author" + }, + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Lead Developer" } ], "description": "An HTML-to-markdown conversion helper for PHP", @@ -533,17 +533,17 @@ }, { "name": "sabre/dav", - "version": "3.2.2", - "version_normalized": "3.2.2.0", + "version": "3.2.3", + "version_normalized": "3.2.3.0", "source": { "type": "git", "url": "https://github.com/sabre-io/dav.git", - "reference": "e987775e619728f12205606c9cc3ee565ffb1516" + "reference": "a9780ce4f35560ecbd0af524ad32d9d2c8954b80" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sabre-io/dav/zipball/e987775e619728f12205606c9cc3ee565ffb1516", - "reference": "e987775e619728f12205606c9cc3ee565ffb1516", + "url": "https://api.github.com/repos/sabre-io/dav/zipball/a9780ce4f35560ecbd0af524ad32d9d2c8954b80", + "reference": "a9780ce4f35560ecbd0af524ad32d9d2c8954b80", "shasum": "" }, "require": { @@ -574,7 +574,7 @@ "ext-curl": "*", "ext-pdo": "*" }, - "time": "2017-02-15T03:06:08+00:00", + "time": "2018-10-19T09:58:27+00:00", "bin": [ "bin/sabredav", "bin/naturalselection" @@ -1029,23 +1029,23 @@ }, { "name": "smarty/smarty", - "version": "v3.1.32", - "version_normalized": "3.1.32.0", + "version": "v3.1.33", + "version_normalized": "3.1.33.0", "source": { "type": "git", "url": "https://github.com/smarty-php/smarty.git", - "reference": "ac9d4b587e5bf53381e21881820a9830765cb459" + "reference": "dd55b23121e55a3b4f1af90a707a6c4e5969530f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/smarty-php/smarty/zipball/ac9d4b587e5bf53381e21881820a9830765cb459", - "reference": "ac9d4b587e5bf53381e21881820a9830765cb459", + "url": "https://api.github.com/repos/smarty-php/smarty/zipball/dd55b23121e55a3b4f1af90a707a6c4e5969530f", + "reference": "dd55b23121e55a3b4f1af90a707a6c4e5969530f", "shasum": "" }, "require": { "php": ">=5.2" }, - "time": "2018-04-24T14:53:33+00:00", + "time": "2018-09-12T20:54:16+00:00", "type": "library", "extra": { "branch-alias": { diff --git a/vendor/league/html-to-markdown/CHANGELOG.md b/vendor/league/html-to-markdown/CHANGELOG.md index 981ffd594..ab07c94f5 100644 --- a/vendor/league/html-to-markdown/CHANGELOG.md +++ b/vendor/league/html-to-markdown/CHANGELOG.md @@ -4,6 +4,24 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip ## [Unreleased][unreleased] +## [4.8.0] - 2018-09-18 +### Added + - Added support for email auto-linking + - Added a new interface (`HtmlConverterInterface`) for the main `HtmlConverter` class + - Added additional test cases (#14) + +### Changed + - The `italic_style` option now defaults to `'*'` so that in-word emphasis is handled properly (#75) + +### Fixed + - Fixed several issues of `` and `
` tags not converting to blocks or inlines properly (#26, #70, #102, #140, #161, #162)
+ - Fixed in-word emphasis using underscores as delimiter (#75)
+ - Fixed character escaping inside of `
` elements + - Fixed header edge cases + +### Deprecated + - The `bold_style` and `italic_style` options have been deprecated (#75) + ## [4.7.0] - 2018-05-19 ### Added - Added `setOptions()` function for chainable calling (#149) @@ -217,7 +235,8 @@ not ideally set, so this releases fixes that. Moving forwards this should reduce ### Added - Initial release -[unreleased]: https://github.com/thephpleague/html-to-markdown/compare/4.7.0...master +[unreleased]: https://github.com/thephpleague/html-to-markdown/compare/4.8.0...master +[4.8.0]: https://github.com/thephpleague/html-to-markdown/compare/4.7.0...4.8.0 [4.7.0]: https://github.com/thephpleague/html-to-markdown/compare/4.6.2...4.7.0 [4.6.2]: https://github.com/thephpleague/html-to-markdown/compare/4.6.1...4.6.2 [4.6.1]: https://github.com/thephpleague/html-to-markdown/compare/4.6.0...4.6.1 diff --git a/vendor/league/html-to-markdown/composer.json b/vendor/league/html-to-markdown/composer.json index c79230562..53403916e 100644 --- a/vendor/league/html-to-markdown/composer.json +++ b/vendor/league/html-to-markdown/composer.json @@ -9,7 +9,7 @@ { "name": "Colin O'Dell", "email": "colinodell@gmail.com", - "homepage": "http://www.colinodell.com", + "homepage": "https://www.colinodell.com", "role": "Lead Developer" }, { @@ -42,7 +42,7 @@ "bin": ["bin/html-to-markdown"], "extra": { "branch-alias": { - "dev-master": "4.8-dev" + "dev-master": "4.9-dev" } } } diff --git a/vendor/league/html-to-markdown/src/Configuration.php b/vendor/league/html-to-markdown/src/Configuration.php index 2943383aa..5bc8d5503 100644 --- a/vendor/league/html-to-markdown/src/Configuration.php +++ b/vendor/league/html-to-markdown/src/Configuration.php @@ -12,6 +12,8 @@ class Configuration public function __construct(array $config = array()) { $this->config = $config; + + $this->checkForDeprecatedOptions($config); } /** @@ -19,6 +21,7 @@ class Configuration */ public function merge(array $config = array()) { + $this->checkForDeprecatedOptions($config); $this->config = array_replace_recursive($this->config, $config); } @@ -27,6 +30,7 @@ class Configuration */ public function replace(array $config = array()) { + $this->checkForDeprecatedOptions($config); $this->config = $config; } @@ -36,6 +40,7 @@ class Configuration */ public function setOption($key, $value) { + $this->checkForDeprecatedOptions(array($key => $value)); $this->config[$key] = $value; } @@ -57,4 +62,15 @@ class Configuration return $this->config[$key]; } + + private function checkForDeprecatedOptions(array $config) + { + foreach ($config as $key => $value) { + if ($key === 'bold_style' && $value !== '**') { + @trigger_error('Customizing the bold_style option is deprecated and may be removed in the next major version', E_USER_DEPRECATED); + } elseif ($key === 'italic_style' && $value !== '*') { + @trigger_error('Customizing the italic_style option is deprecated and may be removed in the next major version', E_USER_DEPRECATED); + } + } + } } diff --git a/vendor/league/html-to-markdown/src/Converter/CodeConverter.php b/vendor/league/html-to-markdown/src/Converter/CodeConverter.php index e536362ee..39e6a7bc4 100644 --- a/vendor/league/html-to-markdown/src/Converter/CodeConverter.php +++ b/vendor/league/html-to-markdown/src/Converter/CodeConverter.php @@ -13,7 +13,7 @@ class CodeConverter implements ConverterInterface */ public function convert(ElementInterface $element) { - $language = null; + $language = ''; // Checking for language class on the code block $classes = $element->getAttribute('class'); @@ -24,8 +24,7 @@ class CodeConverter implements ConverterInterface foreach ($classes as $class) { if (strpos($class, 'language-') !== false) { // Found one, save it as the selected language and stop looping over the classes. - // The space after the language avoids gluing the actual code with the language tag - $language = str_replace('language-', '', $class) . ' '; + $language = str_replace('language-', '', $class); break; } } @@ -39,14 +38,13 @@ class CodeConverter implements ConverterInterface $code = preg_replace('/]*>/', '', $code); $code = str_replace('', '', $code); - // Checking if the code has multiple lines - $lines = preg_split('/\r\n|\r|\n/', $code); - if (count($lines) > 1) { - // Multiple lines detected, adding three backticks and newlines - $markdown .= '```' . $language . "\n" . $code . "\n" . '```' . "\n\n"; + // Checking if it's a code block or span + if ($this->shouldBeBlock($element, $code)) { + // Code block detected, newlines will be added in parent + $markdown .= '```' . $language . "\n" . $code . "\n" . '```'; } else { - // One line of code, wrapping it on one backtick. - $markdown .= '`' . $language . $code . '`'; + // One line of code, wrapping it on one backtick, removing new lines + $markdown .= '`' . preg_replace('/\r\n|\r|\n/', '', $code) . '`'; } return $markdown; @@ -59,4 +57,23 @@ class CodeConverter implements ConverterInterface { return array('code'); } + + /** + * @param ElementInterface $element + * @param string $code + * + * @return bool + */ + private function shouldBeBlock(ElementInterface $element, $code) + { + if ($element->getParent()->getTagName() == 'pre') { + return true; + } + + if (preg_match('/[^\s]` `/', $code)) { + return true; + } + + return false; + } } diff --git a/vendor/league/html-to-markdown/src/Converter/HeaderConverter.php b/vendor/league/html-to-markdown/src/Converter/HeaderConverter.php index d117e7d36..05d4fe81e 100644 --- a/vendor/league/html-to-markdown/src/Converter/HeaderConverter.php +++ b/vendor/league/html-to-markdown/src/Converter/HeaderConverter.php @@ -34,6 +34,10 @@ class HeaderConverter implements ConverterInterface, ConfigurationAwareInterface $level = (int) substr($element->getTagName(), 1, 1); $style = $this->config->getOption('header_style', self::STYLE_SETEXT); + if (strlen($element->getValue()) === 0) { + return ''; + } + if (($level === 1 || $level === 2) && !$element->isDescendantOf('blockquote') && $style === self::STYLE_SETEXT) { return $this->createSetextHeader($level, $element->getValue()); } diff --git a/vendor/league/html-to-markdown/src/Converter/LinkConverter.php b/vendor/league/html-to-markdown/src/Converter/LinkConverter.php index 74b49a778..c82b70e97 100644 --- a/vendor/league/html-to-markdown/src/Converter/LinkConverter.php +++ b/vendor/league/html-to-markdown/src/Converter/LinkConverter.php @@ -21,6 +21,8 @@ class LinkConverter implements ConverterInterface $markdown = '[' . $text . '](' . $href . ' "' . $title . '")'; } elseif ($href === $text && $this->isValidAutolink($href)) { $markdown = '<' . $href . '>'; + } elseif ($href === 'mailto:' . $text && $this->isValidEmail($text)) { + $markdown = '<' . $text . '>'; } else { $markdown = '[' . $text . '](' . $href . ')'; } @@ -49,4 +51,15 @@ class LinkConverter implements ConverterInterface { return preg_match('/^[A-Za-z][A-Za-z0-9.+-]{1,31}:[^<>\x00-\x20]*/i', $href) === 1; } + + /** + * @param string $email + * + * @return bool + */ + private function isValidEmail($email) + { + // Email validation is messy business, but this should cover most cases + return filter_var($email, FILTER_VALIDATE_EMAIL); + } } diff --git a/vendor/league/html-to-markdown/src/Converter/PreformattedConverter.php b/vendor/league/html-to-markdown/src/Converter/PreformattedConverter.php index 3b77ba10b..321c898b1 100644 --- a/vendor/league/html-to-markdown/src/Converter/PreformattedConverter.php +++ b/vendor/league/html-to-markdown/src/Converter/PreformattedConverter.php @@ -13,8 +13,6 @@ class PreformattedConverter implements ConverterInterface */ public function convert(ElementInterface $element) { - $markdown = ''; - $pre_content = html_entity_decode($element->getChildrenAsString()); $pre_content = str_replace(array('
', '
'), '', $pre_content); @@ -28,28 +26,22 @@ class PreformattedConverter implements ConverterInterface $firstBacktick = strpos(trim($pre_content), '`'); $lastBacktick = strrpos(trim($pre_content), '`'); if ($firstBacktick === 0 && $lastBacktick === strlen(trim($pre_content)) - 1) { - return $pre_content; + return $pre_content . "\n\n"; } // If the execution reaches this point it means it's just a pre tag, with no code tag nested // Empty lines are a special case if ($pre_content === '') { - return "```\n```\n"; + return "```\n```\n\n"; } // Normalizing new lines - $pre_content = preg_replace('/\r\n|\r|\n/', PHP_EOL, $pre_content); - - // Is it a single line? - if (strpos($pre_content, PHP_EOL) === false) { - // One line of code, wrapping it on one backtick. - return '`' . $pre_content . '`'; - } + $pre_content = preg_replace('/\r\n|\r|\n/', "\n", $pre_content); // Ensure there's a newline at the end - if (strrpos($pre_content, PHP_EOL) !== strlen($pre_content) - 1) { - $pre_content .= PHP_EOL; + if (strrpos($pre_content, "\n") !== strlen($pre_content) - strlen("\n")) { + $pre_content .= "\n"; } // Use three backticks diff --git a/vendor/league/html-to-markdown/src/Converter/TextConverter.php b/vendor/league/html-to-markdown/src/Converter/TextConverter.php index d6d91e16f..fcd466094 100644 --- a/vendor/league/html-to-markdown/src/Converter/TextConverter.php +++ b/vendor/league/html-to-markdown/src/Converter/TextConverter.php @@ -22,7 +22,9 @@ class TextConverter implements ConverterInterface $markdown = preg_replace('~\s+~u', ' ', $markdown); // Escape the following characters: '*', '_', '[', ']' and '\' - $markdown = preg_replace('~([*_\\[\\]\\\\])~u', '\\\\$1', $markdown); + if ($element->getParent() && $element->getParent()->getTagName() !== 'div') { + $markdown = preg_replace('~([*_\\[\\]\\\\])~u', '\\\\$1', $markdown); + } $markdown = preg_replace('~^#~u', '\\\\#', $markdown); diff --git a/vendor/league/html-to-markdown/src/HtmlConverter.php b/vendor/league/html-to-markdown/src/HtmlConverter.php index 155369f56..3381e1e1e 100644 --- a/vendor/league/html-to-markdown/src/HtmlConverter.php +++ b/vendor/league/html-to-markdown/src/HtmlConverter.php @@ -14,7 +14,7 @@ namespace League\HTMLToMarkdown; * * @license http://www.opensource.org/licenses/mit-license.php MIT */ -class HtmlConverter +class HtmlConverter implements HtmlConverterInterface { /** * @var Environment @@ -35,8 +35,8 @@ class HtmlConverter 'header_style' => 'setext', // Set to 'atx' to output H1 and H2 headers as # Header1 and ## Header2 'suppress_errors' => true, // Set to false to show warnings when loading malformed HTML 'strip_tags' => false, // Set to true to strip tags that don't have markdown equivalents. N.B. Strips tags, not their content. Useful to clean MS Word HTML output. - 'bold_style' => '**', // Set to '__' if you prefer the underlined style - 'italic_style' => '_', // Set to '*' if you prefer the asterisk style + 'bold_style' => '**', // DEPRECATED: Set to '__' if you prefer the underlined style + 'italic_style' => '*', // DEPRECATED: Set to '_' if you prefer the underlined style 'remove_nodes' => '', // space-separated list of dom nodes that should be removed. example: 'meta style script' 'hard_break' => false, // Set to true to turn
into `\n` instead of ` \n` 'list_item_style' => '-', // Set the default character for each
  • in a
      . Can be '-', '*', or '+' diff --git a/vendor/league/html-to-markdown/src/HtmlConverterInterface.php b/vendor/league/html-to-markdown/src/HtmlConverterInterface.php new file mode 100644 index 000000000..7d43cf87e --- /dev/null +++ b/vendor/league/html-to-markdown/src/HtmlConverterInterface.php @@ -0,0 +1,26 @@ + + * + * @link https://github.com/thephpleague/html-to-markdown/ Latest version on GitHub. + * + * @license http://www.opensource.org/licenses/mit-license.php MIT + */ +interface HtmlConverterInterface +{ + /** + * Convert the given $html to Markdown + * + * @param string $html + * + * @throws \InvalidArgumentException + * + * @return string The Markdown version of the html + */ + public function convert($html); +} diff --git a/vendor/sabre/dav/CHANGELOG.md b/vendor/sabre/dav/CHANGELOG.md index 0bccc995c..cda2564e1 100644 --- a/vendor/sabre/dav/CHANGELOG.md +++ b/vendor/sabre/dav/CHANGELOG.md @@ -1,6 +1,12 @@ ChangeLog ========= +3.2.3 (2018-10-19) +------------------ + +* #982: Make sure that files that are siblings of directories, are reported + as files (@nickvergessen) + 3.2.2 (2017-02-14) ------------------ diff --git a/vendor/sabre/dav/bin/build.php b/vendor/sabre/dav/bin/build.php old mode 100755 new mode 100644 diff --git a/vendor/sabre/dav/bin/googlecode_upload.py b/vendor/sabre/dav/bin/googlecode_upload.py old mode 100755 new mode 100644 diff --git a/vendor/sabre/dav/bin/migrateto20.php b/vendor/sabre/dav/bin/migrateto20.php old mode 100755 new mode 100644 diff --git a/vendor/sabre/dav/bin/migrateto21.php b/vendor/sabre/dav/bin/migrateto21.php old mode 100755 new mode 100644 diff --git a/vendor/sabre/dav/bin/migrateto30.php b/vendor/sabre/dav/bin/migrateto30.php old mode 100755 new mode 100644 diff --git a/vendor/sabre/dav/bin/migrateto32.php b/vendor/sabre/dav/bin/migrateto32.php old mode 100755 new mode 100644 diff --git a/vendor/sabre/dav/bin/sabredav.php b/vendor/sabre/dav/bin/sabredav.php old mode 100755 new mode 100644 diff --git a/vendor/sabre/dav/lib/CardDAV/Xml/Filter/AddressData.php b/vendor/sabre/dav/lib/CardDAV/Xml/Filter/AddressData.php index a130cd61d..5b7b2ee17 100644 --- a/vendor/sabre/dav/lib/CardDAV/Xml/Filter/AddressData.php +++ b/vendor/sabre/dav/lib/CardDAV/Xml/Filter/AddressData.php @@ -52,12 +52,15 @@ class AddressData implements XmlDeserializable { ]; $elems = (array)$reader->parseInnerTree(); + $elems = array_filter($elems, function($element) { + return $element['name'] === '{urn:ietf:params:xml:ns:carddav}prop' && + isset($element['attributes']['name']); + }); $result['addressDataProperties'] = array_map(function($element) { return $element['attributes']['name']; }, $elems); return $result; - } } diff --git a/vendor/sabre/dav/lib/DAV/Server.php b/vendor/sabre/dav/lib/DAV/Server.php index 6805ec0b0..f7fcf3057 100644 --- a/vendor/sabre/dav/lib/DAV/Server.php +++ b/vendor/sabre/dav/lib/DAV/Server.php @@ -893,15 +893,16 @@ class Server extends EventEmitter implements LoggerAwareInterface { $newDepth--; } + $propertyNames = $propFind->getRequestedProperties(); + $propFindType = !empty($propertyNames) ? PropFind::NORMAL : PropFind::ALLPROPS; + foreach ($this->tree->getChildren($path) as $childNode) { - $subPropFind = clone $propFind; - $subPropFind->setDepth($newDepth); if ($path !== '') { $subPath = $path . '/' . $childNode->getName(); } else { $subPath = $childNode->getName(); } - $subPropFind->setPath($subPath); + $subPropFind = new PropFind($subPath, $propertyNames, $newDepth, $propFindType); yield [ $subPropFind, diff --git a/vendor/sabre/dav/lib/DAV/Tree.php b/vendor/sabre/dav/lib/DAV/Tree.php index 5d2792503..7c04f0915 100644 --- a/vendor/sabre/dav/lib/DAV/Tree.php +++ b/vendor/sabre/dav/lib/DAV/Tree.php @@ -298,7 +298,9 @@ class Tree { */ protected function copyNode(INode $source, ICollection $destinationParent, $destinationName = null) { - if (!$destinationName) $destinationName = $source->getName(); + if ((string)$destinationName === '') { + $destinationName = $source->getName(); + } if ($source instanceof IFile) { diff --git a/vendor/sabre/dav/tests/Sabre/DAV/Auth/Backend/AbstractBasicTest.php b/vendor/sabre/dav/tests/Sabre/DAV/Auth/Backend/AbstractBasicTest.php index 455403aff..917f5ec3f 100644 --- a/vendor/sabre/dav/tests/Sabre/DAV/Auth/Backend/AbstractBasicTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAV/Auth/Backend/AbstractBasicTest.php @@ -60,7 +60,7 @@ class AbstractBasicTest extends \PHPUnit_Framework_TestCase { $backend->setRealm('writing unittests on a saturday night'); $backend->challenge($request, $response); - $this->assertEquals( + $this->assertContains( 'Basic realm="writing unittests on a saturday night"', $response->getHeader('WWW-Authenticate') ); diff --git a/vendor/sabre/dav/tests/Sabre/DAV/TreeTest.php b/vendor/sabre/dav/tests/Sabre/DAV/TreeTest.php index e719e38d5..c70d17a22 100644 --- a/vendor/sabre/dav/tests/Sabre/DAV/TreeTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAV/TreeTest.php @@ -24,6 +24,22 @@ class TreeTest extends \PHPUnit_Framework_TestCase { } + function testCopyFile() { + + $tree = new TreeMock(); + $tree->copy('hi/file', 'hi/newfile'); + + $this->assertArrayHasKey('newfile', $tree->getNodeForPath('hi')->newFiles); + } + + function testCopyFile0() { + + $tree = new TreeMock(); + $tree->copy('hi/file', 'hi/0'); + + $this->assertArrayHasKey('0', $tree->getNodeForPath('hi')->newFiles); + } + function testMove() { $tree = new TreeMock(); diff --git a/vendor/smarty/smarty/NEW_FEATURES.txt b/vendor/smarty/smarty/NEW_FEATURES.txt index 7632b07ea..b3289dfc1 100644 --- a/vendor/smarty/smarty/NEW_FEATURES.txt +++ b/vendor/smarty/smarty/NEW_FEATURES.txt @@ -2,7 +2,14 @@ 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 +Smarty 3.1.33-dev + Variable capture name in Smarty special variable + ================================================ + {$smarty.capture.$foo} can now be used to access the content of a named + capture block + +Smarty 3.1.32 + New tags for inheritance parent and child ========================================= {parent} == {$smarty.block.parent} {child} == {$smarty.block.child} diff --git a/vendor/smarty/smarty/change_log.txt b/vendor/smarty/smarty/change_log.txt index 5765a1718..70762eda5 100644 --- a/vendor/smarty/smarty/change_log.txt +++ b/vendor/smarty/smarty/change_log.txt @@ -1,4 +1,46 @@ -===== 3.1.32 ===== (24.04.2018) +===== 3.1.33 release ===== 12.09.2018 +===== 3.1.33-dev-12 ===== +03.09.2018 + - bugfix {foreach} using new style property access like {$item@property} on + Smarty 2 style named foreach loop could produce errors https://github.com/smarty-php/smarty/issues/484 + +31.08.2018 + - bugfix some custom left and right delimiters like '{^' '^}' did not work + https://github.com/smarty-php/smarty/issues/450 https://github.com/smarty-php/smarty/pull/482 + + - reformating for PSR-2 coding standards https://github.com/smarty-php/smarty/pull/483 + + - bugfix on Windows absolute filepathes did fail if the drive letter was followed by a linux DIRECTORY_SEPARATOR + like C:/ at Smarty > 3.1.33-dev-5 https://github.com/smarty-php/smarty/issues/451 + + - PSR-2 code style fixes for config and template file Lexer/Parser generated with + the Smarty Lexer/Parser generator from https://github.com/smarty-php/smarty-lexer + https://github.com/smarty-php/smarty/pull/483 + +26.08.2018 + - bugfix/enhancement {capture} allow variable as capture block name in Smarty special variable + like $smarty.capture.$foo https://github.com/smarty-php/smarty/issues/478 https://github.com/smarty-php/smarty/pull/481 + +===== 3.1.33-dev-6 ===== +19.08.2018 + - fix PSR-2 coding standards and PHPDoc blocks https://github.com/smarty-php/smarty/pull/452 + https://github.com/smarty-php/smarty/pull/475 + https://github.com/smarty-php/smarty/pull/473 + - bugfix PHP5.2 compatibility https://github.com/smarty-php/smarty/pull/472 + +===== 3.1.33-dev-4 ===== +17.05.2018 + - bugfix strip-block produces different output in Smarty v3.1.32 https://github.com/smarty-php/smarty/issues/436 + - bugfix Smarty::compileAllTemplates ignores `$extension` parameter https://github.com/smarty-php/smarty/issues/437 + https://github.com/smarty-php/smarty/pull/438 + - improvement do not compute total property in {foreach} if not needed https://github.com/smarty-php/smarty/issues/443 + - bugfix plugins may not be loaded when setMergeCompiledIncludes is true https://github.com/smarty-php/smarty/issues/435 + +26.04.2018 + - bugfix regarding Security Vulnerability did not solve the problem under Linux. + Security issue CVE-2018-16831 + +===== 3.1.32 ===== (24.04.2018) 24.04.2018 - bugfix possible Security Vulnerability in Smarty_Security class. diff --git a/vendor/smarty/smarty/composer.json b/vendor/smarty/smarty/composer.json index 5064c8ce3..5007517bc 100644 --- a/vendor/smarty/smarty/composer.json +++ b/vendor/smarty/smarty/composer.json @@ -2,7 +2,9 @@ "name": "smarty/smarty", "type": "library", "description": "Smarty - the compiling PHP template engine", - "keywords": ["templating"], + "keywords": [ + "templating" + ], "homepage": "http://www.smarty.net", "license": "LGPL-3.0", "authors": [ @@ -28,12 +30,13 @@ "php": ">=5.2" }, "autoload": { - "files": ["libs/bootstrap.php"] + "files": [ + "libs/bootstrap.php" + ] }, "extra": { "branch-alias": { "dev-master": "3.1.x-dev" } } - -} +} \ No newline at end of file diff --git a/vendor/smarty/smarty/demo/index.php b/vendor/smarty/smarty/demo/index.php index b67c217be..3aed37168 100644 --- a/vendor/smarty/smarty/demo/index.php +++ b/vendor/smarty/smarty/demo/index.php @@ -4,27 +4,32 @@ * * @package Example-application */ - require '../libs/Smarty.class.php'; - $smarty = new Smarty; - //$smarty->force_compile = true; $smarty->debugging = true; $smarty->caching = true; $smarty->cache_lifetime = 120; - $smarty->assign("Name", "Fred Irving Johnathan Bradley Peppergill", true); $smarty->assign("FirstName", array("John", "Mary", "James", "Henry")); $smarty->assign("LastName", array("Doe", "Smith", "Johnson", "Case")); -$smarty->assign("Class", array(array("A", "B", "C", "D"), array("E", "F", "G", "H"), array("I", "J", "K", "L"), - array("M", "N", "O", "P"))); - -$smarty->assign("contacts", array(array("phone" => "1", "fax" => "2", "cell" => "3"), - array("phone" => "555-4444", "fax" => "555-3333", "cell" => "760-1234"))); - +$smarty->assign( + "Class", + array( + array("A", "B", "C", "D"), + array("E", "F", "G", "H"), + array("I", "J", "K", "L"), + array("M", "N", "O", "P") + ) +); +$smarty->assign( + "contacts", + array( + array("phone" => "1", "fax" => "2", "cell" => "3"), + array("phone" => "555-4444", "fax" => "555-3333", "cell" => "760-1234") + ) +); $smarty->assign("option_values", array("NY", "NE", "KS", "IA", "OK", "TX")); $smarty->assign("option_output", array("New York", "Nebraska", "Kansas", "Iowa", "Oklahoma", "Texas")); $smarty->assign("option_selected", "NE"); - $smarty->display('index.tpl'); diff --git a/vendor/smarty/smarty/demo/plugins/cacheresource.apc.php b/vendor/smarty/smarty/demo/plugins/cacheresource.apc.php index ed55ec846..7867cc598 100644 --- a/vendor/smarty/smarty/demo/plugins/cacheresource.apc.php +++ b/vendor/smarty/smarty/demo/plugins/cacheresource.apc.php @@ -11,6 +11,11 @@ */ class Smarty_CacheResource_Apc extends Smarty_CacheResource_KeyValueStore { + /** + * Smarty_CacheResource_Apc constructor. + * + * @throws \Exception + */ public function __construct() { // test if APC is present @@ -22,7 +27,7 @@ class Smarty_CacheResource_Apc extends Smarty_CacheResource_KeyValueStore /** * Read values for a set of keys from cache * - * @param array $keys list of keys to fetch + * @param array $keys list of keys to fetch * * @return array list of values with the given keys used as indexes * @return boolean true on success, false on failure @@ -34,15 +39,14 @@ class Smarty_CacheResource_Apc extends Smarty_CacheResource_KeyValueStore foreach ($res as $k => $v) { $_res[ $k ] = $v; } - return $_res; } /** * Save values for a set of keys to cache * - * @param array $keys list of values to save - * @param int $expire expiration time + * @param array $keys list of values to save + * @param int $expire expiration time * * @return boolean true on success, false on failure */ @@ -51,14 +55,13 @@ class Smarty_CacheResource_Apc extends Smarty_CacheResource_KeyValueStore foreach ($keys as $k => $v) { apc_store($k, $v, $expire); } - return true; } /** * Remove values from cache * - * @param array $keys list of keys to delete + * @param array $keys list of keys to delete * * @return boolean true on success, false on failure */ @@ -67,7 +70,6 @@ class Smarty_CacheResource_Apc extends Smarty_CacheResource_KeyValueStore foreach ($keys as $k) { apc_delete($k); } - return true; } diff --git a/vendor/smarty/smarty/demo/plugins/cacheresource.memcache.php b/vendor/smarty/smarty/demo/plugins/cacheresource.memcache.php index 945beb349..9c8855c31 100644 --- a/vendor/smarty/smarty/demo/plugins/cacheresource.memcache.php +++ b/vendor/smarty/smarty/demo/plugins/cacheresource.memcache.php @@ -19,6 +19,9 @@ class Smarty_CacheResource_Memcache extends Smarty_CacheResource_KeyValueStore */ protected $memcache = null; + /** + * Smarty_CacheResource_Memcache constructor. + */ public function __construct() { if (class_exists('Memcached')) { @@ -32,7 +35,7 @@ class Smarty_CacheResource_Memcache extends Smarty_CacheResource_KeyValueStore /** * Read values for a set of keys from cache * - * @param array $keys list of keys to fetch + * @param array $keys list of keys to fetch * * @return array list of values with the given keys used as indexes * @return boolean true on success, false on failure @@ -50,15 +53,14 @@ class Smarty_CacheResource_Memcache extends Smarty_CacheResource_KeyValueStore foreach ($res as $k => $v) { $_res[ $lookup[ $k ] ] = $v; } - return $_res; } /** * Save values for a set of keys to cache * - * @param array $keys list of values to save - * @param int $expire expiration time + * @param array $keys list of values to save + * @param int $expire expiration time * * @return boolean true on success, false on failure */ @@ -68,14 +70,13 @@ class Smarty_CacheResource_Memcache extends Smarty_CacheResource_KeyValueStore $k = sha1($k); $this->memcache->set($k, $v, 0, $expire); } - return true; } /** * Remove values from cache * - * @param array $keys list of keys to delete + * @param array $keys list of keys to delete * * @return boolean true on success, false on failure */ @@ -85,7 +86,6 @@ class Smarty_CacheResource_Memcache extends Smarty_CacheResource_KeyValueStore $k = sha1($k); $this->memcache->delete($k); } - return true; } @@ -96,6 +96,6 @@ class Smarty_CacheResource_Memcache extends Smarty_CacheResource_KeyValueStore */ protected function purge() { - $this->memcache->flush(); + return $this->memcache->flush(); } } diff --git a/vendor/smarty/smarty/demo/plugins/cacheresource.mysql.php b/vendor/smarty/smarty/demo/plugins/cacheresource.mysql.php index 027b93766..c5037eb13 100644 --- a/vendor/smarty/smarty/demo/plugins/cacheresource.mysql.php +++ b/vendor/smarty/smarty/demo/plugins/cacheresource.mysql.php @@ -24,38 +24,55 @@ */ class Smarty_CacheResource_Mysql extends Smarty_CacheResource_Custom { - // PDO instance + /** + * @var \PDO + */ protected $db; + /** + * @var \PDOStatement + */ protected $fetch; + /** + * @var \PDOStatement + */ protected $fetchTimestamp; + /** + * @var \PDOStatement + */ protected $save; + /** + * Smarty_CacheResource_Mysql constructor. + * + * @throws \SmartyException + */ public function __construct() { try { $this->db = new PDO("mysql:dbname=test;host=127.0.0.1", "smarty"); - } - catch (PDOException $e) { + } catch (PDOException $e) { throw new SmartyException('Mysql Resource failed: ' . $e->getMessage()); } $this->fetch = $this->db->prepare('SELECT modified, content FROM output_cache WHERE id = :id'); $this->fetchTimestamp = $this->db->prepare('SELECT modified FROM output_cache WHERE id = :id'); - $this->save = $this->db->prepare('REPLACE INTO output_cache (id, name, cache_id, compile_id, content) - VALUES (:id, :name, :cache_id, :compile_id, :content)'); + $this->save = $this->db->prepare( + 'REPLACE INTO output_cache (id, name, cache_id, compile_id, content) + VALUES (:id, :name, :cache_id, :compile_id, :content)' + ); } /** * fetch cached content and its modification time from data source * - * @param string $id unique cache content identifier - * @param string $name template name - * @param string $cache_id cache id - * @param string $compile_id compile id - * @param string $content cached content - * @param integer $mtime cache modification timestamp (epoch) + * @param string $id unique cache content identifier + * @param string $name template name + * @param string $cache_id cache id + * @param string $compile_id compile id + * @param string $content cached content + * @param integer $mtime cache modification timestamp (epoch) * * @return void */ @@ -76,12 +93,13 @@ class Smarty_CacheResource_Mysql extends Smarty_CacheResource_Custom /** * Fetch cached content's modification timestamp from data source * - * @note implementing this method is optional. Only implement it if modification times can be accessed faster than loading the complete cached content. + * @note implementing this method is optional. Only implement it if modification times can be accessed faster than + * loading the complete cached content. * - * @param string $id unique cache content identifier - * @param string $name template name - * @param string $cache_id cache id - * @param string $compile_id compile id + * @param string $id unique cache content identifier + * @param string $name template name + * @param string $cache_id cache id + * @param string $compile_id compile id * * @return integer|boolean timestamp (epoch) the template was modified, or false if not found */ @@ -90,37 +108,40 @@ class Smarty_CacheResource_Mysql extends Smarty_CacheResource_Custom $this->fetchTimestamp->execute(array('id' => $id)); $mtime = strtotime($this->fetchTimestamp->fetchColumn()); $this->fetchTimestamp->closeCursor(); - return $mtime; } /** * Save content to cache * - * @param string $id unique cache content identifier - * @param string $name template name - * @param string $cache_id cache id - * @param string $compile_id compile id - * @param integer|null $exp_time seconds till expiration time in seconds or null - * @param string $content content to cache + * @param string $id unique cache content identifier + * @param string $name template name + * @param string $cache_id cache id + * @param string $compile_id compile id + * @param integer|null $exp_time seconds till expiration time in seconds or null + * @param string $content content to cache * * @return boolean success */ protected function save($id, $name, $cache_id, $compile_id, $exp_time, $content) { - $this->save->execute(array('id' => $id, 'name' => $name, 'cache_id' => $cache_id, 'compile_id' => $compile_id, - 'content' => $content,)); - + $this->save->execute( + array('id' => $id, + 'name' => $name, + 'cache_id' => $cache_id, + 'compile_id' => $compile_id, + 'content' => $content,) + ); return !!$this->save->rowCount(); } /** * Delete content from cache * - * @param string $name template name - * @param string $cache_id cache id - * @param string $compile_id compile id - * @param integer|null $exp_time seconds till expiration or null + * @param string $name template name + * @param string $cache_id cache id + * @param string $compile_id compile id + * @param integer|null $exp_time seconds till expiration or null * * @return integer number of deleted caches */ @@ -130,8 +151,7 @@ class Smarty_CacheResource_Mysql extends Smarty_CacheResource_Custom if ($name === null && $cache_id === null && $compile_id === null && $exp_time === null) { // returning the number of deleted caches would require a second query to count them $query = $this->db->query('TRUNCATE TABLE output_cache'); - - return - 1; + return -1; } // build the filter $where = array(); @@ -149,12 +169,15 @@ class Smarty_CacheResource_Mysql extends Smarty_CacheResource_Custom } // equal test cache_id and match sub-groups if ($cache_id !== null) { - $where[] = '(cache_id = ' . $this->db->quote($cache_id) . ' OR cache_id LIKE ' . - $this->db->quote($cache_id . '|%') . ')'; + $where[] = + '(cache_id = ' . + $this->db->quote($cache_id) . + ' OR cache_id LIKE ' . + $this->db->quote($cache_id . '|%') . + ')'; } // run delete query $query = $this->db->query('DELETE FROM output_cache WHERE ' . join(' AND ', $where)); - return $query->rowCount(); } } diff --git a/vendor/smarty/smarty/demo/plugins/cacheresource.pdo.php b/vendor/smarty/smarty/demo/plugins/cacheresource.pdo.php index 24a94c1a0..a80cd698e 100644 --- a/vendor/smarty/smarty/demo/plugins/cacheresource.pdo.php +++ b/vendor/smarty/smarty/demo/plugins/cacheresource.pdo.php @@ -29,28 +29,27 @@ */ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom { - - protected $fetchStatements = Array('default' => 'SELECT %2$s + /** + * @var string[] + */ + protected $fetchStatements = array('default' => 'SELECT %2$s FROM %1$s WHERE 1 AND id = :id AND cache_id IS NULL AND compile_id IS NULL', - 'withCacheId' => 'SELECT %2$s FROM %1$s WHERE 1 AND id = :id AND cache_id = :cache_id AND compile_id IS NULL', - 'withCompileId' => 'SELECT %2$s FROM %1$s WHERE 1 AND id = :id AND compile_id = :compile_id AND cache_id IS NULL', - 'withCacheIdAndCompileId' => 'SELECT %2$s FROM %1$s WHERE 1 @@ -58,6 +57,9 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom AND cache_id = :cache_id AND compile_id = :compile_id'); + /** + * @var string + */ protected $insertStatement = 'INSERT INTO %s SET id = :id, @@ -76,113 +78,130 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom expire = DATE_ADD(CURRENT_TIMESTAMP, INTERVAL :expire SECOND), content = :content'; + /** + * @var string + */ protected $deleteStatement = 'DELETE FROM %1$s WHERE %2$s'; + /** + * @var string + */ protected $truncateStatement = 'TRUNCATE TABLE %s'; + /** + * @var string + */ protected $fetchColumns = 'modified, content'; + /** + * @var string + */ protected $fetchTimestampColumns = 'modified'; - protected $pdo, $table, $database; + /** + * @var \PDO + */ + protected $pdo; + + /** + * @var + */ + protected $table; - /* - * Constructor - * - * @param PDO $pdo PDO : active connection - * @param string $table : table (or view) name - * @param string $database : optional - if table is located in another db + /** + * @var null + */ + protected $database; + + /** + * Constructor + * + * @param PDO $pdo PDO : active connection + * @param string $table : table (or view) name + * @param string $database : optional - if table is located in another db + * + * @throws \SmartyException */ public function __construct(PDO $pdo, $table, $database = null) { - if (is_null($table)) { throw new SmartyException("Table name for caching can't be null"); } - $this->pdo = $pdo; $this->table = $table; $this->database = $database; - $this->fillStatementsWithTableName(); } - /* - * Fills the table name into the statements. - * - * @return Current Instance - * @access protected + /** + * Fills the table name into the statements. + * + * @return $this Current Instance + * @access protected */ protected function fillStatementsWithTableName() { - - foreach ($this->fetchStatements AS &$statement) { + foreach ($this->fetchStatements as &$statement) { $statement = sprintf($statement, $this->getTableName(), '%s'); } - $this->insertStatement = sprintf($this->insertStatement, $this->getTableName()); $this->deleteStatement = sprintf($this->deleteStatement, $this->getTableName(), '%s'); $this->truncateStatement = sprintf($this->truncateStatement, $this->getTableName()); - return $this; } - /* - * Gets the fetch statement, depending on what you specify - * - * @param string $columns : the column(s) name(s) you want to retrieve from the database - * @param string $id unique cache content identifier - * @param string|null $cache_id cache id - * @param string|null $compile_id compile id - * @access protected + /** + * Gets the fetch statement, depending on what you specify + * + * @param string $columns : the column(s) name(s) you want to retrieve from the database + * @param string $id unique cache content identifier + * @param string|null $cache_id cache id + * @param string|null $compile_id compile id + * + * @access protected + * @return \PDOStatement */ protected function getFetchStatement($columns, $id, $cache_id = null, $compile_id = null) { - + $args = array(); if (!is_null($cache_id) && !is_null($compile_id)) { - $query = $this->fetchStatements[ 'withCacheIdAndCompileId' ] AND - $args = Array('id' => $id, 'cache_id' => $cache_id, 'compile_id' => $compile_id); + $query = $this->fetchStatements[ 'withCacheIdAndCompileId' ] and + $args = array('id' => $id, 'cache_id' => $cache_id, 'compile_id' => $compile_id); } elseif (is_null($cache_id) && !is_null($compile_id)) { - $query = $this->fetchStatements[ 'withCompileId' ] AND - $args = Array('id' => $id, 'compile_id' => $compile_id); + $query = $this->fetchStatements[ 'withCompileId' ] and + $args = array('id' => $id, 'compile_id' => $compile_id); } elseif (!is_null($cache_id) && is_null($compile_id)) { - $query = $this->fetchStatements[ 'withCacheId' ] AND $args = Array('id' => $id, 'cache_id' => $cache_id); + $query = $this->fetchStatements[ 'withCacheId' ] and $args = array('id' => $id, 'cache_id' => $cache_id); } else { - $query = $this->fetchStatements[ 'default' ] AND $args = Array('id' => $id); + $query = $this->fetchStatements[ 'default' ] and $args = array('id' => $id); } - $query = sprintf($query, $columns); - $stmt = $this->pdo->prepare($query); - - foreach ($args AS $key => $value) { + foreach ($args as $key => $value) { $stmt->bindValue($key, $value); } - return $stmt; } /** * fetch cached content and its modification time from data source * - * @param string $id unique cache content identifier - * @param string $name template name - * @param string|null $cache_id cache id - * @param string|null $compile_id compile id - * @param string $content cached content - * @param integer $mtime cache modification timestamp (epoch) + * @param string $id unique cache content identifier + * @param string $name template name + * @param string|null $cache_id cache id + * @param string|null $compile_id compile id + * @param string $content cached content + * @param integer $mtime cache modification timestamp (epoch) * * @return void * @access protected */ protected function fetch($id, $name, $cache_id = null, $compile_id = null, &$content, &$mtime) { - $stmt = $this->getFetchStatement($this->fetchColumns, $id, $cache_id, $compile_id); $stmt->execute(); $row = $stmt->fetch(); $stmt->closeCursor(); - if ($row) { $content = $this->outputContent($row[ 'content' ]); $mtime = strtotime($row[ 'modified' ]); @@ -197,10 +216,10 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom * {@internal implementing this method is optional. * Only implement it if modification times can be accessed faster than loading the complete cached content.}} * - * @param string $id unique cache content identifier - * @param string $name template name - * @param string|null $cache_id cache id - * @param string|null $compile_id compile id + * @param string $id unique cache content identifier + * @param string $name template name + * @param string|null $cache_id cache id + * @param string|null $compile_id compile id * * @return integer|boolean timestamp (epoch) the template was modified, or false if not found * @access protected @@ -212,7 +231,6 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom // $stmt -> closeCursor(); // return $mtime; // } - /** * Save content to cache * @@ -228,38 +246,37 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom */ protected function save($id, $name, $cache_id = null, $compile_id = null, $exp_time, $content) { - $stmt = $this->pdo->prepare($this->insertStatement); - $stmt->bindValue('id', $id); $stmt->bindValue('name', $name); $stmt->bindValue('cache_id', $cache_id, (is_null($cache_id)) ? PDO::PARAM_NULL : PDO::PARAM_STR); $stmt->bindValue('compile_id', $compile_id, (is_null($compile_id)) ? PDO::PARAM_NULL : PDO::PARAM_STR); - $stmt->bindValue('expire', (int) $exp_time, PDO::PARAM_INT); + $stmt->bindValue('expire', (int)$exp_time, PDO::PARAM_INT); $stmt->bindValue('content', $this->inputContent($content)); $stmt->execute(); - return !!$stmt->rowCount(); } - /* - * Encodes the content before saving to database - * - * @param string $content - * @return string $content - * @access protected + /** + * Encodes the content before saving to database + * + * @param string $content + * + * @return string $content + * @access protected */ protected function inputContent($content) { return $content; } - /* - * Decodes the content before saving to database - * - * @param string $content - * @return string $content - * @access protected + /** + * Decodes the content before saving to database + * + * @param string $content + * + * @return string $content + * @access protected */ protected function outputContent($content) { @@ -272,43 +289,46 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom * @param string|null $name template name * @param string|null $cache_id cache id * @param string|null $compile_id compile id - * @param integer|null|-1 $exp_time seconds till expiration or null + * @param integer|null|-1 $exp_time seconds till expiration or null * * @return integer number of deleted caches - * @access protected + * @access protected */ protected function delete($name = null, $cache_id = null, $compile_id = null, $exp_time = null) { - - // delete the whole cache + // delete the whole cache if ($name === null && $cache_id === null && $compile_id === null && $exp_time === null) { - // returning the number of deleted caches would require a second query to count them + // returning the number of deleted caches would require a second query to count them $this->pdo->query($this->truncateStatement); - return - 1; + return -1; } - // build the filter + // build the filter $where = array(); - // equal test name + // equal test name if ($name !== null) { $where[] = 'name = ' . $this->pdo->quote($name); } - // equal test cache_id and match sub-groups + // equal test cache_id and match sub-groups if ($cache_id !== null) { - $where[] = '(cache_id = ' . $this->pdo->quote($cache_id) . ' OR cache_id LIKE ' . - $this->pdo->quote($cache_id . '|%') . ')'; + $where[] = + '(cache_id = ' . + $this->pdo->quote($cache_id) . + ' OR cache_id LIKE ' . + $this->pdo->quote($cache_id . '|%') . + ')'; } - // equal test compile_id + // equal test compile_id if ($compile_id !== null) { $where[] = 'compile_id = ' . $this->pdo->quote($compile_id); } - // for clearing expired caches + // for clearing expired caches if ($exp_time === Smarty::CLEAR_EXPIRED) { $where[] = 'expire < CURRENT_TIMESTAMP'; } // range test expiration time elseif ($exp_time !== null) { $where[] = 'modified < DATE_SUB(NOW(), INTERVAL ' . intval($exp_time) . ' SECOND)'; } - // run delete query + // run delete query $query = $this->pdo->query(sprintf($this->deleteStatement, join(' AND ', $where))); return $query->rowCount(); } @@ -324,4 +344,3 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom return (is_null($this->database)) ? "`{$this->table}`" : "`{$this->database}`.`{$this->table}`"; } } - \ No newline at end of file diff --git a/vendor/smarty/smarty/demo/plugins/cacheresource.pdo_gzip.php b/vendor/smarty/smarty/demo/plugins/cacheresource.pdo_gzip.php index 8a9e0a5dd..5560b9e39 100644 --- a/vendor/smarty/smarty/demo/plugins/cacheresource.pdo_gzip.php +++ b/vendor/smarty/smarty/demo/plugins/cacheresource.pdo_gzip.php @@ -1,4 +1,5 @@ uid ] = $s; $uid .= $s->filepath; $timestamp = $s->timestamp > $timestamp ? $s->timestamp : $timestamp; - } - catch (SmartyException $e) { + } catch (SmartyException $e) { } } if (!$sources) { $source->exists = false; return; } - $sources = array_reverse($sources, true); reset($sources); $s = current($sources); @@ -51,15 +49,14 @@ class Smarty_Resource_Extendsall extends Smarty_Internal_Resource_Extends $source->timestamp = $timestamp; } - /* + /** * Disable timestamp checks for extendsall resource. * The individual source components will be checked. * - * @return bool + * @return bool false */ public function checkTimestamps() { return false; } - } diff --git a/vendor/smarty/smarty/demo/plugins/resource.mysql.php b/vendor/smarty/smarty/demo/plugins/resource.mysql.php index 619707e78..95a3c2baf 100644 --- a/vendor/smarty/smarty/demo/plugins/resource.mysql.php +++ b/vendor/smarty/smarty/demo/plugins/resource.mysql.php @@ -12,28 +12,46 @@ * PRIMARY KEY (`name`) * ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  • * Demo data: - *
    INSERT INTO `templates` (`name`, `modified`, `source`) VALUES ('test.tpl', "2010-12-25 22:00:00", '{$x="hello world"}{$x}');
    + *
    INSERT INTO `templates` (`name`, `modified`, `source`) VALUES ('test.tpl', "2010-12-25 22:00:00", '{$x="hello
    + * world"}{$x}');
    + * * * @package Resource-examples * @author Rodney Rehm */ class Smarty_Resource_Mysql extends Smarty_Resource_Custom { - // PDO instance + /** + * PDO instance + * + * @var \PDO + */ protected $db; - // prepared fetch() statement + /** + * prepared fetch() statement + * + * @var \PDOStatement + */ protected $fetch; - // prepared fetchTimestamp() statement + /** + * prepared fetchTimestamp() statement + * + * @var \PDOStatement + */ protected $mtime; + /** + * Smarty_Resource_Mysql constructor. + * + * @throws \SmartyException + */ public function __construct() { try { $this->db = new PDO("mysql:dbname=test;host=127.0.0.1", "smarty"); - } - catch (PDOException $e) { + } catch (PDOException $e) { throw new SmartyException('Mysql Resource failed: ' . $e->getMessage()); } $this->fetch = $this->db->prepare('SELECT modified, source FROM templates WHERE name = :name'); @@ -43,9 +61,9 @@ class Smarty_Resource_Mysql extends Smarty_Resource_Custom /** * Fetch a template and its modification time from database * - * @param string $name template name - * @param string $source template source - * @param integer $mtime template modification timestamp (epoch) + * @param string $name template name + * @param string $source template source + * @param integer $mtime template modification timestamp (epoch) * * @return void */ @@ -66,9 +84,10 @@ class Smarty_Resource_Mysql extends Smarty_Resource_Custom /** * Fetch a template's modification time from database * - * @note implementing this method is optional. Only implement it if modification times can be accessed faster than loading the comple template source. + * @note implementing this method is optional. Only implement it if modification times can be accessed faster than + * loading the comple template source. * - * @param string $name template name + * @param string $name template name * * @return integer timestamp (epoch) the template was modified */ @@ -77,7 +96,6 @@ class Smarty_Resource_Mysql extends Smarty_Resource_Custom $this->mtime->execute(array('name' => $name)); $mtime = $this->mtime->fetchColumn(); $this->mtime->closeCursor(); - return strtotime($mtime); } } diff --git a/vendor/smarty/smarty/demo/plugins/resource.mysqls.php b/vendor/smarty/smarty/demo/plugins/resource.mysqls.php index d85aecf31..148a8dd61 100644 --- a/vendor/smarty/smarty/demo/plugins/resource.mysqls.php +++ b/vendor/smarty/smarty/demo/plugins/resource.mysqls.php @@ -14,25 +14,39 @@ * PRIMARY KEY (`name`) * ) ENGINE=InnoDB DEFAULT CHARSET=utf8; * Demo data: - *
    INSERT INTO `templates` (`name`, `modified`, `source`) VALUES ('test.tpl', "2010-12-25 22:00:00", '{$x="hello world"}{$x}');
    + *
    INSERT INTO `templates` (`name`, `modified`, `source`) VALUES ('test.tpl', "2010-12-25 22:00:00", '{$x="hello
    + * world"}{$x}');
    + * * * @package Resource-examples * @author Rodney Rehm */ class Smarty_Resource_Mysqls extends Smarty_Resource_Custom { - // PDO instance + /** + * PDO instance + * + * @var \PDO + */ protected $db; - // prepared fetch() statement + /** + * prepared fetch() statement + * + * @var \PDOStatement + */ protected $fetch; + /** + * Smarty_Resource_Mysqls constructor. + * + * @throws \SmartyException + */ public function __construct() { try { $this->db = new PDO("mysql:dbname=test;host=127.0.0.1", "smarty"); - } - catch (PDOException $e) { + } catch (PDOException $e) { throw new SmartyException('Mysql Resource failed: ' . $e->getMessage()); } $this->fetch = $this->db->prepare('SELECT modified, source FROM templates WHERE name = :name'); @@ -41,9 +55,9 @@ class Smarty_Resource_Mysqls extends Smarty_Resource_Custom /** * Fetch a template and its modification time from database * - * @param string $name template name - * @param string $source template source - * @param integer $mtime template modification timestamp (epoch) + * @param string $name template name + * @param string $source template source + * @param integer $mtime template modification timestamp (epoch) * * @return void */ diff --git a/vendor/smarty/smarty/libs/Autoloader.php b/vendor/smarty/smarty/libs/Autoloader.php index 3a0da8faf..e4dc450f0 100644 --- a/vendor/smarty/smarty/libs/Autoloader.php +++ b/vendor/smarty/smarty/libs/Autoloader.php @@ -2,14 +2,14 @@ /** * Smarty Autoloader * - * @package Smarty + * @package Smarty */ /** * Smarty Autoloader * - * @package Smarty - * @author Uwe Tews + * @package Smarty + * @author Uwe Tews * Usage: * require_once '...path/Autoloader.php'; * Smarty_Autoloader::register(); @@ -20,7 +20,7 @@ */ class Smarty_Autoloader { - /** + /** * Filepath to Smarty root * * @var string @@ -54,8 +54,8 @@ class Smarty_Autoloader if (!defined('SMARTY_SPL_AUTOLOAD')) { define('SMARTY_SPL_AUTOLOAD', 0); } - if (SMARTY_SPL_AUTOLOAD && - set_include_path(get_include_path() . PATH_SEPARATOR . SMARTY_SYSPLUGINS_DIR) !== false + if (SMARTY_SPL_AUTOLOAD + && set_include_path(get_include_path() . PATH_SEPARATOR . SMARTY_SYSPLUGINS_DIR) !== false ) { $registeredAutoLoadFunctions = spl_autoload_functions(); if (!isset($registeredAutoLoadFunctions[ 'spl_autoload' ])) { diff --git a/vendor/smarty/smarty/libs/Smarty.class.php b/vendor/smarty/smarty/libs/Smarty.class.php index 597fbbf0c..a8969926b 100644 --- a/vendor/smarty/smarty/libs/Smarty.class.php +++ b/vendor/smarty/smarty/libs/Smarty.class.php @@ -27,7 +27,7 @@ * @author Uwe Tews * @author Rodney Rehm * @package Smarty - * @version 3.1.32 + * @version 3.1.33 */ /** * set SMARTY_DIR to absolute path to Smarty library files. @@ -112,7 +112,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.32'; + const SMARTY_VERSION = '3.1.33'; /** * define variable scopes */ @@ -166,133 +166,157 @@ class Smarty extends Smarty_Internal_TemplateBase const PLUGIN_COMPILER = 'compiler'; const PLUGIN_MODIFIER = 'modifier'; const PLUGIN_MODIFIERCOMPILER = 'modifiercompiler'; + /** * assigned global tpl vars */ public static $global_tpl_vars = array(); + /** * Flag denoting if Multibyte String functions are available */ public static $_MBSTRING = SMARTY_MBSTRING; + /** * The character set to adhere to (e.g. "UTF-8") */ public static $_CHARSET = SMARTY_RESOURCE_CHAR_SET; + /** * The date format to be used internally * (accepts date() and strftime()) */ public static $_DATE_FORMAT = SMARTY_RESOURCE_DATE_FORMAT; + /** * Flag denoting if PCRE should run in UTF-8 mode */ public static $_UTF8_MODIFIER = 'u'; + /** * Flag denoting if operating system is windows */ public static $_IS_WINDOWS = false; + /** * auto literal on delimiters with whitespace * * @var boolean */ public $auto_literal = true; + /** * display error on not assigned variables * * @var boolean */ public $error_unassigned = false; + /** * look up relative file path in include_path * * @var boolean */ public $use_include_path = false; + /** * flag if template_dir is normalized * * @var bool */ public $_templateDirNormalized = false; + /** * joined template directory string used in cache keys * * @var string */ public $_joined_template_dir = null; + /** * flag if config_dir is normalized * * @var bool */ public $_configDirNormalized = false; + /** * joined config directory string used in cache keys * * @var string */ public $_joined_config_dir = null; + /** * default template handler * * @var callable */ public $default_template_handler_func = null; + /** * default config handler * * @var callable */ public $default_config_handler_func = null; + /** * default plugin handler * * @var callable */ public $default_plugin_handler_func = null; + /** * flag if template_dir is normalized * * @var bool */ public $_compileDirNormalized = false; + /** * flag if plugins_dir is normalized * * @var bool */ public $_pluginsDirNormalized = false; + /** * flag if template_dir is normalized * * @var bool */ public $_cacheDirNormalized = false; + /** * force template compiling? * * @var boolean */ public $force_compile = false; - /** + + /** * use sub dirs for compiled/cached files? * * @var boolean */ public $use_sub_dirs = false; + /** * allow ambiguous resources (that are made unique by the resource handler) * * @var boolean */ public $allow_ambiguous_resources = false; + /** * merge compiled includes * * @var boolean */ public $merge_compiled_includes = false; + /* * flag for behaviour when extends: resource and {extends} tag are used simultaneous * if false disable execution of {extends} in templates called by extends resource. @@ -301,30 +325,35 @@ class Smarty extends Smarty_Internal_TemplateBase * @var boolean */ public $extends_recursion = true; + /** * force cache file creation * * @var boolean */ public $force_cache = false; + /** * template left-delimiter * * @var string */ public $left_delimiter = "{"; + /** * template right-delimiter * * @var string */ public $right_delimiter = "}"; + /** * array of strings which shall be treated as literal by compiler * * @var array string */ public $literals = array(); + /** * class name * This should be instance of Smarty_Security. @@ -333,24 +362,28 @@ class Smarty extends Smarty_Internal_TemplateBase * @see Smarty_Security */ public $security_class = 'Smarty_Security'; + /** * implementation of security class * * @var Smarty_Security */ public $security_policy = null; + /** * controls handling of PHP-blocks * * @var integer */ public $php_handling = self::PHP_PASSTHRU; + /** * controls if the php template file resource is allowed * * @var bool */ public $allow_php_templates = false; + /** * debug mode * Setting this to true enables the debug-console. @@ -358,6 +391,7 @@ class Smarty extends Smarty_Internal_TemplateBase * @var boolean */ public $debugging = false; + /** * This determines if debugging is enable-able from the browser. *
      @@ -368,6 +402,7 @@ class Smarty extends Smarty_Internal_TemplateBase * @var string */ public $debugging_ctrl = 'NONE'; + /** * Name of debugging URL-param. * Only used when $debugging_ctrl is set to 'URL'. @@ -376,54 +411,63 @@ class Smarty extends Smarty_Internal_TemplateBase * @var string */ public $smarty_debug_id = 'SMARTY_DEBUG'; + /** * Path of debug template. * * @var string */ public $debug_tpl = null; + /** * When set, smarty uses this value as error_reporting-level. * * @var int */ public $error_reporting = null; + /** * Controls whether variables with the same name overwrite each other. * * @var boolean */ public $config_overwrite = true; + /** * Controls whether config values of on/true/yes and off/false/no get converted to boolean. * * @var boolean */ public $config_booleanize = true; + /** * Controls whether hidden config sections/vars are read from the file. * * @var boolean */ public $config_read_hidden = false; + /** * locking concurrent compiles * * @var boolean */ public $compile_locking = true; + /** * Controls whether cache resources should use locking mechanism * * @var boolean */ public $cache_locking = false; + /** * seconds to wait for acquiring a lock before ignoring the write lock * * @var float */ public $locking_timeout = 10; + /** * resource type used if none given * Must be an valid key of $registered_resources. @@ -431,6 +475,7 @@ class Smarty extends Smarty_Internal_TemplateBase * @var string */ public $default_resource_type = 'file'; + /** * caching type * Must be an element of $cache_resource_types. @@ -438,160 +483,189 @@ class Smarty extends Smarty_Internal_TemplateBase * @var string */ public $caching_type = 'file'; + /** * config type * * @var string */ public $default_config_type = 'file'; + /** * check If-Modified-Since headers * * @var boolean */ public $cache_modified_check = false; + /** * registered plugins * * @var array */ public $registered_plugins = array(); + /** * registered objects * * @var array */ public $registered_objects = array(); + /** * registered classes * * @var array */ public $registered_classes = array(); + /** * registered filters * * @var array */ public $registered_filters = array(); + /** * registered resources * * @var array */ public $registered_resources = array(); + /** * registered cache resources * * @var array */ public $registered_cache_resources = array(); + /** * autoload filter * * @var array */ public $autoload_filters = array(); + /** * default modifier * * @var array */ public $default_modifiers = array(); + /** * autoescape variable output * * @var boolean */ public $escape_html = false; + /** * start time for execution time calculation * * @var int */ public $start_time = 0; + /** * required by the compiler for BC * * @var string */ public $_current_file = null; + /** * internal flag to enable parser debugging * * @var bool */ public $_parserdebug = false; + /** * This object type (Smarty = 1, template = 2, data = 4) * * @var int */ public $_objType = 1; + /** * Debug object * * @var Smarty_Internal_Debug */ public $_debug = null; + /** * template directory * * @var array */ protected $template_dir = array('./templates/'); + /** * flags for normalized template directory entries * * @var array */ protected $_processedTemplateDir = array(); + /** * config directory * * @var array */ protected $config_dir = array('./configs/'); + /** * flags for normalized template directory entries * * @var array */ protected $_processedConfigDir = array(); + /** * compile directory * * @var string */ protected $compile_dir = './templates_c/'; + /** * plugins directory * * @var array */ protected $plugins_dir = array(); + /** * cache directory * * @var string */ protected $cache_dir = './cache/'; + /** * removed properties * * @var string[] */ - protected $obsoleteProperties = array('resource_caching', 'template_resource_caching', 'direct_access_security', - '_dir_perms', '_file_perms', 'plugin_search_order', - 'inheritance_merge_compiled_includes', 'resource_cache_mode',); + protected $obsoleteProperties = array( + 'resource_caching', 'template_resource_caching', 'direct_access_security', + '_dir_perms', '_file_perms', 'plugin_search_order', + 'inheritance_merge_compiled_includes', 'resource_cache_mode', + ); + /** * List of private properties which will call getter/setter on a direct access * * @var string[] */ - protected $accessMap = array('template_dir' => 'TemplateDir', 'config_dir' => 'ConfigDir', - 'plugins_dir' => 'PluginsDir', 'compile_dir' => 'CompileDir', - 'cache_dir' => 'CacheDir',); + protected $accessMap = array( + 'template_dir' => 'TemplateDir', 'config_dir' => 'ConfigDir', + 'plugins_dir' => 'PluginsDir', 'compile_dir' => 'CompileDir', + 'cache_dir' => 'CacheDir', + ); /** * Initialize new Smarty object @@ -618,7 +692,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * Enable error handler to mute expected messages * - * @return boolean + * @return boolean * @deprecated */ public static function muteExpectedErrors() @@ -639,7 +713,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * Check if a template resource exists * - * @param string $resource_name template name + * @param string $resource_name template name * * @return bool status * @throws \SmartyException @@ -654,10 +728,10 @@ class Smarty extends Smarty_Internal_TemplateBase /** * Loads security class and enables security * - * @param string|Smarty_Security $security_class if a string is used, it must be class-name + * @param string|Smarty_Security $security_class if a string is used, it must be class-name * * @return Smarty current Smarty instance for chaining - * @throws SmartyException when an invalid class name is provided + * @throws \SmartyException */ public function enableSecurity($security_class = null) { @@ -679,9 +753,9 @@ class Smarty extends Smarty_Internal_TemplateBase /** * Add template directory(s) * - * @param string|array $template_dir directory(s) of template sources - * @param string $key of the array element to assign the template dir to - * @param bool $isConfig true for config_dir + * @param string|array $template_dir directory(s) of template sources + * @param string $key of the array element to assign the template dir to + * @param bool $isConfig true for config_dir * * @return Smarty current Smarty instance for chaining */ @@ -747,8 +821,8 @@ class Smarty extends Smarty_Internal_TemplateBase /** * Set template directory * - * @param string|array $template_dir directory(s) of template sources - * @param bool $isConfig true for config_dir + * @param string|array $template_dir directory(s) of template sources + * @param bool $isConfig true for config_dir * * @return \Smarty current Smarty instance for chaining */ @@ -835,7 +909,7 @@ class Smarty extends Smarty_Internal_TemplateBase $this->plugins_dir = (array)$this->plugins_dir; } foreach ($this->plugins_dir as $k => $v) { - $this->plugins_dir[ $k ] = $this->_realpath(rtrim($v, "/\\") . DIRECTORY_SEPARATOR, true); + $this->plugins_dir[ $k ] = $this->_realpath(rtrim($v, '/\\') . DIRECTORY_SEPARATOR, true); } $this->_cache[ 'plugin_files' ] = array(); $this->_pluginsDirNormalized = true; @@ -846,7 +920,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * Set plugins directory * - * @param string|array $plugins_dir directory(s) of plugins + * @param string|array $plugins_dir directory(s) of plugins * * @return Smarty current Smarty instance for chaining */ @@ -901,7 +975,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * Set cache directory * - * @param string $cache_dir directory to store cached templates in + * @param string $cache_dir directory to store cached templates in * * @return Smarty current Smarty instance for chaining */ @@ -915,11 +989,11 @@ class Smarty extends Smarty_Internal_TemplateBase /** * creates a template object * - * @param string $template the resource handle of the template file - * @param mixed $cache_id cache id to be used with this template - * @param mixed $compile_id compile id to be used with this template - * @param object $parent next higher level of Smarty variables - * @param boolean $do_clone flag is Smarty object shall be cloned + * @param string $template the resource handle of the template file + * @param mixed $cache_id cache id to be used with this template + * @param mixed $compile_id compile id to be used with this template + * @param object $parent next higher level of Smarty variables + * @param boolean $do_clone flag is Smarty object shall be cloned * * @return \Smarty_Internal_Template template object * @throws \SmartyException @@ -946,7 +1020,7 @@ class Smarty extends Smarty_Internal_TemplateBase Smarty_Internal_Template::$isCacheTplObj[ $_templateId ]; $tpl->inheritance = null; $tpl->tpl_vars = $tpl->config_vars = array(); - } else if (!$do_clone && isset(Smarty_Internal_Template::$tplObjCache[ $_templateId ])) { + } elseif (!$do_clone && isset(Smarty_Internal_Template::$tplObjCache[ $_templateId ])) { $tpl = clone Smarty_Internal_Template::$tplObjCache[ $_templateId ]; $tpl->inheritance = null; $tpl->tpl_vars = $tpl->config_vars = array(); @@ -981,11 +1055,11 @@ class Smarty extends Smarty_Internal_TemplateBase * class name format: Smarty_PluginType_PluginName * plugin filename format: plugintype.pluginname.php * - * @param string $plugin_name class plugin name to load - * @param bool $check check if already loaded + * @param string $plugin_name class plugin name to load + * @param bool $check check if already loaded * - * @throws SmartyException * @return string |boolean filepath of loaded file or false + * @throws \SmartyException */ public function loadPlugin($plugin_name, $check = true) { @@ -1004,12 +1078,13 @@ class Smarty extends Smarty_Internal_TemplateBase * @return string * @throws \SmartyException */ - public function _getTemplateId($template_name, - $cache_id = null, - $compile_id = null, - $caching = null, - Smarty_Internal_Template $template = null) - { + public function _getTemplateId( + $template_name, + $cache_id = null, + $compile_id = null, + $caching = null, + Smarty_Internal_Template $template = null + ) { $template_name = (strpos($template_name, ':') === false) ? "{$this->default_resource_type}:{$template_name}" : $template_name; $cache_id = $cache_id === null ? $this->cache_id : $cache_id; @@ -1033,33 +1108,22 @@ class Smarty extends Smarty_Internal_TemplateBase * - remove /./ and /../ * - make it absolute if required * - * @param string $path file path - * @param bool $realpath if true - convert to absolute - * false - convert to relative - * null - keep as it is but remove /./ /../ + * @param string $path file path + * @param bool $realpath if true - convert to absolute + * false - convert to relative + * null - keep as it is but + * remove /./ /../ * * @return string */ public function _realpath($path, $realpath = null) { - static $nds = null; - static $sepDotsep = null; - static $sepDot = null; - static $sepSep =null; - if (!isset($nds)) { - $nds = array('/' => '\\', '\\' => '/'); - $sepDotsep = DIRECTORY_SEPARATOR . '.' . DIRECTORY_SEPARATOR; - $sepDot = DIRECTORY_SEPARATOR . '.'; - $sepSep = DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR; - } - // normalize DIRECTORY_SEPARATOR - $path = str_replace(array($nds[DIRECTORY_SEPARATOR], $sepDotsep), DIRECTORY_SEPARATOR, $path); - if (strpos($path,$sepDot) === false && (($realpath === false && $path[0] === '.') || $realpath === null) && $path[0] !== '\\') { - return $path; - } - preg_match('%^(?(?:[[:alpha:]]:[\\\\]|/|[\\\\]{2}[[:alpha:]]+|[[:print:]]{2,}:[/]{2}|[\\\\])?)(?(.*))$%u', - $path, - $parts); + $nds = array('/' => '\\', '\\' => '/'); + preg_match( + '%^(?(?:[[:alpha:]]:[\\\\/]|/|[\\\\]{2}[[:alpha:]]+|[[:print:]]{2,}:[/]{2}|[\\\\])?)(?(.*))$%u', + $path, + $parts + ); $path = $parts[ 'path' ]; if ($parts[ 'root' ] === '\\') { $parts[ 'root' ] = substr(getcwd(), 0, 2) . $parts[ 'root' ]; @@ -1068,24 +1132,18 @@ class Smarty extends Smarty_Internal_TemplateBase $path = getcwd() . DIRECTORY_SEPARATOR . $path; } } - // remove noop 'DIRECTORY_SEPARATOR DIRECTORY_SEPARATOR' and 'DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR' patterns - $path = str_replace(array($sepDotsep,$sepSep), DIRECTORY_SEPARATOR, $path); - // resolve '..DIRECTORY_SEPARATOR' pattern, smallest first - if (strpos($path, '..' . DIRECTORY_SEPARATOR) !== false && - preg_match_all('#[\\\\/]([.][.][\\\\/])+#u', $path, $match) - ) { - $counts = array(); - foreach ($match[ 0 ] as $m) { - $counts[] = (int)((strlen($m) - 1) / 3); - } - sort($counts); - foreach ($counts as $count) { - $path = preg_replace('#([\\\\/]+[^\\\\/]+){' . $count . - '}[\\\\/]+([.][.][\\\\/]+){' . $count . '}#u', - DIRECTORY_SEPARATOR, - $path); - } - } + // normalize DIRECTORY_SEPARATOR + $path = str_replace($nds[ DIRECTORY_SEPARATOR ], DIRECTORY_SEPARATOR, $path); + $parts[ 'root' ] = str_replace($nds[ DIRECTORY_SEPARATOR ], DIRECTORY_SEPARATOR, $parts[ 'root' ]); + do { + $path = preg_replace( + array('#[\\\\/]{2}#', '#[\\\\/][.][\\\\/]#', '#[\\\\/]([^\\\\/.]+)[\\\\/][.][.][\\\\/]#'), + DIRECTORY_SEPARATOR, + $path, + -1, + $count + ); + } while ($count > 0); return $realpath !== false ? $parts[ 'root' ] . $path : str_ireplace(getcwd(), '.', $parts[ 'root' ] . $path); } @@ -1279,19 +1337,18 @@ class Smarty extends Smarty_Internal_TemplateBase * Calls the appropriate getter function. * Issues an E_USER_NOTICE if no valid getter is found. * - * @param string $name property name + * @param string $name property name * * @return mixed - * @throws \SmartyException */ public function __get($name) { if (isset($this->accessMap[ $name ])) { $method = 'get' . $this->accessMap[ $name ]; return $this->{$method}(); - } else if (isset($this->_cache[ $name ])) { + } elseif (isset($this->_cache[ $name ])) { return $this->_cache[ $name ]; - } else if (in_array($name, $this->obsoleteProperties)) { + } elseif (in_array($name, $this->obsoleteProperties)) { return null; } else { trigger_error('Undefined property: ' . get_class($this) . '::$' . $name, E_USER_NOTICE); @@ -1307,21 +1364,18 @@ class Smarty extends Smarty_Internal_TemplateBase * @param string $name property name * @param mixed $value parameter passed to setter * - * @throws \SmartyException */ public function __set($name, $value) { if (isset($this->accessMap[ $name ])) { $method = 'set' . $this->accessMap[ $name ]; $this->{$method}($value); - } else if (in_array($name, $this->obsoleteProperties)) { + } elseif (in_array($name, $this->obsoleteProperties)) { return; + } elseif (is_object($value) && method_exists($value, $name)) { + $this->$name = $value; } else { - if (is_object($value) && method_exists($value, $name)) { - $this->$name = $value; - } else { - trigger_error('Undefined property: ' . get_class($this) . '::$' . $name, E_USER_NOTICE); - } + trigger_error('Undefined property: ' . get_class($this) . '::$' . $name, E_USER_NOTICE); } } @@ -1345,7 +1399,6 @@ class Smarty extends Smarty_Internal_TemplateBase * Normalize template_dir or config_dir * * @param bool $isConfig true for config_dir - * */ private function _normalizeTemplateConfig($isConfig) { diff --git a/vendor/smarty/smarty/libs/SmartyBC.class.php b/vendor/smarty/smarty/libs/SmartyBC.class.php index f2230fc9c..836f98153 100644 --- a/vendor/smarty/smarty/libs/SmartyBC.class.php +++ b/vendor/smarty/smarty/libs/SmartyBC.class.php @@ -28,7 +28,7 @@ /** * @ignore */ -require_once(dirname(__FILE__) . '/Smarty.class.php'); +require_once dirname(__FILE__) . '/Smarty.class.php'; /** * Smarty Backward Compatibility Wrapper Class @@ -53,7 +53,6 @@ class SmartyBC extends Smarty /** * Initialize new SmartyBC object - * */ public function __construct() { @@ -127,12 +126,16 @@ class SmartyBC extends Smarty * @param boolean $smarty_args smarty argument format, else traditional * @param array $block_methods list of methods that are block format * - * @throws SmartyException + * @throws SmartyException * @internal param array $block_functs list of methods that are block format */ - public function register_object($object, $object_impl, $allowed = array(), $smarty_args = true, - $block_methods = array()) - { + public function register_object( + $object, + $object_impl, + $allowed = array(), + $smarty_args = true, + $block_methods = array() + ) { settype($allowed, 'array'); settype($smarty_args, 'boolean'); $this->registerObject($object, $object_impl, $allowed, $smarty_args, $block_methods); @@ -326,10 +329,10 @@ class SmartyBC extends Smarty /** * clear cached content for the given template and cache id * - * @param string $tpl_file name of template file - * @param string $cache_id name of cache_id - * @param string $compile_id name of compile_id - * @param string $exp_time expiration time + * @param string $tpl_file name of template file + * @param string $cache_id name of cache_id + * @param string $compile_id name of compile_id + * @param string $exp_time expiration time * * @return boolean */ @@ -341,7 +344,7 @@ class SmartyBC extends Smarty /** * clear the entire contents of cache (all templates) * - * @param string $exp_time expire time + * @param string $exp_time expire time * * @return boolean */ @@ -353,9 +356,9 @@ class SmartyBC extends Smarty /** * test to see if valid cache exists for this template * - * @param string $tpl_file name of template file - * @param string $cache_id - * @param string $compile_id + * @param string $tpl_file name of template file + * @param string $cache_id + * @param string $compile_id * * @return bool * @throws \Exception @@ -379,9 +382,9 @@ class SmartyBC extends Smarty * or all compiled template files if one is not specified. * This function is for advanced use only, not normally needed. * - * @param string $tpl_file - * @param string $compile_id - * @param string $exp_time + * @param string $tpl_file + * @param string $compile_id + * @param string $exp_time * * @return boolean results of {@link smarty_core_rm_auto()} */ @@ -393,7 +396,7 @@ class SmartyBC extends Smarty /** * Checks whether requested template exists. * - * @param string $tpl_file + * @param string $tpl_file * * @return bool * @throws \SmartyException @@ -406,7 +409,7 @@ class SmartyBC extends Smarty /** * Returns an array containing template variables * - * @param string $name + * @param string $name * * @return array */ @@ -418,7 +421,7 @@ class SmartyBC extends Smarty /** * Returns an array containing config variables * - * @param string $name + * @param string $name * * @return array */ @@ -442,7 +445,7 @@ class SmartyBC extends Smarty /** * return a reference to a registered object * - * @param string $name + * @param string $name * * @return object */ diff --git a/vendor/smarty/smarty/libs/bootstrap.php b/vendor/smarty/smarty/libs/bootstrap.php index dad72fcb1..2c830468e 100644 --- a/vendor/smarty/smarty/libs/bootstrap.php +++ b/vendor/smarty/smarty/libs/bootstrap.php @@ -1,5 +1,5 @@ @@ -7,11 +7,10 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - -/* +/** * Load and register Smarty Autoloader */ if (!class_exists('Smarty_Autoloader')) { - require dirname(__FILE__) . '/Autoloader.php'; + include dirname(__FILE__) . '/Autoloader.php'; } Smarty_Autoloader::register(true); diff --git a/vendor/smarty/smarty/libs/debug.tpl b/vendor/smarty/smarty/libs/debug.tpl index 5526cbca8..edc7bef98 100644 --- a/vendor/smarty/smarty/libs/debug.tpl +++ b/vendor/smarty/smarty/libs/debug.tpl @@ -113,10 +113,10 @@
      {foreach $template_data as $template} {$template.name} -
         +
         (compile {$template['compile_time']|string_format:"%.5f"}) (render {$template['render_time']|string_format:"%.5f"}) (cache {$template['cache_time']|string_format:"%.5f"}) -
      +
      {/foreach}
      {/if} @@ -127,7 +127,7 @@ {foreach $assigned_vars as $vars}

      ${$vars@key}

      - {if isset($vars['nocache'])}Nocache
      {/if} + {if isset($vars['nocache'])}Nocache
      {/if} {if isset($vars['scope'])}Origin: {$vars['scope']|debug_print_var nofilter}{/if}

      Value

      {$vars['value']|debug_print_var:10:80 nofilter} diff --git a/vendor/smarty/smarty/libs/plugins/block.textformat.php b/vendor/smarty/smarty/libs/plugins/block.textformat.php index 310a420ee..5e494637e 100644 --- a/vendor/smarty/smarty/libs/plugins/block.textformat.php +++ b/vendor/smarty/smarty/libs/plugins/block.textformat.php @@ -20,7 +20,6 @@ * - indent_char - string (" ") * - wrap_boundary - boolean (true) * - * * @link http://www.smarty.net/manual/en/language.function.textformat.php {textformat} * (Smarty online manual) * @@ -39,10 +38,15 @@ function smarty_block_textformat($params, $content, Smarty_Internal_Template $te return; } if (Smarty::$_MBSTRING) { - $template->_checkPlugins(array(array('function' => 'smarty_modifier_mb_wordwrap', - 'file' => SMARTY_PLUGINS_DIR . 'modifier.mb_wordwrap.php'))); + $template->_checkPlugins( + array( + array( + 'function' => 'smarty_modifier_mb_wordwrap', + 'file' => SMARTY_PLUGINS_DIR . 'modifier.mb_wordwrap.php' + ) + ) + ); } - $style = null; $indent = 0; $indent_first = 0; @@ -51,47 +55,48 @@ function smarty_block_textformat($params, $content, Smarty_Internal_Template $te $wrap_char = "\n"; $wrap_cut = false; $assign = null; - foreach ($params as $_key => $_val) { switch ($_key) { case 'style': case 'indent_char': case 'wrap_char': case 'assign': - $$_key = (string) $_val; + $$_key = (string)$_val; break; - case 'indent': case 'indent_first': case 'wrap': - $$_key = (int) $_val; + $$_key = (int)$_val; break; - case 'wrap_cut': - $$_key = (bool) $_val; + $$_key = (bool)$_val; break; - default: trigger_error("textformat: unknown attribute '{$_key}'"); } } - if ($style === 'email') { $wrap = 72; } // split into paragraphs $_paragraphs = preg_split('![\r\n]{2}!', $content); - foreach ($_paragraphs as &$_paragraph) { if (!$_paragraph) { continue; } // convert mult. spaces & special chars to single space $_paragraph = - preg_replace(array('!\s+!' . Smarty::$_UTF8_MODIFIER, - '!(^\s+)|(\s+$)!' . Smarty::$_UTF8_MODIFIER), - array(' ', - ''), $_paragraph); + preg_replace( + array( + '!\s+!' . Smarty::$_UTF8_MODIFIER, + '!(^\s+)|(\s+$)!' . Smarty::$_UTF8_MODIFIER + ), + array( + ' ', + '' + ), + $_paragraph + ); // indent first line if ($indent_first > 0) { $_paragraph = str_repeat($indent_char, $indent_first) . $_paragraph; @@ -108,7 +113,6 @@ function smarty_block_textformat($params, $content, Smarty_Internal_Template $te } } $_output = implode($wrap_char . $wrap_char, $_paragraphs); - if ($assign) { $template->assign($assign, $_output); } else { diff --git a/vendor/smarty/smarty/libs/plugins/function.counter.php b/vendor/smarty/smarty/libs/plugins/function.counter.php index 9610362d9..a4129e77c 100644 --- a/vendor/smarty/smarty/libs/plugins/function.counter.php +++ b/vendor/smarty/smarty/libs/plugins/function.counter.php @@ -5,7 +5,6 @@ * @package Smarty * @subpackage PluginsFunction */ - /** * Smarty {counter} function plugin * Type: function @@ -24,50 +23,40 @@ function smarty_function_counter($params, $template) { static $counters = array(); - $name = (isset($params[ 'name' ])) ? $params[ 'name' ] : 'default'; if (!isset($counters[ $name ])) { $counters[ $name ] = array('start' => 1, 'skip' => 1, 'direction' => 'up', 'count' => 1); } $counter =& $counters[ $name ]; - if (isset($params[ 'start' ])) { - $counter[ 'start' ] = $counter[ 'count' ] = (int) $params[ 'start' ]; + $counter[ 'start' ] = $counter[ 'count' ] = (int)$params[ 'start' ]; } - if (!empty($params[ 'assign' ])) { $counter[ 'assign' ] = $params[ 'assign' ]; } - if (isset($counter[ 'assign' ])) { $template->assign($counter[ 'assign' ], $counter[ 'count' ]); } - if (isset($params[ 'print' ])) { - $print = (bool) $params[ 'print' ]; + $print = (bool)$params[ 'print' ]; } else { $print = empty($counter[ 'assign' ]); } - if ($print) { $retval = $counter[ 'count' ]; } else { $retval = null; } - if (isset($params[ 'skip' ])) { $counter[ 'skip' ] = $params[ 'skip' ]; } - if (isset($params[ 'direction' ])) { $counter[ 'direction' ] = $params[ 'direction' ]; } - if ($counter[ 'direction' ] === 'down') { $counter[ 'count' ] -= $counter[ 'skip' ]; } else { $counter[ 'count' ] += $counter[ 'skip' ]; } - return $retval; } diff --git a/vendor/smarty/smarty/libs/plugins/function.cycle.php b/vendor/smarty/smarty/libs/plugins/function.cycle.php index b871524fc..07ffcc5e2 100644 --- a/vendor/smarty/smarty/libs/plugins/function.cycle.php +++ b/vendor/smarty/smarty/libs/plugins/function.cycle.php @@ -5,7 +5,6 @@ * @package Smarty * @subpackage PluginsFunction */ - /** * Smarty {cycle} function plugin * Type: function @@ -29,34 +28,29 @@ * {cycle name=row values="one,two,three" reset=true} * {cycle name=row} * - * - * @link http://www.smarty.net/manual/en/language.function.cycle.php {cycle} + * @link http://www.smarty.net/manual/en/language.function.cycle.php {cycle} * (Smarty online manual) - * @author Monte Ohrt - * @author credit to Mark Priatel - * @author credit to Gerard - * @author credit to Jason Sweat - * @version 1.3 + * @author Monte Ohrt + * @author credit to Mark Priatel + * @author credit to Gerard + * @author credit to Jason Sweat + * @version 1.3 * * @param array $params parameters * @param Smarty_Internal_Template $template template object * * @return string|null */ - function smarty_function_cycle($params, $template) { static $cycle_vars; - $name = (empty($params[ 'name' ])) ? 'default' : $params[ 'name' ]; - $print = (isset($params[ 'print' ])) ? (bool) $params[ 'print' ] : true; - $advance = (isset($params[ 'advance' ])) ? (bool) $params[ 'advance' ] : true; - $reset = (isset($params[ 'reset' ])) ? (bool) $params[ 'reset' ] : false; - + $print = (isset($params[ 'print' ])) ? (bool)$params[ 'print' ] : true; + $advance = (isset($params[ 'advance' ])) ? (bool)$params[ 'advance' ] : true; + $reset = (isset($params[ 'reset' ])) ? (bool)$params[ 'reset' ] : false; if (!isset($params[ 'values' ])) { if (!isset($cycle_vars[ $name ][ 'values' ])) { trigger_error('cycle: missing \'values\' parameter'); - return; } } else { @@ -65,41 +59,34 @@ function smarty_function_cycle($params, $template) } $cycle_vars[ $name ][ 'values' ] = $params[ 'values' ]; } - if (isset($params[ 'delimiter' ])) { $cycle_vars[ $name ][ 'delimiter' ] = $params[ 'delimiter' ]; } elseif (!isset($cycle_vars[ $name ][ 'delimiter' ])) { $cycle_vars[ $name ][ 'delimiter' ] = ','; } - if (is_array($cycle_vars[ $name ][ 'values' ])) { $cycle_array = $cycle_vars[ $name ][ 'values' ]; } else { $cycle_array = explode($cycle_vars[ $name ][ 'delimiter' ], $cycle_vars[ $name ][ 'values' ]); } - if (!isset($cycle_vars[ $name ][ 'index' ]) || $reset) { $cycle_vars[ $name ][ 'index' ] = 0; } - if (isset($params[ 'assign' ])) { $print = false; $template->assign($params[ 'assign' ], $cycle_array[ $cycle_vars[ $name ][ 'index' ] ]); } - if ($print) { $retval = $cycle_array[ $cycle_vars[ $name ][ 'index' ] ]; } else { $retval = null; } - if ($advance) { if ($cycle_vars[ $name ][ 'index' ] >= count($cycle_array) - 1) { $cycle_vars[ $name ][ 'index' ] = 0; } else { - $cycle_vars[ $name ][ 'index' ] ++; + $cycle_vars[ $name ][ 'index' ]++; } } - return $retval; } diff --git a/vendor/smarty/smarty/libs/plugins/function.fetch.php b/vendor/smarty/smarty/libs/plugins/function.fetch.php index 9539e1fcc..768761b23 100644 --- a/vendor/smarty/smarty/libs/plugins/function.fetch.php +++ b/vendor/smarty/smarty/libs/plugins/function.fetch.php @@ -5,7 +5,6 @@ * @package Smarty * @subpackage PluginsFunction */ - /** * Smarty {fetch} plugin * Type: function @@ -26,20 +25,16 @@ function smarty_function_fetch($params, $template) { if (empty($params[ 'file' ])) { trigger_error('[plugin] fetch parameter \'file\' cannot be empty', E_USER_NOTICE); - return; } - // strip file protocol if (stripos($params[ 'file' ], 'file://') === 0) { $params[ 'file' ] = substr($params[ 'file' ], 7); } - $protocol = strpos($params[ 'file' ], '://'); if ($protocol !== false) { $protocol = strtolower(substr($params[ 'file' ], 0, $protocol)); } - if (isset($template->smarty->security_policy)) { if ($protocol) { // remote resource (or php stream, …) @@ -53,7 +48,6 @@ function smarty_function_fetch($params, $template) } } } - $content = ''; if ($protocol === 'http') { // http fetch @@ -104,7 +98,6 @@ function smarty_function_fetch($params, $template) if (!empty($param_value)) { if (!preg_match('![\w\d-]+: .+!', $param_value)) { trigger_error("[plugin] invalid header format '{$param_value}'", E_USER_NOTICE); - return; } else { $extra_headers[] = $param_value; @@ -118,10 +111,9 @@ function smarty_function_fetch($params, $template) break; case 'proxy_port': if (!preg_match('!\D!', $param_value)) { - $proxy_port = (int) $param_value; + $proxy_port = (int)$param_value; } else { trigger_error("[plugin] invalid value for attribute '{$param_key }'", E_USER_NOTICE); - return; } break; @@ -137,16 +129,14 @@ function smarty_function_fetch($params, $template) break; case 'timeout': if (!preg_match('!\D!', $param_value)) { - $timeout = (int) $param_value; + $timeout = (int)$param_value; } else { trigger_error("[plugin] invalid value for attribute '{$param_key}'", E_USER_NOTICE); - return; } break; default: trigger_error("[plugin] unrecognized attribute '{$param_key}'", E_USER_NOTICE); - return; } } @@ -156,10 +146,8 @@ function smarty_function_fetch($params, $template) } else { $fp = fsockopen($server_name, $port, $errno, $errstr, $timeout); } - if (!$fp) { trigger_error("[plugin] unable to fetch: $errstr ($errno)", E_USER_NOTICE); - return; } else { if ($_is_proxy) { @@ -187,23 +175,19 @@ function smarty_function_fetch($params, $template) if (!empty($user) && !empty($pass)) { fputs($fp, 'Authorization: BASIC ' . base64_encode("$user:$pass") . "\r\n"); } - fputs($fp, "\r\n"); while (!feof($fp)) { $content .= fgets($fp, 4096); } fclose($fp); $csplit = preg_split("!\r\n\r\n!", $content, 2); - $content = $csplit[ 1 ]; - if (!empty($params[ 'assign_headers' ])) { $template->assign($params[ 'assign_headers' ], preg_split("!\r\n!", $csplit[ 0 ])); } } } else { trigger_error("[plugin fetch] unable to parse URL, check syntax", E_USER_NOTICE); - return; } } else { @@ -212,7 +196,6 @@ function smarty_function_fetch($params, $template) throw new SmartyException("{fetch} cannot read resource '" . $params[ 'file' ] . "'"); } } - if (!empty($params[ 'assign' ])) { $template->assign($params[ 'assign' ], $content); } else { diff --git a/vendor/smarty/smarty/libs/plugins/function.html_checkboxes.php b/vendor/smarty/smarty/libs/plugins/function.html_checkboxes.php index d654caba6..302358edd 100644 --- a/vendor/smarty/smarty/libs/plugins/function.html_checkboxes.php +++ b/vendor/smarty/smarty/libs/plugins/function.html_checkboxes.php @@ -29,25 +29,29 @@ * - assign (optional) - assign the output as an array to this variable * - escape (optional) - escape the content (not value), defaults to true * - * - * @link http://www.smarty.net/manual/en/language.function.html.checkboxes.php {html_checkboxes} + * @link http://www.smarty.net/manual/en/language.function.html.checkboxes.php {html_checkboxes} * (Smarty online manual) - * @author Christopher Kvarme - * @author credits to Monte Ohrt - * @version 1.0 + * @author Christopher Kvarme + * @author credits to Monte Ohrt + * @version 1.0 * * @param array $params parameters * @param Smarty_Internal_Template $template template object * * @return string - * @uses smarty_function_escape_special_chars() + * @uses smarty_function_escape_special_chars() * @throws \SmartyException */ function smarty_function_html_checkboxes($params, Smarty_Internal_Template $template) { - $template->_checkPlugins(array(array('function' => 'smarty_function_escape_special_chars', - 'file' => SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php'))); - + $template->_checkPlugins( + array( + array( + 'function' => 'smarty_function_escape_special_chars', + 'file' => SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php' + ) + ) + ); $name = 'checkbox'; $values = null; $options = null; @@ -57,31 +61,25 @@ function smarty_function_html_checkboxes($params, Smarty_Internal_Template $temp $labels = true; $label_ids = false; $output = null; - $extra = ''; - foreach ($params as $_key => $_val) { switch ($_key) { case 'name': case 'separator': - $$_key = (string) $_val; + $$_key = (string)$_val; break; - case 'escape': case 'labels': case 'label_ids': - $$_key = (bool) $_val; + $$_key = (bool)$_val; break; - case 'options': - $$_key = (array) $_val; + $$_key = (array)$_val; break; - case 'values': case 'output': - $$_key = array_values((array) $_val); + $$_key = array_values((array)$_val); break; - case 'checked': case 'selected': if (is_array($_val)) { @@ -89,57 +87,61 @@ function smarty_function_html_checkboxes($params, Smarty_Internal_Template $temp foreach ($_val as $_sel) { if (is_object($_sel)) { if (method_exists($_sel, '__toString')) { - $_sel = smarty_function_escape_special_chars((string) $_sel->__toString()); + $_sel = smarty_function_escape_special_chars((string)$_sel->__toString()); } else { - trigger_error('html_checkboxes: selected attribute contains an object of class \'' . - get_class($_sel) . '\' without __toString() method', E_USER_NOTICE); + trigger_error( + 'html_checkboxes: selected attribute contains an object of class \'' . + get_class($_sel) . '\' without __toString() method', + E_USER_NOTICE + ); continue; } } else { - $_sel = smarty_function_escape_special_chars((string) $_sel); + $_sel = smarty_function_escape_special_chars((string)$_sel); } $selected[ $_sel ] = true; } } elseif (is_object($_val)) { if (method_exists($_val, '__toString')) { - $selected = smarty_function_escape_special_chars((string) $_val->__toString()); + $selected = smarty_function_escape_special_chars((string)$_val->__toString()); } else { - trigger_error('html_checkboxes: selected attribute is an object of class \'' . get_class($_val) . - '\' without __toString() method', E_USER_NOTICE); + trigger_error( + 'html_checkboxes: selected attribute is an object of class \'' . get_class($_val) . + '\' without __toString() method', + E_USER_NOTICE + ); } } else { - $selected = smarty_function_escape_special_chars((string) $_val); + $selected = smarty_function_escape_special_chars((string)$_val); } break; - case 'checkboxes': - trigger_error('html_checkboxes: the use of the "checkboxes" attribute is deprecated, use "options" instead', - E_USER_WARNING); - $options = (array) $_val; + trigger_error( + 'html_checkboxes: the use of the "checkboxes" attribute is deprecated, use "options" instead', + E_USER_WARNING + ); + $options = (array)$_val; break; - case 'assign': break; - case 'strict': break; - case 'disabled': case 'readonly': if (!empty($params[ 'strict' ])) { if (!is_scalar($_val)) { - trigger_error("html_options: {$_key} attribute must be a scalar, only boolean true or string '{$_key}' will actually add the attribute", - E_USER_NOTICE); + trigger_error( + "html_options: {$_key} attribute must be a scalar, only boolean true or string '{$_key}' will actually add the attribute", + E_USER_NOTICE + ); } - if ($_val === true || $_val === $_key) { $extra .= ' ' . $_key . '="' . smarty_function_escape_special_chars($_key) . '"'; } - break; } // omit break; to fall through! - + // no break default: if (!is_array($_val)) { $extra .= ' ' . $_key . '="' . smarty_function_escape_special_chars($_val) . '"'; @@ -149,34 +151,49 @@ function smarty_function_html_checkboxes($params, Smarty_Internal_Template $temp break; } } - if (!isset($options) && !isset($values)) { return ''; } /* raise error here? */ - $_html_result = array(); - if (isset($options)) { foreach ($options as $_key => $_val) { $_html_result[] = - smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels, - $label_ids, $escape); + smarty_function_html_checkboxes_output( + $name, + $_key, + $_val, + $selected, + $extra, + $separator, + $labels, + $label_ids, + $escape + ); } } else { foreach ($values as $_i => $_key) { $_val = isset($output[ $_i ]) ? $output[ $_i ] : ''; $_html_result[] = - smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels, - $label_ids, $escape); + smarty_function_html_checkboxes_output( + $name, + $_key, + $_val, + $selected, + $extra, + $separator, + $labels, + $label_ids, + $escape + ); } } - if (!empty($params[ 'assign' ])) { $template->assign($params[ 'assign' ], $_html_result); } else { return implode("\n", $_html_result); } } + /** * @param $name * @param $value @@ -190,59 +207,69 @@ function smarty_function_html_checkboxes($params, Smarty_Internal_Template $temp * * @return string */ -function smarty_function_html_checkboxes_output($name, $value, $output, $selected, $extra, $separator, $labels, - $label_ids, $escape = true) -{ +function smarty_function_html_checkboxes_output( + $name, + $value, + $output, + $selected, + $extra, + $separator, + $labels, + $label_ids, + $escape = true +) { $_output = ''; - if (is_object($value)) { if (method_exists($value, '__toString')) { - $value = (string) $value->__toString(); + $value = (string)$value->__toString(); } else { - trigger_error('html_options: value is an object of class \'' . get_class($value) . - '\' without __toString() method', E_USER_NOTICE); - + trigger_error( + 'html_options: value is an object of class \'' . get_class($value) . + '\' without __toString() method', + E_USER_NOTICE + ); return ''; } } else { - $value = (string) $value; + $value = (string)$value; } - if (is_object($output)) { if (method_exists($output, '__toString')) { - $output = (string) $output->__toString(); + $output = (string)$output->__toString(); } else { - trigger_error('html_options: output is an object of class \'' . get_class($output) . - '\' without __toString() method', E_USER_NOTICE); - + trigger_error( + 'html_options: output is an object of class \'' . get_class($output) . + '\' without __toString() method', + E_USER_NOTICE + ); return ''; } } else { - $output = (string) $output; + $output = (string)$output; } - if ($labels) { if ($label_ids) { - $_id = smarty_function_escape_special_chars(preg_replace('![^\w\-\.]!' . Smarty::$_UTF8_MODIFIER, '_', - $name . '_' . $value)); + $_id = smarty_function_escape_special_chars( + preg_replace( + '![^\w\-\.]!' . Smarty::$_UTF8_MODIFIER, + '_', + $name . '_' . $value + ) + ); $_output .= '