diff --git a/GPL_LIB/Smarty/ChangeLog b/GPL_LIB/Smarty/ChangeLog
index e9ff555a4b4f58613440605d6f2d63ac55a6a839..802891ac8afd57db78b05ba60e7cf52355843d54 100644
--- a/GPL_LIB/Smarty/ChangeLog
+++ b/GPL_LIB/Smarty/ChangeLog
@@ -1,3 +1,1096 @@
+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
@@ -3645,7 +4738,7 @@
 
     * libs/Smarty.class.php
       libs/Smarty_Compiler.class.php:
-      added CVS $Id: ChangeLog,v 1.407 2006/01/16 06:31:51 changelog Exp $
+      added CVS $Id: ChangeLog,v 1.459 2007/03/07 01:31:23 changelog Exp $
 
 2003-03-31  Messju Mohr  <messju@lammfellpuschen.de>
 
diff --git a/GPL_LIB/Smarty/NEWS b/GPL_LIB/Smarty/NEWS
index 4cacb9356b9bc1a68cc0c360716995db25bbab48..7364ac97cc982e510e464ec735a84eb0846d0c40 100644
--- a/GPL_LIB/Smarty/NEWS
+++ b/GPL_LIB/Smarty/NEWS
@@ -1,3 +1,65 @@
+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)
 -------------------------------
 
diff --git a/GPL_LIB/Smarty/libs/Config_File.class.php b/GPL_LIB/Smarty/libs/Config_File.class.php
index d415b3c2e4bd623861bf2861327ec5614cd55451..7d61f6a6ced3cb1df7f380f72b1c22b9435a1bbe 100644
--- a/GPL_LIB/Smarty/libs/Config_File.class.php
+++ b/GPL_LIB/Smarty/libs/Config_File.class.php
@@ -18,14 +18,14 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  * @link http://smarty.php.net/
- * @version 2.6.12
+ * @version 2.6.18
  * @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.83 2005/12/14 14:53:55 mohrt Exp $ */
+/* $Id: Config_File.class.php,v 1.88 2007/03/06 10:40:06 messju Exp $ */
 
 /**
  * Config file reading class
diff --git a/GPL_LIB/Smarty/libs/Smarty.class.php b/GPL_LIB/Smarty/libs/Smarty.class.php
index 06a2e9527022cd2f9a37b45d8860525995837552..95d18f9ee3e11ed5ac5cf1bba1cadd80eeef387d 100644
--- a/GPL_LIB/Smarty/libs/Smarty.class.php
+++ b/GPL_LIB/Smarty/libs/Smarty.class.php
@@ -27,10 +27,10 @@
  * @author Monte Ohrt <monte at ohrt dot com>
  * @author Andrei Zmievski <andrei@php.net>
  * @package Smarty
- * @version 2.6.12
+ * @version 2.6.18
  */
 
-/* $Id: Smarty.class.php,v 1.523 2005/12/31 19:17:04 messju Exp $ */
+/* $Id: Smarty.class.php,v 1.528 2007/03/06 10:40:06 messju Exp $ */
 
 /**
  * DIR_SEP isn't used anymore, but third party apps might
@@ -464,7 +464,7 @@ class Smarty
      *
      * @var string
      */
-    var $_version              = '2.6.12';
+    var $_version              = '2.6.18';
 
     /**
      * current template inclusion depth
diff --git a/GPL_LIB/Smarty/libs/Smarty_Compiler.class.php b/GPL_LIB/Smarty/libs/Smarty_Compiler.class.php
index 4cd71453c675b76fbccfe9d72c0be45a7afabb1f..709e678f31824d742899724b5ea34ac5cbb8020a 100644
--- a/GPL_LIB/Smarty/libs/Smarty_Compiler.class.php
+++ b/GPL_LIB/Smarty/libs/Smarty_Compiler.class.php
@@ -21,18 +21,17 @@
  * @link http://smarty.php.net/
  * @author Monte Ohrt <monte at ohrt dot com>
  * @author Andrei Zmievski <andrei@php.net>
- * @version 2.6.12
+ * @version 2.6.18
  * @copyright 2001-2005 New Digital Group, Inc.
  * @package Smarty
  */
 
-/* $Id: Smarty_Compiler.class.php,v 1.376 2006/01/15 19:29:45 messju Exp $ */
+/* $Id: Smarty_Compiler.class.php,v 1.395 2007/03/06 10:40:06 messju Exp $ */
 
 /**
  * Template compiling class
  * @package Smarty
  */
- 
 class Smarty_Compiler extends Smarty {
 
     // internal vars
@@ -279,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');
@@ -290,7 +289,7 @@ class Smarty_Compiler extends Smarty {
                 for ($curr_sp = 0, $for_max2 = count($sp_match[1]); $curr_sp < $for_max2; $curr_sp++) {
                     if ($this->php_handling == SMARTY_PHP_PASSTHRU) {
                         /* echo php contents */
-                        $text_blocks[$curr_tb] = str_replace('%%%SMARTYSP'.$curr_sp.'%%%', '<?phpphp echo \''.str_replace("'", "\'", $sp_match[1][$curr_sp]).'\'; ?>'."\n", $text_blocks[$curr_tb]);
+                        $text_blocks[$curr_tb] = str_replace('%%%SMARTYSP'.$curr_sp.'%%%', '<?php echo \''.str_replace("'", "\'", $sp_match[1][$curr_sp]).'\'; ?>'."\n", $text_blocks[$curr_tb]);
                     } else if ($this->php_handling == SMARTY_PHP_QUOTE) {
                         /* quote php tags */
                         $text_blocks[$curr_tb] = str_replace('%%%SMARTYSP'.$curr_sp.'%%%', htmlspecialchars($sp_match[1][$curr_sp]), $text_blocks[$curr_tb]);
@@ -299,13 +298,13 @@ class Smarty_Compiler extends Smarty {
                         $text_blocks[$curr_tb] = str_replace('%%%SMARTYSP'.$curr_sp.'%%%', '', $text_blocks[$curr_tb]);
                     } else {
                         /* SMARTY_PHP_ALLOW, but echo non php starting tags */
-                        $sp_match[1][$curr_sp] = preg_replace('~(<\?(?!php|=|$))~i', '<?phpphp echo \'\\1\'?>'."\n", $sp_match[1][$curr_sp]);
+                        $sp_match[1][$curr_sp] = preg_replace('~(<\?(?!php|=|$))~i', '<?php echo \'\\1\'?>'."\n", $sp_match[1][$curr_sp]);
                         $text_blocks[$curr_tb] = str_replace('%%%SMARTYSP'.$curr_sp.'%%%', $sp_match[1][$curr_sp], $text_blocks[$curr_tb]);
                     }
                 }
             }
         }
-
+        
         /* Compile the template tags into PHP code. */
         $compiled_tags = array();
         for ($i = 0, $for_max = count($template_tags); $i < $for_max; $i++) {
@@ -338,7 +337,7 @@ class Smarty_Compiler extends Smarty {
                         /* remove trailing whitespaces from the last text_block */
                         $text_blocks[$j] = rtrim($text_blocks[$j]);
                     }
-                    $text_blocks[$j] = "<?phpphp echo '" . strtr($text_blocks[$j], array("'"=>"\'", "\\"=>"\\\\")) . "'; ?>";
+                    $text_blocks[$j] = "<?php echo '" . strtr($text_blocks[$j], array("'"=>"\'", "\\"=>"\\\\")) . "'; ?>";
                     if ($compiled_tags[$j] == '{/strip}') {
                         $compiled_tags[$j] = "\n"; /* slurped by php, but necessary
                                     if a newline is following the closing strip-tag */
@@ -350,29 +349,39 @@ 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 (strlen($compiled_content) && (substr($compiled_content, -1) == "\n") ) {
             $compiled_content = substr($compiled_content, 0, -1);
         }
 
         if (!empty($this->_cache_serial)) {
-            $compiled_content = "<?phpphp \$this->_cache_serials['".$this->_cache_include."'] = '".$this->_cache_serial."'; ?>" . $compiled_content;
+            $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) {
@@ -388,7 +397,7 @@ class Smarty_Compiler extends Smarty {
         }
 
         // put header at the top of the compiled template
-        $template_header = "<?phpphp /* Smarty version ".$this->_version.", created on ".strftime("%Y-%m-%d %H:%M:%S")."\n";
+        $template_header = "<?php /* Smarty version ".$this->_version.", created on ".strftime("%Y-%m-%d %H:%M:%S")."\n";
         $template_header .= "         compiled from ".strtr(urlencode($resource_name), array('%2F'=>'/', '%3A'=>':'))." */ ?>\n";
 
         /* Emit code to load needed plugins. */
@@ -402,14 +411,14 @@ class Smarty_Compiler extends Smarty {
                 }
             }
             $_plugins_params .= '))';
-            $plugins_code = "<?phpphp require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');\nsmarty_core_load_plugins($_plugins_params, \$this); ?>\n";
+            $plugins_code = "<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');\nsmarty_core_load_plugins($_plugins_params, \$this); ?>\n";
             $template_header .= $plugins_code;
             $this->_plugin_info = array();
             $this->_plugins_code = $plugins_code;
         }
 
         if ($this->_init_smarty_vars) {
-            $template_header .= "<?phpphp require_once(SMARTY_CORE_DIR . 'core.assign_smarty_interface.php');\nsmarty_core_assign_smarty_interface(null, \$this); ?>\n";
+            $template_header .= "<?php require_once(SMARTY_CORE_DIR . 'core.assign_smarty_interface.php');\nsmarty_core_assign_smarty_interface(null, \$this); ?>\n";
             $this->_init_smarty_vars = false;
         }
 
@@ -444,7 +453,7 @@ class Smarty_Compiler extends Smarty {
         if (preg_match('~^' . $this->_num_const_regexp . '|' . $this->_obj_call_regexp . '|' . $this->_var_regexp . '$~', $tag_command)) {
             /* tag name is a variable or object */
             $_return = $this->_parse_var_props($tag_command . $tag_modifier);
-            return "<?phpphp echo $_return; ?>" . $this->_additional_newline;
+            return "<?php echo $_return; ?>" . $this->_additional_newline;
         }
 
         /* If the tag name is a registered object, we process it. */
@@ -469,7 +478,7 @@ class Smarty_Compiler extends Smarty {
                     $this->_syntax_error('unexpected {else}', E_USER_ERROR, __FILE__, __LINE__);
                 else
                     $this->_push_tag('else');
-                return '<?phpphp else: ?>';
+                return '<?php else: ?>';
 
             case 'elseif':
                 list($_open_tag) = end($this->_tag_stack);
@@ -481,7 +490,7 @@ class Smarty_Compiler extends Smarty {
 
             case '/if':
                 $this->_pop_tag('if');
-                return '<?phpphp endif; ?>';
+                return '<?php endif; ?>';
 
             case 'capture':
                 return $this->_compile_capture_tag(true, $tag_args);
@@ -501,15 +510,15 @@ class Smarty_Compiler extends Smarty {
 
             case 'sectionelse':
                 $this->_push_tag('sectionelse');
-                return "<?phpphp endfor; else: ?>";
+                return "<?php endfor; else: ?>";
                 break;
 
             case '/section':
                 $_open_tag = $this->_pop_tag('section');
                 if ($_open_tag == 'sectionelse')
-                    return "<?phpphp endif; ?>";
+                    return "<?php endif; ?>";
                 else
-                    return "<?phpphp endfor; endif; ?>";
+                    return "<?php endfor; endif; ?>";
 
             case 'foreach':
                 $this->_push_tag('foreach');
@@ -518,14 +527,14 @@ class Smarty_Compiler extends Smarty {
 
             case 'foreachelse':
                 $this->_push_tag('foreachelse');
-                return "<?phpphp endforeach; else: ?>";
+                return "<?php endforeach; else: ?>";
 
             case '/foreach':
                 $_open_tag = $this->_pop_tag('foreach');
                 if ($_open_tag == 'foreachelse')
-                    return "<?phpphp endif; unset(\$_from); ?>";
+                    return "<?php endif; unset(\$_from); ?>";
                 else
-                    return "<?phpphp endforeach; endif; unset(\$_from); ?>";
+                    return "<?php endforeach; endif; unset(\$_from); ?>";
                 break;
 
             case 'strip':
@@ -556,14 +565,14 @@ class Smarty_Compiler extends Smarty {
                         return '';
 
                     case 3: /* literal */
-                        return "<?phpphp echo '" . strtr($block[2], array("'"=>"\'", "\\"=>"\\\\")) . "'; ?>" . $this->_additional_newline;
+                        return "<?php echo '" . strtr($block[2], array("'"=>"\'", "\\"=>"\\\\")) . "'; ?>" . $this->_additional_newline;
 
                     case 4: /* php */
                         if ($this->security && !$this->security_settings['PHP_TAGS']) {
                             $this->_syntax_error("(secure mode) php tags not permitted", E_USER_WARNING, __FILE__, __LINE__);
                             return;
                         }
-                        return '<?phpphp ' . $block[3] .' ?>';
+                        return '<?php ' . $block[3] .' ?>';
                 }
                 break;
 
@@ -639,7 +648,7 @@ class Smarty_Compiler extends Smarty {
             if ($have_function) {
                 $output = call_user_func_array($plugin_func, array($tag_args, &$this));
                 if($output != '') {
-                $output = '<?phpphp ' . $this->_push_cacheable_state('compiler', $tag_command)
+                $output = '<?php ' . $this->_push_cacheable_state('compiler', $tag_command)
                                    . $output
                                    . $this->_pop_cacheable_state('compiler', $tag_command) . ' ?>';
                 }
@@ -725,7 +734,7 @@ class Smarty_Compiler extends Smarty {
             $this->_pop_tag($tag_command);
 
         if ($start_tag) {
-            $output = '<?phpphp ' . $this->_push_cacheable_state('block', $tag_command);
+            $output = '<?php ' . $this->_push_cacheable_state('block', $tag_command);
             $attrs = $this->_parse_attrs($tag_args);
             $_cache_attrs='';
             $arg_list = $this->_compile_arg_list('block', $tag_command, $attrs, $_cache_attrs);
@@ -733,7 +742,7 @@ class Smarty_Compiler extends Smarty {
             $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 = '<?phpphp $_block_content = ob_get_contents(); ob_end_clean(); ';
+            $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)';
             if ($tag_modifier != '') {
                 $this->_parse_modifiers($_out_tag_text, $tag_modifier);
@@ -812,7 +821,7 @@ class Smarty_Compiler extends Smarty {
         }
 
         if($output != '') {
-            $output =  '<?phpphp ' . $_cacheable_state . $_cache_attrs . 'echo ' . $output . ';'
+            $output =  '<?php ' . $_cacheable_state . $_cache_attrs . 'echo ' . $output . ';'
                 . $this->_pop_cacheable_state('function', $tag_command) . "?>" . $this->_additional_newline;
         }
 
@@ -881,9 +890,9 @@ class Smarty_Compiler extends Smarty {
                     $prefix .= "while (\$_block_repeat) { ob_start();";
                     $return = null;
                     $postfix = '';
-            } else {
-                    $prefix = "\$_obj_block_content = ob_get_contents(); ob_end_clean(); ";
-                    $return = "\$_block_repeat=false; \$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], \$_obj_block_content, \$this, \$_block_repeat)";
+                } 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 {
@@ -910,7 +919,7 @@ class Smarty_Compiler extends Smarty {
             $output = '';
         }
 
-        return '<?phpphp ' . $prefix . $output . $postfix . "?>" . $newline;
+        return '<?php ' . $prefix . $output . $postfix . "?>" . $newline;
     }
 
     /**
@@ -925,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'])) {
@@ -944,7 +957,7 @@ class Smarty_Compiler extends Smarty {
 
         $_params = "array('args' => array(".implode(', ', (array)$arg_list)."))";
 
-        return "<?phpphp require_once(SMARTY_CORE_DIR . 'core.run_insert_handler.php');\necho smarty_core_run_insert_handler($_params, \$this); ?>" . $this->_additional_newline;
+        return "<?php require_once(SMARTY_CORE_DIR . 'core.run_insert_handler.php');\necho smarty_core_run_insert_handler($_params, \$this); ?>" . $this->_additional_newline;
     }
 
     /**
@@ -975,7 +988,7 @@ class Smarty_Compiler extends Smarty {
             $arg_list[] = "'$arg_name' => $arg_value";
         }
 
-        $output = '<?phpphp ';
+        $output = '<?php ';
 
         if (isset($assign_var)) {
             $output .= "ob_start();\n";
@@ -1028,7 +1041,7 @@ class Smarty_Compiler extends Smarty {
 
         $_params = "array('smarty_file' => " . $attrs['file'] . ", 'smarty_assign' => '$assign_var', 'smarty_once' => $once_var, 'smarty_include_vars' => array(".implode(',', $arg_list)."))";
 
-        return "<?phpphp require_once(SMARTY_CORE_DIR . 'core.smarty_include_php.php');\nsmarty_core_smarty_include_php($_params, \$this); ?>" . $this->_additional_newline;
+        return "<?php require_once(SMARTY_CORE_DIR . 'core.smarty_include_php.php');\nsmarty_core_smarty_include_php($_params, \$this); ?>" . $this->_additional_newline;
     }
 
 
@@ -1043,7 +1056,7 @@ class Smarty_Compiler extends Smarty {
         $attrs = $this->_parse_attrs($tag_args);
         $arg_list = array();
 
-        $output = '<?phpphp ';
+        $output = '<?php ';
         $section_name = $attrs['name'];
         if (empty($section_name)) {
             $this->_syntax_error("missing section name", E_USER_ERROR, __FILE__, __LINE__);
@@ -1158,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'])) {
@@ -1178,7 +1191,7 @@ class Smarty_Compiler extends Smarty {
             $name = null;
         }
 
-        $output = '<?phpphp ';
+        $output = '<?php ';
         $output .= "\$_from = $from; if (!is_array(\$_from) && !is_object(\$_from)) { settype(\$_from, 'array'); }";
         if (isset($name)) {
             $foreach_props = "\$this->_foreach[$name]";
@@ -1218,11 +1231,11 @@ class Smarty_Compiler extends Smarty {
                 $assign = $attrs['assign'];
             else
                 $assign = null;
-            $output = "<?phpphp ob_start(); ?>";
+            $output = "<?php ob_start(); ?>";
             $this->_capture_stack[] = array($buffer, $assign);
         } else {
             list($buffer, $assign) = array_pop($this->_capture_stack);
-            $output = "<?phpphp \$this->_smarty_vars['capture'][$buffer] = ob_get_contents(); ";
+            $output = "<?php \$this->_smarty_vars['capture'][$buffer] = ob_get_contents(); ";
             if (isset($assign)) {
                 $output .= " \$this->assign($assign, ob_get_contents());";
             }
@@ -1254,7 +1267,7 @@ class Smarty_Compiler extends Smarty {
         $tokens = $match[0];
 
         if(empty($tokens)) {
-            $_error_msg .= $elseif ? "'elseif'" : "'if'";
+            $_error_msg = $elseif ? "'elseif'" : "'if'";
             $_error_msg .= ' statement requires arguments'; 
             $this->_syntax_error($_error_msg, E_USER_ERROR, __FILE__, __LINE__);
         }
@@ -1398,9 +1411,9 @@ class Smarty_Compiler extends Smarty {
         }
 
         if ($elseif)
-            return '<?phpphp elseif ('.implode(' ', $tokens).'): ?>';
+            return '<?php elseif ('.implode(' ', $tokens).'): ?>';
         else
-            return '<?phpphp if ('.implode(' ', $tokens).'): ?>';
+            return '<?php if ('.implode(' ', $tokens).'): ?>';
     }
 
 
@@ -1669,11 +1682,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;
@@ -2217,9 +2230,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;
     }
 
@@ -2234,9 +2247,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;';
     }
 
 
diff --git a/GPL_LIB/Smarty/libs/debug.tpl b/GPL_LIB/Smarty/libs/debug.tpl
index 7f1c9d42587ceb21a097334af84aa6292f352f67..c05ef5d0b5ee45701e13f4e36108d90061a33205 100644
--- a/GPL_LIB/Smarty/libs/debug.tpl
+++ b/GPL_LIB/Smarty/libs/debug.tpl
@@ -1,64 +1,157 @@
 {* 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
diff --git a/GPL_LIB/Smarty/libs/internals/core.assign_smarty_interface.php b/GPL_LIB/Smarty/libs/internals/core.assign_smarty_interface.php
index 06dd6a2992c9306661abb39569aaf91bdebe8bde..500ba9a96a3555d821e10f204685865b78d3be8d 100644
--- a/GPL_LIB/Smarty/libs/internals/core.assign_smarty_interface.php
+++ b/GPL_LIB/Smarty/libs/internals/core.assign_smarty_interface.php
@@ -14,7 +14,6 @@
  * @param array Format: null
  * @param Smarty
  */
- 
 function smarty_core_assign_smarty_interface($params, &$smarty)
 {
         if (isset($smarty->_smarty_vars) && isset($smarty->_smarty_vars['request'])) {
diff --git a/GPL_LIB/Smarty/libs/internals/core.write_compiled_include.php b/GPL_LIB/Smarty/libs/internals/core.write_compiled_include.php
index 9cf89298f42a3cb4e970e05e1cd0bef530a76d2c..15c44d63dd5813f63a6a65748264845529ed68f8 100644
--- a/GPL_LIB/Smarty/libs/internals/core.write_compiled_include.php
+++ b/GPL_LIB/Smarty/libs/internals/core.write_compiled_include.php
@@ -15,12 +15,12 @@
 
 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;
 
diff --git a/GPL_LIB/Smarty/libs/internals/core.write_file.php b/GPL_LIB/Smarty/libs/internals/core.write_file.php
index 333b7621b3cff992249e45650b8ae32c09a5950b..9f6ee5ca934fb627e090b1a2e88f23aaa617fdf3 100644
--- a/GPL_LIB/Smarty/libs/internals/core.write_file.php
+++ b/GPL_LIB/Smarty/libs/internals/core.write_file.php
@@ -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
diff --git a/GPL_LIB/Smarty/libs/plugins/function.html_select_date.php b/GPL_LIB/Smarty/libs/plugins/function.html_select_date.php
index e216d587dd999af699948a8267f9e7a44f6b58bb..5e952c2112cc197770c34d221b62d009bceb2ce6 100644
--- a/GPL_LIB/Smarty/libs/plugins/function.html_select_date.php
+++ b/GPL_LIB/Smarty/libs/plugins/function.html_select_date.php
@@ -22,11 +22,13 @@
  *                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
+ * @version 1.3.4
  * @author Andrei Zmievski
  * @author Monte Ohrt <monte at ohrt dot com>
  * @param array
@@ -131,19 +133,21 @@ 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));
     }
     // Now split this in pieces, which later can be used to set the select
     $time = explode("-", $time);
-    
+
     // make syntax "+N" or "-N" work with start_year and end_year
     if (preg_match('!^(\+|\-)\s*(\d+)$!', $end_year, $match)) {
         if ($match[1] == '+') {
@@ -159,7 +163,7 @@ function smarty_function_html_select_date($params, &$smarty)
             $start_year = strftime('%Y') - $match[2];
         }
     }
-    if (strlen($time[0]) > 0) { 
+    if (strlen($time[0]) > 0) {
         if ($start_year > $time[0] && !isset($params['start_year'])) {
             // force start year to include given date if not explicitly set
             $start_year = $time[0];
@@ -174,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)) {
@@ -212,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;
@@ -247,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 {
@@ -310,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;
         }
     }
diff --git a/GPL_LIB/Smarty/libs/plugins/function.html_table.php b/GPL_LIB/Smarty/libs/plugins/function.html_table.php
index b009f8ec0db6f72918f7fa74d8bce43eabc89f67..d74da62cbf2140f585f29362f5cef5948a478540 100644
--- a/GPL_LIB/Smarty/libs/plugins/function.html_table.php
+++ b/GPL_LIB/Smarty/libs/plugins/function.html_table.php
@@ -15,12 +15,15 @@
  * 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,
@@ -31,10 +34,12 @@
  * <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,6 +155,7 @@ function smarty_function_html_table($params, &$smarty)
         }
         $output .= "</tr>\n";
     }
+    $output .= "</tbody>\n";
     $output .= "</table>\n";
     
     return $output;
diff --git a/GPL_LIB/Smarty/libs/plugins/function.mailto.php b/GPL_LIB/Smarty/libs/plugins/function.mailto.php
index b88fa617ae3ff0f0839a0001870052b5f12fe5c5..e6be9089f841da7cf12e04f5d3855117c966e7d7 100644
--- a/GPL_LIB/Smarty/libs/plugins/function.mailto.php
+++ b/GPL_LIB/Smarty/libs/plugins/function.mailto.php
@@ -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,7 +71,7 @@ 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':
diff --git a/GPL_LIB/Smarty/libs/plugins/modifier.capitalize.php b/GPL_LIB/Smarty/libs/plugins/modifier.capitalize.php
index f987ba42965a7d2edfe8ea782e2ebfc363afea39..5c20b270ef5a24fca93fb12c39c898a68aba14f3 100644
--- a/GPL_LIB/Smarty/libs/plugins/modifier.capitalize.php
+++ b/GPL_LIB/Smarty/libs/plugins/modifier.capitalize.php
@@ -21,7 +21,7 @@
 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)
@@ -33,7 +33,7 @@ function smarty_modifier_capitalize_ucfirst($string, $uc_digits = null)
         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];
diff --git a/GPL_LIB/Smarty/libs/plugins/modifier.date_format.php b/GPL_LIB/Smarty/libs/plugins/modifier.date_format.php
index 82b82c4f90e1d9171f0edd1f488265e8c23ea2c3..e4e8850ab6d316f137d297d1213fce20a2995e5a 100644
--- a/GPL_LIB/Smarty/libs/plugins/modifier.date_format.php
+++ b/GPL_LIB/Smarty/libs/plugins/modifier.date_format.php
@@ -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
  *
@@ -28,20 +28,29 @@ require_once $smarty->_get_plugin_filepath('shared','make_timestamp');
  * @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: */
diff --git a/GPL_LIB/Smarty/libs/plugins/modifier.debug_print_var.php b/GPL_LIB/Smarty/libs/plugins/modifier.debug_print_var.php
index a88817b77116e3f9b7c40d5ac6c7bd8453f44ba1..57378381495a1728b1b77d9f046038307c7c1a68 100644
--- a/GPL_LIB/Smarty/libs/plugins/modifier.debug_print_var.php
+++ b/GPL_LIB/Smarty/libs/plugins/modifier.debug_print_var.php
@@ -22,33 +22,66 @@
  */
 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;
 }
 
diff --git a/GPL_LIB/Smarty/libs/plugins/modifier.regex_replace.php b/GPL_LIB/Smarty/libs/plugins/modifier.regex_replace.php
index b1aedf800d788ebb202daeff5128feb0cfba7ff9..ce34ac656cc6d9da36af5351d1ac49cab340303a 100644
--- a/GPL_LIB/Smarty/libs/plugins/modifier.regex_replace.php
+++ b/GPL_LIB/Smarty/libs/plugins/modifier.regex_replace.php
@@ -11,7 +11,7 @@
  *
  * 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>
@@ -22,10 +22,11 @@
  */
 function smarty_modifier_regex_replace($string, $search, $replace)
 {
-    if (preg_match('!\W(\w+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) {
+    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);
 }
 
diff --git a/GPL_LIB/Smarty/libs/plugins/modifier.truncate.php b/GPL_LIB/Smarty/libs/plugins/modifier.truncate.php
index 8113f1250de7a1438f2ed7e818e7bb98a773c188..bd67407428d2c806598b84a5e171fdb964c1e0ae 100644
--- a/GPL_LIB/Smarty/libs/plugins/modifier.truncate.php
+++ b/GPL_LIB/Smarty/libs/plugins/modifier.truncate.php
@@ -31,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);
         }
diff --git a/GPL_LIB/Smarty/libs/plugins/outputfilter.trimwhitespace.php b/GPL_LIB/Smarty/libs/plugins/outputfilter.trimwhitespace.php
index 2e6ee377814db4d4d34a56be519342ae7eef0d40..ac2583ebf7993412fb9b0fae56a4d549c2215ee8 100644
--- a/GPL_LIB/Smarty/libs/plugins/outputfilter.trimwhitespace.php
+++ b/GPL_LIB/Smarty/libs/plugins/outputfilter.trimwhitespace.php
@@ -49,14 +49,14 @@ function smarty_outputfilter_trimwhitespace($source, &$smarty)
     // 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;
 }