From 5ceaede1a923387c38fe4e30c253e95348a7e9d1 Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Sat, 21 Sep 2013 12:23:33 +0200 Subject: [PATCH] Update Smarty to current stable version 3.1.14 --- lib/classes/Smarty | 2 +- lib/classes/Smarty-3.0.8/SMARTY2_BC_NOTES | 108 - .../Smarty-3.0.8/demo/index_php_template.php | 49 - .../demo/templates/index_view.php | 13 - .../Smarty-3.0.8/libs/Smarty.class.php | 815 ----- .../Smarty-3.0.8/libs/plugins/block.php.php | 27 - .../libs/plugins/function.fetch.php | 216 -- .../libs/plugins/function.html_checkboxes.php | 143 - .../libs/plugins/function.html_options.php | 133 - .../libs/plugins/function.html_radios.php | 154 - .../plugins/function.html_select_date.php | 330 -- .../plugins/function.html_select_time.php | 194 - .../libs/plugins/modifier.capitalize.php | 37 - .../libs/plugins/modifier.escape.php | 91 - .../libs/plugins/modifier.spacify.php | 37 - .../libs/plugins/modifier.truncate.php | 67 - .../modifiercompiler.count_characters.php | 39 - .../plugins/modifiercompiler.count_words.php | 31 - .../libs/plugins/modifiercompiler.lower.php | 31 - .../plugins/modifiercompiler.wordwrap.php | 35 - .../plugins/outputfilter.trimwhitespace.php | 77 - .../plugins/shared.escape_special_chars.php | 29 - .../libs/plugins/shared.mb_str_replace.php | 38 - .../smarty_internal_cacheresource_file.php | 207 -- .../smarty_internal_compile_assign.php | 64 - .../smarty_internal_compile_block.php | 187 - .../smarty_internal_compile_break.php | 65 - .../smarty_internal_compile_capture.php | 81 - .../smarty_internal_compile_continue.php | 64 - .../smarty_internal_compile_extends.php | 90 - .../sysplugins/smarty_internal_compile_if.php | 179 - .../smarty_internal_compile_include.php | 186 - .../smarty_internal_compile_include_php.php | 90 - ..._internal_compile_private_block_plugin.php | 78 - ...arty_internal_compile_private_modifier.php | 69 - ..._compile_private_object_block_function.php | 80 - ...ernal_compile_private_print_expression.php | 77 - ...ernal_compile_private_registered_block.php | 95 - .../smarty_internal_compile_while.php | 82 - .../sysplugins/smarty_internal_config.php | 290 -- .../libs/sysplugins/smarty_internal_debug.php | 169 - .../sysplugins/smarty_internal_filter.php | 89 - .../smarty_internal_filter_handler.php | 67 - .../smarty_internal_get_include_path.php | 44 - .../sysplugins/smarty_internal_register.php | 156 - .../smarty_internal_resource_eval.php | 89 - .../smarty_internal_resource_extends.php | 176 - .../smarty_internal_resource_file.php | 128 - .../smarty_internal_resource_php.php | 127 - .../smarty_internal_resource_registered.php | 143 - .../smarty_internal_resource_stream.php | 101 - .../smarty_internal_resource_string.php | 133 - .../sysplugins/smarty_internal_template.php | 1000 ----- .../smarty_internal_templatecompilerbase.php | 445 --- .../smarty_internal_templateparser.php | 3000 --------------- .../sysplugins/smarty_internal_utility.php | 300 -- .../sysplugins/smarty_internal_wrapper.php | 131 - .../sysplugins/smarty_internal_write_file.php | 56 - .../libs/sysplugins/smarty_security.php | 229 -- .../COPYING.lib | 0 .../{Smarty-3.0.8 => Smarty-3.1.14}/README | 8 +- .../Smarty-3.1.14/SMARTY_2_BC_NOTES.txt | 109 + .../Smarty-3.1.14/SMARTY_3.0_BC_NOTES.txt | 24 + .../Smarty-3.1.14/SMARTY_3.1_NOTES.txt | 306 ++ .../change_log.txt | 803 +++- .../demo/configs/test.conf | 0 .../demo/index.php | 6 + .../demo/plugins/cacheresource.apc.php | 77 + .../demo/plugins/cacheresource.memcache.php | 91 + .../demo/plugins/cacheresource.mysql.php | 152 + .../demo/plugins/resource.extendsall.php | 60 + .../demo/plugins/resource.mysql.php | 76 + .../demo/plugins/resource.mysqls.php | 62 + .../demo/templates/footer.tpl | 0 .../demo/templates/header.tpl | 0 .../demo/templates/index.tpl | 0 .../Smarty-3.1.14/libs/Smarty.class.php | 1533 ++++++++ .../Smarty-3.1.14/libs/SmartyBC.class.php | 460 +++ .../libs/debug.tpl | 8 +- .../libs/plugins/block.textformat.php | 77 +- .../libs/plugins/function.counter.php | 8 +- .../libs/plugins/function.cycle.php | 48 +- .../libs/plugins/function.fetch.php | 214 ++ .../libs/plugins/function.html_checkboxes.php | 233 ++ .../libs/plugins/function.html_image.php | 68 +- .../libs/plugins/function.html_options.php | 193 + .../libs/plugins/function.html_radios.php | 217 ++ .../plugins/function.html_select_date.php | 394 ++ .../plugins/function.html_select_time.php | 366 ++ .../libs/plugins/function.html_table.php | 84 +- .../libs/plugins/function.mailto.php | 118 +- .../libs/plugins/function.math.php | 20 +- .../libs/plugins/modifier.capitalize.php | 65 + .../libs/plugins/modifier.date_format.php | 16 +- .../libs/plugins/modifier.debug_print_var.php | 40 +- .../libs/plugins/modifier.escape.php | 188 + .../libs/plugins/modifier.regex_replace.php | 33 +- .../libs/plugins/modifier.replace.php | 14 +- .../libs/plugins/modifier.spacify.php | 27 + .../libs/plugins/modifier.truncate.php | 59 + .../libs/plugins/modifiercompiler.cat.php | 57 +- .../modifiercompiler.count_characters.php | 33 + .../modifiercompiler.count_paragraphs.php | 53 +- .../modifiercompiler.count_sentences.php | 53 +- .../plugins/modifiercompiler.count_words.php | 32 + .../libs/plugins/modifiercompiler.default.php | 66 +- .../libs/plugins/modifiercompiler.escape.php | 125 + .../plugins/modifiercompiler.from_charset.php | 34 + .../libs/plugins/modifiercompiler.indent.php | 62 +- .../libs/plugins/modifiercompiler.lower.php | 31 + .../libs/plugins/modifiercompiler.noprint.php | 47 +- .../modifiercompiler.string_format.php | 50 +- .../libs/plugins/modifiercompiler.strip.php | 64 +- .../plugins/modifiercompiler.strip_tags.php | 62 +- .../plugins/modifiercompiler.to_charset.php | 34 + .../plugins/modifiercompiler.unescape.php | 51 + .../libs/plugins/modifiercompiler.upper.php | 58 +- .../plugins/modifiercompiler.wordwrap.php | 46 + .../plugins/outputfilter.trimwhitespace.php | 94 + .../plugins/shared.escape_special_chars.php | 51 + .../plugins/shared.literal_compiler_param.php | 33 + .../libs/plugins/shared.make_timestamp.php | 17 +- .../libs/plugins/shared.mb_str_replace.php | 55 + .../libs/plugins/shared.mb_unicode.php | 48 + .../libs/plugins/shared.mb_wordwrap.php | 83 + .../variablefilter.htmlspecialchars.php | 13 +- .../libs/sysplugins/smarty_cacheresource.php | 381 ++ .../smarty_cacheresource_custom.php | 237 ++ .../smarty_cacheresource_keyvaluestore.php | 463 +++ .../libs/sysplugins/smarty_config_source.php | 95 + .../smarty_internal_cacheresource_file.php | 275 ++ .../smarty_internal_compile_append.php | 25 +- .../smarty_internal_compile_assign.php | 88 + .../smarty_internal_compile_block.php | 283 ++ .../smarty_internal_compile_break.php | 77 + .../smarty_internal_compile_call.php | 100 +- .../smarty_internal_compile_capture.php | 98 + .../smarty_internal_compile_config_load.php | 61 +- .../smarty_internal_compile_continue.php | 78 + .../smarty_internal_compile_debug.php | 29 +- .../smarty_internal_compile_eval.php | 56 +- .../smarty_internal_compile_extends.php | 133 + .../smarty_internal_compile_for.php | 122 +- .../smarty_internal_compile_foreach.php | 202 +- .../smarty_internal_compile_function.php | 112 +- .../sysplugins/smarty_internal_compile_if.php | 207 ++ .../smarty_internal_compile_include.php | 215 ++ .../smarty_internal_compile_include_php.php | 108 + .../smarty_internal_compile_insert.php | 113 +- .../smarty_internal_compile_ldelim.php | 26 +- .../smarty_internal_compile_nocache.php | 58 +- ..._internal_compile_private_block_plugin.php | 87 + ...ternal_compile_private_function_plugin.php | 45 +- ...arty_internal_compile_private_modifier.php | 140 + ..._compile_private_object_block_function.php | 88 + ...ternal_compile_private_object_function.php | 60 +- ...ernal_compile_private_print_expression.php | 156 + ...ernal_compile_private_registered_block.php | 113 + ...al_compile_private_registered_function.php | 146 +- ...ernal_compile_private_special_variable.php | 46 +- .../smarty_internal_compile_rdelim.php | 26 +- .../smarty_internal_compile_section.php | 112 +- .../smarty_internal_compile_setfilter.php | 72 + .../smarty_internal_compile_while.php | 94 + .../smarty_internal_compilebase.php | 148 +- .../sysplugins/smarty_internal_config.php | 302 ++ .../smarty_internal_config_file_compiler.php | 110 +- .../smarty_internal_configfilelexer.php | 186 +- .../smarty_internal_configfileparser.php | 325 +- .../libs/sysplugins/smarty_internal_data.php | 269 +- .../libs/sysplugins/smarty_internal_debug.php | 206 ++ .../smarty_internal_filter_handler.php | 70 + .../smarty_internal_function_call_handler.php | 95 +- .../smarty_internal_get_include_path.php | 48 + .../smarty_internal_nocache_insert.php | 102 +- .../sysplugins/smarty_internal_parsetree.php | 629 ++-- .../smarty_internal_resource_eval.php | 94 + .../smarty_internal_resource_extends.php | 162 + .../smarty_internal_resource_file.php | 90 + .../smarty_internal_resource_php.php | 114 + .../smarty_internal_resource_registered.php | 95 + .../smarty_internal_resource_stream.php | 78 + .../smarty_internal_resource_string.php | 96 + ...smarty_internal_smartytemplatecompiler.php | 99 +- .../sysplugins/smarty_internal_template.php | 697 ++++ .../smarty_internal_templatebase.php | 811 ++++ .../smarty_internal_templatecompilerbase.php | 672 ++++ .../smarty_internal_templatelexer.php | 269 +- .../smarty_internal_templateparser.php | 3254 +++++++++++++++++ .../sysplugins/smarty_internal_utility.php | 830 +++++ .../sysplugins/smarty_internal_write_file.php | 88 + .../libs/sysplugins/smarty_resource.php | 857 +++++ .../sysplugins/smarty_resource_custom.php | 96 + .../sysplugins/smarty_resource_recompiled.php | 36 + .../sysplugins/smarty_resource_uncompiled.php | 44 + .../libs/sysplugins/smarty_security.php | 459 +++ 196 files changed, 21899 insertions(+), 13231 deletions(-) delete mode 100644 lib/classes/Smarty-3.0.8/SMARTY2_BC_NOTES delete mode 100644 lib/classes/Smarty-3.0.8/demo/index_php_template.php delete mode 100644 lib/classes/Smarty-3.0.8/demo/templates/index_view.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/Smarty.class.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/plugins/block.php.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/plugins/function.fetch.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/plugins/function.html_checkboxes.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/plugins/function.html_options.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/plugins/function.html_radios.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/plugins/function.html_select_date.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/plugins/function.html_select_time.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/plugins/modifier.capitalize.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/plugins/modifier.escape.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/plugins/modifier.spacify.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/plugins/modifier.truncate.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/plugins/modifiercompiler.count_characters.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/plugins/modifiercompiler.count_words.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/plugins/modifiercompiler.lower.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/plugins/modifiercompiler.wordwrap.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/plugins/outputfilter.trimwhitespace.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/plugins/shared.escape_special_chars.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/plugins/shared.mb_str_replace.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_cacheresource_file.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_compile_assign.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_compile_block.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_compile_break.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_compile_capture.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_compile_continue.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_compile_extends.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_compile_if.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_compile_include.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_compile_include_php.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_compile_private_block_plugin.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_compile_private_modifier.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_compile_private_object_block_function.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_compile_private_print_expression.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_compile_private_registered_block.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_compile_while.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_config.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_debug.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_filter.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_filter_handler.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_get_include_path.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_register.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_resource_eval.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_resource_extends.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_resource_file.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_resource_php.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_resource_registered.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_resource_stream.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_resource_string.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_template.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_templatecompilerbase.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_templateparser.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_utility.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_wrapper.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_internal_write_file.php delete mode 100644 lib/classes/Smarty-3.0.8/libs/sysplugins/smarty_security.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/COPYING.lib (100%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/README (99%) create mode 100644 lib/classes/Smarty-3.1.14/SMARTY_2_BC_NOTES.txt create mode 100644 lib/classes/Smarty-3.1.14/SMARTY_3.0_BC_NOTES.txt create mode 100644 lib/classes/Smarty-3.1.14/SMARTY_3.1_NOTES.txt rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/change_log.txt (59%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/demo/configs/test.conf (100%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/demo/index.php (93%) create mode 100644 lib/classes/Smarty-3.1.14/demo/plugins/cacheresource.apc.php create mode 100644 lib/classes/Smarty-3.1.14/demo/plugins/cacheresource.memcache.php create mode 100644 lib/classes/Smarty-3.1.14/demo/plugins/cacheresource.mysql.php create mode 100644 lib/classes/Smarty-3.1.14/demo/plugins/resource.extendsall.php create mode 100644 lib/classes/Smarty-3.1.14/demo/plugins/resource.mysql.php create mode 100644 lib/classes/Smarty-3.1.14/demo/plugins/resource.mysqls.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/demo/templates/footer.tpl (100%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/demo/templates/header.tpl (100%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/demo/templates/index.tpl (100%) create mode 100644 lib/classes/Smarty-3.1.14/libs/Smarty.class.php create mode 100644 lib/classes/Smarty-3.1.14/libs/SmartyBC.class.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/debug.tpl (92%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/plugins/block.textformat.php (51%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/plugins/function.counter.php (89%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/plugins/function.cycle.php (74%) create mode 100644 lib/classes/Smarty-3.1.14/libs/plugins/function.fetch.php create mode 100644 lib/classes/Smarty-3.1.14/libs/plugins/function.html_checkboxes.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/plugins/function.html_image.php (65%) create mode 100644 lib/classes/Smarty-3.1.14/libs/plugins/function.html_options.php create mode 100644 lib/classes/Smarty-3.1.14/libs/plugins/function.html_radios.php create mode 100644 lib/classes/Smarty-3.1.14/libs/plugins/function.html_select_date.php create mode 100644 lib/classes/Smarty-3.1.14/libs/plugins/function.html_select_time.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/plugins/function.html_table.php (76%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/plugins/function.mailto.php (61%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/plugins/function.math.php (76%) create mode 100644 lib/classes/Smarty-3.1.14/libs/plugins/modifier.capitalize.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/plugins/modifier.date_format.php (75%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/plugins/modifier.debug_print_var.php (69%) create mode 100644 lib/classes/Smarty-3.1.14/libs/plugins/modifier.escape.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/plugins/modifier.regex_replace.php (53%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/plugins/modifier.replace.php (63%) create mode 100644 lib/classes/Smarty-3.1.14/libs/plugins/modifier.spacify.php create mode 100644 lib/classes/Smarty-3.1.14/libs/plugins/modifier.truncate.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/plugins/modifiercompiler.cat.php (79%) create mode 100644 lib/classes/Smarty-3.1.14/libs/plugins/modifiercompiler.count_characters.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/plugins/modifiercompiler.count_paragraphs.php (84%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/plugins/modifiercompiler.count_sentences.php (62%) create mode 100644 lib/classes/Smarty-3.1.14/libs/plugins/modifiercompiler.count_words.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/plugins/modifiercompiler.default.php (71%) create mode 100644 lib/classes/Smarty-3.1.14/libs/plugins/modifiercompiler.escape.php create mode 100644 lib/classes/Smarty-3.1.14/libs/plugins/modifiercompiler.from_charset.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/plugins/modifiercompiler.indent.php (76%) create mode 100644 lib/classes/Smarty-3.1.14/libs/plugins/modifiercompiler.lower.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/plugins/modifiercompiler.noprint.php (94%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/plugins/modifiercompiler.string_format.php (79%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/plugins/modifiercompiler.strip.php (70%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/plugins/modifiercompiler.strip_tags.php (61%) create mode 100644 lib/classes/Smarty-3.1.14/libs/plugins/modifiercompiler.to_charset.php create mode 100644 lib/classes/Smarty-3.1.14/libs/plugins/modifiercompiler.unescape.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/plugins/modifiercompiler.upper.php (59%) create mode 100644 lib/classes/Smarty-3.1.14/libs/plugins/modifiercompiler.wordwrap.php create mode 100644 lib/classes/Smarty-3.1.14/libs/plugins/outputfilter.trimwhitespace.php create mode 100644 lib/classes/Smarty-3.1.14/libs/plugins/shared.escape_special_chars.php create mode 100644 lib/classes/Smarty-3.1.14/libs/plugins/shared.literal_compiler_param.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/plugins/shared.make_timestamp.php (70%) create mode 100644 lib/classes/Smarty-3.1.14/libs/plugins/shared.mb_str_replace.php create mode 100644 lib/classes/Smarty-3.1.14/libs/plugins/shared.mb_unicode.php create mode 100644 lib/classes/Smarty-3.1.14/libs/plugins/shared.mb_wordwrap.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/plugins/variablefilter.htmlspecialchars.php (56%) create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_cacheresource.php create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_cacheresource_custom.php create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_cacheresource_keyvaluestore.php create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_config_source.php create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_cacheresource_file.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/sysplugins/smarty_internal_compile_append.php (86%) create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_compile_assign.php create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_compile_block.php create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_compile_break.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/sysplugins/smarty_internal_compile_call.php (63%) create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_compile_capture.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/sysplugins/smarty_internal_compile_config_load.php (54%) create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_compile_continue.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/sysplugins/smarty_internal_compile_debug.php (65%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/sysplugins/smarty_internal_compile_eval.php (56%) create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_compile_extends.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/sysplugins/smarty_internal_compile_for.php (65%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/sysplugins/smarty_internal_compile_foreach.php (58%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/sysplugins/smarty_internal_compile_function.php (67%) create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_compile_if.php create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_compile_include.php create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_compile_include_php.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/sysplugins/smarty_internal_compile_insert.php (58%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/sysplugins/smarty_internal_compile_ldelim.php (55%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/sysplugins/smarty_internal_compile_nocache.php (56%) create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_compile_private_block_plugin.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/sysplugins/smarty_internal_compile_private_function_plugin.php (72%) create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_compile_private_modifier.php create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_compile_private_object_block_function.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/sysplugins/smarty_internal_compile_private_object_function.php (63%) create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_compile_private_print_expression.php create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_compile_private_registered_block.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/sysplugins/smarty_internal_compile_private_registered_function.php (56%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/sysplugins/smarty_internal_compile_private_special_variable.php (79%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/sysplugins/smarty_internal_compile_rdelim.php (54%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/sysplugins/smarty_internal_compile_section.php (74%) create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_compile_setfilter.php create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_compile_while.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/sysplugins/smarty_internal_compilebase.php (55%) create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_config.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/sysplugins/smarty_internal_config_file_compiler.php (66%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/sysplugins/smarty_internal_configfilelexer.php (63%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/sysplugins/smarty_internal_configfileparser.php (76%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/sysplugins/smarty_internal_data.php (67%) create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_debug.php create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_filter_handler.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/sysplugins/smarty_internal_function_call_handler.php (59%) create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_get_include_path.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/sysplugins/smarty_internal_nocache_insert.php (66%) rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/sysplugins/smarty_internal_parsetree.php (52%) create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_resource_eval.php create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_resource_extends.php create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_resource_file.php create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_resource_php.php create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_resource_registered.php create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_resource_stream.php create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_resource_string.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/sysplugins/smarty_internal_smartytemplatecompiler.php (52%) create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_template.php create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_templatebase.php create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_templatecompilerbase.php rename lib/classes/{Smarty-3.0.8 => Smarty-3.1.14}/libs/sysplugins/smarty_internal_templatelexer.php (73%) create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_templateparser.php create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_utility.php create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_internal_write_file.php create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_resource.php create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_resource_custom.php create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_resource_recompiled.php create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_resource_uncompiled.php create mode 100644 lib/classes/Smarty-3.1.14/libs/sysplugins/smarty_security.php diff --git a/lib/classes/Smarty b/lib/classes/Smarty index 730e36f0..a4419630 120000 --- a/lib/classes/Smarty +++ b/lib/classes/Smarty @@ -1 +1 @@ -Smarty-3.0.8/libs \ No newline at end of file +Smarty-3.1.14/libs/ \ No newline at end of file diff --git a/lib/classes/Smarty-3.0.8/SMARTY2_BC_NOTES b/lib/classes/Smarty-3.0.8/SMARTY2_BC_NOTES deleted file mode 100644 index cde8629c..00000000 --- a/lib/classes/Smarty-3.0.8/SMARTY2_BC_NOTES +++ /dev/null @@ -1,108 +0,0 @@ -Smarty 2 and Smarty 3 are quite similar in implementation, but do have a few -differences you need to be aware of when upgrading from Smarty 2 to Smarty 3. - -= Known incompatibilities with Smarty 2 = - -== Syntax == - -The Smarty 3 API has been updated in various places. Some Smarty 2 API calls -need to be updated to comply with Smarty 3. You will get a deprecation notice -with old Smarty 2 API calls, and informed what the new one is. See the README that -comes with Smarty 3 for more information. - -The {$array|@mod} syntax has always been a bit confusing, where an "@" is required -to apply a modifier to an array instead of the individual array elements. Normally you -always want the modifier to apply to the variable regardless of its type. In Smarty 3, -{$array|mod} and {$array|@mod} behave identical. It is safe to drop the "@" and the -modifier will still apply to the array. If you really want the modifier to apply to -each array element, you must loop the array in-template, or use a custom modifier that -supports array iteration. Most smarty functions already escape array elements where -necessary such as {html_options} - -== PHP Version == -Smarty 3 is PHP 5 only. It will not work with PHP 4. - -== {php} Tag == -The {php} tag is disabled by default. The use of {php} tags is -deprecated. It can be enabled with $smarty->allow_php_tag=true. - -Variables inside {php} blocks no longer share scope with other -{php} blocks on the page, so be aware of this change if you use them. - -== Delimiters and whitespace == -Smarty delimiters {} surrounded by whitespace are no longer treated as Smarty tags. -Therefore, { foo } will be ignored by Smarty, but {foo} is recognized. This change -makes Javascript/CSS easier to work with, eliminating the need for {literal}. -This feature can be disabled by setting $smarty->auto_literal = false; - -== Unquoted Strings == -Smarty 2 was a bit more forgiving (and ambiguous) when it comes to unquoted strings -in parameters. Smarty3 is more restrictive. You can still pass strings without quotes -so long as they contain no special characters. (anything outside of A-Za-z0-9_) - -For example filename strings must be quoted: - - -{assign var=foo value=baz} <-- works ok -{include file="path/foo.tpl"} <-- needs quotes! - - -== Extending the Smarty class == -Smarty 3 follows standard PHP5 constructor rules. When extending the Smarty class, -use __construct() as the class constructor name. If you implement your own constructor, -be certain to call parent::__construct() first. - - -class MySmarty extends Smarty { - function __construct() { - parent::__construct(); - - // your initialization code goes here - - } -} - - -== Autoloader == -Smarty implements its own autoloader with spl_autoload_register. If you -use an autoloader in your own application, you MUST register yours as well. Using -__autoload() WILL FAIL. This is standard PHP5 autoloader procedure for shared libraries. -See http://us3.php.net/manual/en/function.spl-autoload-register.php - -== Plugin Filenames == -Since Smarty 3 uses the default spl_autoloader, the plugin filenames are now required to be -lower case. Smarty 2 allowed mixed case plugin names, you must rename them for Smarty 3. - -== Scope of Special Smarty Variables == -In Smarty 2 the special Smarty variables $smarty.section.* and $smarty.foreach.* -had global scope. If you had loops with the same name in subtemplates, you could accidentally -overwrite values of a parent template. - -In Smarty 3 these special Smarty variables now have local scope in the template which -is defining the loop. In the rare case you need these values in a subtemplate, you have to -pass them as parameters. - - -{include file="path/foo.tpl" index=$smarty.section.foo.index} - - -== SMARTY_RESOURCE_CHAR_SET == -Smarty 3 sets the constant SMARTY_RESOURCE_CHAR_SET to utf-8 as the default template charset. -This is now used with modifiers like escape as the default charset. If your templates use -another charset, make sure that you define the constant accordingly. - -== trigger_error() == -The API function trigger_error() has been removed. It is still included in the Smarty2 API wrapper. - -== Smarty constants == -The constants -SMARTY_PHP_PASSTHRU -SMARTY_PHP_QUOTE -SMARTY_PHP_REMOVE -SMARTY_PHP_ALLOW -have been replaced with class constants -Smarty::PHP_PASSTHRU -Smarty::PHP_QUOTE -Smarty::PHP_REMOVE -Smarty::PHP_ALLOW - diff --git a/lib/classes/Smarty-3.0.8/demo/index_php_template.php b/lib/classes/Smarty-3.0.8/demo/index_php_template.php deleted file mode 100644 index 2f95bf67..00000000 --- a/lib/classes/Smarty-3.0.8/demo/index_php_template.php +++ /dev/null @@ -1,49 +0,0 @@ - -* @package SmartyTestScripts -*/ -require('../libs/Smarty.class.php'); - - class Person -{ - private $m_szName; - private $m_iAge; - - public function setName($szName) - { - $this->m_szName = $szName; - return $this; // We now return $this (the Person) - } - - public function setAge($iAge) - { - $this->m_iAge = $iAge; - return $this; // Again, return our Person - } - - public function introduce() - { - return 'Hello my name is '.$this->m_szName.' and I am '.$this->m_iAge.' years old.'; - } -} - -$smarty = new Smarty(); -$smarty->allow_php_templates= true; -$smarty->force_compile = false; -$smarty->caching = true; -$smarty->cache_lifetime = 100; -//$smarty->debugging = true; - -$smarty->assign('foo',"'bar'"); - -$person = new Person; - -$smarty->assign('person',$person); - -$smarty->assign('array',array('a'=>array('aa'=>'This is a long string'),'b'=>2)); - -$smarty->display('php:index_view.php'); - -?> diff --git a/lib/classes/Smarty-3.0.8/demo/templates/index_view.php b/lib/classes/Smarty-3.0.8/demo/templates/index_view.php deleted file mode 100644 index 833fe961..00000000 --- a/lib/classes/Smarty-3.0.8/demo/templates/index_view.php +++ /dev/null @@ -1,13 +0,0 @@ -PHP file test -$foo is -
Test functions - -
Test objects -setName('Paul')->setAge(39)->introduce()?> -
Test Arrays - -
function time - -
nocache function time -';?> -
DONE diff --git a/lib/classes/Smarty-3.0.8/libs/Smarty.class.php b/lib/classes/Smarty-3.0.8/libs/Smarty.class.php deleted file mode 100644 index c0bc78bb..00000000 --- a/lib/classes/Smarty-3.0.8/libs/Smarty.class.php +++ /dev/null @@ -1,815 +0,0 @@ - - * @author Uwe Tews - * @package Smarty - * @version 3.0.8 - */ - -/** - * define shorthand directory separator constant - */ -if (!defined('DS')) { - define('DS', DIRECTORY_SEPARATOR); -} - -/** - * set SMARTY_DIR to absolute path to Smarty library files. - * Sets SMARTY_DIR only if user application has not already defined it. - */ -if (!defined('SMARTY_DIR')) { - define('SMARTY_DIR', dirname(__FILE__) . DS); -} - -/** - * set SMARTY_SYSPLUGINS_DIR to absolute path to Smarty internal plugins. - * Sets SMARTY_SYSPLUGINS_DIR only if user application has not already defined it. - */ -if (!defined('SMARTY_SYSPLUGINS_DIR')) { - define('SMARTY_SYSPLUGINS_DIR', SMARTY_DIR . 'sysplugins' . DS); -} -if (!defined('SMARTY_PLUGINS_DIR')) { - define('SMARTY_PLUGINS_DIR', SMARTY_DIR . 'plugins' . DS); -} -if (!defined('SMARTY_RESOURCE_CHAR_SET')) { - define('SMARTY_RESOURCE_CHAR_SET', 'UTF-8'); -} -if (!defined('SMARTY_RESOURCE_DATE_FORMAT')) { - define('SMARTY_RESOURCE_DATE_FORMAT', '%b %e, %Y'); -} - -/** - * register the class 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) { - $registeredAutoLoadFunctions = spl_autoload_functions(); - if (!isset($registeredAutoLoadFunctions['spl_autoload'])) { - spl_autoload_register(); - } -} else { - spl_autoload_register('smartyAutoload'); -} - -/** - * This is the main Smarty class - */ -class Smarty extends Smarty_Internal_Data { - /** - * constant definitions - */ - // smarty version - const SMARTY_VERSION = 'Smarty-3.0.8'; - //define variable scopes - const SCOPE_LOCAL = 0; - const SCOPE_PARENT = 1; - const SCOPE_ROOT = 2; - const SCOPE_GLOBAL = 3; - // define caching modes - const CACHING_OFF = 0; - const CACHING_LIFETIME_CURRENT = 1; - const CACHING_LIFETIME_SAVED = 2; - /** modes for handling of "" tags in templates. **/ - const PHP_PASSTHRU = 0; //-> print tags as plain text - const PHP_QUOTE = 1; //-> escape tags as entities - const PHP_REMOVE = 2; //-> escape tags as entities - const PHP_ALLOW = 3; //-> escape tags as entities - // filter types - const FILTER_POST = 'post'; - const FILTER_PRE = 'pre'; - const FILTER_OUTPUT = 'output'; - const FILTER_VARIABLE = 'variable'; - // plugin types - const PLUGIN_FUNCTION = 'function'; - const PLUGIN_BLOCK = 'block'; - const PLUGIN_COMPILER = 'compiler'; - const PLUGIN_MODIFIER = 'modifier'; - - /** - * static variables - */ - // assigned global tpl vars - static $global_tpl_vars = array(); - - /** - * variables - */ - // auto literal on delimiters with whitspace - public $auto_literal = true; - // display error on not assigned variables - public $error_unassigned = false; - // template directory - public $template_dir = null; - // default template handler - public $default_template_handler_func = null; - // compile directory - public $compile_dir = null; - // plugins directory - public $plugins_dir = null; - // cache directory - public $cache_dir = null; - // config directory - public $config_dir = null; - // force template compiling? - public $force_compile = false; - // check template for modifications? - public $compile_check = true; - // locking concurrent compiles - public $compile_locking = true; - // use sub dirs for compiled/cached files? - public $use_sub_dirs = false; - // compile_error? - public $compile_error = false; - // caching enabled - public $caching = false; - // merge compiled includes - public $merge_compiled_includes = false; - // cache lifetime - public $cache_lifetime = 3600; - // force cache file creation - public $force_cache = false; - // cache_id - public $cache_id = null; - // compile_id - public $compile_id = null; - // template delimiters - public $left_delimiter = "{"; - public $right_delimiter = "}"; - // security - public $security_class = 'Smarty_Security'; - public $security_policy = null; - public $php_handling = self::PHP_PASSTHRU; - public $allow_php_tag = false; - public $allow_php_templates = false; - public $direct_access_security = true; - public $trusted_dir = array(); - // debug mode - public $debugging = false; - public $debugging_ctrl = 'NONE'; - public $smarty_debug_id = 'SMARTY_DEBUG'; - public $debug_tpl = null; - // When set, smarty does uses this value as error_reporting-level. - public $error_reporting = null; - // config var settings - public $config_overwrite = true; //Controls whether variables with the same name overwrite each other. - public $config_booleanize = true; //Controls whether config values of on/true/yes and off/false/no get converted to boolean - public $config_read_hidden = false; //Controls whether hidden config sections/vars are read from the file. - // config vars - public $config_vars = array(); - // assigned tpl vars - public $tpl_vars = array(); - // dummy parent object - public $parent = null; - // global template functions - public $template_functions = array(); - // resource type used if none given - public $default_resource_type = 'file'; - // caching type - public $caching_type = 'file'; - // internal cache resource types - public $cache_resource_types = array('file'); - // internal config properties - public $properties = array(); - // config type - public $default_config_type = 'file'; - // cached template objects - public $template_objects = null; - // check If-Modified-Since headers - public $cache_modified_check = false; - // registered plugins - public $registered_plugins = array(); - // plugin search order - public $plugin_search_order = array('function', 'block', 'compiler', 'class'); - // registered objects - public $registered_objects = array(); - // registered classes - public $registered_classes = array(); - // registered filters - public $registered_filters = array(); - // registered resources - public $registered_resources = array(); - // autoload filter - public $autoload_filters = array(); - // status of filter on variable output - public $variable_filter = true; - // default modifier - public $default_modifiers = array(); - // global internal smarty vars - static $_smarty_vars = array(); - // start time for execution time calculation - public $start_time = 0; - // default file permissions - public $_file_perms = 0644; - // default dir permissions - public $_dir_perms = 0771; - // block tag hierarchy - public $_tag_stack = array(); - // flag if {block} tag is compiled for template inheritance - public $inheritance = false; - // generate deprecated function call notices? - public $deprecation_notices = true; - // Smarty 2 BC - public $_version = self::SMARTY_VERSION; - // self pointer to Smarty object - public $smarty; - - /** - * Class constructor, initializes basic smarty properties - */ - public function __construct() - { - // selfpointer need by some other class methods - $this->smarty = $this; - if (is_callable('mb_internal_encoding')) { - mb_internal_encoding(SMARTY_RESOURCE_CHAR_SET); - } - $this->start_time = microtime(true); - // set default dirs - $this->template_dir = array('.' . DS . 'templates' . DS); - $this->compile_dir = '.' . DS . 'templates_c' . DS; - $this->plugins_dir = array(SMARTY_PLUGINS_DIR); - $this->cache_dir = '.' . DS . 'cache' . DS; - $this->config_dir = '.' . DS . 'configs' . DS; - $this->debug_tpl = 'file:' . SMARTY_DIR . 'debug.tpl'; - if (isset($_SERVER['SCRIPT_NAME'])) { - $this->assignGlobal('SCRIPT_NAME', $_SERVER['SCRIPT_NAME']); - } - } - - /** - * Class destructor - */ - public function __destruct() - { - } - - /** - * fetches a rendered Smarty template - * - * @param string $template the resource handle of the template file or template object - * @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 $ |null $parent next higher level of Smarty variables - * @return string rendered template output - */ - public function fetch($template, $cache_id = null, $compile_id = null, $parent = null, $display = false) - { - if (!empty($cache_id) && is_object($cache_id)) { - $parent = $cache_id; - $cache_id = null; - } - if ($parent === null) { - // get default Smarty data object - $parent = $this; - } - // create template object if necessary - ($template instanceof $this->template_class)? $_template = $template : - $_template = $this->createTemplate ($template, $cache_id, $compile_id, $parent, false); - if (isset($this->error_reporting)) { - $_smarty_old_error_level = error_reporting($this->error_reporting); - } - // check URL debugging control - if (!$this->debugging && $this->debugging_ctrl == 'URL') { - if (isset($_SERVER['QUERY_STRING'])) { - $_query_string = $_SERVER['QUERY_STRING']; - } else { - $_query_string = ''; - } - if (false !== strpos($_query_string, $this->smarty_debug_id)) { - if (false !== strpos($_query_string, $this->smarty_debug_id . '=on')) { - // enable debugging for this browser session - setcookie('SMARTY_DEBUG', true); - $this->debugging = true; - } elseif (false !== strpos($_query_string, $this->smarty_debug_id . '=off')) { - // disable debugging for this browser session - setcookie('SMARTY_DEBUG', false); - $this->debugging = false; - } else { - // enable debugging for this page - $this->debugging = true; - } - } else { - if (isset($_COOKIE['SMARTY_DEBUG'])) { - $this->debugging = true; - } - } - } - // obtain data for cache modified check - if ($this->cache_modified_check && $this->caching && $display) { - $_isCached = $_template->isCached() && !$_template->has_nocache_code; - if ($_isCached) { - $_gmt_mtime = gmdate('D, d M Y H:i:s', $_template->getCachedTimestamp()) . ' GMT'; - } else { - $_gmt_mtime = ''; - } - } - // return rendered template - if ((!$this->caching || $_template->resource_object->isEvaluated) && (isset($this->autoload_filters['output']) || isset($this->registered_filters['output']))) { - $_output = Smarty_Internal_Filter_Handler::runFilter('output', $_template->getRenderedTemplate(), $_template); - } else { - $_output = $_template->getRenderedTemplate(); - } - $_template->rendered_content = null; - if (isset($this->error_reporting)) { - error_reporting($_smarty_old_error_level); - } - // display or fetch - if ($display) { - if ($this->caching && $this->cache_modified_check) { - $_last_modified_date = @substr($_SERVER['HTTP_IF_MODIFIED_SINCE'], 0, strpos($_SERVER['HTTP_IF_MODIFIED_SINCE'], 'GMT') + 3); - if ($_isCached && $_gmt_mtime == $_last_modified_date) { - if (php_sapi_name() == 'cgi') - header('Status: 304 Not Modified'); - else - header('HTTP/1.1 304 Not Modified'); - } else { - header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $_template->getCachedTimestamp()) . ' GMT'); - echo $_output; - } - } else { - echo $_output; - } - // debug output - if ($this->debugging) { - Smarty_Internal_Debug::display_debug($this); - } - return; - } else { - // return fetched content - return $_output; - } - } - - /** - * displays a Smarty template - * - * @param string $ |object $template the resource handle of the template file or template object - * @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 - */ - public function display($template, $cache_id = null, $compile_id = null, $parent = null) - { - // display template - $this->fetch ($template, $cache_id, $compile_id, $parent, true); - } - - /** - * test if cache i valid - * - * @param string $ |object $template the resource handle of the template file or template object - * @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 - * @return boolean cache status - */ - public function isCached($template, $cache_id = null, $compile_id = null, $parent = null) - { - if ($parent === null) { - $parent = $this; - } - if (!($template instanceof $this->template_class)) { - $template = $this->createTemplate ($template, $cache_id, $compile_id, $parent, false); - } - // return cache status of template - return $template->isCached(); - } - - /** - * creates a data object - * - * @param object $parent next higher level of Smarty variables - * @returns object data object - */ - public function createData($parent = null) - { - return new Smarty_Data($parent, $this); - } - - /** - * 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 - * @returns object template object - */ - public function createTemplate($template, $cache_id = null, $compile_id = null, $parent = null, $do_clone = true) - { - if (!empty($cache_id) && (is_object($cache_id) || is_array($cache_id))) { - $parent = $cache_id; - $cache_id = null; - } - if (!empty($parent) && is_array($parent)) { - $data = $parent; - $parent = null; - } else { - $data = null; - } - if (!is_object($template)) { - // we got a template resource - // already in template cache? - $_templateId = sha1($template . $cache_id . $compile_id); - if (isset($this->template_objects[$_templateId]) && $this->caching) { - // return cached template object - $tpl = $this->template_objects[$_templateId]; - } else { - // create new template object - if ($do_clone) { - $tpl = new $this->template_class($template, clone $this, $parent, $cache_id, $compile_id); - } else { - $tpl = new $this->template_class($template, $this, $parent, $cache_id, $compile_id); - } - } - } else { - // just return a copy of template class - $tpl = $template; - } - // fill data if present - if (!empty($data) && is_array($data)) { - // set up variable values - foreach ($data as $_key => $_val) { - $tpl->tpl_vars[$_key] = new Smarty_variable($_val); - } - } - return $tpl; - } - - - - /** - * Check if a template resource exists - * - * @param string $resource_name template name - * @return boolean status - */ - function templateExists($resource_name) - { - // create template object - $save = $this->template_objects; - $tpl = new $this->template_class($resource_name, $this); - // check if it does exists - $result = $tpl->isExisting(); - $this->template_objects = $save; - return $result; - } - - /** - * Returns a single or all global variables - * - * @param object $smarty - * @param string $varname variable name or null - * @return string variable value or or array of variables - */ - function getGlobal($varname = null) - { - if (isset($varname)) { - if (isset(self::$global_tpl_vars[$varname])) { - return self::$global_tpl_vars[$varname]->value; - } else { - return ''; - } - } else { - $_result = array(); - foreach (self::$global_tpl_vars AS $key => $var) { - $_result[$key] = $var->value; - } - return $_result; - } - } - - /** - * Empty cache folder - * - * @param integer $exp_time expiration time - * @param string $type resource type - * @return integer number of cache files deleted - */ - function clearAllCache($exp_time = null, $type = null) - { - // load cache resource and call clearAll - return $this->loadCacheResource($type)->clearAll($exp_time); - } - - /** - * Empty cache for a specific template - * - * @param string $template_name template name - * @param string $cache_id cache id - * @param string $compile_id compile id - * @param integer $exp_time expiration time - * @param string $type resource type - * @return integer number of cache files deleted - */ - function clearCache($template_name, $cache_id = null, $compile_id = null, $exp_time = null, $type = null) - { - // load cache resource and call clear - return $this->loadCacheResource($type)->clear($template_name, $cache_id, $compile_id, $exp_time); - } - - /** - * Loads security class and enables security - */ - public function enableSecurity($security_class = null) - { - if ($security_class instanceof Smarty_Security) { - $this->security_policy = $security_class; - return; - } - if ($security_class == null) { - $security_class = $this->security_class; - } - if (class_exists($security_class)) { - $this->security_policy = new $security_class($this); - } else { - throw new SmartyException("Security class '$security_class' is not defined"); - } - } - - /** - * Disable security - */ - public function disableSecurity() - { - $this->security_policy = null; - } - - /** - * Loads cache resource. - * - * @param string $type cache resource type - * @return object of cache resource - */ - public function loadCacheResource($type = null) { - if (!isset($type)) { - $type = $this->caching_type; - } - if (in_array($type, $this->cache_resource_types)) { - $cache_resource_class = 'Smarty_Internal_CacheResource_' . ucfirst($type); - return new $cache_resource_class($this); - } - else { - // try plugins dir - $cache_resource_class = 'Smarty_CacheResource_' . ucfirst($type); - if ($this->loadPlugin($cache_resource_class)) { - return new $cache_resource_class($this); - } - else { - throw new SmartyException("Unable to load cache resource '{$type}'"); - } - } - } - - - /** - * Set template directory - * - * @param string $ |array $template_dir folder(s) of template sorces - */ - public function setTemplateDir($template_dir) - { - $this->template_dir = (array)$template_dir; - return; - } - - /** - * Adds template directory(s) to existing ones - * - * @param string $ |array $template_dir folder(s) of template sources - */ - public function addTemplateDir($template_dir) - { - $this->template_dir = array_unique(array_merge((array)$this->template_dir, (array)$template_dir)); - return; - } - - /** - * Adds directory of plugin files - * - * @param object $smarty - * @param string $ |array $ plugins folder - * @return - */ - function addPluginsDir($plugins_dir) - { - $this->plugins_dir = array_unique(array_merge((array)$this->plugins_dir, (array)$plugins_dir)); - return; - } - - - /** - * return a reference to a registered object - * - * @param string $name object name - * @return object - */ - function getRegisteredObject($name) - { - if (!isset($this->registered_objects[$name])) - throw new SmartyException("'$name' is not a registered object"); - - if (!is_object($this->registered_objects[$name][0])) - throw new SmartyException("registered '$name' is not an object"); - - return $this->registered_objects[$name][0]; - } - - - /** - * return name of debugging template - * - * @return string - */ - function getDebugTemplate() - { - return $this->debug_tpl; - } - - /** - * set the debug template - * - * @param string $tpl_name - * @return bool - */ - function setDebugTemplate($tpl_name) - { - return $this->debug_tpl = $tpl_name; - } - - /** - * Takes unknown classes and loads plugin files for them - * class name format: Smarty_PluginType_PluginName - * plugin filename format: plugintype.pluginname.php - * - * @param string $plugin_name class plugin name to load - * @return string |boolean filepath of loaded file or false - */ - public function loadPlugin($plugin_name, $check = true) - { - // if function or class exists, exit silently (already loaded) - if ($check && (is_callable($plugin_name) || class_exists($plugin_name, false))) - return true; - // Plugin name is expected to be: Smarty_[Type]_[Name] - $_plugin_name = strtolower($plugin_name); - $_name_parts = explode('_', $_plugin_name, 3); - // class name must have three parts to be valid plugin - if (count($_name_parts) < 3 || $_name_parts[0] !== 'smarty') { - throw new SmartyException("plugin {$plugin_name} is not a valid name format"); - return false; - } - // if type is "internal", get plugin from sysplugins - if ($_name_parts[1] == 'internal') { - $file = SMARTY_SYSPLUGINS_DIR . $_plugin_name . '.php'; - if (file_exists($file)) { - require_once($file); - return $file; - } else { - return false; - } - } - // plugin filename is expected to be: [type].[name].php - $_plugin_filename = "{$_name_parts[1]}.{$_name_parts[2]}.php"; - // loop through plugin dirs and find the plugin - foreach((array)$this->plugins_dir as $_plugin_dir) { - if (strpos('/\\', substr($_plugin_dir, -1)) === false) { - $_plugin_dir .= DS; - } - $file = $_plugin_dir . $_plugin_filename; - if (file_exists($file)) { - require_once($file); - return $file; - } - } - // no plugin loaded - return false; - } - - /** - * clean up properties on cloned object - */ - public function __clone() - { - // clear config vars - $this->config_vars = array(); - // clear assigned tpl vars - $this->tpl_vars = array(); - // clear objects for external methods - unset($this->register); - unset($this->filter); - } - - - /** - * Handle unknown class methods - * - * @param string $name unknown methode name - * @param array $args aurgument array - */ - public function __call($name, $args) - { - static $camel_func; - if (!isset($camel_func)) - $camel_func = create_function('$c', 'return "_" . strtolower($c[1]);'); - // see if this is a set/get for a property - $first3 = strtolower(substr($name, 0, 3)); - if (in_array($first3, array('set', 'get')) && substr($name, 3, 1) !== '_') { - // try to keep case correct for future PHP 6.0 case-sensitive class methods - // lcfirst() not available < PHP 5.3.0, so improvise - $property_name = strtolower(substr($name, 3, 1)) . substr($name, 4); - // convert camel case to underscored name - $property_name = preg_replace_callback('/([A-Z])/', $camel_func, $property_name); - if (!property_exists($this, $property_name)) { - throw new SmartyException("property '$property_name' does not exist."); - return false; - } - if ($first3 == 'get') - return $this->$property_name; - else - return $this->$property_name = $args[0]; - } - // Smarty Backward Compatible wrapper - if (strpos($name,'_') !== false) { - if (!isset($this->wrapper)) { - $this->wrapper = new Smarty_Internal_Wrapper($this); - } - return $this->wrapper->convert($name, $args); - } - // external Smarty methods ? - foreach(array('Filter','Register') as $external) { - if (class_exists("Smarty_Internal_{$external}") && method_exists("Smarty_Internal_{$external}",$name)) { - if (!isset($this->$external)) { - $class = "Smarty_Internal_{$external}"; - $this->$external = new $class($this); - } - return call_user_func_array(array($this->$external,$name), $args); - } - } - if (in_array($name,array('clearCompiledTemplate','compileAllTemplates','compileAllConfig','testInstall','getTags'))) { - if (!isset($this->utility)) { - $this->utility = new Smarty_Internal_Utility($this); - } - return call_user_func_array(array($this->utility,$name), $args); - } - // PHP4 call to constructor? - if (strtolower($name) == 'smarty') { - throw new SmartyException('Please use parent::__construct() to call parent constuctor'); - return false; - } - throw new SmartyException("Call of unknown function '$name'."); - } -} - -/** - * Autoloader - */ -function smartyAutoload($class) -{ - $_class = strtolower($class); - if (substr($_class, 0, 16) === 'smarty_internal_' || $_class == 'smarty_security') { - include SMARTY_SYSPLUGINS_DIR . $_class . '.php'; - } -} - -/** - * Smarty exception class - */ -Class SmartyException extends Exception { -} - -/** - * Smarty compiler exception class - */ -Class SmartyCompilerException extends SmartyException { -} - -?> diff --git a/lib/classes/Smarty-3.0.8/libs/plugins/block.php.php b/lib/classes/Smarty-3.0.8/libs/plugins/block.php.php deleted file mode 100644 index 8fedd8b4..00000000 --- a/lib/classes/Smarty-3.0.8/libs/plugins/block.php.php +++ /dev/null @@ -1,27 +0,0 @@ -allow_php_tag) { - throw new SmartyException("{php} is deprecated, set allow_php_tag = true to enable"); - } - eval($content); - return ''; -} - -?> \ No newline at end of file diff --git a/lib/classes/Smarty-3.0.8/libs/plugins/function.fetch.php b/lib/classes/Smarty-3.0.8/libs/plugins/function.fetch.php deleted file mode 100644 index 2b09fb94..00000000 --- a/lib/classes/Smarty-3.0.8/libs/plugins/function.fetch.php +++ /dev/null @@ -1,216 +0,0 @@ - - * Name: fetch
- * Purpose: fetch file, web or ftp data and display results - * @link http://smarty.php.net/manual/en/language.function.fetch.php {fetch} - * (Smarty online manual) - * @author Monte Ohrt - * @param array $params parameters - * @param object $template template object - * @return string|null if the assign parameter is passed, Smarty assigns the - * result to a template variable - */ -function smarty_function_fetch($params, $template) -{ - if (empty($params['file'])) { - trigger_error("[plugin] fetch parameter 'file' cannot be empty",E_USER_NOTICE); - return; - } - - $content = ''; - if (isset($template->security_policy) && !preg_match('!^(http|ftp)://!i', $params['file'])) { - if(!$template->security_policy->isTrustedResourceDir($params['file'])) { - return; - } - - // fetch the file - if($fp = @fopen($params['file'],'r')) { - while(!feof($fp)) { - $content .= fgets ($fp,4096); - } - fclose($fp); - } else { - trigger_error('[plugin] fetch cannot read file \'' . $params['file'] . '\'',E_USER_NOTICE); - return; - } - } else { - // not a local file - if(preg_match('!^http://!i',$params['file'])) { - // http fetch - if($uri_parts = parse_url($params['file'])) { - // set defaults - $host = $server_name = $uri_parts['host']; - $timeout = 30; - $accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*"; - $agent = "Smarty Template Engine ".$template->_version; - $referer = ""; - $uri = !empty($uri_parts['path']) ? $uri_parts['path'] : '/'; - $uri .= !empty($uri_parts['query']) ? '?' . $uri_parts['query'] : ''; - $_is_proxy = false; - if(empty($uri_parts['port'])) { - $port = 80; - } else { - $port = $uri_parts['port']; - } - if(!empty($uri_parts['user'])) { - $user = $uri_parts['user']; - } - if(!empty($uri_parts['pass'])) { - $pass = $uri_parts['pass']; - } - // loop through parameters, setup headers - foreach($params as $param_key => $param_value) { - switch($param_key) { - case "file": - case "assign": - case "assign_headers": - break; - case "user": - if(!empty($param_value)) { - $user = $param_value; - } - break; - case "pass": - if(!empty($param_value)) { - $pass = $param_value; - } - break; - case "accept": - if(!empty($param_value)) { - $accept = $param_value; - } - break; - case "header": - 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; - } - } - break; - case "proxy_host": - if(!empty($param_value)) { - $proxy_host = $param_value; - } - break; - case "proxy_port": - if(!preg_match('!\D!', $param_value)) { - $proxy_port = (int) $param_value; - } else { - trigger_error("[plugin] invalid value for attribute '".$param_key."'",E_USER_NOTICE); - return; - } - break; - case "agent": - if(!empty($param_value)) { - $agent = $param_value; - } - break; - case "referer": - if(!empty($param_value)) { - $referer = $param_value; - } - break; - case "timeout": - if(!preg_match('!\D!', $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; - } - } - if(!empty($proxy_host) && !empty($proxy_port)) { - $_is_proxy = true; - $fp = fsockopen($proxy_host,$proxy_port,$errno,$errstr,$timeout); - } 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) { - fputs($fp, 'GET ' . $params['file'] . " HTTP/1.0\r\n"); - } else { - fputs($fp, "GET $uri HTTP/1.0\r\n"); - } - if(!empty($host)) { - fputs($fp, "Host: $host\r\n"); - } - if(!empty($accept)) { - fputs($fp, "Accept: $accept\r\n"); - } - if(!empty($agent)) { - fputs($fp, "User-Agent: $agent\r\n"); - } - if(!empty($referer)) { - fputs($fp, "Referer: $referer\r\n"); - } - if(isset($extra_headers) && is_array($extra_headers)) { - foreach($extra_headers as $curr_header) { - fputs($fp, $curr_header."\r\n"); - } - } - 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 { - // ftp fetch - if($fp = @fopen($params['file'],'r')) { - while(!feof($fp)) { - $content .= fgets ($fp,4096); - } - fclose($fp); - } else { - trigger_error('[plugin] fetch cannot read file \'' . $params['file'] .'\'',E_USER_NOTICE); - return; - } - } - - } - - - if (!empty($params['assign'])) { - $template->assign($params['assign'],$content); - } else { - return $content; - } -} - -?> \ No newline at end of file diff --git a/lib/classes/Smarty-3.0.8/libs/plugins/function.html_checkboxes.php b/lib/classes/Smarty-3.0.8/libs/plugins/function.html_checkboxes.php deleted file mode 100644 index 6a1a3ffd..00000000 --- a/lib/classes/Smarty-3.0.8/libs/plugins/function.html_checkboxes.php +++ /dev/null @@ -1,143 +0,0 @@ - - * Type: function
- * Name: html_checkboxes
- * Date: 24.Feb.2003
- * Purpose: Prints out a list of checkbox input types
- * Examples: - *
- * {html_checkboxes values=$ids output=$names}
- * {html_checkboxes values=$ids name='box' separator='
' output=$names} - * {html_checkboxes values=$ids checked=$checked separator='
' output=$names} - *
- * @link http://smarty.php.net/manual/en/language.function.html.checkboxes.php {html_checkboxes} - * (Smarty online manual) - * @author Christopher Kvarme - * @author credits to Monte Ohrt - * @version 1.0 - * @param array $params parameters - * Input:
- * - name (optional) - string default "checkbox" - * - values (required) - array - * - options (optional) - associative array - * - checked (optional) - array default not set - * - separator (optional) - ie
or   - * - output (optional) - the output next to each checkbox - * - assign (optional) - assign the output as an array to this variable - * @param object $template template object - * @return string - * @uses smarty_function_escape_special_chars() - */ -function smarty_function_html_checkboxes($params, $template) -{ - require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php'); - - $name = 'checkbox'; - $values = null; - $options = null; - $selected = null; - $separator = ''; - $labels = true; - $output = null; - - $extra = ''; - - foreach($params as $_key => $_val) { - switch($_key) { - case 'name': - case 'separator': - $$_key = $_val; - break; - - case 'labels': - $$_key = (bool)$_val; - break; - - case 'options': - $$_key = (array)$_val; - break; - - case 'values': - case 'output': - $$_key = array_values((array)$_val); - break; - - case 'checked': - case 'selected': - $selected = array_map('strval', array_values((array)$_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; - break; - - case 'assign': - break; - - default: - if(!is_array($_val)) { - $extra .= ' '.$_key.'="'.smarty_function_escape_special_chars($_val).'"'; - } else { - trigger_error("html_checkboxes: extra attribute '$_key' cannot be an array", E_USER_NOTICE); - } - break; - } - } - - if (!isset($options) && !isset($values)) - return ''; /* raise error here? */ - - settype($selected, 'array'); - $_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); - - - } 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); - } - - } - - if(!empty($params['assign'])) { - $template->assign($params['assign'], $_html_result); - } else { - return implode("\n",$_html_result); - } - -} - -function smarty_function_html_checkboxes_output($name, $value, $output, $selected, $extra, $separator, $labels) { - $_output = ''; - if ($labels) $_output .= ''; - $_output .= $separator; - - return $_output; -} - -?> \ No newline at end of file diff --git a/lib/classes/Smarty-3.0.8/libs/plugins/function.html_options.php b/lib/classes/Smarty-3.0.8/libs/plugins/function.html_options.php deleted file mode 100644 index 7ac03902..00000000 --- a/lib/classes/Smarty-3.0.8/libs/plugins/function.html_options.php +++ /dev/null @@ -1,133 +0,0 @@ - - * Name: html_options
- * Purpose: Prints the list of