From e074280f9d659f639dde796348d8a11c3436812e Mon Sep 17 00:00:00 2001 From: Mzhelskiy Maxim Date: Sat, 13 Aug 2011 12:35:30 +0000 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D1=81=D1=82=D0=B0=D1=80=D1=8B=D1=85=20=D0=B1=D0=B8?= =?UTF-8?q?=D0=B1=D0=BB=D0=B8=D0=BE=D1=82=D0=B5=D0=BA=20=D0=B8=D0=B7=20/en?= =?UTF-8?q?gine/lib/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- engine/lib/external/Smarty-3.0.7/.htaccess | 2 - engine/lib/external/Smarty-3.0.7/COPYING.lib | 165 - engine/lib/external/Smarty-3.0.7/README | 570 ---- .../external/Smarty-3.0.7/SMARTY2_BC_NOTES | 108 - .../Smarty-3.0.7/libs/Smarty.class.php | 815 ----- .../lib/external/Smarty-3.0.7/libs/debug.tpl | 133 - .../Smarty-3.0.7/libs/plugins/block.php.php | 27 - .../libs/plugins/block.textformat.php | 102 - .../libs/plugins/function.counter.php | 78 - .../libs/plugins/function.cycle.php | 106 - .../libs/plugins/function.fetch.php | 216 -- .../libs/plugins/function.html_checkboxes.php | 143 - .../libs/plugins/function.html_image.php | 137 - .../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/function.html_table.php | 177 - .../libs/plugins/function.mailto.php | 156 - .../libs/plugins/function.math.php | 83 - .../libs/plugins/modifier.capitalize.php | 37 - .../libs/plugins/modifier.date_format.php | 61 - .../libs/plugins/modifier.debug_print_var.php | 87 - .../libs/plugins/modifier.escape.php | 91 - .../libs/plugins/modifier.regex_replace.php | 46 - .../libs/plugins/modifier.replace.php | 31 - .../libs/plugins/modifier.spacify.php | 37 - .../libs/plugins/modifier.truncate.php | 67 - .../libs/plugins/modifiercompiler.cat.php | 29 - .../modifiercompiler.count_characters.php | 39 - .../modifiercompiler.count_paragraphs.php | 27 - .../modifiercompiler.count_sentences.php | 27 - .../plugins/modifiercompiler.count_words.php | 31 - .../libs/plugins/modifiercompiler.default.php | 33 - .../libs/plugins/modifiercompiler.indent.php | 32 - .../libs/plugins/modifiercompiler.lower.php | 31 - .../libs/plugins/modifiercompiler.noprint.php | 24 - .../modifiercompiler.string_format.php | 26 - .../libs/plugins/modifiercompiler.strip.php | 33 - .../plugins/modifiercompiler.strip_tags.php | 34 - .../libs/plugins/modifiercompiler.upper.php | 30 - .../plugins/modifiercompiler.wordwrap.php | 35 - .../plugins/outputfilter.trimwhitespace.php | 77 - .../plugins/shared.escape_special_chars.php | 29 - .../libs/plugins/shared.make_timestamp.php | 43 - .../libs/plugins/shared.mb_str_replace.php | 38 - .../variablefilter.htmlspecialchars.php | 22 - .../smarty_internal_cacheresource_file.php | 207 -- .../smarty_internal_compile_append.php | 50 - .../smarty_internal_compile_assign.php | 64 - .../smarty_internal_compile_block.php | 187 - .../smarty_internal_compile_break.php | 65 - .../smarty_internal_compile_call.php | 108 - .../smarty_internal_compile_capture.php | 81 - .../smarty_internal_compile_config_load.php | 64 - .../smarty_internal_compile_continue.php | 64 - .../smarty_internal_compile_debug.php | 38 - .../smarty_internal_compile_eval.php | 51 - .../smarty_internal_compile_extends.php | 90 - .../smarty_internal_compile_for.php | 147 - .../smarty_internal_compile_foreach.php | 219 -- .../smarty_internal_compile_function.php | 134 - .../sysplugins/smarty_internal_compile_if.php | 179 - .../smarty_internal_compile_include.php | 186 - .../smarty_internal_compile_include_php.php | 90 - .../smarty_internal_compile_insert.php | 123 - .../smarty_internal_compile_ldelim.php | 37 - .../smarty_internal_compile_nocache.php | 63 - ..._internal_compile_private_block_plugin.php | 78 - ...ternal_compile_private_function_plugin.php | 58 - ...arty_internal_compile_private_modifier.php | 69 - ..._compile_private_object_block_function.php | 80 - ...ternal_compile_private_object_function.php | 71 - ...ernal_compile_private_print_expression.php | 77 - ...ernal_compile_private_registered_block.php | 95 - ...al_compile_private_registered_function.php | 67 - ...ernal_compile_private_special_variable.php | 99 - .../smarty_internal_compile_rdelim.php | 37 - .../smarty_internal_compile_section.php | 173 - .../smarty_internal_compile_while.php | 82 - .../smarty_internal_compilebase.php | 150 - .../sysplugins/smarty_internal_config.php | 290 -- .../smarty_internal_config_file_compiler.php | 106 - .../smarty_internal_configfilelexer.php | 526 --- .../smarty_internal_configfileparser.php | 870 ----- .../libs/sysplugins/smarty_internal_data.php | 479 --- .../libs/sysplugins/smarty_internal_debug.php | 169 - .../sysplugins/smarty_internal_filter.php | 89 - .../smarty_internal_filter_handler.php | 67 - .../smarty_internal_function_call_handler.php | 40 - .../smarty_internal_get_include_path.php | 44 - .../smarty_internal_nocache_insert.php | 49 - .../sysplugins/smarty_internal_parsetree.php | 236 -- .../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 - ...smarty_internal_smartytemplatecompiler.php | 72 - .../sysplugins/smarty_internal_template.php | 1003 ------ .../smarty_internal_templatecompilerbase.php | 445 --- .../smarty_internal_templatelexer.php | 1178 ------- .../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 -- 110 files changed, 18741 deletions(-) delete mode 100644 engine/lib/external/Smarty-3.0.7/.htaccess delete mode 100644 engine/lib/external/Smarty-3.0.7/COPYING.lib delete mode 100644 engine/lib/external/Smarty-3.0.7/README delete mode 100644 engine/lib/external/Smarty-3.0.7/SMARTY2_BC_NOTES delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/Smarty.class.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/debug.tpl delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/block.php.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/block.textformat.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/function.counter.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/function.cycle.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/function.fetch.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/function.html_checkboxes.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/function.html_image.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/function.html_options.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/function.html_radios.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/function.html_select_date.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/function.html_select_time.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/function.html_table.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/function.mailto.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/function.math.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/modifier.capitalize.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/modifier.date_format.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/modifier.debug_print_var.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/modifier.escape.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/modifier.regex_replace.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/modifier.replace.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/modifier.spacify.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/modifier.truncate.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/modifiercompiler.cat.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/modifiercompiler.count_characters.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/modifiercompiler.count_paragraphs.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/modifiercompiler.count_sentences.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/modifiercompiler.count_words.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/modifiercompiler.default.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/modifiercompiler.indent.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/modifiercompiler.lower.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/modifiercompiler.noprint.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/modifiercompiler.string_format.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/modifiercompiler.strip.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/modifiercompiler.strip_tags.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/modifiercompiler.upper.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/modifiercompiler.wordwrap.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/outputfilter.trimwhitespace.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/shared.escape_special_chars.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/shared.make_timestamp.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/shared.mb_str_replace.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/plugins/variablefilter.htmlspecialchars.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_cacheresource_file.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_append.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_assign.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_block.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_break.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_call.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_capture.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_config_load.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_continue.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_debug.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_eval.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_extends.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_for.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_foreach.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_function.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_if.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_include.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_include_php.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_insert.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_ldelim.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_nocache.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_private_block_plugin.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_private_function_plugin.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_private_modifier.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_private_object_block_function.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_private_object_function.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_private_print_expression.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_private_registered_block.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_private_registered_function.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_private_special_variable.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_rdelim.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_section.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compile_while.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_compilebase.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_config.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_config_file_compiler.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_configfilelexer.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_configfileparser.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_data.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_debug.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_filter.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_filter_handler.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_function_call_handler.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_get_include_path.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_nocache_insert.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_parsetree.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_register.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_resource_eval.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_resource_extends.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_resource_file.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_resource_php.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_resource_registered.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_resource_stream.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_resource_string.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_smartytemplatecompiler.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_template.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_templatecompilerbase.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_templatelexer.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_templateparser.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_utility.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_wrapper.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_internal_write_file.php delete mode 100644 engine/lib/external/Smarty-3.0.7/libs/sysplugins/smarty_security.php diff --git a/engine/lib/external/Smarty-3.0.7/.htaccess b/engine/lib/external/Smarty-3.0.7/.htaccess deleted file mode 100644 index 2859d7f4..00000000 --- a/engine/lib/external/Smarty-3.0.7/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -Order Deny,Allow -Deny from all \ No newline at end of file diff --git a/engine/lib/external/Smarty-3.0.7/COPYING.lib b/engine/lib/external/Smarty-3.0.7/COPYING.lib deleted file mode 100644 index 02bbb60b..00000000 --- a/engine/lib/external/Smarty-3.0.7/COPYING.lib +++ /dev/null @@ -1,165 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. \ No newline at end of file diff --git a/engine/lib/external/Smarty-3.0.7/README b/engine/lib/external/Smarty-3.0.7/README deleted file mode 100644 index fda1c754..00000000 --- a/engine/lib/external/Smarty-3.0.7/README +++ /dev/null @@ -1,570 +0,0 @@ -Smarty 3.0.8 - -Author: Monte Ohrt -Author: Uwe Tews - -AN INTRODUCTION TO SMARTY 3 - -NOTICE for 3.0.5 release: - -Smarty now follows the PHP error_reporting level by default. If PHP does not mask E_NOTICE and you try to access an unset template variable, you will now get an E_NOTICE warning. To revert to the old behavior: - -$smarty->error_reporting = E_ALL & ~E_NOTICE; - -NOTICE for 3.0 release: - -IMPORTANT: Some API adjustments have been made between the RC4 and 3.0 release. -We felt it is better to make these now instead of after a 3.0 release, then have to -immediately deprecate APIs in 3.1. Online documentation has been updated -to reflect these changes. Specifically: - ----- API CHANGES RC4 -> 3.0 ---- - -$smarty->register->* -$smarty->unregister->* -$smarty->utility->* -$samrty->cache->* - -Have all been changed to local method calls such as: - -$smarty->clearAllCache() -$smarty->registerFoo() -$smarty->unregisterFoo() -$smarty->testInstall() -etc. - -Registration of function, block, compiler, and modifier plugins have been -consolidated under two API calls: - -$smarty->registerPlugin(...) -$smarty->unregisterPlugin(...) - -Registration of pre, post, output and variable filters have been -consolidated under two API calls: - -$smarty->registerFilter(...) -$smarty->unregisterFilter(...) - -Please refer to the online documentation for all specific changes: - -http://www.smarty.net/documentation - ----- - -The Smarty 3 API has been refactored to a syntax geared -for consistency and modularity. The Smarty 2 API syntax is still supported, but -will throw a deprecation notice. You can disable the notices, but it is highly -recommended to adjust your syntax to Smarty 3, as the Smarty 2 syntax must run -through an extra rerouting wrapper. - -Basically, all Smarty methods now follow the "fooBarBaz" camel case syntax. Also, -all Smarty properties now have getters and setters. So for example, the property -$smarty->cache_dir can be set with $smarty->setCacheDir('foo/') and can be -retrieved with $smarty->getCacheDir(). - -Some of the Smarty 3 APIs have been revoked such as the "is*" methods that were -just duplicate functions of the now available "get*" methods. - -Here is a rundown of the Smarty 3 API: - -$smarty->fetch($template, $cache_id = null, $compile_id = null, $parent = null) -$smarty->display($template, $cache_id = null, $compile_id = null, $parent = null) -$smarty->isCached($template, $cache_id = null, $compile_id = null) -$smarty->createData($parent = null) -$smarty->createTemplate($template, $cache_id = null, $compile_id = null, $parent = null) -$smarty->enableSecurity() -$smarty->disableSecurity() -$smarty->setTemplateDir($template_dir) -$smarty->addTemplateDir($template_dir) -$smarty->templateExists($resource_name) -$smarty->loadPlugin($plugin_name, $check = true) -$smarty->loadFilter($type, $name) -$smarty->setExceptionHandler($handler) -$smarty->addPluginsDir($plugins_dir) -$smarty->getGlobal($varname = null) -$smarty->getRegisteredObject($name) -$smarty->getDebugTemplate() -$smarty->setDebugTemplate($tpl_name) -$smarty->assign($tpl_var, $value = null, $nocache = false) -$smarty->assignGlobal($varname, $value = null, $nocache = false) -$smarty->assignByRef($tpl_var, &$value, $nocache = false) -$smarty->append($tpl_var, $value = null, $merge = false, $nocache = false) -$smarty->appendByRef($tpl_var, &$value, $merge = false) -$smarty->clearAssign($tpl_var) -$smarty->clearAllAssign() -$smarty->configLoad($config_file, $sections = null) -$smarty->getVariable($variable, $_ptr = null, $search_parents = true, $error_enable = true) -$smarty->getConfigVariable($variable) -$smarty->getStreamVariable($variable) -$smarty->getConfigVars($varname = null) -$smarty->clearConfig($varname = null) -$smarty->getTemplateVars($varname = null, $_ptr = null, $search_parents = true) -$smarty->clearAllCache($exp_time = null, $type = null) -$smarty->clearCache($template_name, $cache_id = null, $compile_id = null, $exp_time = null, $type = null) - -$smarty->registerPlugin($type, $tag, $callback, $cacheable = true, $cache_attr = array()) - -$smarty->registerObject($object_name, $object_impl, $allowed = array(), $smarty_args = true, $block_methods = array()) - -$smarty->registerFilter($type, $function_name) -$smarty->registerResource($resource_type, $function_names) -$smarty->registerDefaultPluginHandler($function_name) -$smarty->registerDefaultTemplateHandler($function_name) - -$smarty->unregisterPlugin($type, $tag) -$smarty->unregisterObject($object_name) -$smarty->unregisterFilter($type, $function_name) -$smarty->unregisterResource($resource_type) - -$smarty->compileAllTemplates($extention = '.tpl', $force_compile = false, $time_limit = 0, $max_errors = null) -$smarty->clearCompiledTemplate($resource_name = null, $compile_id = null, $exp_time = null) -$smarty->testInstall() - -// then all the getters/setters, available for all properties. Here are a few: - -$caching = $smarty->getCaching(); // get $smarty->caching -$smarty->setCaching(true); // set $smarty->caching -$smarty->setDeprecationNotices(false); // set $smarty->deprecation_notices -$smarty->setCacheId($id); // set $smarty->cache_id -$debugging = $smarty->getDebugging(); // get $smarty->debugging - - -FILE STRUCTURE - -The Smarty 3 file structure is similar to Smarty 2: - -/libs/ - Smarty.class.php -/libs/sysplugins/ - internal.* -/libs/plugins/ - function.mailto.php - modifier.escape.php - ... - -A lot of Smarty 3 core functionality lies in the sysplugins directory; you do -not need to change any files here. The /libs/plugins/ folder is where Smarty -plugins are located. You can add your own here, or create a separate plugin -directory, just the same as Smarty 2. You will still need to create your own -/cache/, /templates/, /templates_c/, /configs/ folders. Be sure /cache/ and -/templates_c/ are writable. - -The typical way to use Smarty 3 should also look familiar: - -require('Smarty.class.php'); -$smarty = new Smarty; -$smarty->assign('foo','bar'); -$smarty->display('index.tpl'); - - -However, Smarty 3 works completely different on the inside. Smarty 3 is mostly -backward compatible with Smarty 2, except for the following items: - -*) Smarty 3 is PHP 5 only. It will not work with PHP 4. -*) The {php} tag is disabled by default. Enable with $smarty->allow_php_tag=true. -*) Delimiters surrounded by whitespace are no longer treated as Smarty tags. - Therefore, { foo } will not compile as a tag, you must use {foo}. This change - Makes Javascript/CSS easier to work with, eliminating the need for {literal}. - This can be disabled by setting $smarty->auto_literal = false; -*) The Smarty 3 API is a bit different. Many Smarty 2 API calls are deprecated - but still work. You will want to update your calls to Smarty 3 for maximum - efficiency. - - -There are many things that are new to Smarty 3. Here are the notable items: - -LEXER/PARSER -============ - -Smarty 3 now uses a lexing tokenizer for its parser/compiler. Basically, this -means Smarty has some syntax additions that make life easier such as in-template -math, shorter/intuitive function parameter options, infinite function recursion, -more accurate error handling, etc. - - -WHAT IS NEW IN SMARTY TEMPLATE SYNTAX -===================================== - -Smarty 3 allows expressions almost anywhere. Expressions can include PHP -functions as long as they are not disabled by the security policy, object -methods and properties, etc. The {math} plugin is no longer necessary but -is still supported for BC. - -Examples: -{$x+$y} will output the sum of x and y. -{$foo = strlen($bar)} function in assignment -{assign var=foo value= $x+$y} in attributes -{$foo = myfunct( ($x+$y)*3 )} as function parameter -{$foo[$x+3]} as array index - -Smarty tags can be used as values within other tags. -Example: {$foo={counter}+3} - -Smarty tags can also be used inside double quoted strings. -Example: {$foo="this is message {counter}"} - -You can define arrays within templates. -Examples: -{assign var=foo value=[1,2,3]} -{assign var=foo value=['y'=>'yellow','b'=>'blue']} -Arrays can be nested. -{assign var=foo value=[1,[9,8],3]} - -There is a new short syntax supported for assigning variables. -Example: {$foo=$bar+2} - -You can assign a value to a specific array element. If the variable exists but -is not an array, it is converted to an array before the new values are assigned. -Examples: -{$foo['bar']=1} -{$foo['bar']['blar']=1} - -You can append values to an array. If the variable exists but is not an array, -it is converted to an array before the new values are assigned. -Example: {$foo[]=1} - -You can use a PHP-like syntax for accessing array elements, as well as the -original "dot" notation. -Examples: -{$foo[1]} normal access -{$foo['bar']} -{$foo['bar'][1]} -{$foo[$x+$x]} index may contain any expression -{$foo[$bar[1]]} nested index -{$foo[section_name]} smarty section access, not array access! - -The original "dot" notation stays, and with improvements. -Examples: -{$foo.a.b.c} => $foo['a']['b']['c'] -{$foo.a.$b.c} => $foo['a'][$b]['c'] with variable index -{$foo.a.{$b+4}.c} => $foo['a'][$b+4]['c'] with expression as index -{$foo.a.{$b.c}} => $foo['a'][$b['c']] with nested index - -note that { and } are used to address ambiguties when nesting the dot syntax. - -Variable names themselves can be variable and contain expressions. -Examples: -$foo normal variable -$foo_{$bar} variable name containing other variable -$foo_{$x+$y} variable name containing expressions -$foo_{$bar}_buh_{$blar} variable name with multiple segments -{$foo_{$x}} will output the variable $foo_1 if $x has a value of 1. - -Object method chaining is implemented. -Example: {$object->method1($x)->method2($y)} - -{for} tag added for looping (replacement for {section} tag): -{for $x=0, $y=count($foo); $x<$y; $x++} .... {/for} -Any number of statements can be used separated by comma as the first -inital expression at {for}. - -{for $x = $start to $end step $step} ... {/for}is in the SVN now . -You can use also -{for $x = $start to $end} ... {/for} -In this case the step value will be automaticall 1 or -1 depending on the start and end values. -Instead of $start and $end you can use any valid expression. -Inside the loop the following special vars can be accessed: -$x@iteration = number of iteration -$x@total = total number of iterations -$x@first = true on first iteration -$x@last = true on last iteration - - -The Smarty 2 {section} syntax is still supported. - -New shorter {foreach} syntax to loop over an array. -Example: {foreach $myarray as $var}...{/foreach} - -Within the foreach loop, properties are access via: - -$var@key foreach $var array key -$var@iteration foreach current iteration count (1,2,3...) -$var@index foreach current index count (0,1,2...) -$var@total foreach $var array total -$var@first true on first iteration -$var@last true on last iteration - -The Smarty 2 {foreach} tag syntax is still supported. - -NOTE: {$bar[foo]} still indicates a variable inside of a {section} named foo. -If you want to access an array element with index foo, you must use quotes -such as {$bar['foo']}, or use the dot syntax {$bar.foo}. - -while block tag is now implemented: -{while $foo}...{/while} -{while $x lt 10}...{/while} - -Direct access to PHP functions: -Just as you can use PHP functions as modifiers directly, you can now access -PHP functions directly, provided they are permitted by security settings: -{time()} - -There is a new {function}...{/function} block tag to implement a template function. -This enables reuse of code sequences like a plugin function. It can call itself recursively. -Template function must be called with the new {call name=foo...} tag. - -Example: - -Template file: -{function name=menu level=0} -
    - {foreach $data as $entry} - {if is_array($entry)} -
  • {$entry@key}
  • - {call name=menu data=$entry level=$level+1} - {else} -
  • {$entry}
  • - {/if} - {/foreach} -
-{/function} - -{$menu = ['item1','item2','item3' => ['item3-1','item3-2','item3-3' => - ['item3-3-1','item3-3-2']],'item4']} - -{call name=menu data=$menu} - - -Generated output: - * item1 - * item2 - * item3 - o item3-1 - o item3-2 - o item3-3 - + item3-3-1 - + item3-3-2 - * item4 - -The function tag itself must have the "name" attribute. This name is the tag -name when calling the function. The function tag may have any number of -additional attributes. These will be default settings for local variables. - -New {nocache} block function: -{nocache}...{/nocache} will declare a section of the template to be non-cached -when template caching is enabled. - -New nocache attribute: -You can declare variable/function output as non-cached with the nocache attribute. -Examples: - -{$foo nocache=true} -{$foo nocache} /* same */ - -{foo bar="baz" nocache=true} -{foo bar="baz" nocache} /* same */ - -{time() nocache=true} -{time() nocache} /* same */ - -Or you can also assign the variable in your script as nocache: -$smarty->assign('foo',$something,true); // third param is nocache setting -{$foo} /* non-cached */ - -$smarty.current_dir returns the directory name of the current template. - -You can use strings directly as templates with the "string" resource type. -Examples: -$smarty->display('string:This is my template, {$foo}!'); // php -{include file="string:This is my template, {$foo}!"} // template - - - -VARIABLE SCOPE / VARIABLE STORAGE -================================= - -In Smarty 2, all assigned variables were stored within the Smarty object. -Therefore, all variables assigned in PHP were accessible by all subsequent -fetch and display template calls. - -In Smarty 3, we have the choice to assign variables to the main Smarty object, -to user-created data objects, and to user-created template objects. -These objects can be chained. The object at the end of a chain can access all -variables belonging to that template and all variables within the parent objects. -The Smarty object can only be the root of a chain, but a chain can be isolated -from the Smarty object. - -All known Smarty assignment interfaces will work on the data and template objects. - -Besides the above mentioned objects, there is also a special storage area for -global variables. - -A Smarty data object can be created as follows: -$data = $smarty->createData(); // create root data object -$data->assign('foo','bar'); // assign variables as usual -$data->config_load('my.conf'); // load config file - -$data= $smarty->createData($smarty); // create data object having a parent link to -the Smarty object - -$data2= $smarty->createData($data); // create data object having a parent link to -the $data data object - -A template object can be created by using the createTemplate method. It has the -same parameter assignments as the fetch() or display() method. -Function definition: -function createTemplate($template, $cache_id = null, $compile_id = null, $parent = null) - -The first parameter can be a template name, a smarty object or a data object. - -Examples: -$tpl = $smarty->createTemplate('mytpl.tpl'); // create template object not linked to any parent -$tpl->assign('foo','bar'); // directly assign variables -$tpl->config_load('my.conf'); // load config file - -$tpl = $smarty->createTemplate('mytpl.tpl',$smarty); // create template having a parent link to the Smarty object -$tpl = $smarty->createTemplate('mytpl.tpl',$data); // create template having a parent link to the $data object - -The standard fetch() and display() methods will implicitly create a template object. -If the $parent parameter is not specified in these method calls, the template object -is will link back to the Smarty object as it's parent. - -If a template is called by an {include...} tag from another template, the -subtemplate links back to the calling template as it's parent. - -All variables assigned locally or from a parent template are accessible. If the -template creates or modifies a variable by using the {assign var=foo...} or -{$foo=...} tags, these new values are only known locally (local scope). When the -template exits, none of the new variables or modifications can be seen in the -parent template(s). This is same behavior as in Smarty 2. - -With Smarty 3, we can assign variables with a scope attribute which allows the -availablility of these new variables or modifications globally (ie in the parent -templates.) - -Possible scopes are local, parent, root and global. -Examples: -{assign var=foo value='bar'} // no scope is specified, the default 'local' -{$foo='bar'} // same, local scope -{assign var=foo value='bar' scope='local'} // same, local scope - -{assign var=foo value='bar' scope='parent'} // Values will be available to the parent object -{$foo='bar' scope='parent'} // (normally the calling template) - -{assign var=foo value='bar' scope='root'} // Values will be exported up to the root object, so they can -{$foo='bar' scope='root'} // be seen from all templates using the same root. - -{assign var=foo value='bar' scope='global'} // Values will be exported to global variable storage, -{$foo='bar' scope='global'} // they are available to any and all templates. - - -The scope attribute can also be attached to the {include...} tag. In this case, -the specified scope will be the default scope for all assignments within the -included template. - - -PLUGINS -======= - -Smarty3 are following the same coding rules as in Smarty2. -The only difference is that the template object is passed as additional third parameter. - -smarty_plugintype_name (array $params, object $smarty, object $template) - -The Smarty 2 plugins are still compatible as long as they do not make use of specific Smarty2 internals. - - -TEMPLATE INHERITANCE: -===================== - -With template inheritance you can define blocks, which are areas that can be -overriden by child templates, so your templates could look like this: - -parent.tpl: - - - {block name='title'}My site name{/block} - - -

{block name='page-title'}Default page title{/block}

-
- {block name='content'} - Default content - {/block} -
- - - -child.tpl: -{extends file='parent.tpl'} -{block name='title'} -Child title -{/block} - -grandchild.tpl: -{extends file='child.tpl'} -{block name='title'}Home - {$smarty.block.parent}{/block} -{block name='page-title'}My home{/block} -{block name='content'} - {foreach $images as $img} - {$img.description} - {/foreach} -{/block} - -We redefined all the blocks here, however in the title block we used {$smarty.block.parent}, -which tells Smarty to insert the default content from the parent template in its place. -The content block was overriden to display the image files, and page-title has also be -overriden to display a completely different title. - -If we render grandchild.tpl we will get this: - - - Home - Child title - - -

My home

-
- image - image - image -
- - - -NOTE: In the child templates everything outside the {extends} or {block} tag sections -is ignored. - -The inheritance tree can be as big as you want (meaning you can extend a file that -extends another one that extends another one and so on..), but be aware that all files -have to be checked for modifications at runtime so the more inheritance the more overhead you add. - -Instead of defining the parent/child relationships with the {extends} tag in the child template you -can use the resource as follow: - -$smarty->display('extends:parent.tpl|child.tpl|grandchild.tpl'); - -Child {block} tags may optionally have a append or prepend attribute. In this case the parent block content -is appended or prepended to the child block content. - -{block name='title' append} My title {/block} - - -PHP STREAMS: -============ - -(see online documentation) - -VARIBLE FILTERS: -================ - -(see online documentation) - - -STATIC CLASS ACCESS AND NAMESPACE SUPPORT -========================================= - -You can register a class with optional namespace for the use in the template like: - -$smarty->register->templateClass('foo','name\name2\myclass'); - -In the template you can use it like this: -{foo::method()} etc. - - -======================= - -Please look through it and send any questions/suggestions/etc to the forums. - -http://www.phpinsider.com/smarty-forum/viewtopic.php?t=14168 - -Monte and Uwe diff --git a/engine/lib/external/Smarty-3.0.7/SMARTY2_BC_NOTES b/engine/lib/external/Smarty-3.0.7/SMARTY2_BC_NOTES deleted file mode 100644 index cde8629c..00000000 --- a/engine/lib/external/Smarty-3.0.7/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/engine/lib/external/Smarty-3.0.7/libs/Smarty.class.php b/engine/lib/external/Smarty-3.0.7/libs/Smarty.class.php deleted file mode 100644 index c0bc78bb..00000000 --- a/engine/lib/external/Smarty-3.0.7/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/engine/lib/external/Smarty-3.0.7/libs/debug.tpl b/engine/lib/external/Smarty-3.0.7/libs/debug.tpl deleted file mode 100644 index 058c5b20..00000000 --- a/engine/lib/external/Smarty-3.0.7/libs/debug.tpl +++ /dev/null @@ -1,133 +0,0 @@ -{capture name='_smarty_debug' assign=debug_output} - - - - Smarty Debug Console - - - - -

Smarty Debug Console - {if isset($template_name)}{$template_name|debug_print_var}{else}Total Time {$execution_time|string_format:"%.5f"}{/if}

- -{if !empty($template_data)} -

included templates & config files (load time in seconds)

- -
-{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} - -

assigned template variables

- - - {foreach $assigned_vars as $vars} - - - - {/foreach} -
${$vars@key|escape:'html'}{$vars|debug_print_var}
- -

assigned config file variables (outer template scope)

- - - {foreach $config_vars as $vars} - - - - {/foreach} - -
{$vars@key|escape:'html'}{$vars|debug_print_var}
- - -{/capture} - diff --git a/engine/lib/external/Smarty-3.0.7/libs/plugins/block.php.php b/engine/lib/external/Smarty-3.0.7/libs/plugins/block.php.php deleted file mode 100644 index 8fedd8b4..00000000 --- a/engine/lib/external/Smarty-3.0.7/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/engine/lib/external/Smarty-3.0.7/libs/plugins/block.textformat.php b/engine/lib/external/Smarty-3.0.7/libs/plugins/block.textformat.php deleted file mode 100644 index 517fd62d..00000000 --- a/engine/lib/external/Smarty-3.0.7/libs/plugins/block.textformat.php +++ /dev/null @@ -1,102 +0,0 @@ - - * Name: textformat
- * Purpose: format text a certain way with preset styles - * or custom wrap/indent settings
- * - * @link http://smarty.php.net/manual/en/language.function.textformat.php {textformat} - * (Smarty online manual) - * @param array $params parameters - *
- * Params:   style: string (email)
- *            indent: integer (0)
- *            wrap: integer (80)
- *            wrap_char string ("\n")
- *            indent_char: string (" ")
- *            wrap_boundary: boolean (true)
- * 
- * @author Monte Ohrt - * @param string $content contents of the block - * @param object $template template object - * @param boolean &$repeat repeat flag - * @return string content re-formatted - */ -function smarty_block_textformat($params, $content, $template, &$repeat) -{ - if (is_null($content)) { - return; - } - - $style = null; - $indent = 0; - $indent_first = 0; - $indent_char = ' '; - $wrap = 80; - $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; - break; - - case 'indent': - case 'indent_first': - case 'wrap': - $$_key = (int)$_val; - break; - - case 'wrap_cut': - $$_key = (bool)$_val; - break; - - default: - trigger_error("textformat: unknown attribute '$_key'"); - } - } - - if ($style == 'email') { - $wrap = 72; - } - // split into paragraphs - $_paragraphs = preg_split('![\r\n][\r\n]!', $content); - $_output = ''; - - for($_x = 0, $_y = count($_paragraphs); $_x < $_y; $_x++) { - if ($_paragraphs[$_x] == '') { - continue; - } - // convert mult. spaces & special chars to single space - $_paragraphs[$_x] = preg_replace(array('!\s+!', '!(^\s+)|(\s+$)!'), array(' ', ''), $_paragraphs[$_x]); - // indent first line - if ($indent_first > 0) { - $_paragraphs[$_x] = str_repeat($indent_char, $indent_first) . $_paragraphs[$_x]; - } - // wordwrap sentences - $_paragraphs[$_x] = wordwrap($_paragraphs[$_x], $wrap - $indent, $wrap_char, $wrap_cut); - // indent lines - if ($indent > 0) { - $_paragraphs[$_x] = preg_replace('!^!m', str_repeat($indent_char, $indent), $_paragraphs[$_x]); - } - } - $_output = implode($wrap_char . $wrap_char, $_paragraphs); - - return $assign ? $template->assign($assign, $_output) : $_output; -} - -?> \ No newline at end of file diff --git a/engine/lib/external/Smarty-3.0.7/libs/plugins/function.counter.php b/engine/lib/external/Smarty-3.0.7/libs/plugins/function.counter.php deleted file mode 100644 index 7c50bd44..00000000 --- a/engine/lib/external/Smarty-3.0.7/libs/plugins/function.counter.php +++ /dev/null @@ -1,78 +0,0 @@ - - * Name: counter
- * Purpose: print out a counter value - * @author Monte Ohrt - * @link http://smarty.php.net/manual/en/language.function.counter.php {counter} - * (Smarty online manual) - * @param array parameters - * @param Smarty - * @param object $template template object - * @return string|null - */ -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']; - } - - 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']; - } 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; - -} - -?> \ No newline at end of file diff --git a/engine/lib/external/Smarty-3.0.7/libs/plugins/function.cycle.php b/engine/lib/external/Smarty-3.0.7/libs/plugins/function.cycle.php deleted file mode 100644 index 98e3e287..00000000 --- a/engine/lib/external/Smarty-3.0.7/libs/plugins/function.cycle.php +++ /dev/null @@ -1,106 +0,0 @@ - - * Name: cycle
- * Date: May 3, 2002
- * Purpose: cycle through given values
- * Input: - * - name = name of cycle (optional) - * - values = comma separated list of values to cycle, - * or an array of values to cycle - * (this can be left out for subsequent calls) - * - reset = boolean - resets given var to true - * - print = boolean - print var or not. default is true - * - advance = boolean - whether or not to advance the cycle - * - delimiter = the value delimiter, default is "," - * - assign = boolean, assigns to template var instead of - * printed. - * - * Examples:
- *
- * {cycle values="#eeeeee,#d0d0d0d"}
- * {cycle name=row values="one,two,three" reset=true}
- * {cycle name=row}
- * 
- * @link http://smarty.php.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 - * @param array - * @param object $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; - - if (!in_array('values', array_keys($params))) { - if(!isset($cycle_vars[$name]['values'])) { - trigger_error("cycle: missing 'values' parameter"); - return; - } - } else { - if(isset($cycle_vars[$name]['values']) - && $cycle_vars[$name]['values'] != $params['values'] ) { - $cycle_vars[$name]['index'] = 0; - } - $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']++; - } - } - - return $retval; -} - -?> \ No newline at end of file diff --git a/engine/lib/external/Smarty-3.0.7/libs/plugins/function.fetch.php b/engine/lib/external/Smarty-3.0.7/libs/plugins/function.fetch.php deleted file mode 100644 index 2b09fb94..00000000 --- a/engine/lib/external/Smarty-3.0.7/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/engine/lib/external/Smarty-3.0.7/libs/plugins/function.html_checkboxes.php b/engine/lib/external/Smarty-3.0.7/libs/plugins/function.html_checkboxes.php deleted file mode 100644 index 6a1a3ffd..00000000 --- a/engine/lib/external/Smarty-3.0.7/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/engine/lib/external/Smarty-3.0.7/libs/plugins/function.html_image.php b/engine/lib/external/Smarty-3.0.7/libs/plugins/function.html_image.php deleted file mode 100644 index abb7b578..00000000 --- a/engine/lib/external/Smarty-3.0.7/libs/plugins/function.html_image.php +++ /dev/null @@ -1,137 +0,0 @@ - - * Name: html_image
- * Date: Feb 24, 2003
- * Purpose: format HTML tags for the image
- * Examples: {html_image file="/images/masthead.gif"} - * Output: - * - * @link http://smarty.php.net/manual/en/language.function.html.image.php {html_image} - * (Smarty online manual) - * @author Monte Ohrt - * @author credits to Duda - * @version 1.0 - * @param array $params parameters - * Input:
- * - file = file (and path) of image (required) - * - height = image height (optional, default actual height) - * - width = image width (optional, default actual width) - * - basedir = base directory for absolute paths, default - * is environment variable DOCUMENT_ROOT - * - path_prefix = prefix for path output (optional, default empty) - * @param object $template template object - * @return string - * @uses smarty_function_escape_special_chars() - */ -function smarty_function_html_image($params, $template) -{ - require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php'); - - $alt = ''; - $file = ''; - $height = ''; - $width = ''; - $extra = ''; - $prefix = ''; - $suffix = ''; - $path_prefix = ''; - $server_vars = $_SERVER; - $basedir = isset($server_vars['DOCUMENT_ROOT']) ? $server_vars['DOCUMENT_ROOT'] : ''; - foreach($params as $_key => $_val) { - switch ($_key) { - case 'file': - case 'height': - case 'width': - case 'dpi': - case 'path_prefix': - case 'basedir': - $$_key = $_val; - break; - - case 'alt': - if (!is_array($_val)) { - $$_key = smarty_function_escape_special_chars($_val); - } else { - throw new SmartyException ("html_image: extra attribute '$_key' cannot be an array", E_USER_NOTICE); - } - break; - - case 'link': - case 'href': - $prefix = ''; - $suffix = ''; - break; - - default: - if (!is_array($_val)) { - $extra .= ' ' . $_key . '="' . smarty_function_escape_special_chars($_val) . '"'; - } else { - throw new SmartyException ("html_image: extra attribute '$_key' cannot be an array", E_USER_NOTICE); - } - break; - } - } - - if (empty($file)) { - trigger_error("html_image: missing 'file' parameter", E_USER_NOTICE); - return; - } - - if (substr($file, 0, 1) == '/') { - $_image_path = $basedir . $file; - } else { - $_image_path = $file; - } - - if (!isset($params['width']) || !isset($params['height'])) { - if (!$_image_data = @getimagesize($_image_path)) { - if (!file_exists($_image_path)) { - trigger_error("html_image: unable to find '$_image_path'", E_USER_NOTICE); - return; - } else if (!is_readable($_image_path)) { - trigger_error("html_image: unable to read '$_image_path'", E_USER_NOTICE); - return; - } else { - trigger_error("html_image: '$_image_path' is not a valid image file", E_USER_NOTICE); - return; - } - } - if (isset($template->security_policy)) { - if (!$template->security_policy->isTrustedResourceDir($_image_path)) { - return; - } - } - - if (!isset($params['width'])) { - $width = $_image_data[0]; - } - if (!isset($params['height'])) { - $height = $_image_data[1]; - } - } - - if (isset($params['dpi'])) { - if (strstr($server_vars['HTTP_USER_AGENT'], 'Mac')) { - $dpi_default = 72; - } else { - $dpi_default = 96; - } - $_resize = $dpi_default / $params['dpi']; - $width = round($width * $_resize); - $height = round($height * $_resize); - } - - return $prefix . '' . $alt . '' . $suffix; -} - -?> \ No newline at end of file diff --git a/engine/lib/external/Smarty-3.0.7/libs/plugins/function.html_options.php b/engine/lib/external/Smarty-3.0.7/libs/plugins/function.html_options.php deleted file mode 100644 index 7ac03902..00000000 --- a/engine/lib/external/Smarty-3.0.7/libs/plugins/function.html_options.php +++ /dev/null @@ -1,133 +0,0 @@ - - * Name: html_options
- * Purpose: Prints the list of