Updated to Smarty 2.6.26 (June 18th, 2009), we should update to Smarty 3.x (current...
authorHarvie <tomas@mudrunka.cz>
Thu, 12 May 2011 23:48:21 +0000 (01:48 +0200)
committerHarvie <tomas@mudrunka.cz>
Thu, 12 May 2011 23:48:21 +0000 (01:48 +0200)
77 files changed:
wwwroot/smarty/COPYING.lib
wwwroot/smarty/ChangeLog
wwwroot/smarty/FAQ
wwwroot/smarty/NEWS
wwwroot/smarty/README
wwwroot/smarty/RELEASE_NOTES
wwwroot/smarty/demo/configs/test.conf [deleted file]
wwwroot/smarty/demo/index.php [deleted file]
wwwroot/smarty/demo/templates/footer.tpl [deleted file]
wwwroot/smarty/demo/templates/header.tpl [deleted file]
wwwroot/smarty/demo/templates/index.tpl [deleted file]
wwwroot/smarty/libs/Config_File.class.php
wwwroot/smarty/libs/Smarty.class.php
wwwroot/smarty/libs/Smarty_Compiler.class.php
wwwroot/smarty/libs/debug.tpl
wwwroot/smarty/libs/internals/core.create_dir_structure.php
wwwroot/smarty/libs/internals/core.is_secure.php
wwwroot/smarty/libs/internals/core.is_trusted.php
wwwroot/smarty/libs/internals/core.process_cached_inserts.php
wwwroot/smarty/libs/internals/core.process_compiled_include.php
wwwroot/smarty/libs/internals/core.write_cache_file.php
wwwroot/smarty/libs/internals/core.write_compiled_include.php
wwwroot/smarty/libs/internals/core.write_file.php
wwwroot/smarty/libs/plugins/block.textformat.php
wwwroot/smarty/libs/plugins/compiler.assign.php
wwwroot/smarty/libs/plugins/function.assign_debug_info.php
wwwroot/smarty/libs/plugins/function.config_load.php
wwwroot/smarty/libs/plugins/function.counter.php
wwwroot/smarty/libs/plugins/function.cycle.php
wwwroot/smarty/libs/plugins/function.eval.php
wwwroot/smarty/libs/plugins/function.fetch.php
wwwroot/smarty/libs/plugins/function.html_image.php
wwwroot/smarty/libs/plugins/function.html_options.php
wwwroot/smarty/libs/plugins/function.html_radios.php
wwwroot/smarty/libs/plugins/function.html_select_date.php
wwwroot/smarty/libs/plugins/function.html_select_time.php
wwwroot/smarty/libs/plugins/function.html_table.php
wwwroot/smarty/libs/plugins/function.mailto.php
wwwroot/smarty/libs/plugins/function.math.php
wwwroot/smarty/libs/plugins/function.popup.php
wwwroot/smarty/libs/plugins/function.popup_init.php
wwwroot/smarty/libs/plugins/modifier.capitalize.php
wwwroot/smarty/libs/plugins/modifier.count_characters.php
wwwroot/smarty/libs/plugins/modifier.count_paragraphs.php
wwwroot/smarty/libs/plugins/modifier.count_sentences.php
wwwroot/smarty/libs/plugins/modifier.count_words.php
wwwroot/smarty/libs/plugins/modifier.date_format.php
wwwroot/smarty/libs/plugins/modifier.debug_print_var.php
wwwroot/smarty/libs/plugins/modifier.default.php
wwwroot/smarty/libs/plugins/modifier.escape.php
wwwroot/smarty/libs/plugins/modifier.indent.php
wwwroot/smarty/libs/plugins/modifier.lower.php
wwwroot/smarty/libs/plugins/modifier.regex_replace.php
wwwroot/smarty/libs/plugins/modifier.replace.php
wwwroot/smarty/libs/plugins/modifier.spacify.php
wwwroot/smarty/libs/plugins/modifier.string_format.php
wwwroot/smarty/libs/plugins/modifier.strip_tags.php
wwwroot/smarty/libs/plugins/modifier.truncate.php
wwwroot/smarty/libs/plugins/modifier.upper.php
wwwroot/smarty/libs/plugins/modifier.wordwrap.php
wwwroot/smarty/libs/plugins/outputfilter.trimwhitespace.php
wwwroot/smarty/libs/plugins/shared.escape_special_chars.php
wwwroot/smarty/libs/plugins/shared.make_timestamp.php
wwwroot/smarty/misc/smarty_icon.README [deleted file]
wwwroot/smarty/misc/smarty_icon.gif [deleted file]
wwwroot/smarty/unit_test/README [deleted file]
wwwroot/smarty/unit_test/config.php [deleted file]
wwwroot/smarty/unit_test/configs/globals_double_quotes.conf [deleted file]
wwwroot/smarty/unit_test/configs/globals_single_quotes.conf [deleted file]
wwwroot/smarty/unit_test/smarty_unit_test.php [deleted file]
wwwroot/smarty/unit_test/smarty_unit_test_gui.php [deleted file]
wwwroot/smarty/unit_test/templates/assign_var.tpl [deleted file]
wwwroot/smarty/unit_test/templates/constant.tpl [deleted file]
wwwroot/smarty/unit_test/templates/index.tpl [deleted file]
wwwroot/smarty/unit_test/templates/parse_math.tpl [deleted file]
wwwroot/smarty/unit_test/templates/parse_obj_meth.tpl [deleted file]
wwwroot/smarty/unit_test/test_cases.php [deleted file]

index 9a749e68550b0b8671c3149e475843b918e40e7b..3b204400cf3d548f93a0f4f8e85d41d7e39ecb59 100644 (file)
@@ -146,7 +146,7 @@ such a program is covered only if its contents constitute a work based
 on the Library (independent of the use of the Library in a tool for
 writing it).  Whether that is true depends on what the Library does
 and what the program that uses the Library does.
-
+  
   1. You may copy and distribute verbatim copies of the Library's
 complete source code as you receive it, in any medium, provided that
 you conspicuously and appropriately publish on each copy an
index 05297a0ed2c2c9125b8ed4f1aaef429817cc578e..4dd534059898534fde4154e40990c8b2092a0cd4 100644 (file)
+2007-09-27  TAKAGI Masahiro  <matakagi@gmail.com>
+
+    * docs/ja/designers/language-custom-functions/language-function-html-checkboxes.xml:
+      sync with en.
+
+2007-09-27  Monte Ohrt  <monte@ohrt.com>
+
+    * docs/en/designers/language-custom-functions/language-function-html-checkboxes.xml:
+      remove redundant attribute
+
+2007-09-18  Messju Mohr  <messju@lammfellpuschen.de>
+
+    * docs/id/programmers/plugins/plugins-functions.xml:
+      removed errornous whitespace
+
+2007-09-18  Zaenal Mutaqin  <zaenalm@gmail.com>
+
+    * docs/id/designers/language-basic-syntax/language-escaping.xml
+      docs/id/designers/language-basic-syntax/language-math.xml
+      docs/id/designers/language-basic-syntax/language-syntax-attributes.xml
+      docs/id/designers/language-basic-syntax/language-syntax-comments.xml
+      docs/id/designers/language-basic-syntax/language-syntax-functions.xml
+      docs/id/designers/language-basic-syntax/language-syntax-quotes.xml
+      docs/id/designers/language-basic-syntax/language-syntax-variables.xml
+      docs/id/designers/language-builtin-functions/language-function-capture.xml
+      docs/id/designers/language-builtin-functions/language-function-config-load.xml
+      docs/id/designers/language-builtin-functions/language-function-foreach.xml
+      docs/id/designers/language-builtin-functions/language-function-if.xml
+      docs/id/designers/language-builtin-functions/language-function-include-php.xml
+      docs/id/designers/language-builtin-functions/language-function-include.xml
+      docs/id/designers/language-builtin-functions/language-function-insert.xml
+      docs/id/designers/language-builtin-functions/language-function-ldelim.xml
+      docs/id/designers/language-builtin-functions/language-function-literal.xml
+      docs/id/designers/language-builtin-functions/language-function-php.xml
+      docs/id/designers/language-builtin-functions/language-function-section.xml
+      docs/id/designers/language-builtin-functions/language-function-strip.xml
+      docs/id/designers/language-custom-functions/language-function-assign.xml
+      docs/id/designers/language-custom-functions/language-function-counter.xml
+      docs/id/designers/language-custom-functions/language-function-cycle.xml
+      docs/id/designers/language-custom-functions/language-function-debug.xml
+      docs/id/designers/language-custom-functions/language-function-eval.xml
+      docs/id/designers/language-custom-functions/language-function-fetch.xml
+      docs/id/designers/language-custom-functions/language-function-html-checkboxes.xml
+      docs/id/designers/language-custom-functions/language-function-html-image.xml
+      docs/id/designers/language-custom-functions/language-function-html-options.xml
+      docs/id/designers/language-custom-functions/language-function-html-radios.xml
+      docs/id/designers/language-custom-functions/language-function-html-select-date.xml
+      docs/id/designers/language-custom-functions/language-function-html-select-time.xml
+      docs/id/designers/language-custom-functions/language-function-html-table.xml
+      docs/id/designers/language-custom-functions/language-function-mailto.xml
+      docs/id/designers/language-custom-functions/language-function-math.xml
+      docs/id/designers/language-custom-functions/language-function-popup-init.xml
+      docs/id/designers/language-custom-functions/language-function-popup.xml
+      docs/id/designers/language-custom-functions/language-function-textformat.xml
+      docs/id/designers/language-modifiers/language-modifier-capitalize.xml
+      docs/id/designers/language-modifiers/language-modifier-cat.xml
+      docs/id/designers/language-modifiers/language-modifier-count-characters.xml
+      docs/id/designers/language-modifiers/language-modifier-count-paragraphs.xml
+      docs/id/designers/language-modifiers/language-modifier-count-sentences.xml
+      docs/id/designers/language-modifiers/language-modifier-count-words.xml
+      docs/id/designers/language-modifiers/language-modifier-date-format.xml
+      docs/id/designers/language-modifiers/language-modifier-default.xml
+      docs/id/designers/language-modifiers/language-modifier-escape.xml
+      docs/id/designers/language-modifiers/language-modifier-indent.xml
+      docs/id/designers/language-modifiers/language-modifier-lower.xml
+      docs/id/designers/language-modifiers/language-modifier-nl2br.xml
+      docs/id/designers/language-modifiers/language-modifier-regex-replace.xml
+      docs/id/designers/language-modifiers/language-modifier-replace.xml
+      docs/id/designers/language-modifiers/language-modifier-spacify.xml
+      docs/id/designers/language-modifiers/language-modifier-string-format.xml
+      docs/id/designers/language-modifiers/language-modifier-strip-tags.xml
+      docs/id/designers/language-modifiers/language-modifier-strip.xml
+      docs/id/designers/language-modifiers/language-modifier-truncate.xml
+      docs/id/designers/language-modifiers/language-modifier-upper.xml
+      docs/id/designers/language-modifiers/language-modifier-wordwrap.xml
+      docs/id/designers/language-variables/language-assigned-variables.xml
+      docs/id/designers/language-variables/language-config-variables.xml
+      docs/id/designers/language-variables/language-variables-smarty.xml
+      docs/id/programmers/advanced-features/advanced-features-objects.xml
+      docs/id/programmers/advanced-features/advanced-features-outputfilters.xml
+      docs/id/programmers/advanced-features/advanced-features-postfilters.xml
+      docs/id/programmers/advanced-features/advanced-features-prefilters.xml
+      docs/id/programmers/advanced-features/section-template-cache-handler-func.xml
+      docs/id/programmers/advanced-features/template-resources.xml
+      docs/id/programmers/api-functions/api-append-by-ref.xml
+      docs/id/programmers/api-functions/api-append.xml
+      docs/id/programmers/api-functions/api-assign-by-ref.xml
+      docs/id/programmers/api-functions/api-assign.xml
+      docs/id/programmers/api-functions/api-clear-all-assign.xml
+      docs/id/programmers/api-functions/api-clear-all-cache.xml
+      docs/id/programmers/api-functions/api-clear-assign.xml
+      docs/id/programmers/api-functions/api-clear-cache.xml
+      docs/id/programmers/api-functions/api-clear-compiled-tpl.xml
+      docs/id/programmers/api-functions/api-clear-config.xml
+      docs/id/programmers/api-functions/api-config-load.xml
+      docs/id/programmers/api-functions/api-display.xml
+      docs/id/programmers/api-functions/api-fetch.xml
+      docs/id/programmers/api-functions/api-get-config-vars.xml
+      docs/id/programmers/api-functions/api-get-registered-object.xml
+      docs/id/programmers/api-functions/api-get-template-vars.xml
+      docs/id/programmers/api-functions/api-is-cached.xml
+      docs/id/programmers/api-functions/api-load-filter.xml
+      docs/id/programmers/api-functions/api-register-block.xml
+      docs/id/programmers/api-functions/api-register-compiler-function.xml
+      docs/id/programmers/api-functions/api-register-function.xml
+      docs/id/programmers/api-functions/api-register-modifier.xml
+      docs/id/programmers/api-functions/api-register-object.xml
+      docs/id/programmers/api-functions/api-register-outputfilter.xml
+      docs/id/programmers/api-functions/api-register-postfilter.xml
+      docs/id/programmers/api-functions/api-register-prefilter.xml
+      docs/id/programmers/api-functions/api-register-resource.xml
+      docs/id/programmers/api-functions/api-template-exists.xml
+      docs/id/programmers/api-functions/api-trigger-error.xml
+      docs/id/programmers/api-functions/api-unregister-block.xml
+      docs/id/programmers/api-functions/api-unregister-compiler-function.xml
+      docs/id/programmers/api-functions/api-unregister-function.xml
+      docs/id/programmers/api-functions/api-unregister-modifier.xml
+      docs/id/programmers/api-functions/api-unregister-object.xml
+      docs/id/programmers/api-functions/api-unregister-outputfilter.xml
+      docs/id/programmers/api-functions/api-unregister-postfilter.xml
+      docs/id/programmers/api-functions/api-unregister-prefilter.xml
+      docs/id/programmers/api-functions/api-unregister-resource.xml
+      docs/id/programmers/api-variables/variable-autoload-filters.xml
+      docs/id/programmers/api-variables/variable-cache-dir.xml
+      docs/id/programmers/api-variables/variable-cache-handler-func.xml
+      docs/id/programmers/api-variables/variable-cache-lifetime.xml
+      docs/id/programmers/api-variables/variable-cache-modified-check.xml
+      docs/id/programmers/api-variables/variable-caching.xml
+      docs/id/programmers/api-variables/variable-compile-check.xml
+      docs/id/programmers/api-variables/variable-compile-dir.xml
+      docs/id/programmers/api-variables/variable-compile-id.xml
+      docs/id/programmers/api-variables/variable-compiler-class.xml
+      docs/id/programmers/api-variables/variable-config-booleanize.xml
+      docs/id/programmers/api-variables/variable-config-dir.xml
+      docs/id/programmers/api-variables/variable-config-fix-newlines.xml
+      docs/id/programmers/api-variables/variable-config-overwrite.xml
+      docs/id/programmers/api-variables/variable-config-read-hidden.xml
+      docs/id/programmers/api-variables/variable-debug-tpl.xml
+      docs/id/programmers/api-variables/variable-debugging-ctrl.xml
+      docs/id/programmers/api-variables/variable-debugging.xml
+      docs/id/programmers/api-variables/variable-default-modifiers.xml
+      docs/id/programmers/api-variables/variable-default-resource-type.xml
+      docs/id/programmers/api-variables/variable-default-template-handler-func.xml
+      docs/id/programmers/api-variables/variable-error-reporting.xml
+      docs/id/programmers/api-variables/variable-force-compile.xml
+      docs/id/programmers/api-variables/variable-left-delimiter.xml
+      docs/id/programmers/api-variables/variable-php-handling.xml
+      docs/id/programmers/api-variables/variable-plugins-dir.xml
+      docs/id/programmers/api-variables/variable-request-use-auto-globals.xml
+      docs/id/programmers/api-variables/variable-request-vars-order.xml
+      docs/id/programmers/api-variables/variable-right-delimiter.xml
+      docs/id/programmers/api-variables/variable-secure-dir.xml
+      docs/id/programmers/api-variables/variable-security-settings.xml
+      docs/id/programmers/api-variables/variable-security.xml
+      docs/id/programmers/api-variables/variable-template-dir.xml
+      docs/id/programmers/api-variables/variable-trusted-dir.xml
+      docs/id/programmers/api-variables/variable-use-sub-dirs.xml
+      docs/id/programmers/caching/caching-cacheable.xml
+      docs/id/programmers/caching/caching-groups.xml
+      docs/id/programmers/caching/caching-multiple-caches.xml
+      docs/id/programmers/caching/caching-setting-up.xml
+      docs/id/programmers/plugins/plugins-block-functions.xml
+      docs/id/programmers/plugins/plugins-compiler-functions.xml
+      docs/id/programmers/plugins/plugins-functions.xml
+      docs/id/programmers/plugins/plugins-howto.xml
+      docs/id/programmers/plugins/plugins-inserts.xml
+      docs/id/programmers/plugins/plugins-modifiers.xml
+      docs/id/programmers/plugins/plugins-naming-conventions.xml
+      docs/id/programmers/plugins/plugins-outputfilters.xml
+      docs/id/programmers/plugins/plugins-prefilters-postfilters.xml
+      docs/id/programmers/plugins/plugins-resources.xml
+      docs/id/programmers/plugins/plugins-writing.xml:
+      Typos correction and all translated now.
+
+2007-09-17  Messju Mohr  <messju@lammfellpuschen.de>
+
+    * docs/id/bookinfo.xml
+      docs/id/getting-started.xml
+      docs/id/language-defs.ent
+      docs/id/language-snippets.ent
+      docs/id/livedocs.ent
+      docs/id/preface.xml:
+      added indonesian docs - thanks Zaenal Mutaqin
+
+    * docs/scripts/generate_web.php:
+      raise pcre.backtrack_limit - thanks to takagi
+
+2007-09-16  Monte Ohrt  <monte@ohrt.com>
+
+    * libs/Smarty_Compiler.class.php:
+      fix typo
+
+2007-08-22  George Miroshnikov  <support@infinity.com.ua>
+
+    * docs/ru/getting-started.xml
+      docs/ru/getting-started.xml:
+      Sync with EN.
+
+2007-08-01  Monte Ohrt  <monte@ohrt.com>
+
+    * NEWS
+      libs/Smarty_Compiler.class.php:
+      add append feature to capture
+
+2007-06-24  TAKAGI Masahiro  <matakagi@osk2.3web.ne.jp>
+
+    * docs/ja/getting-started.xml:
+      sync with en.
+
+2007-06-24  Messju Mohr  <messju@lammfellpuschen.de>
+
+    * docs/Makefile.in:
+      reverted accidently modified file
+
+    * docs/Makefile.in
+      docs/de/getting-started.xml:
+      sync with en
+
+    * docs/en/getting-started.xml:
+      fixed link to ini_set(). thanks to Lee Yunyoung.
+
+2007-06-18  TAKAGI Masahiro  <matakagi@osk2.3web.ne.jp>
+
+    * docs/ja/language-snippets.ent
+      docs/ja/programmers/api-functions/api-register-outputfilter.xml
+      docs/ja/programmers/api-functions/api-register-postfilter.xml
+      docs/ja/programmers/api-functions/api-register-prefilter.xml:
+      sync with en.
+
+2007-06-18  Danilo Buerger  <danilo@blizzz.org>
+
+    * docs/en/language-snippets.ent
+      docs/en/programmers/api-functions/api-register-outputfilter.xml
+      docs/en/programmers/api-functions/api-register-postfilter.xml
+      docs/en/programmers/api-functions/api-register-prefilter.xml:
+      Updated docs according to the changes from the previous commit
+
+    * NEWS
+      libs/Smarty.class.php:
+      Added the ability to (un)register multiple filters of the same type with
+      the same method name but different class name. Before it was not possible
+      due to the fact that only the method name was used to distinguish between
+      different filters of the same type. This does however not allow (same as
+      before) to register multiple filters of the same type with the same method
+      and class name (i.e. different instances of the same class).
+
+2007-05-29  Messju Mohr  <messju@lammfellpuschen.de>
+
+    * libs/plugins/compiler.assign.php:
+      fixed typo
+
+2007-05-11  Messju Mohr  <messju@lammfellpuschen.de>
+
+    * NEWS
+      libs/Smarty_Compiler.class.php:
+      fixed calling registered objects' methods with an empty argument list.
+      thanks marcello
+
+2007-05-03  TAKAGI Masahiro  <matakagi@osk2.3web.ne.jp>
+
+    * docs/ja/designers/language-variables.xml
+      docs/ja/designers/language-builtin-functions/language-function-config-load.xml
+      docs/ja/designers/language-builtin-functions/language-function-foreach.xml
+      docs/ja/designers/language-builtin-functions/language-function-if.xml
+      docs/ja/designers/language-modifiers/language-modifier-cat.xml
+      docs/ja/designers/language-modifiers/language-modifier-wordwrap.xml
+      docs/ja/designers/language-variables/language-variables-smarty.xml:
+      sync with en.
+
+2007-05-03  Monte Ohrt  <monte@ohrt.com>
+
+    * docs/en/designers/language-variables.xml
+      docs/en/designers/language-builtin-functions/language-function-config-load.xml
+      docs/en/designers/language-builtin-functions/language-function-foreach.xml
+      docs/en/designers/language-builtin-functions/language-function-if.xml
+      docs/en/designers/language-modifiers/language-modifier-cat.xml
+      docs/en/designers/language-modifiers/language-modifier-wordwrap.xml
+      docs/en/designers/language-variables/language-variables-smarty.xml:
+      update documentation corrections from marcello in the forums. Thanks
+      marcello!
+
+2007-04-22  TAKAGI Masahiro  <matakagi@osk2.3web.ne.jp>
+
+    * docs/ja/programmers/advanced-features.xml
+      docs/ja/programmers/api-functions.xml
+      docs/ja/programmers/api-variables.xml:
+      corrected the garbled text.
+
+2007-04-21  TAKAGI Masahiro  <matakagi@osk2.3web.ne.jp>
+
+    * docs/ja/bookinfo.xml
+      docs/ja/getting-started.xml
+      docs/ja/language-defs.ent
+      docs/ja/language-snippets.ent
+      docs/ja/livedocs.ent
+      docs/ja/make_chm_index.html
+      docs/ja/preface.xml
+      docs/ja/translation.xml
+      docs/ja/appendixes/bugs.xml
+      docs/ja/appendixes/resources.xml
+      docs/ja/appendixes/tips.xml
+      docs/ja/appendixes/troubleshooting.xml
+      docs/ja/designers/chapter-debugging-console.xml
+      docs/ja/designers/config-files.xml
+      docs/ja/designers/language-basic-syntax.xml
+      docs/ja/designers/language-builtin-functions.xml
+      docs/ja/designers/language-combining-modifiers.xml
+      docs/ja/designers/language-custom-functions.xml
+      docs/ja/designers/language-modifiers.xml
+      docs/ja/designers/language-variables.xml
+      docs/ja/designers/language-basic-syntax/language-escaping.xml
+      docs/ja/designers/language-basic-syntax/language-math.xml
+      docs/ja/designers/language-basic-syntax/language-syntax-attributes.xml
+      docs/ja/designers/language-basic-syntax/language-syntax-comments.xml
+      docs/ja/designers/language-basic-syntax/language-syntax-functions.xml
+      docs/ja/designers/language-basic-syntax/language-syntax-quotes.xml
+      docs/ja/designers/language-basic-syntax/language-syntax-variables.xml
+      docs/ja/designers/language-builtin-functions/language-function-capture.xml
+      docs/ja/designers/language-builtin-functions/language-function-config-load.xml
+      docs/ja/designers/language-builtin-functions/language-function-foreach.xml
+      docs/ja/designers/language-builtin-functions/language-function-if.xml
+      docs/ja/designers/language-builtin-functions/language-function-include-php.xml
+      docs/ja/designers/language-builtin-functions/language-function-include.xml
+      docs/ja/designers/language-builtin-functions/language-function-insert.xml
+      docs/ja/designers/language-builtin-functions/language-function-ldelim.xml
+      docs/ja/designers/language-builtin-functions/language-function-literal.xml
+      docs/ja/designers/language-builtin-functions/language-function-php.xml
+      docs/ja/designers/language-builtin-functions/language-function-section.xml
+      docs/ja/designers/language-builtin-functions/language-function-strip.xml
+      docs/ja/designers/language-custom-functions/language-function-assign.xml
+      docs/ja/designers/language-custom-functions/language-function-counter.xml
+      docs/ja/designers/language-custom-functions/language-function-cycle.xml
+      docs/ja/designers/language-custom-functions/language-function-debug.xml
+      docs/ja/designers/language-custom-functions/language-function-eval.xml
+      docs/ja/designers/language-custom-functions/language-function-fetch.xml
+      docs/ja/designers/language-custom-functions/language-function-html-checkboxes.xml
+      docs/ja/designers/language-custom-functions/language-function-html-image.xml
+      docs/ja/designers/language-custom-functions/language-function-html-options.xml
+      docs/ja/designers/language-custom-functions/language-function-html-radios.xml
+      docs/ja/designers/language-custom-functions/language-function-html-select-date.xml
+      docs/ja/designers/language-custom-functions/language-function-html-select-time.xml
+      docs/ja/designers/language-custom-functions/language-function-html-table.xml
+      docs/ja/designers/language-custom-functions/language-function-mailto.xml
+      docs/ja/designers/language-custom-functions/language-function-math.xml
+      docs/ja/designers/language-custom-functions/language-function-popup-init.xml
+      docs/ja/designers/language-custom-functions/language-function-popup.xml
+      docs/ja/designers/language-custom-functions/language-function-textformat.xml
+      docs/ja/designers/language-modifiers/language-modifier-capitalize.xml
+      docs/ja/designers/language-modifiers/language-modifier-cat.xml
+      docs/ja/designers/language-modifiers/language-modifier-count-characters.xml
+      docs/ja/designers/language-modifiers/language-modifier-count-paragraphs.xml
+      docs/ja/designers/language-modifiers/language-modifier-count-sentences.xml
+      docs/ja/designers/language-modifiers/language-modifier-count-words.xml
+      docs/ja/designers/language-modifiers/language-modifier-date-format.xml
+      docs/ja/designers/language-modifiers/language-modifier-default.xml
+      docs/ja/designers/language-modifiers/language-modifier-escape.xml
+      docs/ja/designers/language-modifiers/language-modifier-indent.xml
+      docs/ja/designers/language-modifiers/language-modifier-lower.xml
+      docs/ja/designers/language-modifiers/language-modifier-nl2br.xml
+      docs/ja/designers/language-modifiers/language-modifier-regex-replace.xml
+      docs/ja/designers/language-modifiers/language-modifier-replace.xml
+      docs/ja/designers/language-modifiers/language-modifier-spacify.xml
+      docs/ja/designers/language-modifiers/language-modifier-string-format.xml
+      docs/ja/designers/language-modifiers/language-modifier-strip-tags.xml
+      docs/ja/designers/language-modifiers/language-modifier-strip.xml
+      docs/ja/designers/language-modifiers/language-modifier-truncate.xml
+      docs/ja/designers/language-modifiers/language-modifier-upper.xml
+      docs/ja/designers/language-modifiers/language-modifier-wordwrap.xml
+      docs/ja/designers/language-variables/language-assigned-variables.xml
+      docs/ja/designers/language-variables/language-config-variables.xml
+      docs/ja/designers/language-variables/language-variables-smarty.xml
+      docs/ja/programmers/advanced-features.xml
+      docs/ja/programmers/api-functions.xml
+      docs/ja/programmers/api-variables.xml
+      docs/ja/programmers/caching.xml
+      docs/ja/programmers/plugins.xml
+      docs/ja/programmers/smarty-constants.xml
+      docs/ja/programmers/advanced-features/advanced-features-objects.xml
+      docs/ja/programmers/advanced-features/advanced-features-outputfilters.xml
+      docs/ja/programmers/advanced-features/advanced-features-postfilters.xml
+      docs/ja/programmers/advanced-features/advanced-features-prefilters.xml
+      docs/ja/programmers/advanced-features/section-template-cache-handler-func.xml
+      docs/ja/programmers/advanced-features/template-resources.xml
+      docs/ja/programmers/api-functions/api-append-by-ref.xml
+      docs/ja/programmers/api-functions/api-append.xml
+      docs/ja/programmers/api-functions/api-assign-by-ref.xml
+      docs/ja/programmers/api-functions/api-assign.xml
+      docs/ja/programmers/api-functions/api-clear-all-assign.xml
+      docs/ja/programmers/api-functions/api-clear-all-cache.xml
+      docs/ja/programmers/api-functions/api-clear-assign.xml
+      docs/ja/programmers/api-functions/api-clear-cache.xml
+      docs/ja/programmers/api-functions/api-clear-compiled-tpl.xml
+      docs/ja/programmers/api-functions/api-clear-config.xml
+      docs/ja/programmers/api-functions/api-config-load.xml
+      docs/ja/programmers/api-functions/api-display.xml
+      docs/ja/programmers/api-functions/api-fetch.xml
+      docs/ja/programmers/api-functions/api-get-config-vars.xml
+      docs/ja/programmers/api-functions/api-get-registered-object.xml
+      docs/ja/programmers/api-functions/api-get-template-vars.xml
+      docs/ja/programmers/api-functions/api-is-cached.xml
+      docs/ja/programmers/api-functions/api-load-filter.xml
+      docs/ja/programmers/api-functions/api-register-block.xml
+      docs/ja/programmers/api-functions/api-register-compiler-function.xml
+      docs/ja/programmers/api-functions/api-register-function.xml
+      docs/ja/programmers/api-functions/api-register-modifier.xml
+      docs/ja/programmers/api-functions/api-register-object.xml
+      docs/ja/programmers/api-functions/api-register-outputfilter.xml
+      docs/ja/programmers/api-functions/api-register-postfilter.xml
+      docs/ja/programmers/api-functions/api-register-prefilter.xml
+      docs/ja/programmers/api-functions/api-register-resource.xml
+      docs/ja/programmers/api-functions/api-template-exists.xml
+      docs/ja/programmers/api-functions/api-trigger-error.xml
+      docs/ja/programmers/api-functions/api-unregister-block.xml
+      docs/ja/programmers/api-functions/api-unregister-compiler-function.xml
+      docs/ja/programmers/api-functions/api-unregister-function.xml
+      docs/ja/programmers/api-functions/api-unregister-modifier.xml
+      docs/ja/programmers/api-functions/api-unregister-object.xml
+      docs/ja/programmers/api-functions/api-unregister-outputfilter.xml
+      docs/ja/programmers/api-functions/api-unregister-postfilter.xml
+      docs/ja/programmers/api-functions/api-unregister-prefilter.xml
+      docs/ja/programmers/api-functions/api-unregister-resource.xml
+      docs/ja/programmers/api-variables/variable-autoload-filters.xml
+      docs/ja/programmers/api-variables/variable-cache-dir.xml
+      docs/ja/programmers/api-variables/variable-cache-handler-func.xml
+      docs/ja/programmers/api-variables/variable-cache-lifetime.xml
+      docs/ja/programmers/api-variables/variable-cache-modified-check.xml
+      docs/ja/programmers/api-variables/variable-caching.xml
+      docs/ja/programmers/api-variables/variable-compile-check.xml
+      docs/ja/programmers/api-variables/variable-compile-dir.xml
+      docs/ja/programmers/api-variables/variable-compile-id.xml
+      docs/ja/programmers/api-variables/variable-compiler-class.xml
+      docs/ja/programmers/api-variables/variable-config-booleanize.xml
+      docs/ja/programmers/api-variables/variable-config-dir.xml
+      docs/ja/programmers/api-variables/variable-config-fix-newlines.xml
+      docs/ja/programmers/api-variables/variable-config-overwrite.xml
+      docs/ja/programmers/api-variables/variable-config-read-hidden.xml
+      docs/ja/programmers/api-variables/variable-debug-tpl.xml
+      docs/ja/programmers/api-variables/variable-debugging-ctrl.xml
+      docs/ja/programmers/api-variables/variable-debugging.xml
+      docs/ja/programmers/api-variables/variable-default-modifiers.xml
+      docs/ja/programmers/api-variables/variable-default-resource-type.xml
+      docs/ja/programmers/api-variables/variable-default-template-handler-func.xml
+      docs/ja/programmers/api-variables/variable-error-reporting.xml
+      docs/ja/programmers/api-variables/variable-force-compile.xml
+      docs/ja/programmers/api-variables/variable-left-delimiter.xml
+      docs/ja/programmers/api-variables/variable-php-handling.xml
+      docs/ja/programmers/api-variables/variable-plugins-dir.xml
+      docs/ja/programmers/api-variables/variable-request-use-auto-globals.xml
+      docs/ja/programmers/api-variables/variable-request-vars-order.xml
+      docs/ja/programmers/api-variables/variable-right-delimiter.xml
+      docs/ja/programmers/api-variables/variable-secure-dir.xml
+      docs/ja/programmers/api-variables/variable-security-settings.xml
+      docs/ja/programmers/api-variables/variable-security.xml
+      docs/ja/programmers/api-variables/variable-template-dir.xml
+      docs/ja/programmers/api-variables/variable-trusted-dir.xml
+      docs/ja/programmers/api-variables/variable-use-sub-dirs.xml
+      docs/ja/programmers/caching/caching-cacheable.xml
+      docs/ja/programmers/caching/caching-groups.xml
+      docs/ja/programmers/caching/caching-multiple-caches.xml
+      docs/ja/programmers/caching/caching-setting-up.xml
+      docs/ja/programmers/plugins/plugins-block-functions.xml
+      docs/ja/programmers/plugins/plugins-compiler-functions.xml
+      docs/ja/programmers/plugins/plugins-functions.xml
+      docs/ja/programmers/plugins/plugins-howto.xml
+      docs/ja/programmers/plugins/plugins-inserts.xml
+      docs/ja/programmers/plugins/plugins-modifiers.xml
+      docs/ja/programmers/plugins/plugins-naming-conventions.xml
+      docs/ja/programmers/plugins/plugins-outputfilters.xml
+      docs/ja/programmers/plugins/plugins-prefilters-postfilters.xml
+      docs/ja/programmers/plugins/plugins-resources.xml
+      docs/ja/programmers/plugins/plugins-writing.xml:
+      added Japanese translation files.
+
+    * docs/Makefile.in
+      docs/configure.in:
+      added the configuration for Japanese translation.
+
+2007-04-11  Messju Mohr  <messju@lammfellpuschen.de>
+
+    * docs/en/programmers/smarty-constants.xml:
+      fixed typo
+
+2007-04-04  Messju Mohr  <messju@lammfellpuschen.de>
+
+    * docs/ru/getting-started.xml:
+      fixed uri for Zend Accelerator
+
+2007-04-03  Messju Mohr  <messju@lammfellpuschen.de>
+
+    * docs/de/getting-started.xml
+      docs/es/getting-started.xml
+      docs/it/getting-started.xml
+      docs/pt_BR/getting-started.xml:
+      fixed uris for php-accelerator
+
+2007-03-08  Monte Ohrt  <monte@ohrt.com>
+
+    * libs/Config_File.class.php
+      libs/Smarty.class.php
+      libs/Smarty_Compiler.class.php:
+      update version numbers
+
+2007-03-07  Monte Ohrt  <monte@ohrt.com>
+
+    * (Smarty_2_6_18)
+      NEWS:
+      update NEWS file with patch
+
+    * (Smarty_2_6_18)
+      docs/en/designers/language-builtin-functions/language-function-section.xml:
+      note the fact that section loop will accept an integer
+
+2007-03-06  Monte Ohrt  <monte@ohrt.com>
+
+    * NEWS
+      libs/plugins/function.html_select_date.php:
+      fix html_select_date separator when parts are missing (thanks to kayk for
+      the patch)
+
+2007-03-06  Messju Mohr  <messju@lammfellpuschen.de>
+
+    * libs/Config_File.class.php
+      libs/Smarty.class.php
+      libs/Smarty_Compiler.class.php:
+      bumped version number
+
+    * NEWS:
+      added release headline
+
+    * libs/internals/core.write_compiled_include.php:
+      fixed detection of non-cached block when writing compiled includes
+
+2007-03-01  Danilo Buerger  <danilo@blizzz.org>
+
+    * NEWS
+      libs/Smarty_Compiler.class.php:
+      Applied boots clean up patch and removed commented out code.
+      Updated NEWS file
+
+2007-02-27  Danilo Buerger  <danilo@blizzz.org>
+
+    * NEWS
+      docs/en/designers/language-modifiers/language-modifier-date-format.xml
+      libs/internals/core.write_file.php
+      libs/plugins/modifier.date_format.php:
+      Updated smarty_core_write_file() and smarty_modifier_date_format() to speed
+      up Windows detection.
+      Emulated more parameters for Windows in smarty_modifier_date_format() and
+      fixed some old ones.
+      Updated the docs to tell what parameters are emulated on Windows.
+      Updated NEWS file.
+
+    * NEWS:
+      Updated NEWS file to reflect changes commited in the last revision
+
+2007-02-27  Monte Ohrt  <monte@ohrt.com>
+
+    * docs/en/appendixes/troubleshooting.xml:
+      fix typo
+
+2007-02-27  Danilo Buerger  <danilo@blizzz.org>
+
+    * libs/Smarty_Compiler.class.php:
+      Modified _(push|pop)_cacheable_state() to embedd alternate syntax. See this
+      bug report: http://www.phpinsider.com/smarty-forum/viewtopic.php?t=10502
+
+2007-02-26  Peter 'Mash' Morgan  <pm@daffodil.uk.com>
+
+    * docs/en/designers/language-custom-functions/language-function-html-options.xml:
+      Fix incorrect var name
+
+2007-02-23  Monte Ohrt  <monte@ohrt.com>
+
+    * libs/Smarty_Compiler.class.php:
+      escape creating of language=php from interleaving
+
+    * libs/Smarty_Compiler.class.php:
+      add removed line back in
+
+    * libs/Smarty_Compiler.class.php:
+      fix up last patch, remove unnecessary lines
+
+    * libs/Smarty_Compiler.class.php:
+      fix situation when no compiled tags are present
+
+    * libs/Smarty_Compiler.class.php:
+      fix problem with php open tags generated from tag interleaving
+
+2007-02-06  boots  <jayboots@yahoo.com>
+
+    * docs/en/programmers/advanced-features/template-resources.xml:
+      Correct default template handler function example.
+
+2007-01-17  Messju Mohr  <messju@lammfellpuschen.de>
+
+    * NEWS
+      libs/plugins/modifier.truncate.php:
+      fixed handling of $etc in the truncate modifier when $etc is longer
+      than $length.
+      
+      thanks to Sylvinus!
+
+2007-01-10  boots  <jayboots@yahoo.com>
+
+    * NEWS
+      libs/plugins/modifier.date_format.php
+      libs/plugins/modifier.date_format.php:
+      fix handling of %I with mysql timestamps
+      
+      Thanks to Danilo Buerger
+
+    * NEWS
+      libs/internals/core.write_file.php:
+      Better recognize Windows filesystems to reduce warnings
+
+    * NEWS
+      libs/plugins/modifier.date_format.php:
+      Emulate %R in the date_format modifier on Windows
+      
+      Thanks to Danilo Buerger
+
+2006-12-10  Yannick Torres  <yannick.torres@keliglia.com>
+
+    * docs/fr/getting-started.xml:
+      fix build
+
+    * docs/fr/language-snippets.ent
+      docs/fr/designers/language-builtin-functions/language-function-include-php.xml
+      docs/fr/designers/language-modifiers/language-modifier-truncate.xml
+      docs/fr/designers/language-variables/language-variables-smarty.xml:
+      sync with EN
+
+2006-12-02  Peter 'Mash' Morgan  <pm@daffodil.uk.com>
+
+    * docs/en/designers/language-builtin-functions/language-function-include-php.xml:
+      Tidy example, speeling andd add links
+
+    * docs/en/getting-started.xml:
+      Add/correct entities
+
+    * docs/entities/global.ent:
+      Fix entities (strange)
+
+2006-12-01  Monte Ohrt  <monte@ohrt.com>
+
+    * libs/Config_File.class.php
+      libs/Smarty.class.php
+      libs/Smarty_Compiler.class.php:
+      update dev version numbers
+
+2006-12-01  boots  <jayboots@yahoo.com>
+
+    * (Smarty_2_6_16)
+      NEWS:
+      Fixed replacement bug introduced in trimwhitespaces output filter that
+      was introduced in the last release.
+      
+      Thanks to Spuerhund from the forums.
+
+    * (Smarty_2_6_16)
+      libs/plugins/outputfilter.trimwhitespace.php:
+      Fixed replacement bug introduced by last changes.
+      
+      Thanks to Spuerhund from the forums.
+
+2006-11-30  Monte Ohrt  <monte@ohrt.com>
+
+    * NEWS
+      docs/en/designers/language-modifiers/language-modifier-truncate.xml
+      libs/Config_File.class.php
+      libs/Smarty.class.php
+      libs/Smarty_Compiler.class.php:
+      update dev version numbers, fix manual typo
+
+2006-11-22  George Miroshnikov  <support@infinity.com.ua>
+
+    * docs/ru/getting-started.xml
+      docs/ru/language-snippets.ent:
+      sync with EN
+
+    * docs/en/getting-started.xml:
+      replaced hardcoded path separator with PATH_SEPARATOR constant
+
+2006-11-20  boots  <jayboots@yahoo.com>
+
+    * libs/plugins/modifier.debug_print_var.php:
+      fix depth formatting of arrays and objects in modifier debug_print_var
+
+2006-11-10  Messju Mohr  <messju@lammfellpuschen.de>
+
+    * docs/en/designers/language-variables/language-variables-smarty.xml:
+      fixed typo. thanks jonez.
+
+2006-11-08  boots  <jayboots@yahoo.com>
+
+    * NEWS
+      libs/internals/core.write_file.php:
+      change file writing semantics in smarty_core_write_file()
+      
+      This avoids unlink() unless rename() fails or a Windows system is detected
+      
+      see: http://www.phpinsider.com/smarty-forum/viewtopic.php?t=6956
+      
+      Thanks to c960657 from the forums.
+
+2006-11-07  boots  <jayboots@yahoo.com>
+
+    * NEWS
+      libs/debug.tpl:
+      update debug.tpl to xhtml 1.1 compliance, fix javascript escaping in debug
+      output and apply a Smarty based color scheme
+      
+      see: http://www.phpinsider.com/smarty-forum/viewtopic.php?t=7178
+      
+      thanks to cybot from the forums!
+
+    * NEWS
+      libs/plugins/modifier.debug_print_var.php:
+      enhance reporting precision of debug_print_var modifier
+      
+      see: http://www.phpinsider.com/smarty-forum/viewtopic.php?t=9281
+      
+      thanks to cybot from the forums
+
+2006-11-01  boots  <jayboots@yahoo.com>
+
+    * NEWS
+      libs/plugins/function.html_select_date.php:
+      make html_select_date work consistently with 0000-00-00 00:00:00 and
+      0000-00-00 inputs
+      
+      Thanks to cybot from forums
+
+2006-10-16  George Miroshnikov  <support@infinity.com.ua>
+
+    * docs/en/language-snippets.ent:
+      minor typo fix - &$class doesn't make sense.
+
+2006-10-14  Yannick Torres  <yannick.torres@keliglia.com>
+
+    * docs/fr/designers/language-basic-syntax.xml
+      docs/fr/designers/language-builtin-functions.xml
+      docs/fr/designers/language-basic-syntax/language-syntax-attributes.xml
+      docs/fr/designers/language-basic-syntax/language-syntax-comments.xml
+      docs/fr/designers/language-basic-syntax/language-syntax-quotes.xml
+      docs/fr/designers/language-builtin-functions/language-function-capture.xml
+      docs/fr/designers/language-builtin-functions/language-function-php.xml
+      docs/fr/designers/language-builtin-functions/language-function-section.xml
+      docs/fr/designers/language-custom-functions/language-function-popup-init.xml
+      docs/fr/designers/language-modifiers/language-modifier-escape.xml
+      docs/fr/programmers/api-functions/api-display.xml
+      docs/fr/programmers/plugins/plugins-inserts.xml:
+      sync with EN
+
+2006-10-14  Fernando Correa da Conceição  <fernando_conceicao@yahoo.com.br>
+
+    * docs/pt_BR/programmers/api-variables/variable-error-reporting.xml:
+      New Translation
+
+    * docs/pt_BR/designers/language-basic-syntax/language-escaping.xml
+      docs/pt_BR/designers/language-basic-syntax/language-syntax-variables.xml:
+      New Translations
+
+    * docs/pt_BR/translation.xml:
+      Used in revcheck
+
+    * docs/pt_BR/getting-started.xml
+      docs/pt_BR/language-snippets.ent
+      docs/pt_BR/make_chm_index.html
+      docs/pt_BR/preface.xml
+      docs/pt_BR/appendixes/resources.xml
+      docs/pt_BR/appendixes/troubleshooting.xml
+      docs/pt_BR/designers/language-modifiers/language-modifier-capitalize.xml
+      docs/pt_BR/designers/language-modifiers/language-modifier-cat.xml
+      docs/pt_BR/designers/language-modifiers/language-modifier-count-characters.xml
+      docs/pt_BR/designers/language-modifiers/language-modifier-count-paragraphs.xml
+      docs/pt_BR/designers/language-modifiers/language-modifier-count-sentences.xml
+      docs/pt_BR/designers/language-modifiers/language-modifier-count-words.xml
+      docs/pt_BR/designers/language-modifiers/language-modifier-date-format.xml
+      docs/pt_BR/designers/language-modifiers/language-modifier-default.xml
+      docs/pt_BR/designers/language-modifiers/language-modifier-escape.xml
+      docs/pt_BR/designers/language-modifiers/language-modifier-indent.xml
+      docs/pt_BR/designers/language-modifiers/language-modifier-lower.xml
+      docs/pt_BR/designers/language-modifiers/language-modifier-nl2br.xml
+      docs/pt_BR/designers/language-modifiers/language-modifier-regex-replace.xml
+      docs/pt_BR/designers/language-modifiers/language-modifier-replace.xml
+      docs/pt_BR/designers/language-modifiers/language-modifier-spacify.xml
+      docs/pt_BR/designers/language-modifiers/language-modifier-string-format.xml
+      docs/pt_BR/designers/language-modifiers/language-modifier-strip-tags.xml
+      docs/pt_BR/designers/language-modifiers/language-modifier-strip.xml
+      docs/pt_BR/designers/language-modifiers/language-modifier-truncate.xml
+      docs/pt_BR/designers/language-modifiers/language-modifier-upper.xml
+      docs/pt_BR/designers/language-modifiers/language-modifier-wordwrap.xml
+      docs/pt_BR/designers/language-variables/language-assigned-variables.xml
+      docs/pt_BR/designers/language-variables/language-config-variables.xml
+      docs/pt_BR/designers/language-variables/language-variables-smarty.xml
+      docs/pt_BR/programmers/advanced-features.xml
+      docs/pt_BR/programmers/api-functions.xml
+      docs/pt_BR/programmers/api-variables.xml
+      docs/pt_BR/programmers/caching.xml
+      docs/pt_BR/programmers/plugins.xml
+      docs/pt_BR/programmers/smarty-constants.xml
+      docs/pt_BR/programmers/advanced-features/advanced-features-objects.xml
+      docs/pt_BR/programmers/advanced-features/advanced-features-outputfilters.xml
+      docs/pt_BR/programmers/advanced-features/advanced-features-postfilters.xml
+      docs/pt_BR/programmers/advanced-features/advanced-features-prefilters.xml
+      docs/pt_BR/programmers/advanced-features/section-template-cache-handler-func.xml
+      docs/pt_BR/programmers/advanced-features/template-resources.xml
+      docs/pt_BR/programmers/api-functions/api-append-by-ref.xml
+      docs/pt_BR/programmers/api-functions/api-append.xml
+      docs/pt_BR/programmers/api-functions/api-assign-by-ref.xml
+      docs/pt_BR/programmers/api-functions/api-assign.xml
+      docs/pt_BR/programmers/api-functions/api-clear-all-assign.xml
+      docs/pt_BR/programmers/api-functions/api-clear-all-cache.xml
+      docs/pt_BR/programmers/api-functions/api-clear-assign.xml
+      docs/pt_BR/programmers/api-functions/api-clear-cache.xml
+      docs/pt_BR/programmers/api-functions/api-clear-compiled-tpl.xml
+      docs/pt_BR/programmers/api-functions/api-clear-config.xml
+      docs/pt_BR/programmers/api-functions/api-config-load.xml
+      docs/pt_BR/programmers/api-functions/api-display.xml
+      docs/pt_BR/programmers/api-functions/api-fetch.xml
+      docs/pt_BR/programmers/api-functions/api-get-config-vars.xml
+      docs/pt_BR/programmers/api-functions/api-get-registered-object.xml
+      docs/pt_BR/programmers/api-functions/api-get-template-vars.xml
+      docs/pt_BR/programmers/api-functions/api-is-cached.xml
+      docs/pt_BR/programmers/api-functions/api-load-filter.xml
+      docs/pt_BR/programmers/api-functions/api-register-block.xml
+      docs/pt_BR/programmers/api-functions/api-register-compiler-function.xml
+      docs/pt_BR/programmers/api-functions/api-register-function.xml
+      docs/pt_BR/programmers/api-functions/api-register-modifier.xml
+      docs/pt_BR/programmers/api-functions/api-register-object.xml
+      docs/pt_BR/programmers/api-functions/api-register-outputfilter.xml
+      docs/pt_BR/programmers/api-functions/api-register-postfilter.xml
+      docs/pt_BR/programmers/api-functions/api-register-prefilter.xml
+      docs/pt_BR/programmers/api-functions/api-register-resource.xml
+      docs/pt_BR/programmers/api-functions/api-template-exists.xml
+      docs/pt_BR/programmers/api-functions/api-trigger-error.xml
+      docs/pt_BR/programmers/api-functions/api-unregister-block.xml
+      docs/pt_BR/programmers/api-functions/api-unregister-compiler-function.xml
+      docs/pt_BR/programmers/api-functions/api-unregister-function.xml
+      docs/pt_BR/programmers/api-functions/api-unregister-modifier.xml
+      docs/pt_BR/programmers/api-functions/api-unregister-object.xml
+      docs/pt_BR/programmers/api-functions/api-unregister-outputfilter.xml
+      docs/pt_BR/programmers/api-functions/api-unregister-postfilter.xml
+      docs/pt_BR/programmers/api-functions/api-unregister-prefilter.xml
+      docs/pt_BR/programmers/api-functions/api-unregister-resource.xml
+      docs/pt_BR/programmers/api-variables/variable-autoload-filters.xml
+      docs/pt_BR/programmers/api-variables/variable-cache-dir.xml
+      docs/pt_BR/programmers/api-variables/variable-cache-handler-func.xml
+      docs/pt_BR/programmers/api-variables/variable-cache-lifetime.xml
+      docs/pt_BR/programmers/api-variables/variable-cache-modified-check.xml
+      docs/pt_BR/programmers/api-variables/variable-caching.xml
+      docs/pt_BR/programmers/api-variables/variable-compile-check.xml
+      docs/pt_BR/programmers/api-variables/variable-compile-dir.xml
+      docs/pt_BR/programmers/api-variables/variable-compile-id.xml
+      docs/pt_BR/programmers/api-variables/variable-compiler-class.xml
+      docs/pt_BR/programmers/api-variables/variable-config-booleanize.xml
+      docs/pt_BR/programmers/api-variables/variable-config-dir.xml
+      docs/pt_BR/programmers/api-variables/variable-config-fix-newlines.xml
+      docs/pt_BR/programmers/api-variables/variable-config-overwrite.xml
+      docs/pt_BR/programmers/api-variables/variable-config-read-hidden.xml
+      docs/pt_BR/programmers/api-variables/variable-debug-tpl.xml
+      docs/pt_BR/programmers/api-variables/variable-debugging-ctrl.xml
+      docs/pt_BR/programmers/api-variables/variable-debugging.xml
+      docs/pt_BR/programmers/api-variables/variable-default-modifiers.xml
+      docs/pt_BR/programmers/api-variables/variable-default-resource-type.xml
+      docs/pt_BR/programmers/api-variables/variable-default-template-handler-func.xml
+      docs/pt_BR/programmers/api-variables/variable-force-compile.xml
+      docs/pt_BR/programmers/api-variables/variable-global-assign.xml
+      docs/pt_BR/programmers/api-variables/variable-left-delimiter.xml
+      docs/pt_BR/programmers/api-variables/variable-php-handling.xml
+      docs/pt_BR/programmers/api-variables/variable-plugins-dir.xml
+      docs/pt_BR/programmers/api-variables/variable-request-use-auto-globals.xml
+      docs/pt_BR/programmers/api-variables/variable-request-vars-order.xml
+      docs/pt_BR/programmers/api-variables/variable-right-delimiter.xml
+      docs/pt_BR/programmers/api-variables/variable-secure-dir.xml
+      docs/pt_BR/programmers/api-variables/variable-security-settings.xml
+      docs/pt_BR/programmers/api-variables/variable-security.xml
+      docs/pt_BR/programmers/api-variables/variable-template-dir.xml
+      docs/pt_BR/programmers/api-variables/variable-trusted-dir.xml
+      docs/pt_BR/programmers/api-variables/variable-undefined.xml
+      docs/pt_BR/programmers/api-variables/variable-use-sub-dirs.xml
+      docs/pt_BR/programmers/caching/caching-cacheable.xml
+      docs/pt_BR/programmers/caching/caching-groups.xml
+      docs/pt_BR/programmers/caching/caching-multiple-caches.xml
+      docs/pt_BR/programmers/caching/caching-setting-up.xml
+      docs/pt_BR/programmers/plugins/plugins-block-functions.xml
+      docs/pt_BR/programmers/plugins/plugins-compiler-functions.xml
+      docs/pt_BR/programmers/plugins/plugins-functions.xml
+      docs/pt_BR/programmers/plugins/plugins-howto.xml
+      docs/pt_BR/programmers/plugins/plugins-inserts.xml
+      docs/pt_BR/programmers/plugins/plugins-modifiers.xml
+      docs/pt_BR/programmers/plugins/plugins-naming-conventions.xml
+      docs/pt_BR/programmers/plugins/plugins-outputfilters.xml
+      docs/pt_BR/programmers/plugins/plugins-prefilters-postfilters.xml
+      docs/pt_BR/programmers/plugins/plugins-resources.xml
+      docs/pt_BR/programmers/plugins/plugins-writing.xml:
+      Big update. Revision tag for all files. Some updates. Now I can update it
+
+2006-10-09  Peter 'Mash' Morgan  <pm@daffodil.uk.com>
+
+    * docs/en/getting-started.xml
+      docs/en/designers/language-basic-syntax.xml
+      docs/en/designers/language-custom-functions/language-function-popup-init.xml
+      docs/en/designers/language-modifiers/language-modifier-escape.xml
+      docs/en/programmers/api-functions/api-display.xml
+      docs/en/programmers/plugins/plugins-inserts.xml:
+      Minor changes and corrections
+
+    * docs/en/designers/language-basic-syntax.xml
+      docs/en/designers/language-builtin-functions.xml
+      docs/en/designers/language-basic-syntax/language-syntax-attributes.xml
+      docs/en/designers/language-basic-syntax/language-syntax-comments.xml
+      docs/en/designers/language-basic-syntax/language-syntax-quotes.xml
+      docs/en/designers/language-modifiers/language-modifier-escape.xml:
+      Minor formatting and error correction
+
+    * docs/en/designers/language-builtin-functions/language-function-capture.xml
+      docs/en/designers/language-builtin-functions/language-function-php.xml
+      docs/en/designers/language-builtin-functions/language-function-section.xml:
+      minor formatting and changes
+
+    * docs/en/getting-started.xml:
+      Tidied up formatting so more readable, tidied up the install to the paths
+      are more clear (ta jj)
+
+2006-10-09  Yannick Torres  <yannick.torres@keliglia.com>
+
+    * docs/fr/designers/language-builtin-functions/language-function-section.xml:
+      sync with EN
+
+2006-10-08  Yannick Torres  <yannick.torres@keliglia.com>
+
+    * docs/fr/designers/language-builtin-functions/language-function-php.xml
+      docs/fr/designers/language-modifiers/language-modifier-escape.xml
+      docs/fr/designers/language-variables/language-variables-smarty.xml
+      docs/fr/programmers/api-variables/variable-request-use-auto-globals.xml:
+      fix build
+
+    * docs/fr/designers/language-builtin-functions/language-function-strip.xml
+      docs/fr/programmers/caching.xml
+      docs/fr/programmers/smarty-constants.xml
+      docs/fr/programmers/api-variables/variable-autoload-filters.xml
+      docs/fr/programmers/api-variables/variable-cache-dir.xml
+      docs/fr/programmers/api-variables/variable-cache-handler-func.xml
+      docs/fr/programmers/api-variables/variable-cache-lifetime.xml
+      docs/fr/programmers/api-variables/variable-cache-modified-check.xml
+      docs/fr/programmers/api-variables/variable-caching.xml
+      docs/fr/programmers/api-variables/variable-compile-check.xml
+      docs/fr/programmers/api-variables/variable-compile-dir.xml
+      docs/fr/programmers/api-variables/variable-compile-id.xml
+      docs/fr/programmers/api-variables/variable-compiler-class.xml
+      docs/fr/programmers/api-variables/variable-config-booleanize.xml
+      docs/fr/programmers/api-variables/variable-config-dir.xml
+      docs/fr/programmers/api-variables/variable-config-fix-newlines.xml
+      docs/fr/programmers/api-variables/variable-config-overwrite.xml
+      docs/fr/programmers/api-variables/variable-config-read-hidden.xml
+      docs/fr/programmers/api-variables/variable-debug-tpl.xml
+      docs/fr/programmers/api-variables/variable-debugging-ctrl.xml
+      docs/fr/programmers/api-variables/variable-debugging.xml
+      docs/fr/programmers/api-variables/variable-default-modifiers.xml
+      docs/fr/programmers/api-variables/variable-default-resource-type.xml
+      docs/fr/programmers/api-variables/variable-default-template-handler-func.xml
+      docs/fr/programmers/api-variables/variable-error-reporting.xml
+      docs/fr/programmers/api-variables/variable-force-compile.xml
+      docs/fr/programmers/api-variables/variable-left-delimiter.xml
+      docs/fr/programmers/api-variables/variable-php-handling.xml
+      docs/fr/programmers/api-variables/variable-plugins-dir.xml
+      docs/fr/programmers/api-variables/variable-request-use-auto-globals.xml
+      docs/fr/programmers/api-variables/variable-request-vars-order.xml
+      docs/fr/programmers/api-variables/variable-right-delimiter.xml
+      docs/fr/programmers/api-variables/variable-secure-dir.xml
+      docs/fr/programmers/api-variables/variable-security-settings.xml
+      docs/fr/programmers/api-variables/variable-security.xml
+      docs/fr/programmers/api-variables/variable-template-dir.xml
+      docs/fr/programmers/api-variables/variable-trusted-dir.xml
+      docs/fr/programmers/api-variables/variable-use-sub-dirs.xml
+      docs/fr/programmers/caching/caching-cacheable.xml
+      docs/fr/programmers/caching/caching-groups.xml
+      docs/fr/programmers/caching/caching-multiple-caches.xml
+      docs/fr/programmers/caching/caching-setting-up.xml
+      docs/fr/programmers/plugins/plugins-block-functions.xml
+      docs/fr/programmers/plugins/plugins-compiler-functions.xml
+      docs/fr/programmers/plugins/plugins-functions.xml
+      docs/fr/programmers/plugins/plugins-inserts.xml
+      docs/fr/programmers/plugins/plugins-modifiers.xml
+      docs/fr/programmers/plugins/plugins-naming-conventions.xml
+      docs/fr/programmers/plugins/plugins-outputfilters.xml
+      docs/fr/programmers/plugins/plugins-prefilters-postfilters.xml
+      docs/fr/programmers/plugins/plugins-resources.xml
+      docs/fr/programmers/plugins/plugins-writing.xml:
+      sync with EN
+
+2006-10-07  Yannick Torres  <yannick.torres@keliglia.com>
+
+    * docs/fr/programmers/advanced-features/advanced-features-objects.xml
+      docs/fr/programmers/advanced-features/advanced-features-outputfilters.xml
+      docs/fr/programmers/advanced-features/advanced-features-postfilters.xml
+      docs/fr/programmers/advanced-features/advanced-features-prefilters.xml
+      docs/fr/programmers/advanced-features/section-template-cache-handler-func.xml
+      docs/fr/programmers/advanced-features/template-resources.xml
+      docs/fr/programmers/api-functions/api-append-by-ref.xml
+      docs/fr/programmers/api-functions/api-append.xml
+      docs/fr/programmers/api-functions/api-assign-by-ref.xml
+      docs/fr/programmers/api-functions/api-assign.xml
+      docs/fr/programmers/api-functions/api-clear-all-assign.xml
+      docs/fr/programmers/api-functions/api-clear-all-cache.xml
+      docs/fr/programmers/api-functions/api-clear-assign.xml
+      docs/fr/programmers/api-functions/api-clear-cache.xml
+      docs/fr/programmers/api-functions/api-clear-compiled-tpl.xml
+      docs/fr/programmers/api-functions/api-clear-config.xml
+      docs/fr/programmers/api-functions/api-config-load.xml
+      docs/fr/programmers/api-functions/api-display.xml
+      docs/fr/programmers/api-functions/api-fetch.xml
+      docs/fr/programmers/api-functions/api-get-config-vars.xml
+      docs/fr/programmers/api-functions/api-get-registered-object.xml
+      docs/fr/programmers/api-functions/api-get-template-vars.xml
+      docs/fr/programmers/api-functions/api-is-cached.xml
+      docs/fr/programmers/api-functions/api-load-filter.xml
+      docs/fr/programmers/api-functions/api-register-block.xml
+      docs/fr/programmers/api-functions/api-register-compiler-function.xml
+      docs/fr/programmers/api-functions/api-register-function.xml
+      docs/fr/programmers/api-functions/api-register-modifier.xml
+      docs/fr/programmers/api-functions/api-register-object.xml
+      docs/fr/programmers/api-functions/api-register-outputfilter.xml
+      docs/fr/programmers/api-functions/api-register-postfilter.xml
+      docs/fr/programmers/api-functions/api-register-prefilter.xml
+      docs/fr/programmers/api-functions/api-register-resource.xml
+      docs/fr/programmers/api-functions/api-template-exists.xml
+      docs/fr/programmers/api-functions/api-trigger-error.xml
+      docs/fr/programmers/api-functions/api-unregister-block.xml
+      docs/fr/programmers/api-functions/api-unregister-compiler-function.xml
+      docs/fr/programmers/api-functions/api-unregister-function.xml
+      docs/fr/programmers/api-functions/api-unregister-modifier.xml
+      docs/fr/programmers/api-functions/api-unregister-object.xml
+      docs/fr/programmers/api-functions/api-unregister-outputfilter.xml
+      docs/fr/programmers/api-functions/api-unregister-postfilter.xml
+      docs/fr/programmers/api-functions/api-unregister-prefilter.xml
+      docs/fr/programmers/api-functions/api-unregister-resource.xml:
+      sync with EN
+
+2006-10-03  Yannick Torres  <yannick.torres@keliglia.com>
+
+    * docs/fr/designers/language-custom-functions/language-function-html-select-time.xml
+      docs/fr/designers/language-custom-functions/language-function-html-table.xml
+      docs/fr/designers/language-custom-functions/language-function-mailto.xml
+      docs/fr/designers/language-custom-functions/language-function-math.xml
+      docs/fr/designers/language-custom-functions/language-function-popup-init.xml
+      docs/fr/designers/language-custom-functions/language-function-popup.xml
+      docs/fr/designers/language-custom-functions/language-function-textformat.xml
+      docs/fr/designers/language-modifiers/language-modifier-capitalize.xml
+      docs/fr/designers/language-modifiers/language-modifier-cat.xml
+      docs/fr/designers/language-modifiers/language-modifier-count-characters.xml
+      docs/fr/designers/language-modifiers/language-modifier-count-paragraphs.xml
+      docs/fr/designers/language-modifiers/language-modifier-count-sentences.xml
+      docs/fr/designers/language-modifiers/language-modifier-count-words.xml
+      docs/fr/designers/language-modifiers/language-modifier-date-format.xml
+      docs/fr/designers/language-modifiers/language-modifier-default.xml
+      docs/fr/designers/language-modifiers/language-modifier-escape.xml
+      docs/fr/designers/language-modifiers/language-modifier-indent.xml
+      docs/fr/designers/language-modifiers/language-modifier-lower.xml
+      docs/fr/designers/language-modifiers/language-modifier-nl2br.xml
+      docs/fr/designers/language-modifiers/language-modifier-regex-replace.xml
+      docs/fr/designers/language-modifiers/language-modifier-replace.xml
+      docs/fr/designers/language-modifiers/language-modifier-spacify.xml
+      docs/fr/designers/language-modifiers/language-modifier-string-format.xml
+      docs/fr/designers/language-modifiers/language-modifier-strip-tags.xml
+      docs/fr/designers/language-modifiers/language-modifier-strip.xml
+      docs/fr/designers/language-modifiers/language-modifier-truncate.xml
+      docs/fr/designers/language-modifiers/language-modifier-upper.xml
+      docs/fr/designers/language-modifiers/language-modifier-wordwrap.xml
+      docs/fr/designers/language-variables/language-assigned-variables.xml
+      docs/fr/designers/language-variables/language-config-variables.xml
+      docs/fr/designers/language-variables/language-variables-smarty.xml:
+      sync with EN
+
+2006-10-01  Yannick Torres  <yannick.torres@keliglia.com>
+
+    * docs/fr/designers/language-builtin-functions/language-function-include-php.xml
+      docs/fr/designers/language-builtin-functions/language-function-include.xml
+      docs/fr/designers/language-builtin-functions/language-function-insert.xml
+      docs/fr/designers/language-builtin-functions/language-function-ldelim.xml
+      docs/fr/designers/language-builtin-functions/language-function-literal.xml
+      docs/fr/designers/language-builtin-functions/language-function-php.xml
+      docs/fr/designers/language-custom-functions/language-function-assign.xml
+      docs/fr/designers/language-custom-functions/language-function-counter.xml
+      docs/fr/designers/language-custom-functions/language-function-cycle.xml
+      docs/fr/designers/language-custom-functions/language-function-debug.xml
+      docs/fr/designers/language-custom-functions/language-function-eval.xml
+      docs/fr/designers/language-custom-functions/language-function-fetch.xml
+      docs/fr/designers/language-custom-functions/language-function-html-checkboxes.xml
+      docs/fr/designers/language-custom-functions/language-function-html-image.xml
+      docs/fr/designers/language-custom-functions/language-function-html-options.xml
+      docs/fr/designers/language-custom-functions/language-function-html-radios.xml
+      docs/fr/designers/language-custom-functions/language-function-html-select-date.xml:
+      sync with EN
+
+2006-09-30  Yannick Torres  <yannick.torres@keliglia.com>
+
+    * docs/fr/getting-started.xml:
+      fix build
+
+    * docs/fr/designers/chapter-debugging-console.xml
+      docs/fr/designers/config-files.xml
+      docs/fr/designers/language-builtin-functions.xml
+      docs/fr/designers/language-modifiers.xml
+      docs/fr/designers/language-variables.xml
+      docs/fr/designers/language-basic-syntax/language-escaping.xml
+      docs/fr/designers/language-basic-syntax/language-math.xml
+      docs/fr/designers/language-basic-syntax/language-syntax-comments.xml
+      docs/fr/designers/language-basic-syntax/language-syntax-functions.xml
+      docs/fr/designers/language-basic-syntax/language-syntax-quotes.xml
+      docs/fr/designers/language-basic-syntax/language-syntax-variables.xml
+      docs/fr/designers/language-builtin-functions/language-function-capture.xml
+      docs/fr/designers/language-builtin-functions/language-function-config-load.xml
+      docs/fr/designers/language-builtin-functions/language-function-foreach.xml
+      docs/fr/designers/language-builtin-functions/language-function-if.xml:
+      sync with EN
+
+    * docs/fr/getting-started.xml
+      docs/fr/language-snippets.ent
+      docs/fr/appendixes/resources.xml
+      docs/fr/appendixes/tips.xml
+      docs/fr/appendixes/troubleshooting.xml:
+      sync with EN
+
+2006-09-27  Peter 'Mash' Morgan  <pm@daffodil.uk.com>
+
+    * docs/en/designers/language-builtin-functions/language-function-section.xml:
+      Minor tweaks and corrections
+
+    * docs/en/getting-started.xml
+      docs/en/designers/chapter-debugging-console.xml
+      docs/en/designers/language-basic-syntax/language-syntax-comments.xml
+      docs/en/designers/language-custom-functions/language-function-html-image.xml
+      docs/en/designers/language-custom-functions/language-function-html-options.xml
+      docs/en/designers/language-custom-functions/language-function-html-radios.xml
+      docs/en/designers/language-custom-functions/language-function-html-select-date.xml
+      docs/en/designers/language-custom-functions/language-function-html-select-time.xml
+      docs/en/designers/language-custom-functions/language-function-html-table.xml
+      docs/en/designers/language-custom-functions/language-function-mailto.xml
+      docs/en/designers/language-custom-functions/language-function-popup-init.xml
+      docs/en/designers/language-custom-functions/language-function-textformat.xml
+      docs/en/designers/language-variables/language-config-variables.xml
+      docs/en/designers/language-variables/language-variables-smarty.xml:
+      Add literal tags to html, general formatting
+
+    * docs/en/getting-started.xml
+      docs/en/appendixes/resources.xml
+      docs/en/appendixes/tips.xml
+      docs/en/appendixes/troubleshooting.xml
+      docs/en/designers/config-files.xml
+      docs/en/programmers/caching.xml
+      docs/en/programmers/smarty-constants.xml
+      docs/en/programmers/advanced-features/advanced-features-objects.xml
+      docs/en/programmers/advanced-features/advanced-features-outputfilters.xml
+      docs/en/programmers/advanced-features/advanced-features-postfilters.xml
+      docs/en/programmers/advanced-features/advanced-features-prefilters.xml
+      docs/en/programmers/advanced-features/section-template-cache-handler-func.xml
+      docs/en/programmers/advanced-features/template-resources.xml
+      docs/en/programmers/api-variables/variable-autoload-filters.xml
+      docs/en/programmers/api-variables/variable-cache-dir.xml
+      docs/en/programmers/api-variables/variable-cache-handler-func.xml
+      docs/en/programmers/api-variables/variable-cache-lifetime.xml
+      docs/en/programmers/api-variables/variable-cache-modified-check.xml
+      docs/en/programmers/api-variables/variable-caching.xml
+      docs/en/programmers/api-variables/variable-compile-check.xml
+      docs/en/programmers/api-variables/variable-compile-dir.xml
+      docs/en/programmers/api-variables/variable-compile-id.xml
+      docs/en/programmers/api-variables/variable-config-booleanize.xml
+      docs/en/programmers/api-variables/variable-config-dir.xml
+      docs/en/programmers/api-variables/variable-config-fix-newlines.xml
+      docs/en/programmers/api-variables/variable-config-overwrite.xml
+      docs/en/programmers/api-variables/variable-config-read-hidden.xml
+      docs/en/programmers/api-variables/variable-debug-tpl.xml
+      docs/en/programmers/api-variables/variable-debugging-ctrl.xml
+      docs/en/programmers/api-variables/variable-debugging.xml
+      docs/en/programmers/api-variables/variable-default-modifiers.xml
+      docs/en/programmers/api-variables/variable-default-resource-type.xml
+      docs/en/programmers/api-variables/variable-error-reporting.xml
+      docs/en/programmers/api-variables/variable-force-compile.xml
+      docs/en/programmers/api-variables/variable-left-delimiter.xml
+      docs/en/programmers/api-variables/variable-php-handling.xml
+      docs/en/programmers/api-variables/variable-plugins-dir.xml
+      docs/en/programmers/api-variables/variable-request-use-auto-globals.xml
+      docs/en/programmers/api-variables/variable-request-vars-order.xml
+      docs/en/programmers/api-variables/variable-right-delimiter.xml
+      docs/en/programmers/api-variables/variable-secure-dir.xml
+      docs/en/programmers/api-variables/variable-security-settings.xml
+      docs/en/programmers/api-variables/variable-security.xml
+      docs/en/programmers/api-variables/variable-template-dir.xml
+      docs/en/programmers/api-variables/variable-trusted-dir.xml
+      docs/en/programmers/api-variables/variable-use-sub-dirs.xml
+      docs/en/programmers/caching/caching-cacheable.xml
+      docs/en/programmers/caching/caching-groups.xml
+      docs/en/programmers/caching/caching-multiple-caches.xml
+      docs/en/programmers/caching/caching-setting-up.xml:
+      Tidy up of formatting
+
+    * docs/entities/global.ent:
+      Adding some more resources
+
+    * docs/en/programmers/plugins/plugins-block-functions.xml
+      docs/en/programmers/plugins/plugins-compiler-functions.xml
+      docs/en/programmers/plugins/plugins-functions.xml
+      docs/en/programmers/plugins/plugins-inserts.xml
+      docs/en/programmers/plugins/plugins-modifiers.xml
+      docs/en/programmers/plugins/plugins-naming-conventions.xml
+      docs/en/programmers/plugins/plugins-outputfilters.xml
+      docs/en/programmers/plugins/plugins-prefilters-postfilters.xml
+      docs/en/programmers/plugins/plugins-resources.xml
+      docs/en/programmers/plugins/plugins-writing.xml:
+      Tidy up some formatting
+
+2006-09-26  Peter 'Mash' Morgan  <pm@daffodil.uk.com>
+
+    * docs/en/programmers/api-functions/api-append-by-ref.xml
+      docs/en/programmers/api-functions/api-append.xml
+      docs/en/programmers/api-functions/api-assign-by-ref.xml
+      docs/en/programmers/api-functions/api-assign.xml
+      docs/en/programmers/api-functions/api-clear-all-assign.xml
+      docs/en/programmers/api-functions/api-clear-all-cache.xml
+      docs/en/programmers/api-functions/api-clear-assign.xml
+      docs/en/programmers/api-functions/api-clear-cache.xml
+      docs/en/programmers/api-functions/api-clear-compiled-tpl.xml
+      docs/en/programmers/api-functions/api-clear-config.xml
+      docs/en/programmers/api-functions/api-config-load.xml
+      docs/en/programmers/api-functions/api-display.xml
+      docs/en/programmers/api-functions/api-fetch.xml
+      docs/en/programmers/api-functions/api-get-config-vars.xml
+      docs/en/programmers/api-functions/api-get-registered-object.xml
+      docs/en/programmers/api-functions/api-get-template-vars.xml
+      docs/en/programmers/api-functions/api-is-cached.xml
+      docs/en/programmers/api-functions/api-load-filter.xml
+      docs/en/programmers/api-functions/api-register-block.xml
+      docs/en/programmers/api-functions/api-register-compiler-function.xml
+      docs/en/programmers/api-functions/api-register-function.xml
+      docs/en/programmers/api-functions/api-register-modifier.xml
+      docs/en/programmers/api-functions/api-register-object.xml
+      docs/en/programmers/api-functions/api-register-outputfilter.xml
+      docs/en/programmers/api-functions/api-register-postfilter.xml
+      docs/en/programmers/api-functions/api-register-prefilter.xml
+      docs/en/programmers/api-functions/api-register-resource.xml
+      docs/en/programmers/api-functions/api-template-exists.xml
+      docs/en/programmers/api-functions/api-trigger-error.xml
+      docs/en/programmers/api-functions/api-unregister-block.xml
+      docs/en/programmers/api-functions/api-unregister-compiler-function.xml
+      docs/en/programmers/api-functions/api-unregister-function.xml
+      docs/en/programmers/api-functions/api-unregister-modifier.xml
+      docs/en/programmers/api-functions/api-unregister-object.xml
+      docs/en/programmers/api-functions/api-unregister-outputfilter.xml
+      docs/en/programmers/api-functions/api-unregister-postfilter.xml
+      docs/en/programmers/api-functions/api-unregister-prefilter.xml
+      docs/en/programmers/api-functions/api-unregister-resource.xml:
+      Tidy up formatting and examples
+
+    * docs/en/language-snippets.ent:
+      Moved recurring para for register_*
+
+    * docs/en/designers/language-modifiers.xml:
+      Spelling on modifiers
+
+    * docs/en/designers/language-builtin-functions.xml
+      docs/en/designers/language-modifiers.xml
+      docs/en/designers/language-custom-functions/language-function-html-options.xml
+      docs/en/designers/language-modifiers/language-modifier-capitalize.xml
+      docs/en/designers/language-modifiers/language-modifier-cat.xml
+      docs/en/designers/language-modifiers/language-modifier-count-characters.xml
+      docs/en/designers/language-modifiers/language-modifier-count-paragraphs.xml
+      docs/en/designers/language-modifiers/language-modifier-count-sentences.xml
+      docs/en/designers/language-modifiers/language-modifier-count-words.xml
+      docs/en/designers/language-modifiers/language-modifier-date-format.xml
+      docs/en/designers/language-modifiers/language-modifier-default.xml
+      docs/en/designers/language-modifiers/language-modifier-escape.xml
+      docs/en/designers/language-modifiers/language-modifier-indent.xml
+      docs/en/designers/language-modifiers/language-modifier-lower.xml
+      docs/en/designers/language-modifiers/language-modifier-nl2br.xml
+      docs/en/designers/language-modifiers/language-modifier-regex-replace.xml
+      docs/en/designers/language-modifiers/language-modifier-replace.xml
+      docs/en/designers/language-modifiers/language-modifier-spacify.xml
+      docs/en/designers/language-modifiers/language-modifier-string-format.xml
+      docs/en/designers/language-modifiers/language-modifier-strip-tags.xml
+      docs/en/designers/language-modifiers/language-modifier-strip.xml
+      docs/en/designers/language-modifiers/language-modifier-truncate.xml
+      docs/en/designers/language-modifiers/language-modifier-upper.xml
+      docs/en/designers/language-modifiers/language-modifier-wordwrap.xml:
+      Tidying up some markup
+
+    * docs/en/designers/language-variables.xml:
+      typo
+
+    * docs/en/designers/language-variables.xml
+      docs/en/designers/language-variables/language-assigned-variables.xml
+      docs/en/designers/language-variables/language-config-variables.xml
+      docs/en/designers/language-variables/language-variables-smarty.xml:
+      Tidy up formatting on variables
+
+    * docs/en/designers/language-basic-syntax/language-escaping.xml
+      docs/en/designers/language-basic-syntax/language-math.xml
+      docs/en/designers/language-basic-syntax/language-syntax-comments.xml
+      docs/en/designers/language-basic-syntax/language-syntax-functions.xml
+      docs/en/designers/language-basic-syntax/language-syntax-quotes.xml
+      docs/en/designers/language-basic-syntax/language-syntax-variables.xml:
+      Formatting of the basic-syntax dir
+
+    * docs/en/designers/language-custom-functions/language-function-assign.xml
+      docs/en/designers/language-custom-functions/language-function-counter.xml
+      docs/en/designers/language-custom-functions/language-function-cycle.xml
+      docs/en/designers/language-custom-functions/language-function-debug.xml
+      docs/en/designers/language-custom-functions/language-function-eval.xml
+      docs/en/designers/language-custom-functions/language-function-fetch.xml
+      docs/en/designers/language-custom-functions/language-function-html-checkboxes.xml
+      docs/en/designers/language-custom-functions/language-function-html-image.xml
+      docs/en/designers/language-custom-functions/language-function-html-options.xml
+      docs/en/designers/language-custom-functions/language-function-html-radios.xml
+      docs/en/designers/language-custom-functions/language-function-html-select-date.xml
+      docs/en/designers/language-custom-functions/language-function-html-select-time.xml
+      docs/en/designers/language-custom-functions/language-function-html-table.xml
+      docs/en/designers/language-custom-functions/language-function-mailto.xml
+      docs/en/designers/language-custom-functions/language-function-math.xml
+      docs/en/designers/language-custom-functions/language-function-popup-init.xml
+      docs/en/designers/language-custom-functions/language-function-popup.xml
+      docs/en/designers/language-custom-functions/language-function-textformat.xml:
+      More formatting and cleaning up examples
+
+2006-09-25  Peter 'Mash' Morgan  <pm@daffodil.uk.com>
+
+    * docs/en/designers/language-builtin-functions/language-function-foreach.xml
+      docs/en/designers/language-builtin-functions/language-function-section.xml:
+      Doh! removing tabs
+
+    * docs/en/designers/language-builtin-functions/language-function-capture.xml
+      docs/en/designers/language-builtin-functions/language-function-config-load.xml
+      docs/en/designers/language-builtin-functions/language-function-foreach.xml
+      docs/en/designers/language-builtin-functions/language-function-if.xml
+      docs/en/designers/language-builtin-functions/language-function-include-php.xml
+      docs/en/designers/language-builtin-functions/language-function-include.xml
+      docs/en/designers/language-builtin-functions/language-function-insert.xml
+      docs/en/designers/language-builtin-functions/language-function-ldelim.xml
+      docs/en/designers/language-builtin-functions/language-function-literal.xml
+      docs/en/designers/language-builtin-functions/language-function-php.xml
+      docs/en/designers/language-builtin-functions/language-function-section.xml
+      docs/en/designers/language-builtin-functions/language-function-strip.xml:
+      A lot of formatting, tagging and tidy up. Some consistency at last
+
+    * docs/en/designers/language-builtin-functions/language-function-section.xml:
+      Major tidy up
+
+    * docs/en/designers/language-builtin-functions/language-function-foreach.xml:
+      Major tidy up, added index property and some examples
+
+2006-09-03  Yannick Torres  <yannick.torres@keliglia.com>
+
+    * docs/fr/designers/language-custom-functions/language-function-popup-init.xml
+      docs/fr/programmers/advanced-features/advanced-features-outputfilters.xml
+      docs/fr/programmers/advanced-features/advanced-features-postfilters.xml
+      docs/fr/programmers/advanced-features/advanced-features-prefilters.xml:
+      sync with EN
+
+2006-09-01  George Miroshnikov  <support@infinity.com.ua>
+
+    * docs/ru/programmers/api-functions/api-append-by-ref.xml
+      docs/ru/programmers/api-functions/api-append.xml
+      docs/ru/programmers/api-functions/api-assign-by-ref.xml
+      docs/ru/programmers/api-functions/api-assign.xml
+      docs/ru/programmers/api-functions/api-clear-all-assign.xml
+      docs/ru/programmers/api-functions/api-clear-all-cache.xml
+      docs/ru/programmers/api-functions/api-clear-assign.xml
+      docs/ru/programmers/api-functions/api-clear-cache.xml
+      docs/ru/programmers/api-functions/api-clear-compiled-tpl.xml
+      docs/ru/programmers/api-functions/api-clear-config.xml
+      docs/ru/programmers/api-functions/api-config-load.xml
+      docs/ru/programmers/api-functions/api-display.xml:
+      sync with EN
+
+2006-08-25  Messju Mohr  <messju@lammfellpuschen.de>
+
+    * NEWS
+      libs/Smarty_Compiler.class.php:
+      fixed wrong handling of name attribute in {insert}
+      thanks to Ivan Kravets for reporting this
+
+    * libs/Smarty_Compiler.class.php:
+      fixed typo
+
+2006-08-21  George Miroshnikov  <support@infinity.com.ua>
+
+    * docs/ru/designers/language-custom-functions/language-function-popup-init.xml
+      docs/ru/programmers/advanced-features/advanced-features-objects.xml
+      docs/ru/programmers/advanced-features/advanced-features-outputfilters.xml
+      docs/ru/programmers/advanced-features/advanced-features-postfilters.xml
+      docs/ru/programmers/advanced-features/advanced-features-prefilters.xml
+      docs/ru/programmers/advanced-features/section-template-cache-handler-func.xml
+      docs/ru/programmers/advanced-features/template-resources.xml:
+      sync with EN
+
+    * docs/en/programmers/advanced-features/advanced-features-prefilters.xml:
+      another missing dot
+
+    * docs/en/programmers/advanced-features/advanced-features-postfilters.xml:
+      missing dot
+
+    * docs/en/programmers/advanced-features/advanced-features-outputfilters.xml:
+      missing comma
+
+2006-08-19  Peter 'Mash' Morgan  <pmm@daffodil.uk.com>
+
+    * docs/en/designers/language-custom-functions/language-function-popup-init.xml:
+      avoid dupes and added remote paths
+
+2006-08-06  Yannick Torres  <yannick.torres@keliglia.com>
+
+    * docs/fr/designers/language-custom-functions/language-function-html-table.xml
+      docs/fr/designers/language-custom-functions/language-function-mailto.xml:
+      sync with EN
+
+2006-08-03  Messju Mohr  <messju@lammfellpuschen.de>
+
+    * NEWS
+      libs/Smarty_Compiler.class.php:
+      fix false replacement of "$t" inside double quotes
+      thanks to checat for reporting this
+
+2006-07-20  George Miroshnikov  <support@infinity.com.ua>
+
+    * docs/ru/designers/language-custom-functions/language-function-html-table.xml
+      docs/ru/designers/language-custom-functions/language-function-mailto.xml:
+      incrementing EN-Revision
+
+    * docs/ru/designers/language-custom-functions/language-function-assign.xml
+      docs/ru/designers/language-custom-functions/language-function-eval.xml
+      docs/ru/designers/language-custom-functions/language-function-fetch.xml
+      docs/ru/designers/language-custom-functions/language-function-html-checkboxes.xml
+      docs/ru/designers/language-custom-functions/language-function-html-image.xml
+      docs/ru/designers/language-custom-functions/language-function-html-options.xml
+      docs/ru/designers/language-custom-functions/language-function-html-radios.xml
+      docs/ru/designers/language-custom-functions/language-function-html-table.xml
+      docs/ru/designers/language-custom-functions/language-function-mailto.xml
+      docs/ru/designers/language-custom-functions/language-function-popup-init.xml
+      docs/ru/designers/language-custom-functions/language-function-popup.xml
+      docs/ru/designers/language-modifiers/language-modifier-date-format.xml
+      docs/ru/designers/language-modifiers/language-modifier-default.xml
+      docs/ru/designers/language-modifiers/language-modifier-escape.xml
+      docs/ru/designers/language-modifiers/language-modifier-indent.xml
+      docs/ru/designers/language-modifiers/language-modifier-lower.xml
+      docs/ru/designers/language-modifiers/language-modifier-nl2br.xml
+      docs/ru/designers/language-modifiers/language-modifier-strip.xml
+      docs/ru/designers/language-modifiers/language-modifier-truncate.xml
+      docs/ru/designers/language-modifiers/language-modifier-upper.xml
+      docs/ru/designers/language-modifiers/language-modifier-wordwrap.xml
+      docs/ru/designers/language-variables/language-variables-smarty.xml:
+      sync with EN
+
+    * docs/en/designers/language-custom-functions/language-function-mailto.xml:
+      typo
+
+2006-07-10  boots  <jayboots@yahoo.com>
+
+    * libs/plugins/function.html_table.php:
+      fixed email address in comments
+
+    * NEWS
+      libs/plugins/function.html_table.php:
+      html_table: fixed th/tr output, added hdir support for column
+      headings,update docs to reflect new features
+
+2006-07-08  Messju Mohr  <messju@lammfellpuschen.de>
+
+    * libs/plugins/function.html_table.php:
+      fix occasional notices on undefined variables
+
+2006-07-08  boots  <jayboots@yahoo.com>
+
+    * libs/plugins/function.html_table.php:
+      Added ability to specify column headings in {html_table}
+      
+      Added th_attrs attribute which works similary to td_attr and tr_attr but
+      for TH elements. Changes the cols attribute to allow mixed values; a
+      numeric still specifies the number of columns to render but now an array
+      of values can be used to specify TH column values. The number of columns
+      is determine from the size of the array. Further, a comma-separated
+      string of column names can be used which is internally coverted to an
+      array and used as if it was specified as a normal array.
+      
+      Thanks for lynlyn for the feature request.
+
+2006-06-23  boots  <jayboots@yahoo.com>
+
+    * libs/plugins/outputfilter.trimwhitespace.php:
+      fix comments in outputfilter.trimwhitespace
+
+    * NEWS
+      libs/plugins/outputfilter.trimwhitespace.php:
+      fixed ordering of replacements in trimwhitespace output filter
+      
+      Thanks to Getty from IRC for reporting this.
+
+2006-06-20  boots  <jayboots@yahoo.com>
+
+    * NEWS
+      libs/plugins/function.mailto.php:
+      update mailto function plugin to work around a firefox/thunderbird escaping
+      bug
+      
+      Thanks to elijahlofgren from the forums for reporting this and providing
+      the necessary patch
+
+    * NEWS
+      libs/plugins/modifier.date_format.php:
+      emulate %l in the date_format modifier on windows
+      
+      thanks to Gibberish from the forums for reporting this
+
+2006-06-14  boots  <jayboots@yahoo.com>
+
+    * NEWS
+      libs/plugins/modifier.capitalize.php:
+      Fix handling of apostrophes in the capitalize modifier.
+      
+      Thanks to asmecher from the forums for reporting this and providing a
+      partial solution.
+
+2006-05-28  Monte Ohrt  <monte@ohrt.com>
+
+    * NEWS
+      libs/Config_File.class.php
+      libs/Smarty.class.php
+      libs/Smarty_Compiler.class.php:
+      update version numbers
+
+2006-05-25  boots  <jayboots@yahoo.com>
+
+    * NEWS
+      libs/Smarty_Compiler.class.php:
+      un-hide hidden xml open tags
+
+2006-05-09  boots  <jayboots@yahoo.com>
+
+    * NEWS
+      libs/Smarty_Compiler.class.php:
+      separate handling of comment blocks from "special blocks"
+
+    * NEWS
+      libs/plugins/function.popup_init.php:
+      reverted {popup_init} as proposed change to insertion behviour was not BC
+
+2006-05-04  boots  <jayboots@yahoo.com>
+
+    * NEWS
+      libs/plugins/function.popup_init.php:
+      changed {popup_init} to only emit code once during a request
+      
+      Thanks to TGKnIght from forums
+
+2006-04-22  Messju Mohr  <messju@lammfellpuschen.de>
+
+    * NEWS
+      libs/Smarty_Compiler.class.php:
+      fix handling of block-methods of registered objects
+      thanks to El Hombre Gris
+
+2006-04-04  Monte Ohrt  <monte@ohrt.com>
+
+    * libs/plugins/function.html_select_date.php:
+      fix typo
+
+2006-03-09  Monte Ohrt  <monte@ohrt.com>
+
+    * (Smarty_2_6_13)
+      NEWS:
+      update for release
+
+2006-03-08  Monte Ohrt  <monte@ohrt.com>
+
+    * libs/plugins/modifier.regex_replace.php:
+      remove delim quote
+
+    * libs/plugins/modifier.regex_replace.php:
+      fix delimiter issue
+
+2006-03-03  Monte Ohrt  <monte@ohrt.com>
+
+    * libs/plugins/modifier.regex_replace.php:
+      use preg_replace to cover any space chars
+
+    * libs/plugins/modifier.regex_replace.php:
+      fix problem with allowing "e" modifier
+
+2006-01-29  Messju Mohr  <messju@lammfellpuschen.de>
+
+    * libs/Smarty_Compiler.class.php:
+      removed possiblity for E_NOTICE on an undefined variable in
+      Smarty_Compiler::_compile_if_tag() - thanks to sbeh
+
+2006-01-18  Monte Ohrt  <monte@ohrt.com>
+
+    * libs/Config_File.class.php
+      libs/Smarty.class.php
+      libs/Smarty_Compiler.class.php:
+      update version numbers
+
+    * (Smarty_2_6_12)
+      NEWS:
+      commit 2.6.12 release
+
+2006-01-15  Messju Mohr  <messju@lammfellpuschen.de>
+
+    * NEWS
+      libs/Smarty_Compiler.class.php:
+      fixed use of references $cache_attrs and $repeat in Smarty_Compiler.
+      
+      php does not allow to pass an assigned by reference to a function. since
+      php-5.1.2
+      the reference to the lval gets lost when passing an assignment.
+
+2005-12-31  Messju Mohr  <messju@lammfellpuschen.de>
+
+    * NEWS
+      libs/Smarty.class.php:
+      fixed incompatible use of fread() in Smarty::_read_file()
+      it choke on php-5.1.1 and later.
+      thanks to andig for pointing this out.
+
+2005-12-21  boots  <jayboots@yahoo.com>
+
+    * NEWS
+      libs/Smarty_Compiler.class.php:
+      Fix improper tokenization of certain inline math expressions.
+      
+      Thanks to gerard at forums for reporting this.
+
+2005-12-19  Messju Mohr  <messju@lammfellpuschen.de>
+
+    * libs/plugins/function.math.php:
+      fixed problem with math in certain LC_NUMERIC locales.
+      thanks to wiebren for providing problem+solution.
+
+2005-12-14  Messju Mohr  <messju@lammfellpuschen.de>
+
+    * NEWS:
+      fixed iso-latin1 special chars
+
+2005-12-14  Monte Ohrt  <monte@ohrt.com>
+
+    * libs/Config_File.class.php
+      libs/Smarty.class.php
+      libs/Smarty_Compiler.class.php:
+      update version numbers
+
+    * (Smarty_2_6_11)
+      NEWS:
+      commit NEWS file for 2.6.11
+
+2005-12-08  Messju Mohr  <messju@lammfellpuschen.de>
+
+    * docs/de/getting-started.xml:
+      sync with en
+
+2005-11-29  Messju Mohr  <messju@lammfellpuschen.de>
+
+    * NEWS
+      libs/Smarty_Compiler.class.php:
+      fixed code generation of non-cacheable blocks to play well with php's
+      "Alternative syntax" used for example in compiled {if}..{else}..{/if}
+      blocks.
+      
+      (see: http://php.net/manual/en/control-structures.alternative-syntax.php
+      on "Alternative syntax")
+      
+      thanks to kihara from the forum.
+
+2005-11-26  Messju Mohr  <messju@lammfellpuschen.de>
+
+    * NEWS:
+      fixed handling of multiple identical calls to {insert}.
+      
+      the function was called multiple times, but all inserts where replaced
+      by the results of the first call to the insert function.
+
+    * libs/plugins/compiler.assign.php
+      libs/plugins/function.config_load.php:
+      added credits
+
+    * libs/plugins/function.popup.php:
+      added "closeclick" from
+      http://www.bosrup.com/web/overlib/?Command_Reference
+
+2005-11-23  boots  <jayboots@yahoo.com>
+
+    * NEWS
+      libs/Config_File.class.php
+      libs/Smarty.class.php
+      libs/Smarty_Compiler.class.php
+      libs/plugins/modifier.escape.php:
+      replace {} string access with equivalent substr() to avoid E_STRICT
+      warnings in PHP 5.1
+
+2005-11-09  boots  <jayboots@yahoo.com>
+
+    * NEWS
+      libs/Smarty.class.php:
+      return valid reference in get_config_vars() when given var is non-existant
+
+2005-10-11  Monte Ohrt  <monte@ohrt.com>
+
+    * libs/plugins/block.textformat.php
+      libs/plugins/compiler.assign.php
+      libs/plugins/function.assign_debug_info.php
+      libs/plugins/function.config_load.php
+      libs/plugins/function.counter.php
+      libs/plugins/function.eval.php
+      libs/plugins/function.fetch.php
+      libs/plugins/function.html_options.php
+      libs/plugins/function.html_select_date.php
+      libs/plugins/function.html_select_time.php
+      libs/plugins/function.math.php
+      libs/plugins/function.popup.php
+      libs/plugins/function.popup_init.php
+      libs/plugins/modifier.capitalize.php
+      libs/plugins/modifier.count_characters.php
+      libs/plugins/modifier.count_paragraphs.php
+      libs/plugins/modifier.count_sentences.php
+      libs/plugins/modifier.count_words.php
+      libs/plugins/modifier.date_format.php
+      libs/plugins/modifier.debug_print_var.php
+      libs/plugins/modifier.default.php
+      libs/plugins/modifier.escape.php
+      libs/plugins/modifier.indent.php
+      libs/plugins/modifier.lower.php
+      libs/plugins/modifier.regex_replace.php
+      libs/plugins/modifier.replace.php
+      libs/plugins/modifier.spacify.php
+      libs/plugins/modifier.string_format.php
+      libs/plugins/modifier.strip_tags.php
+      libs/plugins/modifier.truncate.php
+      libs/plugins/modifier.upper.php
+      libs/plugins/modifier.wordwrap.php
+      libs/plugins/shared.escape_special_chars.php
+      libs/plugins/shared.make_timestamp.php:
+      Added author title to plugins where they don't exist. I put my name where I
+      was the original or co-author. If there needs to be more credit given
+      somewhere, speak up!
+
+2005-10-10  Monte Ohrt  <monte@ohrt.com>
+
+    * NEWS
+      libs/plugins/function.html_image.php:
+      add path_prefix to html_image, fix incorrect secure_dir error when image
+      file is missing
+
+2005-10-04  Monte Ohrt  <monte@ohrt.com>
+
+    * demo/templates/index.tpl:
+      remove popup example, update section var syntax
+
+2005-09-16  Nuno Lopes  <nunoplopes@sapo.pt>
+
+    * docs/de/getting-started.xml:
+      more fixes
+
+    * docs/de/getting-started.xml:
+      fix php bug #34520: broken example display (de only)
+
+2005-08-30  Monte Ohrt  <monte@ohrt.com>
+
+    * libs/plugins/modifier.escape.php:
+      change default charset from utf8 to iso-8859-1
+
+    * NEWS
+      libs/plugins/modifier.escape.php:
+      add char_set param
+
+2005-08-17  Monte Ohrt  <monte@ohrt.com>
+
+    * NEWS:
+      fix notice in debug security check
+
+    * libs/Smarty.class.php:
+      fix typo
+
+    * NEWS
+      libs/Smarty.class.php:
+      return valid reference in get_template_vars() when given var is
+      non-existant
+
+2005-08-12  Monte Ohrt  <monte@ohrt.com>
+
+    * NEWS
+      libs/plugins/modifier.escape.php:
+      add "urlpathinfo" escape type to escape modifier. (apache does not like %2F
+      in the PATH_INFO)
+
+2005-08-05  Monte Ohrt  <monte@ohrt.com>
+
+    * NEWS
+      libs/Config_File.class.php
+      libs/Smarty.class.php
+      libs/Smarty_Compiler.class.php:
+      update version numbers
+
 2005-08-04  Monte Ohrt  <monte@ohrt.com>
 
     * NEWS:
     * libs/Smarty.class.php:
       fixed serialization of values containing newlines (like _cache_attrs)
       in core_write_cache_file()
-
+      
       bumped version to 2.6.6-dev-3 to indicate that the fileformat of cache
       has changed
 
     * libs/Smarty_Compiler.class.php:
       reduced the code that is generated on a {foreach}-block that has a
       name.
-
+      
       instead of pre-computing all foreach-properties (like first, last,
       show) on each iteration, they are computed on demand as soon as
       {$smarty.foreach.*}-variables are used.
     * NEWS
       libs/Smarty_Compiler.class.php:
       slight optimization in the compilation of $smarty.const.FOO .
-
+      
       more complex consts like $smarty.const.$name still compile to
       constant($this->_tpl_vars['name'])
 
       libs/Smarty_Compiler.class.php:
       make block functions and registered objects' block methods use a
       local variable for block_content instead of $this->_block_content
-
+      
       it's not necessary to have $smarty->_block_content accessible.
 
 2005-01-04  Yannick Torres  <yannick.torres@keliglia.com>
     * libs/plugins/function.html_options.php:
       fixed semantically misleading check for $options (use isset() instead
       of is_array() because it is always an array).
-
+      
       thanks to albert almeida.
 
 2004-11-08  Messju Mohr  <messju@lammfellpuschen.de>
       in the replacement of internal nocache-tags to dynamic content that
       lead to false results with deeply nested includes or with
       nocache-blocks inside nocache-blocks.
-
+      
       many thanks to Lars Jankowfsky for providing big help on reproducing
       and tracking down this bug!
 
       libs/Smarty_Compiler.class.php:
       - better header for compiled includes (more in line with compiled
       templates)
-
+      
       - reuse cache_serials if a file is compiled more than once in one
         process (force_compile)
-
+      
       - don't print nocache-delimiters wenn already inside
       process_cached_inserts()
 
       libs/Smarty_Compiler.class.php:
       moved $this->_num_const_regexp out of $this->_var_regexp and added it
       to the places that affect $this->_var_regexp
-
+      
       this should fix some problems parsing plugin-names endings with digits
 
 2004-09-14  Messju Mohr  <messju@lammfellpuschen.de>
     * NEWS
       libs/core/core.write_file.php:
       tempnam() seems to be borken on many installation.
-
+      
       now we try tempnam first and if that fails we generate our own
       temp-filename with uniqid()
 
       libs/Smarty_Compiler.class.php:
       fixed occasional wrong error messages on mismatched tags when
       {else}, {elseif}, {foreachelse} or {sectionelse} is involved
-
+      
       thanks to Ooypunk for pointing me on this
 
 2004-08-12  Nuno Lopes  <nunoplopes@sapo.pt>
     * NEWS
       libs/Smarty_Compiler.class.php:
       fixed handling of methods arguments.
-
+      
       thanks to Manfred Wischin for finding this one and providing the
       conceptual fix.
 
       libs/plugins/function.html_radios.php:
       there was little flaw in smarty_function_html_radios() and
       smarty_function_html_checkboxes():
-
+      
       the newly introduced assign-attribute was still added to the
       tag-output as an extra-attribute.
-
+      
       fixed.
 
     * NEWS
       libs/plugins/function.html_select_time.php
       libs/plugins/modifier.date_format.php:
       backed out renaming of _get_plugin_filepath() to get_plugin_filepath()
-
+      
       we'll stick to _get_plugin_filepath() and look for a more viable
       solution to be exposed to plugin-writers.
 
     * NEWS
       libs/Smarty.class.php:
       enhanced auto-generated filenames for templates_c and cache
-
+      
       incremented Smarty::_version because the tempfiles' structure changed
       a little
 
       libs/core/core.write_file.php:
       use tempnam() instead of unqid() to create better temporary files in
       smarty_core_write_file().
-
+      
       (thanks to xces for finding this race-condition and his work on
       fixing it)
 
     * NEWS
       libs/core/core.write_compiled_include.php:
       made smarty_core_write_compiled_include() php5-aware
-
+      
       if someone knows a better way than patching the source with the
       tokenizer, please stand up!
 
       libs/Smarty.class.php:
       removed unused functionality to load a subset of lines from a file in
       Smarty::_read_file()
-
+      
       additionally removed a warning that is emitted since php-4.3.5 when
       fread() is called on an empty file (with filesize()==0). thanks to
       Andreas Streichardt who pointed this out.
       unrolled call to the is_compiled()-check to be able to supply the
       correct resource_base_path for config_load. this avoids errors when
       config-files are accessed where security is enabled.
-
+      
       thanks to shuther for pointing out this bug.
 
 2004-03-20  Nuno Lopes  <nunoplopes@sapo.pt>
 
     * libs/core/core.is_secure.php:
       removed merging of $smarty->template_dir into $smarty->secure_dir
-
+      
       the resource_base_path is considerd secure instead. this change should
       have absolutely no impact on smarty's security's behaviour
 
     * libs/Smarty.class.php:
       moved setting of a default resource_base_path from
       Smarty::_parse_resource_name() to Smarty::_fetch_resource_info()
-
+      
       this shouldn't affect anything, since all calls to
       _parse_resource_name() that are not done from within
       _fetch_resource_info() all pass their own resource_base_path
       libs/Smarty.class.php:
       removed '.' from the list of default resource_base_paths in
       _parse_resource_name()
-
+      
       this should only affect _parse_resource_name() for templates, not for
       php-resources and not for config_files. the latter pass two their own
       resource_base_path.
     * NEWS
       libs/plugins/function.html_image.php:
       fix: $smarty->security is now correctly handled
-
+      
       minor optimizations:
          core/core.is_secure.php is only included when needed
          $dpi_default is only determined when needed
       allow single-digit days and months without smarty_make_timestamp()
       this makes dates like "1968-11-6" work correctly since no strtotime()
       is involved
-
+      
       add warning when unknown parameter is passed
 
 2003-12-16  Messju Mohr  <messju@lammfellpuschen.de>
       libs/plugins/function.html_options.php:
       fix bug when comparing array-keys to "selected" in html_options and
       html_checkboxes
-
+      
       in_array() uses "strict" comparason now.
 
     * libs/plugins/function.html_checkboxes.php
     * libs/Smarty.class.php
       libs/core/core.is_secure.php:
       move check for template_dir in secure_dir-array into core.is_secure.php
-
+      
       this makes template_exists() work correctly with security=true even if
       template_dir is not inside the secure_dir-array
 
     * libs/plugins/shared.make_timestamp.php:
       tightened check for YYYYMMDDHHMMSS-format. thanks konstantin for
       pointing this out.
-
+      
       removed a few tabs.
 
     * libs/Smarty_Compiler.class.php:
     * docs/designers.sgml:
       added parameter-descriptions for count_characters (thanks Konstantin
       A. Pelepelin)
-
+      
       fixed docs for {html_checkboxes}
 
 2003-08-14  Messju Mohr  <messju@lammfellpuschen.de>
       - handling of section-attribute
       - reusing the same config-file multiple times
       - serialization of config-data for php<4.2.0 (no var_export)
-
+      
       many thanks to atu for pointing this out and for testing
 
 2003-08-13  Messju Mohr  <messju@lammfellpuschen.de>
       libs/Smarty_Compiler.class.php:
       enabled registration of class-methods as callbacks for the
       register_*-functions
-
+      
       use: array('classname', 'method_name')) as callback
 
 2003-07-29  Messju Mohr  <messju@lammfellpuschen.de>
       libs/Smarty.class.php:
       enabled array(&$obj. 'source', 'timestamp', 'secure', 'trusted') as
       callback for register_resource()
-
+      
       enabled array(&$obj, 'method') as callback for
       $default_template_handler_func
 
 
     * libs/Smarty.class.php
       libs/Smarty_Compiler.class.php:
-      added CVS $Id: ChangeLog,v 1.389 2005/08/05 05:40:57 changelog Exp $
+      added CVS $Id: ChangeLog 2746 2007-09-28 01:32:05Z changelog $
 
 2003-03-31  Messju Mohr  <messju@lammfellpuschen.de>
 
index bf66959f508f4141e7607a81b087235fc55b4c0d..1860678e7006a2af126e9a6110bce7d67c0fde8c 100644 (file)
@@ -117,7 +117,7 @@ A: Be sure you set $compile_check=false once your templates are initially
    change too often, turn on the caching engine and adjust your application so
    it doesn't do unnecessary work (like db calls) if a cached page is
    available. See the documentation for examples.
-
+   
 Q: Do you have a mailing list?
 A:  We have a few mailing lists. "general" for you to share your ideas or ask
        questions, "dev" for those interested in the development efforts of Smarty,
@@ -226,7 +226,7 @@ A: In Edit - Properties - Rewrite HTML you can specify if Dreamweaver should
 
 HOWTO
 -----
-
+   
 Q: How do I generate different cache files per template based on arguments
    passed to the page?
 A: Use your $REQUEST_URI as the cache_id when fetching the page:
index 70405aeab4de05feaafbe5fb517a066b1ba15d8f..cbab78f5a3ce7a14fcd4565498cc5941f2913217 100644 (file)
@@ -1,3 +1,146 @@
+Version 2.6.26 (June 18th, 2009)
+-------------------------------
+- revert super global access changes, and instead rely on
+  USE_SUPER_GLOBALS for security
+
+Version 2.6.25 (May 19th, 2009)
+-------------------------------
+- fix E_NOTICE when sessions are disabled (mohrt)
+
+Version 2.6.24 (May 16th, 2009)
+-------------------------------
+- fix problem introduced with super global changes (mohrt)
+
+Version 2.6.23 (May 13th, 2009)
+-------------------------------
+- strip backticks from {math} equations (mohrt)
+- make PHP super globals read-only from template (mohrt)
+- throw error when template exists but not readable (mohrt)
+
+Version 2.6.22 (Dec 17th, 2008)
+-------------------------------
+
+- back out method chaining, bug in some versions of PCRE causes errors (mohrt)
+
+Version 2.6.21 (Dec 2nd, 2008)
+------------------------------
+
+- fix  function injection security hole closed (U.Tews)
+- fix pass expiration time at cache_handler_fuc call in core.write_cache_file.php (U.Tews)
+- Update of compiler.class.php to allow method chaining for PHP4 and PHP5 (U.Tews)
+
+Version 2.6.20 (Feb 15th, 2008)
+-------------------------------
+
+- fix cache tag bug when multiple cache tags on a page (mankyd,
+  mohrt)
+- fix /e tag checking when using arrays with regex_replace
+  (mohrt)
+- fix that function results can be used with condition like "is even" in 
+  {if} tags (U.Tews)
+- fix handling of non-empty <pre>-tags and empty <textarea>- and
+  <script>-tags (Spuerhund, messju)
+
+Version 2.6.19 (Feb 11th, 2008)
+-------------------------------
+
+- fix regex_replace allowing \0 in the search string (c960657,
+  monte)
+- add append feature to {capture} (jablko, monte)
+- fix when (un)registering filters with the same method name but different class
+  name (danilo)
+- fix calling registered objects' methods with an empty argument list
+  (marcello, messju)
+Version 2.6.18 (Mar 7th, 2007)
+------------------------------
+
+- fix html_select_date separator when parts are missing (hayk,
+  monte)
+- fix broken detection of non-cached blocks introduced in 2.6.17
+  (messju)
+
+Version 2.6.17 (Mar 5th, 2007)
+------------------------------
+
+- fix php handling (monte, boots, danilo)
+- fix handling of plugin tags directly followed by an else tag (Fahr, danilo)
+- fix handling of $etc in the truncate modifier when $etc is longer
+  than $length (Sylvinus, messju)
+- fix handling of %I with mysql timestamps in the date_format modifier
+  (danilo, boots)
+- update smarty_core_write_file() and smarty_modifier_date_format() to better
+  recognize Windows (boots, danilo)
+- emulate %h, %n, %r, %R, %t in the date_format modifier on Windows 
+  (danilo, boots)
+
+Version 2.6.16 (Dec 1st, 2006)
+------------------------------
+
+- fixed replacement bug in trimwhitespace output filter that was introduced
+  in the last release (Spuerhund, boots)
+
+Version 2.6.15 (Nov 30th, 2006)
+-------------------------------
+
+- change file writing semantics in smarty_core_write_file() to unlink() only
+  when rename() fails or a Windows system is detected (c960657, boots) 
+- update debug.tpl to xhtml 1.1 compliance, fix javascript escaping in debug
+  output and apply a Smarty based color scheme (cybot, boots)
+- enhance reporting precision of debug_print_var modifier (cybot, boots) 
+- make html_select_date work consistently with 0000-00-00 00:00:00 and
+  0000-00-00 inputs (cybot, boots)
+- fix wrong handling of insert's name attribute. (messju)
+- fix false replacement of "$t" inside double quotes (checat, messju)
+- added support for column headings and caption element to html_table and
+  updated the output to use thead/tbody elements (boots)
+- fixed ordering of replacements in trimwhitespace output filter (Getty, boots)
+- update mailto function plugin to work around a firefox/thunderbird
+  escaping bug (elijahlofgren, boots)
+- emulate %l in the date_format modifier on windows (boots) 
+- fix handling of apostrophes in capitalize modifier (Alec Smecher, boots)
+
+Version 2.6.14 (May 28th, 2006)
+-------------------------------
+
+- fix compiler bug allowing php tags in secure templates
+  (boots,monte)
+- un-hide hidden xml open tags (boots)
+- fix handling of block-methods of registered objects (El Hombre Gris,
+  messju)
+
+Version 2.6.13 (March 9th, 2006)
+--------------------------------
+
+ - update regex_replace, removing possible use of "e" modifier
+
+Version 2.6.12 (Jan 18th, 2006)
+-------------------------------
+
+ - fix improper use of references in the compiler handling cached
+   attributes and in compiled code handling block plugins (messju)
+ - make Smarty::_read_file() work on latest php (messju)
+ - fixed improper tokenization of certain inline math expressions (boots)
+
+Version 2.6.11 (Dec 14, 2005)
+-----------------------------
+
+ - fixed code generation of non-cacheable blocks to play well with php's
+   "Alternative syntax for control structures" (kihara, messju)
+ - fix handling of multiple identical inserts in one display()-call (messju)
+ - replace {} string access with equivalent substr() to avoid E_STRICT
+   warnings in PHP 5.1 (boots)
+ - return valid reference in get_config_vars() when given var is
+   non-existant (Thomas Schulz, boots)
+ - plugin html_image: fix incorrect secure_dir error when
+   file doesn't exist (monte)
+ - plugin html_image: add path_prefix param (monte)
+ - add char_set parameter to escape modifier (Loading, monte)
+ - fix notice in debug security check (Drakla, monte)
+ - return valid reference in get_template_vars() when given var is
+   non-existant (monte)
+ - add escape type "urlpathinfo" to escape modifier (monte)
+
 Version 2.6.10 (Aug 5, 2005)
 ----------------------------
 
index d8fb90005a48a353aa9fd9c81ada5cf1d15fa1a9..15992d09eeef5d02b5b0db8990309fea470ef535 100644 (file)
@@ -1,31 +1,37 @@
+
 NAME:
 
     Smarty - the PHP compiling template engine
 
-VERSION: 2.6.0
+VERSION: 2.6.26
 
 AUTHORS:
-
+    
     Monte Ohrt <monte at ohrt dot com>
     Andrei Zmievski <andrei@php.net>
 
 MAILING LISTS:
 
-    We have a few mailing lists. "general" for you to share your ideas or ask
-       questions, "dev" for those interested in the development efforts of Smarty,
-       and "cvs" for those that would like to track the updates made in the cvs
+    We have a few mailing lists. "discussion" for you to share your ideas or ask
+       questions, "developers" for those interested in the development efforts of Smarty,
+       and "svn" for those that would like to track the updates made in the svn
        repository.
 
     send a blank e-mail message to:
-      smarty-general-subscribe@lists.php.net (subscribe to the general list)
-      smarty-general-unsubscribe@lists.php.net (unsubscribe from the general list)
-      smarty-general-digest-subscribe@lists.php.net (subscribe to digest)
-      smarty-general-digest-unsubscribe@lists.php.net (unsubscribe from digest)
-      smarty-dev-subscribe@lists.php.net (subscribe to the dev list)
-      smarty-dev-unsubscribe@lists.php.net (unsubscribe from the dev list)
-      smarty-cvs-subscribe@lists.php.net (subscribe to the cvs list)
-      smarty-cvs-unsubscribe@lists.php.net (unsubscribe from the cvs list)
+      smarty-discussion-subscribe@googlecode.com(subscribe to the general discussion list)
+      smarty-discussion-unsubscribe@googlecode.com (unsubscribe from the general discussion list)
+      smarty-discussion-digest-subscribe@googlecode.com (subscribe to digest)
+      smarty-discussion-digest-unsubscribe@googlecode.com (unsubscribe from digest)
+      smarty-developers-subscribe@googlecode.com (subscribe to the dev list)
+      smarty-developers-unsubscribe@googlecode.com (unsubscribe from the dev list)
+      smarty-svn-subscribe@googlecode.com (subscribe to the svn list)
+      smarty-svn-unsubscribe@googlecode.com (unsubscribe from the svn list)
+
     You can also browse the mailing list archives at
+    http://groups.google.com/group/smarty-discussion
+    http://groups.google.com/group/smarty-developers
+
+    and the OLD list archives at
     http://marc.theaimsgroup.com/?l=smarty&r=1&w=2
 
 SYNOPSIS:
index 627100f6a6ca5c9da6c0fa30f84382e426ae6f0f..2cc9896bbf41856856353ff18ae3396fcfe65d9b 100644 (file)
@@ -58,7 +58,7 @@ extracted to PHP namespace, saving an extract call for every template. There is
 now support for applying modifiers to static values and functions. You can now
 access constants with $smarty.const.VAR.  See the NEWS file for complete
 changes.
-
 2.3.1
 -----
 
@@ -135,7 +135,7 @@ through a list (or array) of values.
 This release has quite a few new features and fixes. Most notable are the
 introduction of block functions, so you can write plugins that work on a block
 of text with {func}{/func} notation. Also output filters were added, so you can
-apply a function against the output of your templates. This differs from the
+apply a function against the output of your templates. This differs from the 
 postfilter function, which works on the compiled template at compile time, and
 output filters work on the template output at runtime.
 
diff --git a/wwwroot/smarty/demo/configs/test.conf b/wwwroot/smarty/demo/configs/test.conf
deleted file mode 100644 (file)
index 5eac748..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-title = Welcome to Smarty!
-cutoff_size = 40
-
-[setup]
-bold = true
diff --git a/wwwroot/smarty/demo/index.php b/wwwroot/smarty/demo/index.php
deleted file mode 100644 (file)
index fee202f..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-
-require '../libs/Smarty.class.php';
-
-$smarty = new Smarty;
-
-$smarty->compile_check = true;
-$smarty->debugging = true;
-
-$smarty->assign("Name","Fred Irving Johnathan Bradley Peppergill");
-$smarty->assign("FirstName",array("John","Mary","James","Henry"));
-$smarty->assign("LastName",array("Doe","Smith","Johnson","Case"));
-$smarty->assign("Class",array(array("A","B","C","D"), array("E", "F", "G", "H"),
-         array("I", "J", "K", "L"), array("M", "N", "O", "P")));
-
-$smarty->assign("contacts", array(array("phone" => "1", "fax" => "2", "cell" => "3"),
-         array("phone" => "555-4444", "fax" => "555-3333", "cell" => "760-1234")));
-
-$smarty->assign("option_values", array("NY","NE","KS","IA","OK","TX"));
-$smarty->assign("option_output", array("New York","Nebraska","Kansas","Iowa","Oklahoma","Texas"));
-$smarty->assign("option_selected", "NE");
-
-$smarty->display('index.tpl');
-
-?>
diff --git a/wwwroot/smarty/demo/templates/footer.tpl b/wwwroot/smarty/demo/templates/footer.tpl
deleted file mode 100644 (file)
index e04310f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-</BODY>
-</HTML>
diff --git a/wwwroot/smarty/demo/templates/header.tpl b/wwwroot/smarty/demo/templates/header.tpl
deleted file mode 100644 (file)
index af8f613..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<HTML>
-<HEAD>
-{popup_init src="/javascripts/overlib.js"}
-<TITLE>{$title} - {$Name}</TITLE>
-</HEAD>
-<BODY bgcolor="#ffffff">
diff --git a/wwwroot/smarty/demo/templates/index.tpl b/wwwroot/smarty/demo/templates/index.tpl
deleted file mode 100644 (file)
index c4d5eee..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-{config_load file=test.conf section="setup"}
-{include file="header.tpl" title=foo}
-
-<PRE>
-
-{* bold and title are read from the config file *}
-{if #bold#}<b>{/if}
-{* capitalize the first letters of each word of the title *}
-Title: {#title#|capitalize}
-{if #bold#}</b>{/if}
-
-The current date and time is {$smarty.now|date_format:"%Y-%m-%d %H:%M:%S"}
-
-Tooltip example: Move your mouse over the <A HREF="" {popup sticky=true caption="Smarty pop-up text" delay=400 text="This is an example of a tooltip. Tooltips are handy for context sensitive information, and extremely easy to add to your templates with Smarty and the integration of <a href='http://www.bosrup.com/web/overlib/'>overLIB</a> by Erik Bosrup"} onclick="return false;">Help</A> link to see an example of a tooltip using Smarty's popup function.
-
-The value of global assigned variable $SCRIPT_NAME is {$SCRIPT_NAME}
-
-Example of accessing server environment variable SERVER_NAME: {$smarty.server.SERVER_NAME}
-
-The value of {ldelim}$Name{rdelim} is <b>{$Name}</b>
-
-variable modifier example of {ldelim}$Name|upper{rdelim}
-
-<b>{$Name|upper}</b>
-
-
-An example of a section loop:
-
-{section name=outer loop=$FirstName}
-{if %outer.index% is odd by 2}
-       {%outer.rownum%} . {$FirstName[outer]} {$LastName[outer]}
-{else}
-       {%outer.rownum%} * {$FirstName[outer]} {$LastName[outer]}
-{/if}
-{sectionelse}
-       none
-{/section}
-
-An example of section looped key values:
-
-{section name=sec1 loop=$contacts}
-       phone: {$contacts[sec1].phone}<br>
-       fax: {$contacts[sec1].fax}<br>
-       cell: {$contacts[sec1].cell}<br>
-{/section}
-<p>
-
-testing strip tags
-{strip}
-<table border=0>
-       <tr>
-               <td>
-                       <A HREF="{$SCRIPT_NAME}">
-                       <font color="red">This is a  test     </font>
-                       </A>
-               </td>
-       </tr>
-</table>
-{/strip}
-
-</PRE>
-
-This is an example of the html_select_date function:
-
-<form>
-{html_select_date start_year=1998 end_year=2010}
-</form>
-
-This is an example of the html_select_time function:
-
-<form>
-{html_select_time use_24_hours=false}
-</form>
-
-This is an example of the html_options function:
-
-<form>
-<select name=states>
-{html_options values=$option_values selected=$option_selected output=$option_output}
-</select>
-</form>
-
-{include file="footer.tpl"}
index e0e8c0c0fbbea9ba51045aa6baa4a4bba54f94e7..5787ad15f81309d830be32042562d12c46f76a28 100644 (file)
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * @link http://smarty.php.net/
- * @version 2.6.10
+ * For questions, help, comments, discussion, etc., please join the
+ * Smarty mailing list. Send a blank e-mail to
+ * smarty-discussion-subscribe@googlegroups.com 
+ *
+ * @link http://www.smarty.net/
+ * @version 2.6.26
  * @copyright Copyright: 2001-2005 New Digital Group, Inc.
  * @author Andrei Zmievski <andrei@php.net>
  * @access public
  * @package Smarty
  */
 
-/* $Id: Config_File.class.php,v 1.80 2005/07/18 15:22:41 messju Exp $ */
+/* $Id: Config_File.class.php 3149 2009-05-23 20:59:25Z monte.ohrt $ */
 
 /**
  * Config file reading class
@@ -285,9 +289,9 @@ class Config_File {
             $line = $lines[$i];
             if (empty($line)) continue;
 
-            if ( $line{0} == '[' && preg_match('!^\[(.*?)\]!', $line, $match) ) {
+            if ( substr($line, 0, 1) == '[' && preg_match('!^\[(.*?)\]!', $line, $match) ) {
                 /* section found */
-                if ($match[1]{0} == '.') {
+                if (substr($match[1], 0, 1) == '.') {
                     /* hidden section */
                     if ($this->read_hidden) {
                         $section_name = substr($match[1], 1);
@@ -297,7 +301,7 @@ class Config_File {
                         $vars = array();
                         continue;
                     }
-                } else {
+                } else {                    
                     $section_name = $match[1];
                 }
                 if (!isset($config_data['sections'][$section_name]))
@@ -347,7 +351,7 @@ class Config_File {
      */
     function _set_config_var(&$container, $var_name, $var_value, $booleanize)
     {
-        if ($var_name{0} == '.') {
+        if (substr($var_name, 0, 1) == '.') {
             if (!$this->read_hidden)
                 return;
             else
index 82f8f52d03783f5a286ab995cd765ab4966cbfb9..e7298f2ec4dd375192164fe9aa64c0a3de157b31 100644 (file)
  *
  * For questions, help, comments, discussion, etc., please join the
  * Smarty mailing list. Send a blank e-mail to
- * smarty-general-subscribe@lists.php.net
+ * smarty-discussion-subscribe@googlegroups.com 
  *
- * @link http://smarty.php.net/
+ * @link http://www.smarty.net/
  * @copyright 2001-2005 New Digital Group, Inc.
  * @author Monte Ohrt <monte at ohrt dot com>
  * @author Andrei Zmievski <andrei@php.net>
  * @package Smarty
- * @version 2.6.10
+ * @version 2.6.26
  */
 
-/* $Id: Smarty.class.php,v 1.516 2005/07/18 08:43:53 messju Exp $ */
+/* $Id: Smarty.class.php 3163 2009-06-17 14:39:24Z monte.ohrt $ */
 
 /**
  * DIR_SEP isn't used anymore, but third party apps might
@@ -107,7 +107,7 @@ class Smarty
     /**
      * When set, smarty does uses this value as error_reporting-level.
      *
-     * @var boolean
+     * @var integer
      */
     var $error_reporting  =  null;
 
@@ -209,7 +209,7 @@ class Smarty
      *
      * @var boolean
      */
-    var $security       =   true;
+    var $security       =   false;
 
     /**
      * This is the list of template directories that are considered secure. This
@@ -236,7 +236,8 @@ class Smarty
                                     'INCLUDE_ANY'     => false,
                                     'PHP_TAGS'        => false,
                                     'MODIFIER_FUNCS'  => array('count'),
-                                    'ALLOW_CONSTANTS'  => false
+                                    'ALLOW_CONSTANTS'  => false,
+                                    'ALLOW_SUPER_GLOBALS' => true
                                    );
 
     /**
@@ -464,7 +465,7 @@ class Smarty
      *
      * @var string
      */
-    var $_version              = '2.6.10';
+    var $_version              = '2.6.26';
 
     /**
      * current template inclusion depth
@@ -838,69 +839,66 @@ class Smarty
      * Registers a prefilter function to apply
      * to a template before compiling
      *
-     * @param string $function name of PHP function to register
+     * @param callback $function
      */
     function register_prefilter($function)
     {
-    $_name = (is_array($function)) ? $function[1] : $function;
-        $this->_plugins['prefilter'][$_name]
+        $this->_plugins['prefilter'][$this->_get_filter_name($function)]
             = array($function, null, null, false);
     }
 
     /**
      * Unregisters a prefilter function
      *
-     * @param string $function name of PHP function
+     * @param callback $function
      */
     function unregister_prefilter($function)
     {
-        unset($this->_plugins['prefilter'][$function]);
+        unset($this->_plugins['prefilter'][$this->_get_filter_name($function)]);
     }
 
     /**
      * Registers a postfilter function to apply
      * to a compiled template after compilation
      *
-     * @param string $function name of PHP function to register
+     * @param callback $function
      */
     function register_postfilter($function)
     {
-    $_name = (is_array($function)) ? $function[1] : $function;
-        $this->_plugins['postfilter'][$_name]
+        $this->_plugins['postfilter'][$this->_get_filter_name($function)]
             = array($function, null, null, false);
     }
 
     /**
      * Unregisters a postfilter function
      *
-     * @param string $function name of PHP function
+     * @param callback $function
      */
     function unregister_postfilter($function)
     {
-        unset($this->_plugins['postfilter'][$function]);
+        unset($this->_plugins['postfilter'][$this->_get_filter_name($function)]);
     }
 
     /**
      * Registers an output filter function to apply
      * to a template output
      *
-     * @param string $function name of PHP function
+     * @param callback $function
      */
     function register_outputfilter($function)
     {
-    $_name = (is_array($function)) ? $function[1] : $function;
-        $this->_plugins['outputfilter'][$_name]
+        $this->_plugins['outputfilter'][$this->_get_filter_name($function)]
             = array($function, null, null, false);
     }
 
     /**
      * Unregisters an outputfilter function
      *
-     * @param string $function name of PHP function
+     * @param callback $function
      */
     function unregister_outputfilter($function)
     {
-        unset($this->_plugins['outputfilter'][$function]);
+        unset($this->_plugins['outputfilter'][$this->_get_filter_name($function)]);
     }
 
     /**
@@ -1055,9 +1053,12 @@ class Smarty
     {
         if(!isset($name)) {
             return $this->_tpl_vars;
-        }
-        if(isset($this->_tpl_vars[$name])) {
+        } elseif(isset($this->_tpl_vars[$name])) {
             return $this->_tpl_vars[$name];
+        } else {
+            // var non-existant, return valid reference
+            $_tmp = null;
+            return $_tmp;   
         }
     }
 
@@ -1074,6 +1075,10 @@ class Smarty
             return $this->_config[0]['vars'];
         } else if(isset($this->_config[0]['vars'][$name])) {
             return $this->_config[0]['vars'][$name];
+        } else {
+            // var non-existant, return valid reference
+            $_tmp = null;
+            return $_tmp;
         }
     }
 
@@ -1112,7 +1117,7 @@ class Smarty
     function fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)
     {
         static $_cache_info = array();
-
+        
         $_smarty_old_error_level = $this->debugging ? error_reporting() : error_reporting(isset($this->error_reporting)
                ? $this->error_reporting : error_reporting() & ~E_NOTICE);
 
@@ -1544,7 +1549,7 @@ class Smarty
                         $params['source_content'] = $this->_read_file($_resource_name);
                     }
                     $params['resource_timestamp'] = filemtime($_resource_name);
-                    $_return = is_file($_resource_name);
+                    $_return = is_file($_resource_name) && is_readable($_resource_name);
                     break;
 
                 default:
@@ -1691,8 +1696,8 @@ class Smarty
      */
     function _dequote($string)
     {
-        if (($string{0} == "'" || $string{0} == '"') &&
-            $string{strlen($string)-1} == $string{0})
+        if ((substr($string, 0, 1) == "'" || substr($string, 0, 1) == '"') &&
+            substr($string, -1) == substr($string, 0, 1))
             return substr($string, 1, -1);
         else
             return $string;
@@ -1707,8 +1712,11 @@ class Smarty
      */
     function _read_file($filename)
     {
-        if ( file_exists($filename) && ($fd = @fopen($filename, 'rb')) ) {
-            $contents = ($size = filesize($filename)) ? fread($fd, $size) : '';
+        if ( file_exists($filename) && is_readable($filename) && ($fd = @fopen($filename, 'rb')) ) {
+            $contents = '';
+            while (!feof($fd)) {
+                $contents .= fread($fd, 8192);
+            }
             fclose($fd);
             return $contents;
         } else {
@@ -1925,6 +1933,25 @@ class Smarty
     {
         return eval($code);
     }
+    
+    /**
+     * Extracts the filter name from the given callback
+     * 
+     * @param callback $function
+     * @return string
+     */
+       function _get_filter_name($function)
+       {
+               if (is_array($function)) {
+                       $_class_name = (is_object($function[0]) ?
+                               get_class($function[0]) : $function[0]);
+                       return $_class_name . '_' . $function[1];
+               }
+               else {
+                       return $function;
+               }
+       }
+  
     /**#@-*/
 
 }
index 0ad429a87b80068547d9945a01d0298f10fe99a0..1178b84d0b0149a480b1b70f69948d7d0caa5a6e 100644 (file)
  * @link http://smarty.php.net/
  * @author Monte Ohrt <monte at ohrt dot com>
  * @author Andrei Zmievski <andrei@php.net>
- * @version 2.6.10
+ * @version 2.6.26
  * @copyright 2001-2005 New Digital Group, Inc.
  * @package Smarty
  */
 
-/* $Id: Smarty_Compiler.class.php,v 1.370 2005/08/04 19:43:21 messju Exp $ */
+/* $Id: Smarty_Compiler.class.php 3163 2009-06-17 14:39:24Z monte.ohrt $ */
 
 /**
  * Template compiling class
@@ -162,7 +162,7 @@ class Smarty_Compiler extends Smarty {
                 . '(?:\s*,\s*' . $this->_obj_single_param_regexp . ')*)?\)';
         $this->_obj_start_regexp = '(?:' . $this->_dvar_regexp . '(?:' . $this->_obj_ext_regexp . ')+)';
         $this->_obj_call_regexp = '(?:' . $this->_obj_start_regexp . '(?:' . $this->_obj_params_regexp . ')?(?:' . $this->_dvar_math_regexp . '(?:' . $this->_num_const_regexp . '|' . $this->_dvar_math_var_regexp . ')*)?)';
-
+        
         // matches valid modifier syntax:
         // |foo
         // |@foo
@@ -278,7 +278,7 @@ class Smarty_Compiler extends Smarty {
         /* loop through text blocks */
         for ($curr_tb = 0, $for_max = count($text_blocks); $curr_tb < $for_max; $curr_tb++) {
             /* match anything resembling php tags */
-            if (preg_match_all('~(<\?(?:\w+|=)?|\?>|language\s*=\s*[\"\']?php[\"\']?)~is', $text_blocks[$curr_tb], $sp_match)) {
+            if (preg_match_all('~(<\?(?:\w+|=)?|\?>|language\s*=\s*[\"\']?\s*php\s*[\"\']?)~is', $text_blocks[$curr_tb], $sp_match)) {
                 /* replace tags with placeholders to prevent recursive replacements */
                 $sp_match[1] = array_unique($sp_match[1]);
                 usort($sp_match[1], '_smarty_sort_length');
@@ -304,7 +304,7 @@ class Smarty_Compiler extends Smarty {
                 }
             }
         }
-
+        
         /* Compile the template tags into PHP code. */
         $compiled_tags = array();
         for ($i = 0, $for_max = count($template_tags); $i < $for_max; $i++) {
@@ -333,7 +333,7 @@ class Smarty_Compiler extends Smarty {
                 for ($j = $i + 1; $j < $for_max; $j++) {
                     /* remove leading and trailing whitespaces of each line */
                     $text_blocks[$j] = preg_replace('![\t ]*[\r\n]+[\t ]*!', '', $text_blocks[$j]);
-                    if ($compiled_tags[$j] == '{/strip}') {
+                    if ($compiled_tags[$j] == '{/strip}') {                       
                         /* remove trailing whitespaces from the last text_block */
                         $text_blocks[$j] = rtrim($text_blocks[$j]);
                     }
@@ -349,19 +349,32 @@ class Smarty_Compiler extends Smarty {
             }
         }
         $compiled_content = '';
-
+        
+        $tag_guard = '%%%SMARTYOTG' . md5(uniqid(rand(), true)) . '%%%';
+        
         /* Interleave the compiled contents and text blocks to get the final result. */
         for ($i = 0, $for_max = count($compiled_tags); $i < $for_max; $i++) {
             if ($compiled_tags[$i] == '') {
                 // tag result empty, remove first newline from following text block
                 $text_blocks[$i+1] = preg_replace('~^(\r\n|\r|\n)~', '', $text_blocks[$i+1]);
             }
-            $compiled_content .= $text_blocks[$i].$compiled_tags[$i];
+            // replace legit PHP tags with placeholder
+            $text_blocks[$i] = str_replace('<?', $tag_guard, $text_blocks[$i]);
+            $compiled_tags[$i] = str_replace('<?', $tag_guard, $compiled_tags[$i]);
+            
+            $compiled_content .= $text_blocks[$i] . $compiled_tags[$i];
         }
-        $compiled_content .= $text_blocks[$i];
+        $compiled_content .= str_replace('<?', $tag_guard, $text_blocks[$i]);
+
+        // escape php tags created by interleaving
+        $compiled_content = str_replace('<?', "<?php echo '<?' ?>\n", $compiled_content);
+        $compiled_content = preg_replace("~(?<!')language\s*=\s*[\"\']?\s*php\s*[\"\']?~", "<?php echo 'language=php' ?>\n", $compiled_content);
 
+        // recover legit tags
+        $compiled_content = str_replace($tag_guard, '<?', $compiled_content); 
+        
         // remove \n from the end of the file, if any
-        if (($_len=strlen($compiled_content)) && ($compiled_content{$_len - 1} == "\n" )) {
+        if (strlen($compiled_content) && (substr($compiled_content, -1) == "\n") ) {
             $compiled_content = substr($compiled_content, 0, -1);
         }
 
@@ -369,9 +382,6 @@ class Smarty_Compiler extends Smarty {
             $compiled_content = "<?php \$this->_cache_serials['".$this->_cache_include."'] = '".$this->_cache_serial."'; ?>" . $compiled_content;
         }
 
-        // remove unnecessary close/open tags
-        $compiled_content = preg_replace('~\?>\n?<\?php~', '', $compiled_content);
-
         // run compiled template through postfilter functions
         if (count($this->_plugins['postfilter']) > 0) {
             foreach ($this->_plugins['postfilter'] as $filter_name => $postfilter) {
@@ -425,9 +435,9 @@ class Smarty_Compiler extends Smarty {
     function _compile_tag($template_tag)
     {
         /* Matched comment. */
-        if ($template_tag{0} == '*' && $template_tag{strlen($template_tag) - 1} == '*')
+        if (substr($template_tag, 0, 1) == '*' && substr($template_tag, -1) == '*')
             return '';
-
+        
         /* Split tag into two three parts: command, command modifiers and the arguments. */
         if(! preg_match('~^(?:(' . $this->_num_const_regexp . '|' . $this->_obj_call_regexp . '|' . $this->_var_regexp
                 . '|\/?' . $this->_reg_obj_regexp . '|\/?' . $this->_func_regexp . ')(' . $this->_mod_regexp . '*))
@@ -435,7 +445,7 @@ class Smarty_Compiler extends Smarty {
                     ~xs', $template_tag, $match)) {
             $this->_syntax_error("unrecognized tag: $template_tag", E_USER_ERROR, __FILE__, __LINE__);
         }
-
+        
         $tag_command = $match[1];
         $tag_modifier = isset($match[2]) ? $match[2] : null;
         $tag_args = isset($match[3]) ? $match[3] : null;
@@ -529,7 +539,7 @@ class Smarty_Compiler extends Smarty {
 
             case 'strip':
             case '/strip':
-                if ($tag_command{0}=='/') {
+                if (substr($tag_command, 0, 1)=='/') {
                     $this->_pop_tag('strip');
                     if (--$this->_strip_depth==0) { /* outermost closing {/strip} */
                         $this->_additional_newline = "\n";
@@ -575,7 +585,7 @@ class Smarty_Compiler extends Smarty {
                 } else if ($this->_compile_block_tag($tag_command, $tag_args, $tag_modifier, $output)) {
                     return $output;
                 } else if ($this->_compile_custom_tag($tag_command, $tag_args, $tag_modifier, $output)) {
-                    return $output;
+                    return $output;                    
                 } else {
                     $this->_syntax_error("unrecognized tag '$tag_command'", E_USER_ERROR, __FILE__, __LINE__);
                 }
@@ -664,7 +674,7 @@ class Smarty_Compiler extends Smarty {
      */
     function _compile_block_tag($tag_command, $tag_args, $tag_modifier, &$output)
     {
-        if ($tag_command{0} == '/') {
+        if (substr($tag_command, 0, 1) == '/') {
             $start_tag = false;
             $tag_command = substr($tag_command, 1);
         } else
@@ -726,17 +736,18 @@ class Smarty_Compiler extends Smarty {
         if ($start_tag) {
             $output = '<?php ' . $this->_push_cacheable_state('block', $tag_command);
             $attrs = $this->_parse_attrs($tag_args);
-            $arg_list = $this->_compile_arg_list('block', $tag_command, $attrs, $_cache_attrs='');
+            $_cache_attrs='';
+            $arg_list = $this->_compile_arg_list('block', $tag_command, $attrs, $_cache_attrs);
             $output .= "$_cache_attrs\$this->_tag_stack[] = array('$tag_command', array(".implode(',', $arg_list).')); ';
-            $output .= $this->_compile_plugin_call('block', $tag_command).'($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat=true);';
+            $output .= '$_block_repeat=true;' . $this->_compile_plugin_call('block', $tag_command).'($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);';
             $output .= 'while ($_block_repeat) { ob_start(); ?>';
         } else {
             $output = '<?php $_block_content = ob_get_contents(); ob_end_clean(); ';
-            $_out_tag_text = $this->_compile_plugin_call('block', $tag_command).'($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat=false)';
+            $_out_tag_text = $this->_compile_plugin_call('block', $tag_command).'($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat)';
             if ($tag_modifier != '') {
                 $this->_parse_modifiers($_out_tag_text, $tag_modifier);
             }
-            $output .= 'echo '.$_out_tag_text.'; } ';
+            $output .= '$_block_repeat=false;echo ' . $_out_tag_text . '; } ';
             $output .= " array_pop(\$this->_tag_stack); " . $this->_pop_cacheable_state('block', $tag_command) . '?>';
         }
 
@@ -801,7 +812,8 @@ class Smarty_Compiler extends Smarty {
 
         $_cacheable_state = $this->_push_cacheable_state('function', $tag_command);
         $attrs = $this->_parse_attrs($tag_args);
-        $arg_list = $this->_compile_arg_list('function', $tag_command, $attrs, $_cache_attrs='');
+        $_cache_attrs = '';
+        $arg_list = $this->_compile_arg_list('function', $tag_command, $attrs, $_cache_attrs);
 
         $output = $this->_compile_plugin_call('function', $tag_command).'(array('.implode(',', $arg_list)."), \$this)";
         if($tag_modifier != '') {
@@ -826,7 +838,7 @@ class Smarty_Compiler extends Smarty {
      */
     function _compile_registered_object_tag($tag_command, $attrs, $tag_modifier)
     {
-        if ($tag_command{0} == '/') {
+        if (substr($tag_command, 0, 1) == '/') {
             $start_tag = false;
             $tag_command = substr($tag_command, 1);
         } else {
@@ -857,7 +869,7 @@ class Smarty_Compiler extends Smarty {
             // traditional argument format
             $args = implode(',', array_values($attrs));
             if (empty($args)) {
-                $args = 'null';
+                $args = '';
             }
         }
 
@@ -874,13 +886,13 @@ class Smarty_Compiler extends Smarty {
                 // block method
                 if ($start_tag) {
                     $prefix = "\$this->_tag_stack[] = array('$obj_comp', $args); ";
-                    $prefix .= "\$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], null, \$this, \$_block_repeat=true); ";
+                    $prefix .= "\$_block_repeat=true; \$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], null, \$this, \$_block_repeat); ";
                     $prefix .= "while (\$_block_repeat) { ob_start();";
                     $return = null;
                     $postfix = '';
-            } else {
-                    $prefix = "\$_obj_block_content = ob_get_contents(); ob_end_clean(); ";
-                    $return = "\$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], \$_obj_block_content, \$this, \$_block_repeat=false)";
+                } else {
+                    $prefix = "\$_obj_block_content = ob_get_contents(); ob_end_clean(); \$_block_repeat=false;";
+                    $return = "\$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], \$_obj_block_content, \$this, \$_block_repeat)";
                     $postfix = "} array_pop(\$this->_tag_stack);";
                 }
             } else {
@@ -922,7 +934,11 @@ class Smarty_Compiler extends Smarty {
         $name = $this->_dequote($attrs['name']);
 
         if (empty($name)) {
-            $this->_syntax_error("missing insert name", E_USER_ERROR, __FILE__, __LINE__);
+            return $this->_syntax_error("missing insert name", E_USER_ERROR, __FILE__, __LINE__);
+        }
+        
+        if (!preg_match('~^\w+$~', $name)) {
+            return $this->_syntax_error("'insert: 'name' must be an insert function name", E_USER_ERROR, __FILE__, __LINE__);
         }
 
         if (!empty($attrs['script'])) {
@@ -1155,7 +1171,7 @@ class Smarty_Compiler extends Smarty {
         }
         $item = $this->_dequote($attrs['item']);
         if (!preg_match('~^\w+$~', $item)) {
-            return $this->_syntax_error("'foreach: item' must be a variable name (literal string)", E_USER_ERROR, __FILE__, __LINE__);
+            return $this->_syntax_error("foreach: 'item' must be a variable name (literal string)", E_USER_ERROR, __FILE__, __LINE__);
         }
 
         if (isset($attrs['key'])) {
@@ -1206,23 +1222,21 @@ class Smarty_Compiler extends Smarty {
         $attrs = $this->_parse_attrs($tag_args);
 
         if ($start) {
-            if (isset($attrs['name']))
-                $buffer = $attrs['name'];
-            else
-                $buffer = "'default'";
-
-            if (isset($attrs['assign']))
-                $assign = $attrs['assign'];
-            else
-                $assign = null;
+            $buffer = isset($attrs['name']) ? $attrs['name'] : "'default'";
+            $assign = isset($attrs['assign']) ? $attrs['assign'] : null;
+            $append = isset($attrs['append']) ? $attrs['append'] : null;
+            
             $output = "<?php ob_start(); ?>";
-            $this->_capture_stack[] = array($buffer, $assign);
+            $this->_capture_stack[] = array($buffer, $assign, $append);
         } else {
-            list($buffer, $assign) = array_pop($this->_capture_stack);
+            list($buffer, $assign, $append) = array_pop($this->_capture_stack);
             $output = "<?php \$this->_smarty_vars['capture'][$buffer] = ob_get_contents(); ";
             if (isset($assign)) {
                 $output .= " \$this->assign($assign, ob_get_contents());";
             }
+            if (isset($append)) {
+                $output .= " \$this->append($append, ob_get_contents());";
+            }
             $output .= "ob_end_clean(); ?>";
         }
 
@@ -1251,12 +1265,12 @@ class Smarty_Compiler extends Smarty {
         $tokens = $match[0];
 
         if(empty($tokens)) {
-            $_error_msg .= $elseif ? "'elseif'" : "'if'";
-            $_error_msg .= ' statement requires arguments';
+            $_error_msg = $elseif ? "'elseif'" : "'if'";
+            $_error_msg .= ' statement requires arguments'; 
             $this->_syntax_error($_error_msg, E_USER_ERROR, __FILE__, __LINE__);
         }
-
-
+            
+                
         // make sure we have balanced parenthesis
         $token_count = array_count_values($tokens);
         if(isset($token_count['(']) && $token_count['('] != $token_count[')']) {
@@ -1349,9 +1363,14 @@ class Smarty_Compiler extends Smarty {
                     /* If last token was a ')', we operate on the parenthesized
                        expression. The start of the expression is on the stack.
                        Otherwise, we operate on the last encountered token. */
-                    if ($tokens[$i-1] == ')')
+                    if ($tokens[$i-1] == ')') {
                         $is_arg_start = array_pop($is_arg_stack);
-                    else
+                        if ($is_arg_start != 0) {
+                            if (preg_match('~^' . $this->_func_regexp . '$~', $tokens[$is_arg_start-1])) {
+                                $is_arg_start--;
+                            } 
+                        } 
+                    } else
                         $is_arg_start = $i-1;
                     /* Construct the argument for 'is' expression, so it knows
                        what to operate on. */
@@ -1379,9 +1398,9 @@ class Smarty_Compiler extends Smarty {
                                !in_array($token, $this->security_settings['IF_FUNCS'])) {
                                 $this->_syntax_error("(secure mode) '$token' not allowed in if statement", E_USER_ERROR, __FILE__, __LINE__);
                             }
-                    } elseif(preg_match('~^' . $this->_var_regexp . '$~', $token) && isset($tokens[$i+1]) && $tokens[$i+1] == '(') {
+                    } elseif(preg_match('~^' . $this->_var_regexp . '$~', $token) && (strpos('+-*/^%&|', substr($token, -1)) === false) && isset($tokens[$i+1]) && $tokens[$i+1] == '(') {
                         // variable function call
-                        $this->_syntax_error("variable function call '$token' not allowed in if statement", E_USER_ERROR, __FILE__, __LINE__);
+                        $this->_syntax_error("variable function call '$token' not allowed in if statement", E_USER_ERROR, __FILE__, __LINE__);                      
                     } elseif(preg_match('~^' . $this->_obj_call_regexp . '|' . $this->_var_regexp . '(?:' . $this->_mod_regexp . '*)$~', $token)) {
                         // object or variable
                         $token = $this->_parse_var_props($token);
@@ -1666,11 +1685,11 @@ class Smarty_Compiler extends Smarty {
         // if contains unescaped $, expand it
         if(preg_match_all('~(?:\`(?<!\\\\)\$' . $this->_dvar_guts_regexp . '(?:' . $this->_obj_ext_regexp . ')*\`)|(?:(?<!\\\\)\$\w+(\[[a-zA-Z0-9]+\])*)~', $var_expr, $_match)) {
             $_match = $_match[0];
-            rsort($_match);
-            reset($_match);
+            $_replace = array();
             foreach($_match as $_var) {
-                $var_expr = str_replace ($_var, '".(' . $this->_parse_var(str_replace('`','',$_var)) . ')."', $var_expr);
+                $_replace[$_var] = '".(' . $this->_parse_var(str_replace('`','',$_var)) . ')."';
             }
+            $var_expr = strtr($var_expr, $_replace);
             $_return = preg_replace('~\.""|(?<!\\\\)""\.~', '', $var_expr);
         } else {
             $_return = $var_expr;
@@ -1730,16 +1749,16 @@ class Smarty_Compiler extends Smarty {
         }
 
         // prevent cutting of first digit in the number (we _definitly_ got a number if the first char is a digit)
-        if(is_numeric($var_expr{0}))
+        if(is_numeric(substr($var_expr, 0, 1)))
             $_var_ref = $var_expr;
         else
             $_var_ref = substr($var_expr, 1);
-
+        
         if(!$_has_math) {
-
+            
             // get [foo] and .foo and ->foo and (...) pieces
             preg_match_all('~(?:^\w+)|' . $this->_obj_params_regexp . '|(?:' . $this->_var_bracket_regexp . ')|->\$?\w+|\.\$?\w+|\S+~', $_var_ref, $match);
-
+                        
             $_indexes = $match[0];
             $_var_name = array_shift($_indexes);
 
@@ -1756,7 +1775,7 @@ class Smarty_Compiler extends Smarty {
                     $_var_name = substr(array_shift($_indexes), 1);
                     $_output = "\$this->_smarty_vars['$_var_name']";
                 }
-            } elseif(is_numeric($_var_name) && is_numeric($var_expr{0})) {
+            } elseif(is_numeric($_var_name) && is_numeric(substr($var_expr, 0, 1))) {
                 // because . is the operator for accessing arrays thru inidizes we need to put it together again for floating point numbers
                 if(count($_indexes) > 0)
                 {
@@ -1769,11 +1788,11 @@ class Smarty_Compiler extends Smarty {
             }
 
             foreach ($_indexes as $_index) {
-                if ($_index{0} == '[') {
+                if (substr($_index, 0, 1) == '[') {
                     $_index = substr($_index, 1, -1);
                     if (is_numeric($_index)) {
                         $_output .= "[$_index]";
-                    } elseif ($_index{0} == '$') {
+                    } elseif (substr($_index, 0, 1) == '$') {
                         if (strpos($_index, '.') !== false) {
                             $_output .= '[' . $this->_parse_var($_index) . ']';
                         } else {
@@ -1785,8 +1804,8 @@ class Smarty_Compiler extends Smarty {
                         $_var_section_prop = isset($_var_parts[1]) ? $_var_parts[1] : 'index';
                         $_output .= "[\$this->_sections['$_var_section']['$_var_section_prop']]";
                     }
-                } else if ($_index{0} == '.') {
-                    if ($_index{1} == '$')
+                } else if (substr($_index, 0, 1) == '.') {
+                    if (substr($_index, 1, 1) == '$')
                         $_output .= "[\$this->_tpl_vars['" . substr($_index, 2) . "']]";
                     else
                         $_output .= "['" . substr($_index, 1) . "']";
@@ -1795,7 +1814,7 @@ class Smarty_Compiler extends Smarty {
                         $this->_syntax_error('call to internal object members is not allowed', E_USER_ERROR, __FILE__, __LINE__);
                     } elseif($this->security && substr($_index, 2, 1) == '_') {
                         $this->_syntax_error('(secure) call to private object member is not allowed', E_USER_ERROR, __FILE__, __LINE__);
-                    } elseif ($_index{2} == '$') {
+                    } elseif (substr($_index, 2, 1) == '$') {
                         if ($this->security) {
                             $this->_syntax_error('(secure) call to dynamic object member is not allowed', E_USER_ERROR, __FILE__, __LINE__);
                         } else {
@@ -1804,7 +1823,7 @@ class Smarty_Compiler extends Smarty {
                     } else {
                         $_output .= $_index;
                     }
-                } elseif ($_index{0} == '(') {
+                } elseif (substr($_index, 0, 1) == '(') {
                     $_index = $this->_parse_parenth_args($_index);
                     $_output .= $_index;
                 } else {
@@ -1901,7 +1920,7 @@ class Smarty_Compiler extends Smarty {
             preg_match_all('~:(' . $this->_qstr_regexp . '|[^:]+)~', $modifier_arg_strings[$_i], $_match);
             $_modifier_args = $_match[1];
 
-            if ($_modifier_name{0} == '@') {
+            if (substr($_modifier_name, 0, 1) == '@') {
                 $_map_array = false;
                 $_modifier_name = substr($_modifier_name, 1);
             } else {
@@ -1923,10 +1942,10 @@ class Smarty_Compiler extends Smarty {
 
             if($_modifier_name == 'default') {
                 // supress notifications of default modifier vars and args
-                if($output{0} == '$') {
+                if(substr($output, 0, 1) == '$') {
                     $output = '@' . $output;
                 }
-                if(isset($_modifier_args[0]) && $_modifier_args[0]{0} == '$') {
+                if(isset($_modifier_args[0]) && substr($_modifier_args[0], 0, 1) == '$') {
                     $_modifier_args[0] = '@' . $_modifier_args[0];
                 }
             }
@@ -1978,7 +1997,7 @@ class Smarty_Compiler extends Smarty {
         /* Extract the reference name. */
         $_ref = substr($indexes[0], 1);
         foreach($indexes as $_index_no=>$_index) {
-            if ($_index{0} != '.' && $_index_no<2 || !preg_match('~^(\.|\[|->)~', $_index)) {
+            if (substr($_index, 0, 1) != '.' && $_index_no<2 || !preg_match('~^(\.|\[|->)~', $_index)) {
                 $this->_syntax_error('$smarty' . implode('', array_slice($indexes, 0, 2)) . ' is an invalid reference', E_USER_ERROR, __FILE__, __LINE__);
             }
         }
@@ -1999,7 +2018,7 @@ class Smarty_Compiler extends Smarty {
                         array_shift($indexes);
                         $compiled_ref = "(\$this->_foreach[$_var]['iteration']-1)";
                         break;
-
+                        
                     case 'first':
                         array_shift($indexes);
                         $compiled_ref = "(\$this->_foreach[$_var]['iteration'] <= 1)";
@@ -2009,12 +2028,12 @@ class Smarty_Compiler extends Smarty {
                         array_shift($indexes);
                         $compiled_ref = "(\$this->_foreach[$_var]['iteration'] == \$this->_foreach[$_var]['total'])";
                         break;
-
+                        
                     case 'show':
                         array_shift($indexes);
                         $compiled_ref = "(\$this->_foreach[$_var]['total'] > 0)";
                         break;
-
+                        
                     default:
                         unset($_max_index);
                         $compiled_ref = "\$this->_foreach[$_var]";
@@ -2028,27 +2047,57 @@ class Smarty_Compiler extends Smarty {
                 break;
 
             case 'get':
-                $compiled_ref = ($this->request_use_auto_globals) ? '$_GET' : "\$GLOBALS['HTTP_GET_VARS']";
+                if ($this->security && !$this->security_settings['ALLOW_SUPER_GLOBALS']) {
+                    $this->_syntax_error("(secure mode) super global access not permitted",
+                                         E_USER_WARNING, __FILE__, __LINE__);
+                    return;
+                }
+                $compiled_ref = "\$_GET";
                 break;
 
             case 'post':
-                $compiled_ref = ($this->request_use_auto_globals) ? '$_POST' : "\$GLOBALS['HTTP_POST_VARS']";
+                if ($this->security && !$this->security_settings['ALLOW_SUPER_GLOBALS']) {
+                    $this->_syntax_error("(secure mode) super global access not permitted",
+                                         E_USER_WARNING, __FILE__, __LINE__);
+                    return;
+                }
+                $compiled_ref = "\$_POST";
                 break;
 
             case 'cookies':
-                $compiled_ref = ($this->request_use_auto_globals) ? '$_COOKIE' : "\$GLOBALS['HTTP_COOKIE_VARS']";
+                if ($this->security && !$this->security_settings['ALLOW_SUPER_GLOBALS']) {
+                    $this->_syntax_error("(secure mode) super global access not permitted",
+                                         E_USER_WARNING, __FILE__, __LINE__);
+                    return;
+                }
+                $compiled_ref = "\$_COOKIE";
                 break;
 
             case 'env':
-                $compiled_ref = ($this->request_use_auto_globals) ? '$_ENV' : "\$GLOBALS['HTTP_ENV_VARS']";
+                if ($this->security && !$this->security_settings['ALLOW_SUPER_GLOBALS']) {
+                    $this->_syntax_error("(secure mode) super global access not permitted",
+                                         E_USER_WARNING, __FILE__, __LINE__);
+                    return;
+                }
+                $compiled_ref = "\$_ENV";
                 break;
 
             case 'server':
-                $compiled_ref = ($this->request_use_auto_globals) ? '$_SERVER' : "\$GLOBALS['HTTP_SERVER_VARS']";
+                if ($this->security && !$this->security_settings['ALLOW_SUPER_GLOBALS']) {
+                    $this->_syntax_error("(secure mode) super global access not permitted",
+                                         E_USER_WARNING, __FILE__, __LINE__);
+                    return;
+                }
+                $compiled_ref = "\$_SERVER";
                 break;
 
             case 'session':
-                $compiled_ref = ($this->request_use_auto_globals) ? '$_SESSION' : "\$GLOBALS['HTTP_SESSION_VARS']";
+                if ($this->security && !$this->security_settings['ALLOW_SUPER_GLOBALS']) {
+                    $this->_syntax_error("(secure mode) super global access not permitted",
+                                         E_USER_WARNING, __FILE__, __LINE__);
+                    return;
+                }
+                $compiled_ref = "\$_SESSION";
                 break;
 
             /*
@@ -2056,8 +2105,13 @@ class Smarty_Compiler extends Smarty {
              * compiler.
              */
             case 'request':
+                if ($this->security && !$this->security_settings['ALLOW_SUPER_GLOBALS']) {
+                    $this->_syntax_error("(secure mode) super global access not permitted",
+                                         E_USER_WARNING, __FILE__, __LINE__);
+                    return;
+                }
                 if ($this->request_use_auto_globals) {
-                    $compiled_ref = '$_REQUEST';
+                    $compiled_ref = "\$_REQUEST";
                     break;
                 } else {
                     $this->_init_smarty_vars = true;
@@ -2105,7 +2159,7 @@ class Smarty_Compiler extends Smarty {
             case 'rdelim':
                 $compiled_ref = "'$this->right_delimiter'";
                 break;
-
+                
             default:
                 $this->_syntax_error('$smarty.' . $_ref . ' is an unknown reference', E_USER_ERROR, __FILE__, __LINE__);
                 break;
@@ -2214,9 +2268,9 @@ class Smarty_Compiler extends Smarty {
         if ($_cacheable
             || 0<$this->_cacheable_state++) return '';
         if (!isset($this->_cache_serial)) $this->_cache_serial = md5(uniqid('Smarty'));
-        $_ret = 'if ($this->caching && !$this->_cache_including) { echo \'{nocache:'
+        $_ret = 'if ($this->caching && !$this->_cache_including): echo \'{nocache:'
             . $this->_cache_serial . '#' . $this->_nocache_count
-            . '}\';}';
+            . '}\'; endif;';
         return $_ret;
     }
 
@@ -2231,9 +2285,9 @@ class Smarty_Compiler extends Smarty {
         $_cacheable = !isset($this->_plugins[$type][$name]) || $this->_plugins[$type][$name][4];
         if ($_cacheable
             || --$this->_cacheable_state>0) return '';
-        return 'if ($this->caching && !$this->_cache_including) { echo \'{/nocache:'
+        return 'if ($this->caching && !$this->_cache_including): echo \'{/nocache:'
             . $this->_cache_serial . '#' . ($this->_nocache_count++)
-            . '}\';}';
+            . '}\'; endif;';
     }
 
 
index 2051b2f31f769715f84c6de6442229e5e64c476d..c05ef5d0b5ee45701e13f4e36108d90061a33205 100644 (file)
 {* Smarty *}
+{* debug.tpl, last updated version 2.1.0 *}
+{assign_debug_info}
+{capture assign=debug_output}
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+    <title>Smarty Debug Console</title>
+{literal}
+<style type="text/css">
+/* <![CDATA[ */
+body, h1, h2, td, th, p {
+    font-family: sans-serif;
+    font-weight: normal;
+    font-size: 0.9em;
+    margin: 1px;
+    padding: 0;
+}
 
-{* debug.tpl, last updated version 2.0.1 *}
+h1 {
+    margin: 0;
+    text-align: left;
+    padding: 2px;
+    background-color: #f0c040;
+    color:  black;
+    font-weight: bold;
+    font-size: 1.2em;
+ }
 
-{assign_debug_info}
+h2 {
+    background-color: #9B410E;
+    color: white;
+    text-align: left;
+    font-weight: bold;
+    padding: 2px;
+    border-top: 1px solid black;
+}
+
+body {
+    background: black; 
+}
+
+p, table, div {
+    background: #f0ead8;
+} 
+
+p {
+    margin: 0;
+    font-style: italic;
+    text-align: center;
+}
+
+table {
+    width: 100%;
+}
+
+th, td {
+    font-family: monospace;
+    vertical-align: top;
+    text-align: left;
+    width: 50%;
+}
+
+td {
+    color: green;
+}
+
+.odd {
+    background-color: #eeeeee;
+}
+
+.even {
+    background-color: #fafafa;
+}
+
+.exectime {
+    font-size: 0.8em;
+    font-style: italic;
+}
+
+#table_assigned_vars th {
+    color: blue;
+}
+
+#table_config_vars th {
+    color: maroon;
+}
+/* ]]> */
+</style>
+{/literal}
+</head>
+<body>
+
+<h1>Smarty Debug Console</h1>
+
+<h2>included templates &amp; config files (load time in seconds)</h2>
+
+<div>
+{section name=templates loop=$_debug_tpls}
+    {section name=indent loop=$_debug_tpls[templates].depth}&nbsp;&nbsp;&nbsp;{/section}
+    <font color={if $_debug_tpls[templates].type eq "template"}brown{elseif $_debug_tpls[templates].type eq "insert"}black{else}green{/if}>
+        {$_debug_tpls[templates].filename|escape:html}</font>
+    {if isset($_debug_tpls[templates].exec_time)}
+        <span class="exectime">
+        ({$_debug_tpls[templates].exec_time|string_format:"%.5f"})
+        {if %templates.index% eq 0}(total){/if}
+        </span>
+    {/if}
+    <br />
+{sectionelse}
+    <p>no templates included</p>
+{/section}
+</div>
+
+<h2>assigned template variables</h2>
+
+<table id="table_assigned_vars">
+    {section name=vars loop=$_debug_keys}
+        <tr class="{cycle values="odd,even"}">
+            <th>{ldelim}${$_debug_keys[vars]|escape:'html'}{rdelim}</th>
+            <td>{$_debug_vals[vars]|@debug_print_var}</td></tr>
+    {sectionelse}
+        <tr><td><p>no template variables assigned</p></td></tr>
+    {/section}
+</table>
+
+<h2>assigned config file variables (outer template scope)</h2>
 
+<table id="table_config_vars">
+    {section name=config_vars loop=$_debug_config_keys}
+        <tr class="{cycle values="odd,even"}">
+            <th>{ldelim}#{$_debug_config_keys[config_vars]|escape:'html'}#{rdelim}</th>
+            <td>{$_debug_config_vals[config_vars]|@debug_print_var}</td></tr>
+    {sectionelse}
+        <tr><td><p>no config vars assigned</p></td></tr>
+    {/section}
+</table>
+</body>
+</html>
+{/capture}
 {if isset($_smarty_debug_output) and $_smarty_debug_output eq "html"}
-       <table border=0 width=100%>
-       <tr bgcolor=#cccccc><th colspan=2>Smarty Debug Console</th></tr>
-       <tr bgcolor=#cccccc><td colspan=2><b>included templates & config files (load time in seconds):</b></td></tr>
-       {section name=templates loop=$_debug_tpls}
-               <tr bgcolor={if %templates.index% is even}#eeeeee{else}#fafafa{/if}><td colspan=2><tt>{section name=indent loop=$_debug_tpls[templates].depth}&nbsp;&nbsp;&nbsp;{/section}<font color={if $_debug_tpls[templates].type eq "template"}brown{elseif $_debug_tpls[templates].type eq "insert"}black{else}green{/if}>{$_debug_tpls[templates].filename|escape:html}</font>{if isset($_debug_tpls[templates].exec_time)} <font size=-1><i>({$_debug_tpls[templates].exec_time|string_format:"%.5f"}){if %templates.index% eq 0} (total){/if}</i></font>{/if}</tt></td></tr>
-       {sectionelse}
-               <tr bgcolor=#eeeeee><td colspan=2><tt><i>no templates included</i></tt></td></tr>
-       {/section}
-       <tr bgcolor=#cccccc><td colspan=2><b>assigned template variables:</b></td></tr>
-       {section name=vars loop=$_debug_keys}
-               <tr bgcolor={if %vars.index% is even}#eeeeee{else}#fafafa{/if}><td valign=top><tt><font color=blue>{ldelim}${$_debug_keys[vars]}{rdelim}</font></tt></td><td nowrap><tt><font color=green>{$_debug_vals[vars]|@debug_print_var}</font></tt></td></tr>
-       {sectionelse}
-               <tr bgcolor=#eeeeee><td colspan=2><tt><i>no template variables assigned</i></tt></td></tr>
-       {/section}
-       <tr bgcolor=#cccccc><td colspan=2><b>assigned config file variables (outer template scope):</b></td></tr>
-       {section name=config_vars loop=$_debug_config_keys}
-               <tr bgcolor={if %config_vars.index% is even}#eeeeee{else}#fafafa{/if}><td valign=top><tt><font color=maroon>{ldelim}#{$_debug_config_keys[config_vars]}#{rdelim}</font></tt></td><td><tt><font color=green>{$_debug_config_vals[config_vars]|@debug_print_var}</font></tt></td></tr>
-       {sectionelse}
-               <tr bgcolor=#eeeeee><td colspan=2><tt><i>no config vars assigned</i></tt></td></tr>
-       {/section}
-       </table>
-</BODY></HTML>
+    {$debug_output}
 {else}
-<SCRIPT language=javascript>
-       if( self.name == '' ) {ldelim}
-          var title = 'Console';
-       {rdelim}
-       else {ldelim}
-          var title = 'Console_' + self.name;
-       {rdelim}
-       _smarty_console = window.open("",title.value,"width=680,height=600,resizable,scrollbars=yes");
-       _smarty_console.document.write("<HTML><HEAD><TITLE>Smarty Debug Console_"+self.name+"</TITLE></HEAD><BODY bgcolor=#ffffff>");
-       _smarty_console.document.write("<table border=0 width=100%>");
-       _smarty_console.document.write("<tr bgcolor=#cccccc><th colspan=2>Smarty Debug Console</th></tr>");
-       _smarty_console.document.write("<tr bgcolor=#cccccc><td colspan=2><b>included templates & config files (load time in seconds):</b></td></tr>");
-       {section name=templates loop=$_debug_tpls}
-               _smarty_console.document.write("<tr bgcolor={if %templates.index% is even}#eeeeee{else}#fafafa{/if}><td colspan=2><tt>{section name=indent loop=$_debug_tpls[templates].depth}&nbsp;&nbsp;&nbsp;{/section}<font color={if $_debug_tpls[templates].type eq "template"}brown{elseif $_debug_tpls[templates].type eq "insert"}black{else}green{/if}>{$_debug_tpls[templates].filename|escape:html|escape:javascript}</font>{if isset($_debug_tpls[templates].exec_time)} <font size=-1><i>({$_debug_tpls[templates].exec_time|string_format:"%.5f"}){if %templates.index% eq 0} (total){/if}</i></font>{/if}</tt></td></tr>");
-       {sectionelse}
-               _smarty_console.document.write("<tr bgcolor=#eeeeee><td colspan=2><tt><i>no templates included</i></tt></td></tr>");
-       {/section}
-       _smarty_console.document.write("<tr bgcolor=#cccccc><td colspan=2><b>assigned template variables:</b></td></tr>");
-       {section name=vars loop=$_debug_keys}
-               _smarty_console.document.write("<tr bgcolor={if %vars.index% is even}#eeeeee{else}#fafafa{/if}><td valign=top><tt><font color=blue>{ldelim}${$_debug_keys[vars]}{rdelim}</font></tt></td><td nowrap><tt><font color=green>{$_debug_vals[vars]|@debug_print_var|escape:javascript}</font></tt></td></tr>");
-       {sectionelse}
-               _smarty_console.document.write("<tr bgcolor=#eeeeee><td colspan=2><tt><i>no template variables assigned</i></tt></td></tr>");
-       {/section}
-       _smarty_console.document.write("<tr bgcolor=#cccccc><td colspan=2><b>assigned config file variables (outer template scope):</b></td></tr>");
-       {section name=config_vars loop=$_debug_config_keys}
-               _smarty_console.document.write("<tr bgcolor={if %config_vars.index% is even}#eeeeee{else}#fafafa{/if}><td valign=top><tt><font color=maroon>{ldelim}#{$_debug_config_keys[config_vars]}#{rdelim}</font></tt></td><td><tt><font color=green>{$_debug_config_vals[config_vars]|@debug_print_var|escape:javascript}</font></tt></td></tr>");
-       {sectionelse}
-               _smarty_console.document.write("<tr bgcolor=#eeeeee><td colspan=2><tt><i>no config vars assigned</i></tt></td></tr>");
-       {/section}
-       _smarty_console.document.write("</table>");
-       _smarty_console.document.write("</BODY></HTML>");
-       _smarty_console.document.close();
-</SCRIPT>
-{/if}
+<script type="text/javascript">
+// <![CDATA[
+    if ( self.name == '' ) {ldelim}
+       var title = 'Console';
+    {rdelim}
+    else {ldelim}
+       var title = 'Console_' + self.name;
+    {rdelim}
+    _smarty_console = window.open("",title.value,"width=680,height=600,resizable,scrollbars=yes");
+    _smarty_console.document.write('{$debug_output|escape:'javascript'}');
+    _smarty_console.document.close();
+// ]]>
+</script>
+{/if}
\ No newline at end of file
index 999cf59302c690c14e488f57d48c6761abcddb68..3eecc49723c78615f8e28d0623984d07d09a58c9 100644 (file)
@@ -22,7 +22,7 @@ function smarty_core_create_dir_structure($params, &$smarty)
             /* unix-style paths */
             $_dir = $params['dir'];
             $_dir_parts = preg_split('!/+!', $_dir, -1, PREG_SPLIT_NO_EMPTY);
-            $_new_dir = ($_dir{0}=='/') ? '/' : getcwd().'/';
+            $_new_dir = (substr($_dir, 0, 1)=='/') ? '/' : getcwd().'/';
             if($_use_open_basedir = !empty($_open_basedir_ini)) {
                 $_open_basedirs = explode(':', $_open_basedir_ini);
             }
index 9bec5c21efb57166ef324e30d39dcd9904b3c6f3..d54abd432275a75bba7c53274ca5c9866039c871 100644 (file)
@@ -27,7 +27,7 @@ function smarty_core_is_secure($params, &$smarty)
             foreach ((array)$params['resource_base_path'] as $curr_dir) {
                 if ( ($_cd = realpath($curr_dir)) !== false &&
                      strncmp($_rp, $_cd, strlen($_cd)) == 0 &&
-                     $_rp{strlen($_cd)} == DIRECTORY_SEPARATOR ) {
+                     substr($_rp, strlen($_cd), 1) == DIRECTORY_SEPARATOR ) {
                     return true;
                 }
             }
@@ -35,10 +35,10 @@ function smarty_core_is_secure($params, &$smarty)
         if (!empty($smarty->secure_dir)) {
             foreach ((array)$smarty->secure_dir as $curr_dir) {
                 if ( ($_cd = realpath($curr_dir)) !== false) {
-                    if( strncmp($_rp, $_cd, strlen($_cd)) == 0 &&
-                     $_rp{strlen($_cd)} == DIRECTORY_SEPARATOR ) {
+                    if($_cd == $_rp) {
                         return true;
-                    } elseif ($_cd == $_rp) {
+                    } elseif (strncmp($_rp, $_cd, strlen($_cd)) == 0 &&
+                        substr($_rp, strlen($_cd), 1) == DIRECTORY_SEPARATOR) {
                         return true;
                     }
                 }
index f0bd2fb8c96f945e9e0d9015749e07a6e9bf84b4..429973158d6cb75b3a6126f471aac3218fb6dc56 100644 (file)
@@ -25,7 +25,7 @@ function smarty_core_is_trusted($params, &$smarty)
                 if (!empty($curr_dir) && is_readable ($curr_dir)) {
                     $_cd = realpath($curr_dir);
                     if (strncmp($_rp, $_cd, strlen($_cd)) == 0
-                        && $_rp{strlen($_cd)} == DIRECTORY_SEPARATOR ) {
+                        && substr($_rp, strlen($_cd), 1) == DIRECTORY_SEPARATOR ) {
                         $_smarty_trusted = true;
                         break;
                     }
index 29cb007eb1d3eb945d960776d18aa475de4afa55..1d78edd937a587cf793a4d74a2bd65560b440563 100644 (file)
@@ -52,7 +52,7 @@ function smarty_core_process_cached_inserts($params, &$smarty)
             $replace = '';
         }
 
-        $params['results'] = str_replace($cached_inserts[$i], $replace, $params['results']);
+        $params['results'] = substr_replace($params['results'], $replace, strpos($params['results'], $cached_inserts[$i]), strlen($cached_inserts[$i]));
         if ($smarty->debugging) {
             $_params = array();
             require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
index d539423bf740ee58787d4352a9e83b2990696b1f..904d59745288b54da60c92397a8fb854556d297c 100644 (file)
@@ -25,7 +25,7 @@ function smarty_core_process_compiled_include($params, &$smarty)
         $smarty->_include($_include_file_path, true);
     }
 
-    foreach ($smarty->_cache_serials as $_include_file_path=>$_cache_serial) {
+    foreach ($smarty->_cache_info['cache_serials'] as $_include_file_path=>$_cache_serial) {
         $_return = preg_replace_callback('!(\{nocache\:('.$_cache_serial.')#(\d+)\})!s',
                                          array(&$smarty, '_process_compiled_include_callback'),
                                          $_return);
index edccfbd5e90a343f6af2f005b24aaf4cefcf46c8..fa3cdd746d7342f055f269aa23dc4f40fb41fe4b 100644 (file)
@@ -37,10 +37,10 @@ function smarty_core_write_cache_file($params, &$smarty)
         // and replace it by a single nocache-tag
         // this new nocache-tag will be replaced by dynamic contents in
         // smarty_core_process_compiled_includes() on a cache-read
-
+        
         $match_count = count($match[0]);
         $results = preg_split('!(\{/?nocache\:[0-9a-f]{32}#\d+\})!', $params['results'], -1, PREG_SPLIT_DELIM_CAPTURE);
-
+        
         $level = 0;
         $j = 0;
         for ($i=0, $results_count = count($results); $i < $results_count && $j < $match_count; $i++) {
@@ -68,7 +68,7 @@ function smarty_core_write_cache_file($params, &$smarty)
     if (!empty($smarty->cache_handler_func)) {
         // use cache_handler function
         call_user_func_array($smarty->cache_handler_func,
-                             array('write', &$smarty, &$params['results'], $params['tpl_file'], $params['cache_id'], $params['compile_id'], null));
+                             array('write', &$smarty, &$params['results'], $params['tpl_file'], $params['cache_id'], $params['compile_id'], $smarty->_cache_info['expires']));
     } else {
         // use local cache file
 
index 3a719be12981fd3624d33025f618c6aa7ef18076..c14adb5f42a8e5db92914dbefcbbfdea9d29edde 100644 (file)
 
 function smarty_core_write_compiled_include($params, &$smarty)
 {
-    $_tag_start = 'if \(\$this->caching && \!\$this->_cache_including\) \{ echo \'\{nocache\:('.$params['cache_serial'].')#(\d+)\}\';\}';
-    $_tag_end   = 'if \(\$this->caching && \!\$this->_cache_including\) \{ echo \'\{/nocache\:(\\2)#(\\3)\}\';\}';
+    $_tag_start = 'if \(\$this->caching && \!\$this->_cache_including\)\: echo \'\{nocache\:('.$params['cache_serial'].')#(\d+)\}\'; endif;';
+    $_tag_end   = 'if \(\$this->caching && \!\$this->_cache_including\)\: echo \'\{/nocache\:(\\2)#(\\3)\}\'; endif;';
 
     preg_match_all('!('.$_tag_start.'(.*)'.$_tag_end.')!Us',
                    $params['compiled_content'], $_match_source, PREG_SET_ORDER);
-
+    
     // no nocache-parts found: done
     if (count($_match_source)==0) return;
 
@@ -62,7 +62,7 @@ function smarty_core_write_compiled_include($params, &$smarty)
                         $tokens[$i] = '$' . $this_varname;
                     } else {
                         $tokens[$i] = $tokens[$i][1];
-                    }
+                    }                   
                 }
             }
             $source = implode('', $tokens);
index 09e169840347984a6a990304e75d0e70a3b65f25..8a3a3b39843955431036bfea1b9cfc68dc358646 100644 (file)
@@ -23,8 +23,7 @@ function smarty_core_write_file($params, &$smarty)
         smarty_core_create_dir_structure($_params, $smarty);
     }
 
-    // write to tmp file, then rename it to avoid
-    // file locking race condition
+    // write to tmp file, then rename it to avoid file locking race condition
     $_tmp_file = tempnam($_dirname, 'wrt');
 
     if (!($fd = @fopen($_tmp_file, 'wb'))) {
@@ -38,12 +37,13 @@ function smarty_core_write_file($params, &$smarty)
     fwrite($fd, $params['contents']);
     fclose($fd);
 
-    // Delete the file if it allready exists (this is needed on Win,
-    // because it cannot overwrite files with rename()
-    if (file_exists($params['filename'])) {
+    if (DIRECTORY_SEPARATOR == '\\' || !@rename($_tmp_file, $params['filename'])) {
+        // On platforms and filesystems that cannot overwrite with rename() 
+        // delete the file before renaming it -- because windows always suffers
+        // this, it is short-circuited to avoid the initial rename() attempt
         @unlink($params['filename']);
+        @rename($_tmp_file, $params['filename']);
     }
-    @rename($_tmp_file, $params['filename']);
     @chmod($params['filename'], $smarty->_file_perms);
 
     return true;
@@ -51,4 +51,4 @@ function smarty_core_write_file($params, &$smarty)
 
 /* vim: set expandtab: */
 
-?>
+?>
\ No newline at end of file
index f67b1947940a568d060ea9d4c80736a44e6540f5..8cd010acb4e29089db5122c40b119c08de316028 100644 (file)
@@ -23,6 +23,7 @@
  *           indent_char: string (" ")
  *           wrap_boundary: boolean (true)
  * </pre>
+ * @author Monte Ohrt <monte at ohrt dot com>
  * @param string contents of the block
  * @param Smarty clever simulation of a method
  * @return string string $content re-formatted
@@ -41,7 +42,7 @@ function smarty_block_textformat($params, $content, &$smarty)
     $wrap_char = "\n";
     $wrap_cut = false;
     $assign = null;
-
+    
     foreach ($params as $_key => $_val) {
         switch ($_key) {
             case 'style':
index 2e0201779628ea68db65d965499e5d00e8f6f5df..abef377f8c45a253a95661af4b65a2a034658b36 100644 (file)
@@ -13,6 +13,8 @@
  * Purpose:  assign a value to a template variable
  * @link http://smarty.php.net/manual/en/language.custom.functions.php#LANGUAGE.FUNCTION.ASSIGN {assign}
  *       (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com> (initial author)
+ * @author messju mohr <messju at lammfellpuschen dot de> (conversion to compiler function)
  * @param string containing var-attribute and value-attribute
  * @param Smarty_Compiler
  */
index 0d66b061aec2b3869f6ce867dc2f93406d9dbf21..654049876a92f6797ce0773202c6e521426ca17d 100644 (file)
@@ -11,6 +11,7 @@
  * Type:     function<br>
  * Name:     assign_debug_info<br>
  * Purpose:  assign debug info to the template<br>
+ * @author Monte Ohrt <monte at ohrt dot com>
  * @param array unused in this plugin, this plugin uses {@link Smarty::$_config},
  *              {@link Smarty::$_tpl_vars} and {@link Smarty::$_smarty_debug_info}
  * @param Smarty
@@ -25,12 +26,12 @@ function smarty_function_assign_debug_info($params, &$smarty)
         $smarty->assign("_debug_config_keys", array_keys($config_vars));
         $smarty->assign("_debug_config_vals", array_values($config_vars));
     }
-
+    
     $included_templates = $smarty->_smarty_debug_info;
-
+    
     $smarty->assign("_debug_keys", array_keys($assigned_vars));
     $smarty->assign("_debug_vals", array_values($assigned_vars));
-
+    
     $smarty->assign("_debug_tpls", $included_templates);
 }
 
index db7f8f6b9b4281a97d49ede001aece3fb032fc24..db89f638c28aba5755ee2ee58715fc250758dcdd 100644 (file)
@@ -13,6 +13,8 @@
  * Purpose:  load config file vars
  * @link http://smarty.php.net/manual/en/language.function.config.load.php {config_load}
  *       (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @author messju mohr <messju at lammfellpuschen dot de> (added use of resources)
  * @param array Format:
  * <pre>
  * array('file' => required config file name,
index 2fb5b2c6cd7dda34a899f43b9a9c215c9772da00..1f26db5fb632166ad33d46d15faa9449cfd84dd4 100644 (file)
@@ -12,6 +12,7 @@
  * Type:     function<br>
  * Name:     counter<br>
  * Purpose:  print out a counter value
+ * @author Monte Ohrt <monte at ohrt dot com>
  * @link http://smarty.php.net/manual/en/language.function.counter.php {counter}
  *       (Smarty online manual)
  * @param array parameters
@@ -44,7 +45,7 @@ function smarty_function_counter($params, &$smarty)
     if (isset($counter['assign'])) {
         $smarty->assign($counter['assign'], $counter['count']);
     }
-
+    
     if (isset($params['print'])) {
         $print = (bool)$params['print'];
     } else {
@@ -60,7 +61,7 @@ function smarty_function_counter($params, &$smarty)
     if (isset($params['skip'])) {
         $counter['skip'] = $params['skip'];
     }
-
+    
     if (isset($params['direction'])) {
         $counter['direction'] = $params['direction'];
     }
@@ -69,9 +70,9 @@ function smarty_function_counter($params, &$smarty)
         $counter['count'] -= $counter['skip'];
     else
         $counter['count'] += $counter['skip'];
-
+    
     return $retval;
-
+    
 }
 
 /* vim: set expandtab: */
index cd333ce49858aa6a67e94f43036628c1a991f021..fe78bb87da02a617af79964a02c944543c68c27b 100644 (file)
 function smarty_function_cycle($params, &$smarty)
 {
     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'])) {
             $smarty->trigger_error("cycle: missing 'values' parameter");
@@ -64,22 +64,22 @@ function smarty_function_cycle($params, &$smarty)
     }
 
     $cycle_vars[$name]['delimiter'] = (isset($params['delimiter'])) ? $params['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;
         $smarty->assign($params['assign'], $cycle_array[$cycle_vars[$name]['index']]);
     }
-
+        
     if($print) {
         $retval = $cycle_array[$cycle_vars[$name]['index']];
     } else {
@@ -93,7 +93,7 @@ function smarty_function_cycle($params, &$smarty)
             $cycle_vars[$name]['index']++;
         }
     }
-
+    
     return $retval;
 }
 
index 3a4b8b2b8c4e3514e7352849084b8979f27432bd..ff0472de250e235d88243cedac343572723e508d 100644 (file)
@@ -14,6 +14,7 @@
  * Purpose:  evaluate a template variable as a template<br>
  * @link http://smarty.php.net/manual/en/language.function.eval.php {eval}
  *       (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
  * @param array
  * @param Smarty
  */
index fb5daec20557346b3cfc3448241cb0f20efad7ae..81b1bfc6b9a03f916fcdb62209f6f458c5e712e5 100644 (file)
@@ -14,6 +14,7 @@
  * 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 <monte at ohrt dot com>
  * @param array
  * @param Smarty
  * @return string|null if the assign parameter is passed, Smarty assigns the
@@ -34,7 +35,7 @@ function smarty_function_fetch($params, &$smarty)
             $smarty->_trigger_fatal_error('[plugin] (secure mode) fetch \'' . $params['file'] . '\' is not allowed');
             return;
         }
-
+        
         // fetch the file
         if($fp = @fopen($params['file'],'r')) {
             while(!feof($fp)) {
index d75ac31c4c35cb45db2e800a66840f497af50bb5..9abae72ef7623066530109baf7d72dfde8f5422e 100644 (file)
  *         - 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)
  *
- * Examples: {html_image file="images/masthead.gif"}
- * Output:   <img src="images/masthead.gif" width=400 height=23>
+ * Examples: {html_image file="/images/masthead.gif"}
+ * Output:   <img src="/images/masthead.gif" width=400 height=23>
  * @link http://smarty.php.net/manual/en/language.function.html.image.php {html_image}
  *      (Smarty online manual)
  * @author   Monte Ohrt <monte at ohrt dot com>
@@ -36,7 +37,7 @@
 function smarty_function_html_image($params, &$smarty)
 {
     require_once $smarty->_get_plugin_filepath('shared','escape_special_chars');
-
+    
     $alt = '';
     $file = '';
     $height = '';
@@ -44,6 +45,7 @@ function smarty_function_html_image($params, &$smarty)
     $extra = '';
     $prefix = '';
     $suffix = '';
+    $path_prefix = '';
     $server_vars = ($smarty->request_use_auto_globals) ? $_SERVER : $GLOBALS['HTTP_SERVER_VARS'];
     $basedir = isset($server_vars['DOCUMENT_ROOT']) ? $server_vars['DOCUMENT_ROOT'] : '';
     foreach($params as $_key => $_val) {
@@ -52,6 +54,7 @@ function smarty_function_html_image($params, &$smarty)
             case 'height':
             case 'width':
             case 'dpi':
+            case 'path_prefix':
             case 'basedir':
                 $$_key = $_val;
                 break;
@@ -90,15 +93,9 @@ function smarty_function_html_image($params, &$smarty)
     } else {
         $_image_path = $file;
     }
-
+    
     if(!isset($params['width']) || !isset($params['height'])) {
-        if ($smarty->security &&
-            ($_params = array('resource_type' => 'file', 'resource_name' => $_image_path)) &&
-            (require_once(SMARTY_CORE_DIR . 'core.is_secure.php')) &&
-            (!smarty_core_is_secure($_params, $smarty)) ) {
-            $smarty->trigger_error("html_image: (secure) '$_image_path' not in secure directory", E_USER_NOTICE);
-
-        } elseif (!$_image_data = @getimagesize($_image_path)) {
+        if(!$_image_data = @getimagesize($_image_path)) {
             if(!file_exists($_image_path)) {
                 $smarty->trigger_error("html_image: unable to find '$_image_path'", E_USER_NOTICE);
                 return;
@@ -110,7 +107,13 @@ function smarty_function_html_image($params, &$smarty)
                 return;
             }
         }
-
+        if ($smarty->security &&
+            ($_params = array('resource_type' => 'file', 'resource_name' => $_image_path)) &&
+            (require_once(SMARTY_CORE_DIR . 'core.is_secure.php')) &&
+            (!smarty_core_is_secure($_params, $smarty)) ) {
+            $smarty->trigger_error("html_image: (secure) '$_image_path' not in secure directory", E_USER_NOTICE);
+        }        
+        
         if(!isset($params['width'])) {
             $width = $_image_data[0];
         }
@@ -131,7 +134,7 @@ function smarty_function_html_image($params, &$smarty)
         $height = round($height * $_resize);
     }
 
-    return $prefix . '<img src="'.$file.'" alt="'.$alt.'" width="'.$width.'" height="'.$height.'"'.$extra.' />' . $suffix;
+    return $prefix . '<img src="'.$path_prefix.$file.'" alt="'.$alt.'" width="'.$width.'" height="'.$height.'"'.$extra.' />' . $suffix;
 }
 
 /* vim: set expandtab: */
index b6f6b74003c5f7721ec79a48f0633b124dd1a01e..cebadde4794cca9e3883ef39c47828851683b754 100644 (file)
@@ -21,6 +21,7 @@
  *           the passed parameters
  * @link http://smarty.php.net/manual/en/language.function.html.options.php {html_image}
  *      (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
  * @param array
  * @param Smarty
  * @return string
 function smarty_function_html_options($params, &$smarty)
 {
     require_once $smarty->_get_plugin_filepath('shared','escape_special_chars');
-
+    
     $name = null;
     $values = null;
     $options = null;
     $selected = array();
     $output = null;
-
+    
     $extra = '';
-
+    
     foreach($params as $_key => $_val) {
         switch($_key) {
             case 'name':
                 $$_key = (string)$_val;
                 break;
-
+            
             case 'options':
                 $$_key = (array)$_val;
                 break;
-
+                
             case 'values':
             case 'output':
                 $$_key = array_values((array)$_val);
@@ -56,7 +57,7 @@ function smarty_function_html_options($params, &$smarty)
             case 'selected':
                 $$_key = array_map('strval', array_values((array)$_val));
                 break;
-
+                
             default:
                 if(!is_array($_val)) {
                     $extra .= ' '.$_key.'="'.smarty_function_escape_special_chars($_val).'"';
@@ -73,12 +74,12 @@ function smarty_function_html_options($params, &$smarty)
     $_html_result = '';
 
     if (isset($options)) {
-
+        
         foreach ($options as $_key=>$_val)
             $_html_result .= smarty_function_html_options_optoutput($_key, $_val, $selected);
 
     } else {
-
+        
         foreach ($values as $_i=>$_key) {
             $_val = isset($output[$_i]) ? $output[$_i] : '';
             $_html_result .= smarty_function_html_options_optoutput($_key, $_val, $selected);
index 8ad0c65eec9816bc5f71d36e214efc33e87e94b0..7503cfaca8f01a1b7652ff69820b242e7e8497d2 100644 (file)
@@ -41,7 +41,7 @@
 function smarty_function_html_radios($params, &$smarty)
 {
     require_once $smarty->_get_plugin_filepath('shared','escape_special_chars');
-
+   
     $name = 'radio';
     $values = null;
     $options = null;
@@ -134,7 +134,7 @@ function smarty_function_html_radios_output($name, $value, $output, $selected, $
           $_id = smarty_function_escape_special_chars(preg_replace('![^\w\-\.]!', '_', $name . '_' . $value));
           $_output .= '<label for="' . $_id . '">';
       } else {
-          $_output .= '<label>';
+          $_output .= '<label>';           
       }
    }
    $_output .= '<input type="radio" name="'
index e03e670903fa057e2126d4a9a6a94895052ba094..e5eb18307bf3922d27b2b978bd81a30920e4d57f 100644 (file)
  *                month values (Gary Loescher)
  *           - 1.3.1 added support for choosing format for
  *                day values (Marcus Bointon)
- *           - 1.3.2 suppport negative timestamps, force year
+ *           - 1.3.2 support negative timestamps, force year
  *             dropdown to include given date unless explicitly set (Monte)
+ *           - 1.3.4 fix behaviour of 0000-00-00 00:00:00 dates to match that
+ *             of 0000-00-00 dates (cybot, boots)
  * @link http://smarty.php.net/manual/en/language.function.html.select.date.php {html_select_date}
  *      (Smarty online manual)
- * @version 1.3.2
- * @author   Andrei Zmievski
+ * @version 1.3.4
+ * @author Andrei Zmievski
+ * @author Monte Ohrt <monte at ohrt dot com>
  * @param array
  * @param Smarty
  * @return string
@@ -130,12 +133,14 @@ function smarty_function_html_select_date($params, &$smarty)
         }
     }
 
-    if(preg_match('!^-\d+$!',$time)) {
+    if (preg_match('!^-\d+$!', $time)) {
         // negative timestamp, use date()
-        $time = date('Y-m-d',$time);
+        $time = date('Y-m-d', $time);
     }
     // If $time is not in format yyyy-mm-dd
-    if (!preg_match('/^\d{0,4}-\d{0,2}-\d{0,2}$/', $time)) {
+    if (preg_match('/^(\d{0,4}-\d{0,2}-\d{0,2})/', $time, $found)) {
+        $time = $found[1];
+    } else {
         // use smarty_make_timestamp to get an unix timestamp and
         // strftime to make yyyy-mm-dd
         $time = strftime('%Y-%m-%d', smarty_make_timestamp($time));
@@ -173,7 +178,9 @@ function smarty_function_html_select_date($params, &$smarty)
 
     $html_result = $month_result = $day_result = $year_result = "";
 
+    $field_separator_count = -1;
     if ($display_months) {
+       $field_separator_count++;
         $month_names = array();
         $month_values = array();
         if(isset($month_empty)) {
@@ -211,6 +218,7 @@ function smarty_function_html_select_date($params, &$smarty)
     }
 
     if ($display_days) {
+       $field_separator_count++;
         $days = array();
         if (isset($day_empty)) {
             $days[''] = $day_empty;
@@ -246,6 +254,7 @@ function smarty_function_html_select_date($params, &$smarty)
     }
 
     if ($display_years) {
+       $field_separator_count++;
         if (null !== $field_array){
             $year_name = $field_array . '[' . $prefix . 'Year]';
         } else {
@@ -309,7 +318,7 @@ function smarty_function_html_select_date($params, &$smarty)
                 break;
         }
         // Add the field seperator
-        if($i != 2) {
+        if($i < $field_separator_count) {
             $html_result .= $field_separator;
         }
     }
index 0941a44a3d683f3b167f1c7d8ba7ad5722af5fb5..2e5be7efe3ff0bc9d17ec69686163d39a97f76c1 100644 (file)
@@ -14,6 +14,8 @@
  * Purpose:  Prints the dropdowns for time selection
  * @link http://smarty.php.net/manual/en/language.function.html.select.time.php {html_select_time}
  *          (Smarty online manual)
+ * @author Roberto Berto <roberto@berto.net>
+ * @credits Monte Ohrt <monte AT ohrt DOT com>
  * @param array
  * @param Smarty
  * @return string
@@ -123,7 +125,7 @@ function smarty_function_html_select_time($params, &$smarty)
             $html_result .= ' ' . $all_extra;
         }
         $html_result .= '>'."\n";
-
+        
         $html_result .= smarty_function_html_options(array('output'          => $minutes,
                                                            'values'          => $minutes,
                                                            'selected'      => $selected,
@@ -143,7 +145,7 @@ function smarty_function_html_select_time($params, &$smarty)
         } else {
             $html_result .= '"' . $prefix . 'Second"';
         }
-
+        
         if (null !== $second_extra){
             $html_result .= ' ' . $second_extra;
         }
@@ -151,7 +153,7 @@ function smarty_function_html_select_time($params, &$smarty)
             $html_result .= ' ' . $all_extra;
         }
         $html_result .= '>'."\n";
-
+        
         $html_result .= smarty_function_html_options(array('output'          => $seconds,
                                                            'values'          => $seconds,
                                                            'selected'      => $selected,
@@ -167,7 +169,7 @@ function smarty_function_html_select_time($params, &$smarty)
         } else {
             $html_result .= '"' . $prefix . 'Meridian"';
         }
-
+        
         if (null !== $meridian_extra){
             $html_result .= ' ' . $meridian_extra;
         }
@@ -175,7 +177,7 @@ function smarty_function_html_select_time($params, &$smarty)
             $html_result .= ' ' . $all_extra;
         }
         $html_result .= '>'."\n";
-
+        
         $html_result .= smarty_function_html_options(array('output'          => array('AM', 'PM'),
                                                            'values'          => array('am', 'pm'),
                                                            'selected'      => strtolower(strftime('%p', $time)),
index 843b51b65c5d6178d5cbe44f400035ef1466ab57..32aeba83c95b215bca9f720f92061bbac5e7964b 100644 (file)
  * Purpose:  make an html table from an array of data<br>
  * Input:<br>
  *         - loop = array to loop through
- *         - cols = number of columns
+ *         - cols = number of columns, comma separated list of column names
+ *                  or array of column names
  *         - rows = number of rows
  *         - table_attr = table attributes
+ *         - th_attr = table heading attributes (arrays are cycled)
  *         - tr_attr = table row attributes (arrays are cycled)
  *         - td_attr = table cell attributes (arrays are cycled)
  *         - trailpad = value to pad trailing cells with
+ *         - caption = text for caption element 
  *         - vdir = vertical direction (default: "down", means top-to-bottom)
  *         - hdir = horizontal direction (default: "right", means left-to-right)
  *         - inner = inner loop (default "cols": print $loop line by line,
  * <pre>
  * {table loop=$data}
  * {table loop=$data cols=4 tr_attr='"bgcolor=red"'}
- * {table loop=$data cols=4 tr_attr=$colors}
+ * {table loop=$data cols="first,second,third" tr_attr=$colors}
  * </pre>
  * @author   Monte Ohrt <monte at ohrt dot com>
- * @version  1.0
+ * @author credit to Messju Mohr <messju at lammfellpuschen dot de>
+ * @author credit to boots <boots dot smarty at yahoo dot com>
+ * @version  1.1
  * @link http://smarty.php.net/manual/en/language.function.html.table.php {html_table}
  *          (Smarty online manual)
  * @param array
@@ -45,13 +50,15 @@ function smarty_function_html_table($params, &$smarty)
 {
     $table_attr = 'border="1"';
     $tr_attr = '';
+    $th_attr = '';
     $td_attr = '';
-    $cols = 3;
+    $cols = $cols_count = 3;
     $rows = 3;
     $trailpad = '&nbsp;';
     $vdir = 'down';
     $hdir = 'right';
     $inner = 'cols';
+    $caption = '';
 
     if (!isset($params['loop'])) {
         $smarty->trigger_error("html_table: missing 'loop' parameter");
@@ -65,6 +72,19 @@ function smarty_function_html_table($params, &$smarty)
                 break;
 
             case 'cols':
+                if (is_array($_value) && !empty($_value)) {
+                    $cols = $_value;
+                    $cols_count = count($_value);
+                } elseif (!is_numeric($_value) && is_string($_value) && !empty($_value)) {
+                    $cols = explode(',', $_value);
+                    $cols_count = count($cols);
+                } elseif (!empty($_value)) {
+                    $cols_count = (int)$_value;
+                } else {
+                    $cols_count = $cols;
+                }
+                break;
+
             case 'rows':
                 $$_key = (int)$_value;
                 break;
@@ -74,11 +94,13 @@ function smarty_function_html_table($params, &$smarty)
             case 'hdir':
             case 'vdir':
             case 'inner':
+            case 'caption':
                 $$_key = (string)$_value;
                 break;
 
             case 'tr_attr':
             case 'td_attr':
+            case 'th_attr':
                 $$_key = $_value;
                 break;
         }
@@ -87,25 +109,42 @@ function smarty_function_html_table($params, &$smarty)
     $loop_count = count($loop);
     if (empty($params['rows'])) {
         /* no rows specified */
-        $rows = ceil($loop_count/$cols);
+        $rows = ceil($loop_count/$cols_count);
     } elseif (empty($params['cols'])) {
         if (!empty($params['rows'])) {
             /* no cols specified, but rows */
-            $cols = ceil($loop_count/$rows);
+            $cols_count = ceil($loop_count/$rows);
         }
     }
 
     $output = "<table $table_attr>\n";
 
+    if (!empty($caption)) {
+        $output .= '<caption>' . $caption . "</caption>\n";
+    }
+
+    if (is_array($cols)) {
+        $cols = ($hdir == 'right') ? $cols : array_reverse($cols);
+        $output .= "<thead><tr>\n";
+
+        for ($r=0; $r<$cols_count; $r++) {
+            $output .= '<th' . smarty_function_html_table_cycle('th', $th_attr, $r) . '>';
+            $output .= $cols[$r];
+            $output .= "</th>\n";
+        }
+        $output .= "</tr></thead>\n";
+    }
+
+    $output .= "<tbody>\n";
     for ($r=0; $r<$rows; $r++) {
         $output .= "<tr" . smarty_function_html_table_cycle('tr', $tr_attr, $r) . ">\n";
-        $rx =  ($vdir == 'down') ? $r*$cols : ($rows-1-$r)*$cols;
+        $rx =  ($vdir == 'down') ? $r*$cols_count : ($rows-1-$r)*$cols_count;
 
-        for ($c=0; $c<$cols; $c++) {
-            $x =  ($hdir == 'right') ? $rx+$c : $rx+$cols-1-$c;
+        for ($c=0; $c<$cols_count; $c++) {
+            $x =  ($hdir == 'right') ? $rx+$c : $rx+$cols_count-1-$c;
             if ($inner!='cols') {
                 /* shuffle x to loop over rows*/
-                $x = floor($x/$cols) + ($x%$cols)*$rows;
+                $x = floor($x/$cols_count) + ($x%$cols_count)*$rows;
             }
 
             if ($x<$loop_count) {
@@ -116,8 +155,9 @@ function smarty_function_html_table($params, &$smarty)
         }
         $output .= "</tr>\n";
     }
+    $output .= "</tbody>\n";
     $output .= "</table>\n";
-
+    
     return $output;
 }
 
@@ -127,7 +167,7 @@ function smarty_function_html_table_cycle($name, $var, $no) {
     } else {
         $ret = $var[$no % count($var)];
     }
-
+    
     return ($ret) ? ' '.$ret : '';
 }
 
index 292c96631887f373fc27a32c2004620bd9921cd0..20e9ed984992712b1e683122fef9fd23cb5d2304 100644 (file)
@@ -62,6 +62,8 @@ function smarty_function_mailto($params, &$smarty)
 
     // netscape and mozilla do not decode %40 (@) in BCC field (bug?)
     // so, don't encode it.
+    $search = array('%40', '%2C');
+    $replace  = array('@', ',');
     $mail_parms = array();
     foreach ($params as $var=>$value) {
         switch ($var) {
@@ -69,9 +71,9 @@ function smarty_function_mailto($params, &$smarty)
             case 'bcc':
             case 'followupto':
                 if (!empty($value))
-                    $mail_parms[] = $var.'='.str_replace('%40','@',rawurlencode($value));
+                    $mail_parms[] = $var.'='.str_replace($search,$replace,rawurlencode($value));
                 break;
-
+                
             case 'subject':
             case 'newsgroups':
                 $mail_parms[] = $var.'='.rawurlencode($value);
@@ -112,7 +114,7 @@ function smarty_function_mailto($params, &$smarty)
         $string = '<a href="mailto:'.$address.'" '.$extra.'>'.$text.'</a>';
 
         for($x = 0, $y = strlen($string); $x < $y; $x++ ) {
-            $ord[] = ord($string[$x]);
+            $ord[] = ord($string[$x]);   
         }
 
         $_ret = "<script type=\"text/javascript\" language=\"javascript\">\n";
@@ -123,10 +125,10 @@ function smarty_function_mailto($params, &$smarty)
         $_ret .= "}\n";
         $_ret .= "//-->\n";
         $_ret .= "</script>\n";
-
+        
         return $_ret;
-
-
+        
+        
     } elseif ($encode == 'hex') {
 
         preg_match('!^(.*)(\?.*)$!',$address,$match);
index 544f5c6a8a0b719cc06dcd3827d8e4a576b13991..bb78dac22c0be41c9148a2a36634089be3f74dcc 100644 (file)
@@ -14,6 +14,7 @@
  * Purpose:  handle math computations in template<br>
  * @link http://smarty.php.net/manual/en/language.function.math.php {math}
  *          (Smarty online manual)
+ * @author   Monte Ohrt <monte at ohrt dot com>
  * @param array
  * @param Smarty
  * @return string
@@ -26,7 +27,8 @@ function smarty_function_math($params, &$smarty)
         return;
     }
 
-    $equation = $params['equation'];
+    // strip out backticks, not necessary for math
+    $equation = str_replace('`','',$params['equation']);
 
     // make sure parenthesis are balanced
     if (substr_count($equation,"(") != substr_count($equation,")")) {
@@ -38,7 +40,7 @@ function smarty_function_math($params, &$smarty)
     preg_match_all("!(?:0x[a-fA-F0-9]+)|([a-zA-Z][a-zA-Z0-9_]+)!",$equation, $match);
     $allowed_funcs = array('int','abs','ceil','cos','exp','floor','log','log10',
                            'max','min','pi','pow','rand','round','sin','sqrt','srand','tan');
-
+    
     foreach($match[1] as $curr_var) {
         if ($curr_var && !in_array($curr_var, array_keys($params)) && !in_array($curr_var, $allowed_funcs)) {
             $smarty->trigger_error("math: function call $curr_var not allowed");
@@ -57,7 +59,7 @@ function smarty_function_math($params, &$smarty)
                 $smarty->trigger_error("math: parameter $key: is not numeric");
                 return;
             }
-            $equation = preg_replace("/\b$key\b/",$val, $equation);
+            $equation = preg_replace("/\b$key\b/", " \$params['$key'] ", $equation);
         }
     }
 
index 2ba54de5ab70a0fe1ac8c84f728234257b62e21d..3a76b785a4e73f4f415d51bab0551b1a6b4faf0f 100644 (file)
@@ -14,6 +14,7 @@
  * Purpose:  make text pop up in windows via overlib
  * @link http://smarty.php.net/manual/en/language.function.popup.php {popup}
  *          (Smarty online manual)
+ * @author   Monte Ohrt <monte at ohrt dot com>
  * @param array
  * @param Smarty
  * @return string
@@ -88,6 +89,7 @@ function smarty_function_popup($params, &$smarty)
             case 'vauto':
             case 'mouseoff':
             case 'followmouse':
+            case 'closeclick':
                 if ($_value) $append .= ',' . strtoupper($_key);
                 break;
 
index f89c21fc23e93810275405d21f05528a17753d7a..93cb45450c7fd5638117cb2c6a07d7c1f02a7d2c 100644 (file)
@@ -14,6 +14,7 @@
  * Purpose:  initialize overlib
  * @link http://smarty.php.net/manual/en/language.function.popup.init.php {popup_init}
  *          (Smarty online manual)
+ * @author   Monte Ohrt <monte at ohrt dot com>
  * @param array
  * @param Smarty
  * @return string
 function smarty_function_popup_init($params, &$smarty)
 {
     $zindex = 1000;
-
+    
     if (!empty($params['zindex'])) {
         $zindex = $params['zindex'];
     }
-
+    
     if (!empty($params['src'])) {
         return '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:'.$zindex.';"></div>' . "\n"
          . '<script type="text/javascript" language="JavaScript" src="'.$params['src'].'"></script>' . "\n";
index 3600589d507efaa8a9abc4d18a68c8d777921cf9..4a611d9f0f225524ab3d82f6ba81085105a1a61b 100644 (file)
  * Purpose:  capitalize words in the string
  * @link http://smarty.php.net/manual/en/language.modifiers.php#LANGUAGE.MODIFIER.CAPITALIZE
  *      capitalize (Smarty online manual)
+ * @author   Monte Ohrt <monte at ohrt dot com>
  * @param string
  * @return string
  */
 function smarty_modifier_capitalize($string, $uc_digits = false)
 {
     smarty_modifier_capitalize_ucfirst(null, $uc_digits);
-    return preg_replace_callback('!\b\w+\b!', 'smarty_modifier_capitalize_ucfirst', $string);
+    return preg_replace_callback('!\'?\b\w(\w|\')*\b!', 'smarty_modifier_capitalize_ucfirst', $string);
 }
 
 function smarty_modifier_capitalize_ucfirst($string, $uc_digits = null)
 {
     static $_uc_digits = false;
-
+    
     if(isset($uc_digits)) {
         $_uc_digits = $uc_digits;
         return;
     }
-
-    if(!preg_match('!\d!',$string[0]) || $_uc_digits)
+    
+    if(substr($string[0],0,1) != "'" && !preg_match("!\d!",$string[0]) || $_uc_digits)
         return ucfirst($string[0]);
     else
         return $string[0];
index 49ce655e85354a7a121bcad6380167ed49fd9da5..5ed9a87cd1f099b7a5d45944e7405e6c139ed58c 100644 (file)
@@ -14,6 +14,7 @@
  * Purpose:  count the number of characters in a text
  * @link http://smarty.php.net/manual/en/language.modifier.count.characters.php
  *          count_characters (Smarty online manual)
+ * @author   Monte Ohrt <monte at ohrt dot com>
  * @param string
  * @param boolean include whitespace in the character count
  * @return integer
index 6a9833c97ca009f4a963095cc6bf8d6d6d2f1276..e0e274da77a9c70324fbb7a207a9a177a8ce1005 100644 (file)
@@ -14,6 +14,7 @@
  * Purpose:  count the number of paragraphs in a text
  * @link http://smarty.php.net/manual/en/language.modifier.count.paragraphs.php
  *          count_paragraphs (Smarty online manual)
+ * @author   Monte Ohrt <monte at ohrt dot com>
  * @param string
  * @return integer
  */
index 0c210f08fe97801fe36bc63847f00b69544f5387..f66ea1703d3c236398f491293adcb7a0d9a4d909 100644 (file)
@@ -14,6 +14,7 @@
  * Purpose:  count the number of sentences in a text
  * @link http://smarty.php.net/manual/en/language.modifier.count.paragraphs.php
  *          count_sentences (Smarty online manual)
+ * @author   Monte Ohrt <monte at ohrt dot com>
  * @param string
  * @return integer
  */
index 42c8a741c5cdd6754dc3f18b4e83f56b0e990408..9d339f5422f93440c9539b508ac97e1b450d91b6 100644 (file)
@@ -14,6 +14,7 @@
  * Purpose:  count the number of words in a text
  * @link http://smarty.php.net/manual/en/language.modifier.count.words.php
  *          count_words (Smarty online manual)
+ * @author   Monte Ohrt <monte at ohrt dot com>
  * @param string
  * @return integer
  */
index 2f36b3b79c0ae2418f1228a164429492403d5321..8cf7d5e14e8d5d0aa143512007b1632cc67b26d2 100644 (file)
@@ -8,7 +8,7 @@
 /**
  * Include the {@link shared.make_timestamp.php} plugin
  */
-require_once $smarty->_get_plugin_filepath('shared','make_timestamp');
+require_once $smarty->_get_plugin_filepath('shared', 'make_timestamp');
 /**
  * Smarty date_format modifier plugin
  *
@@ -21,26 +21,36 @@ require_once $smarty->_get_plugin_filepath('shared','make_timestamp');
  *         - default_date: default date if $string is empty
  * @link http://smarty.php.net/manual/en/language.modifier.date.format.php
  *          date_format (Smarty online manual)
+ * @author   Monte Ohrt <monte at ohrt dot com>
  * @param string
  * @param string
  * @param string
  * @return string|void
  * @uses smarty_make_timestamp()
  */
-function smarty_modifier_date_format($string, $format="%b %e, %Y", $default_date=null)
+function smarty_modifier_date_format($string, $format = '%b %e, %Y', $default_date = '')
 {
-    if (substr(PHP_OS,0,3) == 'WIN') {
-           $_win_from = array ('%e',  '%T',       '%D');
-           $_win_to   = array ('%#d', '%H:%M:%S', '%m/%d/%y');
-           $format = str_replace($_win_from, $_win_to, $format);
-    }
-    if($string != '') {
-        return strftime($format, smarty_make_timestamp($string));
-    } elseif (isset($default_date) && $default_date != '') {
-        return strftime($format, smarty_make_timestamp($default_date));
+    if ($string != '') {
+        $timestamp = smarty_make_timestamp($string);
+    } elseif ($default_date != '') {
+        $timestamp = smarty_make_timestamp($default_date);
     } else {
         return;
     }
+    if (DIRECTORY_SEPARATOR == '\\') {
+        $_win_from = array('%D',       '%h', '%n', '%r',          '%R',    '%t', '%T');
+        $_win_to   = array('%m/%d/%y', '%b', "\n", '%I:%M:%S %p', '%H:%M', "\t", '%H:%M:%S');
+        if (strpos($format, '%e') !== false) {
+            $_win_from[] = '%e';
+            $_win_to[]   = sprintf('%\' 2d', date('j', $timestamp));
+        }
+        if (strpos($format, '%l') !== false) {
+            $_win_from[] = '%l';
+            $_win_to[]   = sprintf('%\' 2d', date('h', $timestamp));
+        }
+        $format = str_replace($_win_from, $_win_to, $format);
+    }
+    return strftime($format, $timestamp);
 }
 
 /* vim: set expandtab: */
index b9bb1848802ef8884a6069d662d7402b0644b9f6..e4f7bc0ccf7444a8bec01a90950b62be9c271e89 100644 (file)
@@ -14,6 +14,7 @@
  * Purpose:  formats variable contents for display in the console
  * @link http://smarty.php.net/manual/en/language.modifier.debug.print.var.php
  *          debug_print_var (Smarty online manual)
+ * @author   Monte Ohrt <monte at ohrt dot com>
  * @param array|object
  * @param integer
  * @param integer
  */
 function smarty_modifier_debug_print_var($var, $depth = 0, $length = 40)
 {
-    $_replace = array("\n"=>'<i>&#92;n</i>', "\r"=>'<i>&#92;r</i>', "\t"=>'<i>&#92;t</i>');
-    if (is_array($var)) {
-        $results = "<b>Array (".count($var).")</b>";
-        foreach ($var as $curr_key => $curr_val) {
-            $return = smarty_modifier_debug_print_var($curr_val, $depth+1, $length);
-            $results .= "<br>".str_repeat('&nbsp;', $depth*2)."<b>".strtr($curr_key, $_replace)."</b> =&gt; $return";
-        }
-    } else if (is_object($var)) {
-        $object_vars = get_object_vars($var);
-        $results = "<b>".get_class($var)." Object (".count($object_vars).")</b>";
-        foreach ($object_vars as $curr_key => $curr_val) {
-            $return = smarty_modifier_debug_print_var($curr_val, $depth+1, $length);
-            $results .= "<br>".str_repeat('&nbsp;', $depth*2)."<b>$curr_key</b> =&gt; $return";
-        }
-    } else if (is_resource($var)) {
-        $results = '<i>'.(string)$var.'</i>';
-    } else if (empty($var) && $var != "0") {
-        $results = '<i>empty</i>';
-    } else {
-        if (strlen($var) > $length ) {
-            $results = substr($var, 0, $length-3).'...';
-        } else {
-            $results = $var;
-        }
-        $results = htmlspecialchars($results);
-        $results = strtr($results, $_replace);
+    $_replace = array(
+        "\n" => '<i>\n</i>',
+        "\r" => '<i>\r</i>',
+        "\t" => '<i>\t</i>'
+    );
+
+    switch (gettype($var)) {
+        case 'array' :
+            $results = '<b>Array (' . count($var) . ')</b>';
+            foreach ($var as $curr_key => $curr_val) {
+                $results .= '<br>' . str_repeat('&nbsp;', $depth * 2)
+                    . '<b>' . strtr($curr_key, $_replace) . '</b> =&gt; '
+                    . smarty_modifier_debug_print_var($curr_val, ++$depth, $length);
+                    $depth--;
+            }
+            break;
+        case 'object' :
+            $object_vars = get_object_vars($var);
+            $results = '<b>' . get_class($var) . ' Object (' . count($object_vars) . ')</b>';
+            foreach ($object_vars as $curr_key => $curr_val) {
+                $results .= '<br>' . str_repeat('&nbsp;', $depth * 2)
+                    . '<b> -&gt;' . strtr($curr_key, $_replace) . '</b> = '
+                    . smarty_modifier_debug_print_var($curr_val, ++$depth, $length);
+                    $depth--;
+            }
+            break;
+        case 'boolean' :
+        case 'NULL' :
+        case 'resource' :
+            if (true === $var) {
+                $results = 'true';
+            } elseif (false === $var) {
+                $results = 'false';
+            } elseif (null === $var) {
+                $results = 'null';
+            } else {
+                $results = htmlspecialchars((string) $var);
+            }
+            $results = '<i>' . $results . '</i>';
+            break;
+        case 'integer' :
+        case 'float' :
+            $results = htmlspecialchars((string) $var);
+            break;
+        case 'string' :
+            $results = strtr($var, $_replace);
+            if (strlen($var) > $length ) {
+                $results = substr($var, 0, $length - 3) . '...';
+            }
+            $results = htmlspecialchars('"' . $results . '"');
+            break;
+        case 'unknown type' :
+        default :
+            $results = strtr((string) $var, $_replace);
+            if (strlen($results) > $length ) {
+                $results = substr($results, 0, $length - 3) . '...';
+            }
+            $results = htmlspecialchars($results);
     }
+
     return $results;
 }
 
index 8268e396ff0dc77837d3f81a64d8b4ab62718e29..70011fd6b55edc9c7f5a3352eaa85aec1d542e17 100644 (file)
@@ -14,6 +14,7 @@
  * Purpose:  designate default value for empty variables
  * @link http://smarty.php.net/manual/en/language.modifier.default.php
  *          default (Smarty online manual)
+ * @author   Monte Ohrt <monte at ohrt dot com>
  * @param string
  * @param string
  * @return string
index ca5c006257ddf8ac7f3a739ccec79f1d757132c3..a2f52b232c1316ee9b7d0a2ea70cfc41c1b012c6 100644 (file)
  * Purpose:  Escape the string according to escapement type
  * @link http://smarty.php.net/manual/en/language.modifier.escape.php
  *          escape (Smarty online manual)
+ * @author   Monte Ohrt <monte at ohrt dot com>
  * @param string
  * @param html|htmlall|url|quotes|hex|hexentity|javascript
  * @return string
  */
-function smarty_modifier_escape($string, $esc_type = 'html')
+function smarty_modifier_escape($string, $esc_type = 'html', $char_set = 'ISO-8859-1')
 {
     switch ($esc_type) {
         case 'html':
-            return htmlspecialchars($string, ENT_QUOTES);
+            return htmlspecialchars($string, ENT_QUOTES, $char_set);
 
         case 'htmlall':
-            return htmlentities($string, ENT_QUOTES);
+            return htmlentities($string, ENT_QUOTES, $char_set);
 
         case 'url':
             return rawurlencode($string);
 
+        case 'urlpathinfo':
+            return str_replace('%2F','/',rawurlencode($string));
+            
         case 'quotes':
             // escape unescaped single quotes
             return preg_replace("%(?<!\\\\)'%", "\\'", $string);
@@ -41,7 +45,7 @@ function smarty_modifier_escape($string, $esc_type = 'html')
                 $return .= '%' . bin2hex($string[$x]);
             }
             return $return;
-
+            
         case 'hexentity':
             $return = '';
             for ($x=0; $x < strlen($string); $x++) {
@@ -59,22 +63,22 @@ function smarty_modifier_escape($string, $esc_type = 'html')
         case 'javascript':
             // escape quotes and backslashes, newlines, etc.
             return strtr($string, array('\\'=>'\\\\',"'"=>"\\'",'"'=>'\\"',"\r"=>'\\r',"\n"=>'\\n','</'=>'<\/'));
-
+            
         case 'mail':
             // safe way to display e-mail address on a web page
             return str_replace(array('@', '.'),array(' [AT] ', ' [DOT] '), $string);
-
+            
         case 'nonstd':
            // escape non-standard chars, such as ms document quotes
            $_res = '';
            for($_i = 0, $_len = strlen($string); $_i < $_len; $_i++) {
-               $_ord = ord($string{$_i});
+               $_ord = ord(substr($string, $_i, 1));
                // non-standard char, escape it
                if($_ord >= 126){
                    $_res .= '&#' . $_ord . ';';
                }
                else {
-                   $_res .= $string{$_i};
+                   $_res .= substr($string, $_i, 1);
                }
            }
            return $_res;
index 1642bac3ded676bd8785aab923b783d920396307..394147a29d6a203475f91ba386ff1112dd3ae4ee 100644 (file)
@@ -14,6 +14,7 @@
  * Purpose:  indent lines of text
  * @link http://smarty.php.net/manual/en/language.modifier.indent.php
  *          indent (Smarty online manual)
+ * @author   Monte Ohrt <monte at ohrt dot com>
  * @param string
  * @param integer
  * @param string
index 0b4d1517dc668fef314e393171ab46f61a6b3aef..20e7a8d39c641888b3c29c77317f8fb65ecee944 100644 (file)
@@ -14,6 +14,7 @@
  * Purpose:  convert string to lowercase
  * @link http://smarty.php.net/manual/en/language.modifier.lower.php
  *          lower (Smarty online manual)
+ * @author   Monte Ohrt <monte at ohrt dot com>
  * @param string
  * @return string
  */
index 7eee497c85bd677c1757c0bd586be00cf963a720..100b58ce4b1e7a969bef4fdee59f17d36f56f41c 100644 (file)
  *
  * Type:     modifier<br>
  * Name:     regex_replace<br>
- * Purpose:  regular epxression search/replace
+ * Purpose:  regular expression search/replace
  * @link http://smarty.php.net/manual/en/language.modifier.regex.replace.php
  *          regex_replace (Smarty online manual)
+ * @author   Monte Ohrt <monte at ohrt dot com>
  * @param string
  * @param string|array
  * @param string|array
  */
 function smarty_modifier_regex_replace($string, $search, $replace)
 {
-    if (preg_match('!\W(\w+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) {
+    if(is_array($search)) {
+      foreach($search as $idx => $s)
+        $search[$idx] = _smarty_regex_replace_check($s);
+    } else {
+      $search = _smarty_regex_replace_check($search);
+    }       
+
+    return preg_replace($search, $replace, $string);
+}
+
+function _smarty_regex_replace_check($search)
+{
+    if (($pos = strpos($search,"\0")) !== false)
+      $search = substr($search,0,$pos);
+    if (preg_match('!([a-zA-Z\s]+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) {
         /* remove eval-modifier from $search */
-        $search = substr($search, 0, -strlen($match[1])) . str_replace('e', '', $match[1]);
+        $search = substr($search, 0, -strlen($match[1])) . preg_replace('![e\s]+!', '', $match[1]);
     }
-    return preg_replace($search, $replace, $string);
+    return $search;
 }
 
 /* vim: set expandtab: */
index 2a43515f7eae0057ffb44f140df2542a07249249..df041c884393769d845d17ce0c09e93f8bfe4902 100644 (file)
@@ -14,6 +14,7 @@
  * Purpose:  simple search/replace
  * @link http://smarty.php.net/manual/en/language.modifier.replace.php
  *          replace (Smarty online manual)
+ * @author   Monte Ohrt <monte at ohrt dot com>
  * @param string
  * @param string
  * @param string
index dad057f9b5ec0513cbdb6d4b7a8a91cb7e43c162..c2423f4f2ff306b242ff6bc2329fb07f7650659c 100644 (file)
@@ -14,6 +14,7 @@
  * Purpose:  add spaces between characters in a string
  * @link http://smarty.php.net/manual/en/language.modifier.spacify.php
  *          spacify (Smarty online manual)
+ * @author   Monte Ohrt <monte at ohrt dot com>
  * @param string
  * @param string
  * @return string
index efd621506fa5a6c9c1400104e9cca645aa71257c..9e051a578e1d28b2b42c59458845ef9d6f63ac16 100644 (file)
@@ -14,6 +14,7 @@
  * Purpose:  format strings via sprintf
  * @link http://smarty.php.net/manual/en/language.modifier.string.format.php
  *          string_format (Smarty online manual)
+ * @author   Monte Ohrt <monte at ohrt dot com>
  * @param string
  * @param string
  * @return string
index 45f1ec14d15c2da03905bb8811d3061166f79b0a..93011a892c8d1427bb63ad4a040f808cb6f32673 100644 (file)
@@ -14,6 +14,7 @@
  * Purpose:  strip html tags from text
  * @link http://smarty.php.net/manual/en/language.modifier.strip.tags.php
  *          strip_tags (Smarty online manual)
+ * @author   Monte Ohrt <monte at ohrt dot com>
  * @param string
  * @param boolean
  * @return string
index 93c3f510882d7111a915abcffb634f16873ddfbb..35c89690a1556cc6dfa943bde00f40abb43dca15 100644 (file)
@@ -16,6 +16,7 @@
  *           appending the $etc string or inserting $etc into the middle.
  * @link http://smarty.php.net/manual/en/language.modifier.truncate.php
  *          truncate (Smarty online manual)
+ * @author   Monte Ohrt <monte at ohrt dot com>
  * @param string
  * @param integer
  * @param string
@@ -30,12 +31,12 @@ function smarty_modifier_truncate($string, $length = 80, $etc = '...',
         return '';
 
     if (strlen($string) > $length) {
-        $length -= strlen($etc);
+        $length -= min($length, strlen($etc));
         if (!$break_words && !$middle) {
             $string = preg_replace('/\s+?(\S+)?$/', '', substr($string, 0, $length+1));
         }
         if(!$middle) {
-            return substr($string, 0, $length).$etc;
+            return substr($string, 0, $length) . $etc;
         } else {
             return substr($string, 0, $length/2) . $etc . substr($string, -$length/2);
         }
index 69960ae7217ee19cdd6af03eca9f2ab462148cc5..c12480fbda7adc5b1bdcca41f1c4d193b0bb258e 100644 (file)
@@ -14,6 +14,7 @@
  * Purpose:  convert string to uppercase
  * @link http://smarty.php.net/manual/en/language.modifier.upper.php
  *          upper (Smarty online manual)
+ * @author   Monte Ohrt <monte at ohrt dot com>
  * @param string
  * @return string
  */
index b9a9fe94b3fb38c3fcd2164bf42bbe48edba5e71..ce07181569fff87cb0108fa4772537ec2cb9f1f1 100644 (file)
@@ -14,6 +14,7 @@
  * Purpose:  wrap a string of text at a given length
  * @link http://smarty.php.net/manual/en/language.modifier.wordwrap.php
  *          wordwrap (Smarty online manual)
+ * @author   Monte Ohrt <monte at ohrt dot com>
  * @param string
  * @param integer
  * @param string
index 01e35e03df93c829d32c127d9a8bf698da9fb2b2..739fa39b021a36fe24d8b39efee9363f1aab8cc1 100644 (file)
 function smarty_outputfilter_trimwhitespace($source, &$smarty)
 {
     // Pull out the script blocks
-    preg_match_all("!<script[^>]+>.*?</script>!is", $source, $match);
+    preg_match_all("!<script[^>]*?>.*?</script>!is", $source, $match);
     $_script_blocks = $match[0];
-    $source = preg_replace("!<script[^>]+>.*?</script>!is",
+    $source = preg_replace("!<script[^>]*?>.*?</script>!is",
                            '@@@SMARTY:TRIM:SCRIPT@@@', $source);
 
     // Pull out the pre blocks
-    preg_match_all("!<pre>.*?</pre>!is", $source, $match);
+    preg_match_all("!<pre[^>]*?>.*?</pre>!is", $source, $match);
     $_pre_blocks = $match[0];
-    $source = preg_replace("!<pre>.*?</pre>!is",
+    $source = preg_replace("!<pre[^>]*?>.*?</pre>!is",
                            '@@@SMARTY:TRIM:PRE@@@', $source);
-
+    
     // Pull out the textarea blocks
-    preg_match_all("!<textarea[^>]+>.*?</textarea>!is", $source, $match);
+    preg_match_all("!<textarea[^>]*?>.*?</textarea>!is", $source, $match);
     $_textarea_blocks = $match[0];
-    $source = preg_replace("!<textarea[^>]+>.*?</textarea>!is",
+    $source = preg_replace("!<textarea[^>]*?>.*?</textarea>!is",
                            '@@@SMARTY:TRIM:TEXTAREA@@@', $source);
 
     // remove all leading spaces, tabs and carriage returns NOT
     // preceeded by a php close tag.
     $source = trim(preg_replace('/((?<!\?>)\n)[\s]+/m', '\1', $source));
 
-    // replace script blocks
-    smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:SCRIPT@@@",$_script_blocks, $source);
+    // replace textarea blocks
+    smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:TEXTAREA@@@",$_textarea_blocks, $source);
 
     // replace pre blocks
     smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:PRE@@@",$_pre_blocks, $source);
 
-    // replace textarea blocks
-    smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:TEXTAREA@@@",$_textarea_blocks, $source);
+    // replace script blocks
+    smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:SCRIPT@@@",$_script_blocks, $source);
 
     return $source;
 }
index 515763abedc096e496cfbf3dd8424c197d0e387c..c07ce31be2ca033b9500eb68b4c8dcb3bcf7bbd6 100644 (file)
@@ -12,6 +12,7 @@
  * Function: smarty_function_escape_special_chars<br>
  * Purpose:  used by other smarty functions to escape
  *           special chars except for already escaped ones
+ * @author   Monte Ohrt <monte at ohrt dot com>
  * @param string
  * @return string
  */
index 3f85439e14825da997936dc8feedb8383d2e4ed2..b42eb11d85d1b6f0a5a2064d88f102d958dfd302 100644 (file)
@@ -10,6 +10,7 @@
  * Function: smarty_make_timestamp<br>
  * Purpose:  used by other smarty functions to make a timestamp
  *           from a string.
+ * @author   Monte Ohrt <monte at ohrt dot com>
  * @param string
  * @return string
  */
@@ -20,14 +21,14 @@ function smarty_make_timestamp($string)
         $time = time();
 
     } elseif (preg_match('/^\d{14}$/', $string)) {
-        // it is mysql timestamp format of YYYYMMDDHHMMSS?
+        // it is mysql timestamp format of YYYYMMDDHHMMSS?            
         $time = mktime(substr($string, 8, 2),substr($string, 10, 2),substr($string, 12, 2),
                        substr($string, 4, 2),substr($string, 6, 2),substr($string, 0, 4));
-
+        
     } elseif (is_numeric($string)) {
         // it is a numeric string, we handle it as timestamp
         $time = (int)$string;
-
+        
     } else {
         // strtotime should handle it
         $time = strtotime($string);
diff --git a/wwwroot/smarty/misc/smarty_icon.README b/wwwroot/smarty/misc/smarty_icon.README
deleted file mode 100644 (file)
index a5b4d05..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-Feel free to put the smarty icon on your site.
-You can cut-and-paste the following code, be sure
-to adjust the path to the image:
-
-<a href="http://smarty.php.net/">
-<img src="smarty_icon.gif" border="0" height="31" width="88" /></a>
diff --git a/wwwroot/smarty/misc/smarty_icon.gif b/wwwroot/smarty/misc/smarty_icon.gif
deleted file mode 100644 (file)
index 5d51969..0000000
Binary files a/wwwroot/smarty/misc/smarty_icon.gif and /dev/null differ
diff --git a/wwwroot/smarty/unit_test/README b/wwwroot/smarty/unit_test/README
deleted file mode 100644 (file)
index d4d9731..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-Smarty Unit Testing
--------------------
-
-Smarty unit tests require the PEAR PHPUnit
-package to be installed. See if you have that
-installed with the following command:
-
-$> pear list
-
-If you don't see PHPUnit, install with this:
-
-$> pear install PHPUnit
-
-Edit the config.php file,
-be sure everything is defined correctly.
-
-Be sure the following directories are present:
-
-templates
-configs
-templates_c (writable)
-cache (writable)
-
-Then run from the command line:
-php -q smarty_unit_test.php
-
-Or from the web browser:
-http://www.your_domain.com/path/to/smarty_unit_test_gui.php
-
-This will run a unit test for every component
-of Smarty and dump the results. All should pass
-with flying colors. :)
diff --git a/wwwroot/smarty/unit_test/config.php b/wwwroot/smarty/unit_test/config.php
deleted file mode 100644 (file)
index 5e7da05..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
-
-define('SMARTY_DIR', '../libs/');
-
-?>
diff --git a/wwwroot/smarty/unit_test/configs/globals_double_quotes.conf b/wwwroot/smarty/unit_test/configs/globals_double_quotes.conf
deleted file mode 100644 (file)
index 5abc475..0000000
+++ /dev/null
@@ -1 +0,0 @@
-foo = "bar"
diff --git a/wwwroot/smarty/unit_test/configs/globals_single_quotes.conf b/wwwroot/smarty/unit_test/configs/globals_single_quotes.conf
deleted file mode 100644 (file)
index 4517b7b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-foo = 'bar'
diff --git a/wwwroot/smarty/unit_test/smarty_unit_test.php b/wwwroot/smarty/unit_test/smarty_unit_test.php
deleted file mode 100644 (file)
index c56a61a..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
-
-require_once 'test_cases.php';
-require_once 'PHPUnit.php';
-
-$suite = new PHPUnit_TestSuite("SmartyTest");
-$result = PHPUnit::run($suite);
-
-echo $result -> toString();
-?>
diff --git a/wwwroot/smarty/unit_test/smarty_unit_test_gui.php b/wwwroot/smarty/unit_test/smarty_unit_test_gui.php
deleted file mode 100644 (file)
index 03309d4..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
-
-require_once 'test_cases.php';
-require_once 'PHPUnit.php';
-
-$suite = new PHPUnit_TestSuite("SmartyTest");
-$result = PHPUnit::run($suite);
-
-echo $result -> toHTML();
-?>
diff --git a/wwwroot/smarty/unit_test/templates/assign_var.tpl b/wwwroot/smarty/unit_test/templates/assign_var.tpl
deleted file mode 100644 (file)
index acc4b66..0000000
+++ /dev/null
@@ -1 +0,0 @@
-{$foo}
diff --git a/wwwroot/smarty/unit_test/templates/constant.tpl b/wwwroot/smarty/unit_test/templates/constant.tpl
deleted file mode 100644 (file)
index 7ae11f1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-{$smarty.const.TEST_CONSTANT}
diff --git a/wwwroot/smarty/unit_test/templates/index.tpl b/wwwroot/smarty/unit_test/templates/index.tpl
deleted file mode 100644 (file)
index fb6aad2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-TEST STRING
diff --git a/wwwroot/smarty/unit_test/templates/parse_math.tpl b/wwwroot/smarty/unit_test/templates/parse_math.tpl
deleted file mode 100644 (file)
index 0b787d3..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-{foreach name=loop from=$items item=i}
-{$smarty.foreach.loop.iteration+2}
-{$smarty.foreach.loop.iteration+$flt}
-{$smarty.foreach.loop.iteration+$obj->six()}
-{$smarty.foreach.loop.iteration+$obj->ten}
-{/foreach}
-{$obj->ten+$flt}
-{$obj->ten*$flt}
-{$obj->six()+$obj->ten}
-{$obj->ten+$obj->ten}
-{$obj->six()+$flt}
-{$obj->six()+$items.0}
diff --git a/wwwroot/smarty/unit_test/templates/parse_obj_meth.tpl b/wwwroot/smarty/unit_test/templates/parse_obj_meth.tpl
deleted file mode 100644 (file)
index ab19832..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-{$obj->meth($foo, 2.5)}
-{$obj->meth(2.5, $foo)}
-{$obj->meth(2.5)}
-{$obj->meth($obj->val, "foo")}
-{$obj->meth("foo", $obj->val)}
-{$obj->meth("foo", $foo)}
-{$obj->meth($obj->arr.one, 2)}
-{$obj->meth($obj->meth("foo", $foo))}
diff --git a/wwwroot/smarty/unit_test/test_cases.php b/wwwroot/smarty/unit_test/test_cases.php
deleted file mode 100644 (file)
index 156727b..0000000
+++ /dev/null
@@ -1,450 +0,0 @@
-<?php
-
-require_once './config.php';
-require_once SMARTY_DIR . 'Smarty.class.php';
-require_once 'PHPUnit.php';
-
-class Obj {
-    var $val = 'val';
-    var $arr = array('one' => 'one', 'two' => 2);
-    var $ten = 10;
-
-    function meth($a="a", $b="b") {
-        return "$a:$b";
-    }
-
-    function six() {
-        return 6;
-    }
-}
-
-
-class SmartyTest extends PHPUnit_TestCase {
-    // contains the object handle of the string class
-    var $abc;
-    // contains the last triggered error's errorlevel
-    var $errorlevel;
-
-    // constructor of the test suite
-    function SmartyTest($name) {
-       $this->PHPUnit_TestCase($name);
-    }
-
-    // called before the test functions will be executed
-    // this function is defined in PHPUnit_TestCase and overwritten
-    // here
-    function setUp() {
-        // create a new instance of String with the
-        // string 'abc'
-        $this->smarty = new Smarty;
-    }
-    // called after the test functions are executed
-    // this function is defined in PHPUnit_TestCase and overwritten
-    // here
-    function tearDown() {
-        // delete your instance
-        unset($this->smarty);
-    }
-
-    // dummy errorhandler for functions that are supposed to call trigger_error()
-    function error_handler($errorlevel) {
-        if ($errorlevel) $this->errorlevel = $errorlevel;
-    }
-
-    /* DIRECTORY TESTS */
-
-    // test that template_dir exists
-    function test_template_dir_exists() {
-        $this->assertTrue(file_exists($this->smarty->template_dir));
-    }
-    // test that template_dir is a directory
-    function test_template_dir_is_dir() {
-        $this->assertTrue(is_dir($this->smarty->template_dir));
-    }
-    // test that template_dir is readable
-    function test_template_dir_is_readable() {
-        $this->assertTrue(is_readable($this->smarty->template_dir));
-    }
-    // test that config_dir exists
-    function test_config_dir_exists() {
-        $this->assertTrue(file_exists($this->smarty->config_dir));
-    }
-    // test that config_dir is a directory
-    function test_config_dir_is_dir() {
-        $this->assertTrue(is_dir($this->smarty->config_dir));
-    }
-    // test that config_dir is readable
-    function test_config_dir_is_readable() {
-        $this->assertTrue(is_readable($this->smarty->config_dir));
-    }
-    // test that compile_dir exists
-    function test_compile_dir_exists() {
-        $this->assertTrue(file_exists($this->smarty->compile_dir));
-    }
-    // test that compile_dir is a directory
-    function test_compile_dir_is_dir() {
-        $this->assertTrue(is_dir($this->smarty->compile_dir));
-    }
-    // test that compile_dir is readable
-    function test_compile_dir_is_readable() {
-        $this->assertTrue(is_readable($this->smarty->compile_dir));
-    }
-    // test that compile_dir is writable
-    function test_compile_dir_is_writable() {
-        $this->assertTrue(is_writable($this->smarty->compile_dir));
-    }
-    // test that cache_dir exists
-    function test_cache_dir_exists() {
-        $this->assertTrue(file_exists($this->smarty->cache_dir));
-    }
-    // test that cache_dir is a directory
-    function test_cache_dir_is_dir() {
-        $this->assertTrue(is_dir($this->smarty->cache_dir));
-    }
-    // test that cache_dir is readable
-    function test_cache_dir_is_readable() {
-        $this->assertTrue(is_readable($this->smarty->cache_dir));
-    }
-    // test that cache_dir is writable
-    function test_cache_dir_is_writable() {
-        $this->assertTrue(is_writable($this->smarty->cache_dir));
-    }
-
-    /* METHOD EXISTS TESTS */
-    function test_assign_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'assign'));
-    }
-    function test_assign_by_ref_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'assign_by_ref'));
-    }
-    function test_append_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'append'));
-    }
-    function test_append_by_ref_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'append_by_ref'));
-    }
-    function test_clear_assign_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'clear_assign'));
-    }
-    function test_register_function_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'register_function'));
-    }
-    function test_unregister_function_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'unregister_function'));
-    }
-    function test_register_object_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'register_object'));
-    }
-    function test_unregister_object_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'unregister_object'));
-    }
-    function test_register_block_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'register_block'));
-    }
-    function test_unregister_block_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'unregister_block'));
-    }
-    function test_register_compiler_function_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'register_compiler_function'));
-    }
-    function test_unregister_compiler_function_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'unregister_compiler_function'));
-    }
-    function test_register_modifier_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'register_modifier'));
-    }
-    function test_unregister_modifier_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'unregister_modifier'));
-    }
-    function test_register_resource_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'register_resource'));
-    }
-    function test_unregister_resource_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'unregister_resource'));
-    }
-    function test_register_prefilter_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'register_prefilter'));
-    }
-    function test_unregister_prefilter_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'unregister_prefilter'));
-    }
-    function test_register_postfilter_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'register_postfilter'));
-    }
-    function test_unregister_postfilter_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'unregister_postfilter'));
-    }
-    function test_register_outputfilter_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'register_outputfilter'));
-    }
-    function test_unregister_outputfilter_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'unregister_outputfilter'));
-    }
-    function test_load_filter_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'load_filter'));
-    }
-    function test_clear_cache_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'clear_cache'));
-    }
-    function test_clear_all_cache_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'clear_all_cache'));
-    }
-    function test_is_cached_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'is_cached'));
-    }
-    function test_clear_all_assign_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'clear_all_assign'));
-    }
-    function test_clear_compiled_tpl_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'clear_compiled_tpl'));
-    }
-    function test_template_exists_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'template_exists'));
-    }
-    function test_get_template_vars_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'get_template_vars'));
-    }
-    function test_get_config_vars_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'get_config_vars'));
-    }
-    function test_trigger_error_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'trigger_error'));
-    }
-    function test_display_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'display'));
-    }
-    function test_fetch_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'fetch'));
-    }
-    function test_config_load_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'config_load'));
-    }
-    function test_get_registered_object_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'get_registered_object'));
-    }
-    function test_clear_config_method_exists() {
-        $this->assertTrue(method_exists($this->smarty, 'clear_config'));
-    }
-    function test_get_plugin_filepath() {
-        $this->assertTrue(method_exists($this->smarty, '_get_plugin_filepath'));
-    }
-
-
-    function test_clear_compiled_tpl() {
-        $this->assertTrue($this->smarty->clear_compiled_tpl());
-    }
-
-    /* DISPLAY TESTS */
-
-    // test that display() executes properly
-    function test_call_to_display() {
-        ob_start();
-        $this->smarty->display('index.tpl');
-        $output = ob_get_contents();
-        ob_end_clean();
-        $this->assertEquals($output, 'TEST STRING');
-    }
-
-    /* FETCH TESTS */
-
-    // test that fetch() executes properly
-    function test_call_to_fetch() {
-        $this->assertEquals($this->smarty->fetch('index.tpl'), 'TEST STRING');
-    }
-
-    /* ASSIGN TESTS */
-
-    // test assigning a simple template variable
-    function test_assign_var() {
-        $this->smarty->assign('foo', 'bar');
-        $this->assertEquals($this->smarty->fetch('assign_var.tpl'), 'bar');
-    }
-
-    /* PARSING TESTS */
-
-    // test assigning and calling an object
-    function test_parse_obj_meth() {
-        $obj  = new Obj();
-        $this->smarty->assign('obj', $obj);
-        $this->smarty->assign('foo', 'foo');
-        $this->assertEquals('foo:2.5
-2.5:foo
-2.5:b
-val:foo
-foo:val
-foo:foo
-one:2
-foo:foo:b', $this->smarty->fetch('parse_obj_meth.tpl'));
-    }
-
-    // test assigning and calling an object
-    function test_parse_math() {
-        $obj  = new Obj();
-        $this->smarty->assign('obj', $obj);
-        $this->smarty->assign('flt', 2.5);
-        $this->smarty->assign('items', array(1, 2));
-        $this->assertEquals('3
-3.5
-7
-11
-4
-4.5
-8
-12
-12.5
-25
-16
-20
-8.5
-7', $this->smarty->fetch('parse_math.tpl'));
-    }
-
-    /* CONFIG FILE TESTS */
-
-    // test assigning a double quoted global variable
-    function test_config_load_globals_double_quotes() {
-        // load the global var
-        $this->smarty->config_load('globals_double_quotes.conf');
-        // test that it is assigned
-        $this->assertEquals($this->smarty->_config[0]['vars']['foo'], 'bar');
-    }
-
-    // test assigning a single quoted global variable
-    function test_config_load_globals_single_quotes() {
-        // load the global var
-        $this->smarty->config_load('globals_single_quotes.conf');
-        // test that it is assigned
-        $this->assertEquals($this->smarty->_config[0]['vars']['foo'], 'bar');
-    }
-
-    // test loading and running modifier.escape.php
-    function test_escape_modifier_get_plugins_filepath() {
-        $filepath = $this->smarty->_get_plugin_filepath('modifier', 'escape');
-        $this->assertTrue($filepath);
-    }
-
-    function test_escape_modifier_include_file() {
-        $filepath = $this->smarty->_get_plugin_filepath('modifier', 'escape');
-        $this->assertTrue(include($filepath));
-    }
-
-    function test_escape_modifier_function_exists() {
-        $this->assertTrue(function_exists('smarty_modifier_escape'));
-    }
-
-    function test_escape_modifier_escape_default() {
-        $string = smarty_modifier_escape("<html><body></body></html>");
-        $this->assertEquals('&lt;html&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;',
-                            $string);
-    }
-
-    function test_escape_modifier_escape_html() {
-        $string = smarty_modifier_escape("<html><body></body></html>", 'html');
-        $this->assertEquals('&lt;html&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;',
-                            $string);
-    }
-
-    function test_escape_modifier_escape_htmlall() {
-        $string = smarty_modifier_escape("<html><body></body></html>", 'htmlall');
-        $this->assertEquals('&lt;html&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;',
-                            $string);
-    }
-
-    function test_escape_modifier_escape_url() {
-        $string = smarty_modifier_escape("http://test.com?foo=bar", 'url');
-        $this->assertEquals('http%3A%2F%2Ftest.com%3Ffoo%3Dbar', $string);
-    }
-
-    function test_escape_modifier_escape_quotes() {
-        $string = smarty_modifier_escape("'\\'\\''", 'quotes');
-        $this->assertEquals("\\'\\'\\'\\'", $string);
-    }
-
-    function test_escape_modifier_escape_hex() {
-        $string = smarty_modifier_escape("abcd", 'hex');
-        $this->assertEquals('%61%62%63%64', $string);
-    }
-
-    function test_escape_modifier_escape_hexentity() {
-        $string = smarty_modifier_escape("ABCD", 'hexentity');
-        $this->assertEquals('&#x41;&#x42;&#x43;&#x44;', $string);
-    }
-
-    function test_escape_modifier_escape_javascript() {
-        $string = smarty_modifier_escape("\r\n\\", 'javascript');
-        $this->assertEquals('\\r\\n\\\\', $string);
-    }
-
-
-    function test_core_is_secure_file_exists() {
-        $file = SMARTY_CORE_DIR . 'core.is_secure.php';
-        $this->assertTrue(file_exists($file));
-    }
-
-    function test_core_is_secure_file_include() {
-        $file = SMARTY_CORE_DIR . 'core.is_secure.php';
-        $this->assertTrue(include($file));
-    }
-
-    function test_core_is_secure_function_exists() {
-        $this->assertTrue(function_exists('smarty_core_is_secure'));
-    }
-
-    function test_core_is_secure_function_is_secure_true() {
-        $security = $this->smarty->security;
-        $this->smarty->security = true;
-
-        /* check if index.tpl is secure (should be true) */
-        $params = array('resource_type' => 'file',
-                        'resource_base_path' => dirname(__FILE__) . '/templates',
-                        'resource_name' => dirname(__FILE__) . '/templates/index.tpl');
-        $this->assertTrue(smarty_core_is_secure($params, $this->smarty));
-        $this->smarty->security = $security;
-    }
-
-    function test_core_is_secure_function_is_secure_false() {
-        $security = $this->smarty->security;
-        $this->smarty->security = true;
-        /* check if test_cases.php is secure (should be false) */
-        $params = array('resource_type' => 'file',
-                        'resource_base_path' => dirname(__FILE__) . '/templates',
-                        'resource_name' => __FILE__);
-        $this->assertFalse(smarty_core_is_secure($params, $this->smarty));
-        $this->smarty->security = $security;
-
-    }
-
-    // test constants and security
-    function test_core_is_secure_function_smarty_var_const() {
-        define('TEST_CONSTANT', 'test constant');
-        $this->assertEquals('test constant', $this->smarty->fetch('constant.tpl',
-                                                             null, 'var_const'));
-    }
-
-    function test_core_is_secure_function_smarty_var_const_allowed() {
-        $security = $this->smarty->security;
-        $security_settings = $this->smarty->security_settings;
-        $this->smarty->security_settings['ALLOW_CONSTANTS'] = true;
-        $this->smarty->security = true;
-        $this->assertEquals('test constant', $this->smarty->fetch('constant.tpl',
-                                                     null, 'var_const_allowed'));
-        $this->smarty->security_settings = $security_settings;
-        $this->smarty->security = $security;
-    }
-
-    function test_core_is_secure_function_smarty_var_const_not_allowed() {
-        $security = $this->smarty->security;
-        $this->smarty->security = true;
-        /* catch errors: */
-        $this->errorlevel = null;
-        set_error_handler(array(&$this, 'error_handler'));
-        $this->smarty->fetch('constant.tpl', null, 'var_const_not_allowed');
-        restore_error_handler();
-
-        $this->assertEquals( $this->errorlevel, E_USER_WARNING);
-        $this->smarty->security = $security;
-    }
-
-}
-
-?>
This page took 1.650658 seconds and 4 git commands to generate.