Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 2122)
+++ branches/2.8.x/CHANGELOG	(revision 2123)
@@ -11,6 +11,8 @@
 ! = Update/Change
 ===============================================================================
 
+01 Apr-2015 Build 2123 Manuela v.d.Decken(DarkViper)
+! /framework/SqlImport  modified for new export format of phpMyAdmin
 18 Mar-2015 Build 2122 Manuela v.d.Decken(DarkViper)
 ! /index.php adapted for WB-2.8.4
 16 Mar-2015 Build 2121 Manuela v.d.Decken(DarkViper)
@@ -217,7 +219,7 @@
 20 Dec-2013 Build 2047 Dietmar Woellbrink (Luisehahne)
 + /admin/addons/languages/ 22 Language Files added (Tks To jacobi22)
 19 Dec-2013 Build 2046 Manuela v.d.Decken(DarkViper)
-# little Typofixes in packet AccessFile 
+# little Typofixes in packet AccessFile
 19 Dec-2013 Build 2045 Dietmar Woellbrink (Luisehahne)
 ! update Access Files Classes with easier handling for modules who create their own accessfiles
 19 Dec-2013 Build 2045 Dietmar Woellbrink (Luisehahne)
@@ -230,7 +232,7 @@
 18 Dec-2013 Build 2042 Dietmar Woellbrink (Luisehahne)
 + /admin/addons/languages/ add NL Languages File (Tks To Nibz)
 18 Dec-2013 Build 2041 Dietmar Woellbrink (Luisehahne)
-- /media/~dummy.git 
+- /media/~dummy.git
 + /media/favicon.ico
 - /pages/~dummy.git
 + /pages/favicon.ico
@@ -325,7 +327,7 @@
 ! /upgrade-script.php  add ModuleReorgAbstract calling the Reorg Accessfiles from modules
 14 Nov-2013 Build 2002 Dietmar Woellbrink (Luisehahne)
 # include/editarea/edit_area_full.js fixed browser useragent query (Tks to Marmot)
-  include/editarea/SOURCE add editarea sourcecode 
+  include/editarea/SOURCE add editarea sourcecode
 14 Nov-2013 Build 2001 Dietmar Woellbrink (Luisehahne)
 ! /framework/class.wb.php::ShowMaintainScreen add locked maintenance message
 # /framework/initialize.php::readConfiguration taken back last change (Revision 1996)
@@ -368,7 +370,7 @@
   also implemented in frontend account
 19 Oct-2013 Build 1986 Dietmar Woellbrink (Luisehahne)
 ! If the advanced option languages ​​Page was disabled or pages exist with one language only,
-  then all available languages ​​are shown to be selected in the User-Settings implemented in backend 
+  then all available languages ​​are shown to be selected in the User-Settings implemented in backend
 19 Oct-2013 Build 1985 Dietmar Woellbrink (Luisehahne)
 ! /modules/news/Reorg.php completely recoded using class AccessFile()
 ! /modules/news/upgrade.php  add accessfile report to output details in upgrade-script.php
@@ -399,7 +401,7 @@
 ! /framework/functions.php: started implementation of packet AccessFile in function rebuild_all_accessfiles()
 + /framework/functions.php::rm_full_dir() added additional argument to set list of protected files
 ! integrate the new processes into the upgrade-script.php
-+ extended checks and informations in /modules/MultiLingual/upgrade.php 
++ extended checks and informations in /modules/MultiLingual/upgrade.php
   increasing version for module MultiLingual to 1.6.9
 05 Oct-2013 Build 1976 Manuela v.d.Decken(DarkViper)
 # Packet AccessFile fixed indifferent handling of './..' directory entries
@@ -422,7 +424,7 @@
 # MultiLingual typofix in methode updateDefaultPagesCode
 ! Pages settings fix output page_code treelist (not ready yet)
 30 Sep-2013 Build 1969 Dietmar Woellbrink (Luisehahne)
-# fixed wrong [REFERRER_ID] replacement for search 
+# fixed wrong [REFERRER_ID] replacement for search
 # security Application error message fix in search/search.php
 24 Sep-2013 Build 1968 Manuela v.d.Decken(DarkViper)
 # /news/add.php insert missing [SHORT] tag
@@ -553,7 +555,7 @@
 ! recoding /modules/code/add.php with exception
 07 Jun-2013 Build 1914 Dietmar Woellbrink (Luisehahne)
 ! /admin/pages/  add/change to new Translate class
-  add a default.ini with a list of protected basenames, 
+  add a default.ini with a list of protected basenames,
   and a PagesEnvironment to force writing the accessfile forever
 07 Jun-2013 Build 1913 Dietmar Woellbrink (Luisehahne)
 ! /admin/addons/  change to new Translate class
@@ -568,7 +570,7 @@
 07 Jun-2013 Build 1909 Dietmar Woellbrink (Luisehahne)
 ! install/save.php,search_modext.php set $sSectionIdPrefix (SEC_ANCHOR) to the right value
 07 Jun-2013 Build 1908 Dietmar Woellbrink (Luisehahne)
-! class.admin.php corrected url_help, 
+! class.admin.php corrected url_help,
   add Translat::disableAddon() in methode print_footer
 ! frontend.functions.php page_content() set $sSectionIdPrefix to the right format
 ! functions.php change get_parent_titles from menu_title to filename
@@ -611,19 +613,19 @@
 ! update news module and set Version to 3.8.7
 19 Mar-2013 Build 1894 Dietmar Woellbrink (Luisehahne)
 # bugfix form intall form284db.sql
-# bugfix wb_search_data.sql layout for table settings 
+# bugfix wb_search_data.sql layout for table settings
 ! update menu_link module and set Version to 2.8.1
 19 Mar-2013 Build 1893 Dietmar Woellbrink (Luisehahne)
 # little issue on handing the cache in TranslationTable
 # fix missing block or block[0] issue in /admin/pages/section.php
 19 Mar-2013 Build 1892 Dietmar Woellbrink (Luisehahne)
-! update output_filter module set version to 0.4.1 
+! update output_filter module set version to 0.4.1
 19 Mar-2013 Build 1891 Dietmar Woellbrink (Luisehahne)
-! update captcha_control module set version to 1.2.1 
+! update captcha_control module set version to 1.2.1
 19 Mar-2013 Build 1890 Dietmar Woellbrink (Luisehahne)
-# bugfix and update form module set version to 2.9.1 
-! update code module set version to 2.8.4 
-! update wysiwyg module set version to 2.9.1 
+# bugfix and update form module set version to 2.9.1
+! update code module set version to 2.8.4
+! update wysiwyg module set version to 2.9.1
 19 Mar-2013 Build 1889 Dietmar Woellbrink (Luisehahne)
 # bugfix solved sections block update
 ! update sections table change some varchar to int(11)
@@ -630,14 +632,14 @@
 + upgradeHelper class for better module upgrade
 12 Mar-2013 Build 1888 Dietmar Woellbrink (Luisehahne)
 # fixed Deprecated: preg_replace(): modules\show_menu2\include.php
-  The /e modifier is deprecated, replaced with preg_replace_callback 
+  The /e modifier is deprecated, replaced with preg_replace_callback
 12 Mar-2013 Build 1887 Dietmar Woellbrink (Luisehahne)
 # bugfix Notice: Constant messages during new WB installation
-! update WbDatabase SqlImport parameter, 
+! update WbDatabase SqlImport parameter,
 12 Mar-2013 Build 1886 Dietmar Woellbrink (Luisehahne)
 ! Install update, Split Step1+2 from the inputs Steps
 # Languages Typofix
-! check tables remove not needed tables 
+! check tables remove not needed tables
 11 Mar-2013 Build 1885 Dietmar Woellbrink (Luisehahne)
 # protect magic setter to fix security issue in WbDatabase
 + additional arguments for Charset and TablePrefix in WbDatabase::doConnect
@@ -646,8 +648,8 @@
 + initialize.php now also support Charset and TablePrefix settings from setup.ini.php
 ! in setup.ini.php some keys are renamed (WB_URL => AppUrl and ADMIN_DIRECTORY => AcpDir)
 10 Mar-2013 Build 1884 Dietmar Woellbrink (Luisehahne)
-! from security reasons the new installation has changed 
-  from the old config.php into new setup.ini.php without 
+! from security reasons the new installation has changed
+  from the old config.php into new setup.ini.php without
   using global constants for critical values like username & password and so on.
 07 Mar-2013 Build 1883 Dietmar Woellbrink (Luisehahne)
 ! groups change languages class to translate class
@@ -665,7 +667,7 @@
 05 Mar-2013 Build 1878 Manuela v.d.Decken(DarkViper)
 # fixed PagesDir in WbAdaptor
 02 Mar-2013 Build 1877 Dietmar Woellbrink (Luisehahne)
-! fix news reorg.php to be backward compatible slash settings  
+! fix news reorg.php to be backward compatible slash settings
 01 Mar-2013 Build 1876 Dietmar Woellbrink (Luisehahne)
 ! wysgwyg, first try to repair missing table entries
 ! page sections typofix in header
@@ -682,7 +684,7 @@
 # bugfix preferences timezone, date_format, time_format settings, backend and frontend
 23 Feb-2013 Build 1871 Dietmar Woellbrink (Luisehahne)
 # bugfix Undefined variable: sName in .../framework/functions.php
-# bugfix droplet ShowWysiwyg Undefined variable: module 
+# bugfix droplet ShowWysiwyg Undefined variable: module
 21 Feb-2013 Build 1870 Dietmar Woellbrink (Luisehahne)
 # solved installation issues
 ! upgrade-script sanitize pages_directory before creating access files
@@ -689,7 +691,7 @@
 20 Feb-2013 Build 1869 Dietmar Woellbrink (Luisehahne)
 # solved renaming access files by page settings if php as apachehandler
 19 Feb-2013 Build 1868 Dietmar Woellbrink (Luisehahne)
-! change mysql_esc_string to WbDatabase::getInstance()->escapeStrinng() 
+! change mysql_esc_string to WbDatabase::getInstance()->escapeStrinng()
 19 Feb-2013 Build 1867 Dietmar Woellbrink (Luisehahne)
 ! fixed pagetree header
 19 Feb-2013 Build 1866 Dietmar Woellbrink (Luisehahne)
@@ -737,7 +739,7 @@
 07 Jan-2013 Build 1851 Manuela v.d.Decken(DarkViper)
 ! updated Twig template engine to stable version 1.11.1
 06 Jan-2013 Build 1850 Dietmar Woellbrink (Luisehahne)
-! add default_timezone in admin account by new installation 
+! add default_timezone in admin account by new installation
 06 Jan-2013 Build 1849 Dietmar Woellbrink (Luisehahne)
 # typofix page_extended in admin/settings and admin/pages/
 ! Fill empty option modules dropdown in admin/pages/sections.php
@@ -755,7 +757,7 @@
 28 Dez-2012 Build 1844 Dietmar Woellbrink (Luisehahne)
 # fixed Use of undefined constant PAGE_ID in /account/forgot.php
 ! change return value to boolean in user management delete.php, add.php
-! change WEBSITE_SIGNATURE to WBMAIL_SIGNATURE 
+! change WEBSITE_SIGNATURE to WBMAIL_SIGNATURE
 27 Dez-2012 Build 1843 Dietmar Woellbrink (Luisehahne)
 ! trash only will be shown in sectionmanagement if more than one section exists
 ! In the server settings the renaming of the page_directory is only possible, if no page exists
@@ -776,7 +778,7 @@
 13 Dez-2012 Build 1838 Dietmar Woellbrink (Luisehahne)
 ! groups management now completely html valide
 13 Dez-2012 Build 1837 Dietmar Woellbrink (Luisehahne)
-! runtime optimized in /admin/pages/index.php 
+! runtime optimized in /admin/pages/index.php
 12 Dez-2012 Build 1836 Dietmar Woellbrink (Luisehahne)
 # fixed WB admin wrapper script, could never run at end if section_id == 0
 10 Dez-2012 Build 1835 Dietmar Woellbrink (Luisehahne)
@@ -802,7 +804,7 @@
 # fixed to big preview images in media
 20 Nov-2012 Build 1825 Dietmar Woellbrink (Luisehahne)
 ! update page settings, add save & back Button, add extended hide/show
-  redesign the page settings for a better overview  
+  redesign the page settings for a better overview
 20 Nov-2012 Build 1824 Dietmar Woellbrink (Luisehahne)
 ! update media in look to the changes in user management
 20 Nov-2012 Build 1823 Dietmar Woellbrink (Luisehahne)
@@ -810,7 +812,7 @@
   if homefolders in settings are enabled
   add save & back in user modify
 20 Nov-2012 Build 1822 Dietmar Woellbrink (Luisehahne)
-! update installer, strict difference between table structure and data 
+! update installer, strict difference between table structure and data
 # fixed wrong constant for settings table
 ! update redirect to upgrade-script in /admin/start/index.php
 16 Nov-2012 Build 1821 Dietmar Woellbrink (Luisehahne)
@@ -817,7 +819,7 @@
 ! forgot to upload the /install/save.php
 16 Nov-2012 Build 1820 Dietmar Woellbrink (Luisehahne)
 + added sql folder including  websitebaker.sql, wb_search.sql
-! update /install/save.php, will now created the tables with $database->SqlImport() 
+! update /install/save.php, will now created the tables with $database->SqlImport()
 ! update search layout in settings
 16 Nov-2012 Build 1819 Dietmar Woellbrink (Luisehahne)
 # bugfix media, Undefined index /admin/media/upload.php on line 108
@@ -843,14 +845,14 @@
 09 Nov-2012 Build 1810 Dietmar Woellbrink (Luisehahne)
 ! account signup check that display_name is unique in whole system
   (prevents from User-faking)
-! add POST Request to admintools 
+! add POST Request to admintools
 07 Nov-2012 Build 1809 Dietmar Woellbrink (Luisehahne)
 ! remove login_ip after 60days set in /admin/start/index.php
 ! add confirm_code and confirm_timeout fields in users table in /install/save.php
 07 Nov-2012 Build 1808 Dietmar Woellbrink (Luisehahne)
 ! add ErrorMsgException in /framework/globalExceptionHandler.php
-! ErrorMessage "ADMIN_INSUFFICIENT_PRIVELLIGES" now can be styled 
-  by the /admin/skel/themes/htt/ErrorMsgFile.htt template 
+! ErrorMessage "ADMIN_INSUFFICIENT_PRIVELLIGES" now can be styled
+  by the /admin/skel/themes/htt/ErrorMsgFile.htt template
 ! add css selectors to wb_theme
 ! rename maintance.htt to maintenance.htt
 07 Nov-2012 Build 1807 Dietmar Woellbrink (Luisehahne)
@@ -875,15 +877,15 @@
 ! update form modul, change text "unknown#" to "Guest"
   in view_submission and emailheader email_fromname
 01 Nov-2012 Build 1803 Dietmar Woellbrink (Luisehahne)
-! update submission form with designer friendly css classes  
+! update submission form with designer friendly css classes
 31 Oct-2012 Build 1802 Dietmar Woellbrink (Luisehahne)
 ! change installation info "Please rename to config.php"
 31 Oct-2012 Build 1801 Dietmar Woellbrink (Luisehahne)
 ! upgrade-script: update if filesRemove or remove dirs failed
-! update methode StripCodeFromText, add remove <?php ... ?>,    
+! update methode StripCodeFromText, add remove <?php ... ?>,
 ! security fixes in form modul with StripCodeFromText
 29 Oct-2012 Build 1800 Dietmar Woellbrink (Luisehahne)
-# add missing lang var in account/languages/EN.PHP 
+# add missing lang var in account/languages/EN.PHP
 29 Oct-2012 Build 1799 Dietmar Woellbrink (Luisehahne)
 ! media iframe browser now is html XHTML 1.0 Transitional valide
 28 Oct-2012 Build 1798 Dietmar Woellbrink (Luisehahne)
@@ -895,9 +897,9 @@
 24 Oct-2012 Build 1795 Dietmar Woellbrink (Luisehahne)
 ! change setting of the $_SESSION['SYSTEM_PERMISSIONS']
   from get_user_id to ami_group_member, sp that all Users
-  with Administrators Group, don't need to login again  
+  with Administrators Group, don't need to login again
 24 Oct-2012 Build 1794 Dietmar Woellbrink (Luisehahne)
-! upgrade-script: system_permission changes for group Administrators 
+! upgrade-script: system_permission changes for group Administrators
   will be change in $_SESSION['SYSTEM_PERMISSIONS'], if you are logged in as user_id == 1
 24 Oct-2012 Build 1793 Dietmar Woellbrink (Luisehahne)
 + add missing warning icon
@@ -907,7 +909,7 @@
 24 Oct-2012 Build 1791 Dietmar Woellbrink (Luisehahne)
 # fixed save search settings
 14 Oct-2012 Build 1790 Dietmar Woellbrink (Luisehahne)
-! update group permission, 
+! update group permission,
 14 Oct-2012 Build 1789 Dietmar Woellbrink (Luisehahne)
 ! update Group Permission, add module_advanced
 ! upgrade-script will be updating Adminitrator Group
@@ -914,7 +916,7 @@
 13 Oct-2012 Build 1788 Dietmar Woellbrink (Luisehahne)
 # fixed page settings for php Version less 5.2.9
 13 Oct-2012 Build 1787 Dietmar Woellbrink (Luisehahne)
-# fixed parsing error in signup 
+# fixed parsing error in signup
 12 Oct-2012 Build 1786 Dietmar Woellbrink (Luisehahne)
 # fixed double content
 12 Oct-2012 Build 1785 Dietmar Woellbrink (Luisehahne)
@@ -990,11 +992,11 @@
 # fixed upgrade-script wrong Adding/updating page_icon_dir to settings table
 18 Sep-2012 Build 1761 Dietmar Woellbrink (Luisehahne)
 # fixed wrong MODULE_URL in form modul
-# fixed loginForgot.htt missing vars in <title></title> 
+# fixed loginForgot.htt missing vars in <title></title>
 18 Sep-2012 Build 1760 Dietmar Woellbrink (Luisehahne)
 ! fallback changes in wysiwyg Revision 1754
   because it's required that section_id is the PRIMARY KEY
-  Fallback will be done in upgrade-script until the final version  
+  Fallback will be done in upgrade-script until the final version
 ! build in extra input seo title in page settings
 ! beginning rebranding wb_theme
 17 Sep-2012 Build 1759 Dietmar Woellbrink (Luisehahne)
@@ -1003,10 +1005,10 @@
 ! change multi-dimensional arrays (variables) to similar arrays in framework/functions.php
 16 Sep-2012 Build 1758 Dietmar Woellbrink (Luisehahne)
 ! forgot to upload the install.php from wysiwyg modul in Revision 1756
-! correcting some more SEC_ANCHOR 
+! correcting some more SEC_ANCHOR
 16 Sep-2012 Build 1757 Dietmar Woellbrink (Luisehahne)
 # fixed mysql_fetch_array() expects parameter 1 to be resource, boolean given
-  by adding a new form on page, 
+  by adding a new form on page,
 ! refactroring form/install.php to SqlImport, add a form sql dump
 ! correcting some SEC_ANCHOR in form
 15 Sep-2012 Build 1756 Dietmar Woellbrink (Luisehahne)
@@ -1016,7 +1018,7 @@
 15 Sep-2012 Build 1754 Dietmar Woellbrink (Luisehahne)
 # fixed Duplicate entry  for key 'PRIMARY' if adding a new  pageX
   search for ->page['root_parent'] == 0 in module and shoe_menu2 calls
-  page['root_parent'] has always the page_id from the first adding new page in level  
+  page['root_parent'] has always the page_id from the first adding new page in level
 15 Sep-2012 Build 1753 Dietmar Woellbrink (Luisehahne)
 ! remove summary="" in captcha tables frontend
 ! fixed calendar time, now all Calendar in WB shows right user TIMEZONE
@@ -1039,13 +1041,13 @@
 08 Sep-2012 Build 1747 Dietmar Woellbrink (Luisehahne)
 # fixed issues with older table strucure for earlier WB installations
 08 Sep-2012 Build 1746 Dietmar Woellbrink (Luisehahne)
-# add prefix wb_ to class name for content container 
+# add prefix wb_ to class name for content container
   if module has the same name as a html markup e.g code
 08 Sep-2012 Build 1745 Dietmar Woellbrink (Luisehahne)
 ! add div container in page_content for each sections,
 ! update droplets SectionPicker, ShowWysiwyg and ShowRandomWysiwyg
 ! put sec_anchor in this div, sec_anchor fixed in all found files
-  sec_anchor default now set to "section_", 
+  sec_anchor default now set to "section_",
   sec_anchor can't be empty for future developement
 08 Sep-2012 Build 1744 Dietmar Woellbrink (Luisehahne)
 # typofix upgrade-script Adding redirect timer to settings table
@@ -1057,10 +1059,10 @@
 07 Sep-2012 Build 1741 Dietmar Woellbrink (Luisehahne)
 ! Preparing Separation of code and HTML in Droplets
 05 Sep-2012 Build 1740 Dietmar Woellbrink (Luisehahne)
-! frontend.functions.php remove return $content in page_content(), 
+! frontend.functions.php remove return $content in page_content(),
   incompatible with search logic
-! /include/jquery forgot jquery version.txt 
-# /form/view.php fixed wrong compare syntax 
+! /include/jquery forgot jquery version.txt
+# /form/view.php fixed wrong compare syntax
 ! group management, design style, set max-heights for permission boxes
 05 Sep-2012 Build 1739 Dietmar Woellbrink (Luisehahne)
 ! update jquery ui to version 1.8.23
@@ -1078,11 +1080,11 @@
 31 Aug-2012 Build 1734 Dietmar Woellbrink (Luisehahne)
 # typofix in /install/save.php and /admin/settings_page.php
 31 Aug-2012 Build 1733 Dietmar Woellbrink (Luisehahne)
-+ forgot the jquery version.txt 
++ forgot the jquery version.txt
 31 Aug-2012 Build 1732 Dietmar Woellbrink (Luisehahne)
 ! update jquery to version 1.8.1
 31 Aug-2012 Build 1731 Dietmar Woellbrink (Luisehahne)
-+ add Page extended to settings, 
++ add Page extended to settings,
 ! to show experten mode in page settings
 ! shows some more settings like icon dir
 31 Aug-2012 Build 1730 Dietmar Woellbrink (Luisehahne)
@@ -1103,7 +1105,7 @@
 # fixed form submission output if no entry exist
 30 Aug-2012 Build 1723 Dietmar Woellbrink (Luisehahne)
 # fixed missing class.admin
-# check droplet skype if no existing user 
+# check droplet skype if no existing user
 30 Aug-2012 Build 1722 Dietmar Woellbrink (Luisehahne)
 # fixed missing login template after install
 29 Aug-2012 Build 1721 Dietmar Woellbrink (Luisehahne)
@@ -1148,7 +1150,7 @@
 ! change multi-dimensional arrays (variables) to similar arrays
 ! change default templates, change code to new templates
 29 Aug-2012 Build 1706 Dietmar Woellbrink (Luisehahne)
-# fixed save page option 
+# fixed save page option
 27 Aug-2012 Build 1705 Dietmar Woellbrink (Luisehahne)
 ! update headerinfo
 ! change os_version request if os is not windows
@@ -1167,9 +1169,9 @@
 ! method page_content, add parameter $echo true to print $content, false return $content
 27 Aug-2012 Build 1700 Dietmar Woellbrink (Luisehahne)
 ! change multi-dimensional arrays (variables) to similar arrays
-+ add variables for backend-menu, header.htt and footer.htt 
++ add variables for backend-menu, header.htt and footer.htt
 27 Aug-2012 Build 1699 Dietmar Woellbrink (Luisehahne)
-! Fixed IDKEY in Secureform.mtab to solve issues whith Security warnings 
+! Fixed IDKEY in Secureform.mtab to solve issues whith Security warnings
 ! on pages that used a lot of IDKEYS. (fixed by NorHei)
 27 Aug-2012 Build 1698 Dietmar Woellbrink (Luisehahne)
 ! optimize some methods
@@ -1181,7 +1183,7 @@
 27 Aug-2012 Build 1696 Dietmar Woellbrink (Luisehahne)
 ! move extra handling of menu links in index.php to the view.php of module menu links {Tks to NorHei)
 18 Aug-2012 Build 1695 Dietmar Woellbrink (Luisehahne)
-# fixed $install_tables in install/save.php 
+# fixed $install_tables in install/save.php
 18 Aug-2012 Build 1694 Dietmar Woellbrink (Luisehahne)
 + add var $iPhpDeclaredClasses = sizeof(get_declared_classes() set by PHP in initialize.php
 18 Aug-2012 Build 1693 Dietmar Woellbrink (Luisehahne)
@@ -1199,7 +1201,7 @@
 # fixed Errorhandling for old class.database
 08 May-2012 Build 1688 Dietmar Woellbrink (Luisehahne)
 ! update upgrade-script first remove access files in an existing pages folder
-  before rebuilding them 
+  before rebuilding them
 ! for security upgrade don't remove access files in root
 07 May-2012 Build 1687 Manuela v.d.Decken(DarkViper)
 # Drop tables in installer fixed
@@ -1214,12 +1216,12 @@
 06 May-2012 Build 1684 Dietmar Woellbrink (Luisehahne)
 ! update upgrade-script, now don't overwrite existings values in settings
 + add field tooltip to table pages in installer
-! change some module tool_icon.png (Tks to Stefek) 
+! change some module tool_icon.png (Tks to Stefek)
 ! add date_time string to backup_droplets.zip
-- search and comment out founded require_once(WB_PATH."/framework/class.database.php"); 
+- search and comment out founded require_once(WB_PATH."/framework/class.database.php");
 - this will be never needed anymore and produce errors
 ! rename class.msg_queue.php in msgQueue.php to work with autokoader
-+ add function format_message to class.wb.php 
++ add function format_message to class.wb.php
 03 May-2012 Build 1683 Manuela v.d.Decken(DarkViper)
 ! changed class Database into a Singleton-Class
 # added forgotten 'static' keyword in ModLanguage
@@ -1281,7 +1283,7 @@
 ! update of installer and upgradescript for Revision 1664/1665
 + add fields page_icon, menu_icon_0, menu_icon_1 to pages
 + add settings values dev_infos and page_icon_dir
-! update languages files 
+! update languages files
 17 Apr-2012 Build 1665 Manuela v.d.Decken(DarkViper)
 ! update page_settings - CSS for wb_theme and argos_theme (for Rev.1664)
 17 Apr-2012 Build 1664 Manuela v.d.Decken(DarkViper)
@@ -1401,7 +1403,7 @@
 + Validationfix, add qx_rawlang.php in quickSkin_alpha to solve
   <a> escaping malformed URI reference messages in javascript
 ! fixed magic_quotes_gpc=on, magic_quotes going to be removed in PHP6.
-  and some hoster do not set it to off  
+  and some hoster do not set it to off
 18 Feb-2012 Build 1614 Dietmar Woellbrink (Luisehahne)
 # fixed tabindex in installer (Tks to Easyuser)
 # fixed installer call in /admin/index.php
@@ -1432,7 +1434,7 @@
 ! fix local module reload and module manuell install
 ! forgot to upload login.php
 08 Feb-2012 Build 1602 Dietmar Woellbrink (Luisehahne)
-! a quick simple stylesheet fix in wb_theme, 
+! a quick simple stylesheet fix in wb_theme,
 07 Feb-2012 Build 1601 Dietmar Woellbrink (Luisehahne)
 ! little designfix in forgot_form.php
 ! fix media if uploading zip files with folder, than create FolderProtectFiles
@@ -1442,7 +1444,7 @@
 06 Feb-2012 Build 1599 Dietmar Woellbrink (Luisehahne)
 ! update all used files with redirect_url to $_SESSION['HTTP_REFERER']
 06 Feb-2012 Build 1598 Dietmar Woellbrink (Luisehahne)
-# fixed undefined fragment index in initialize.php 
+# fixed undefined fragment index in initialize.php
 ! add $_SESSION['HTTP_REFERER'] storing active pagelink if page_id != 0
 05 Feb-2012 Build 1597 Dietmar Woellbrink (Luisehahne)
 # fixed issues with get_magic_quotes_gpc and FCKeditor
@@ -1451,7 +1453,7 @@
 # announced on http://www.darksecurity.de/advisories/2012/SSCHADV2012-003.txt
 04 Feb-2012 Build 1595 Dietmar Woellbrink (Luisehahne)
 # fix form language vars for better understanding (Tks to Maverik)
-! change request if HTTP_REFERER is not empty in logout.php 
+! change request if HTTP_REFERER is not empty in logout.php
 03 Feb-2012 Build 1594 Dietmar Woellbrink (Luisehahne)
 # fixed use of undefined constant fri in /form/view.php
 01 Feb-2012 Build 1593 Dietmar Woellbrink (Luisehahne)
@@ -1476,7 +1478,7 @@
 # fixed double table width in modify.php form module ((Tks to Ruebenwurzel)
 19 Jan-2012 Build 1584 Dietmar Woellbrink (Luisehahne)
 ! form module, shows email-adress from body tag
-- remove scrollable table in overview form module 
+- remove scrollable table in overview form module
 19 Jan-2012 Build 1583 Dietmar Woellbrink (Luisehahne)
 ! forgot upload save.php in wysiwyg module
 19 Jan-2012 Build 1582 Dietmar Woellbrink (Luisehahne)
@@ -1518,7 +1520,7 @@
 ! fix show_menu2 2th parameter for template round and allcss (Tks to Ruebenwurzel)
 ! set fingerprint_with_ip_octets default to 2 in a new installation
 07 Jan-2012 Build 1567 Dietmar Woellbrink (Luisehahne)
-# fix wbmailer_smtp_auth, could not be disabled after enabled 
+# fix wbmailer_smtp_auth, could not be disabled after enabled
 07 Jan-2012 Build 1566 Dietmar Woellbrink (Luisehahne)
 # fix class.login, when name and pass are both empty no longer call increase_attemps
 ! some redirect updates in frontend account files
@@ -1527,7 +1529,7 @@
 06 Jan-2012 Build 1564 Dietmar Woellbrink (Luisehahne)
 # entities fixes in FI and TR languages files (Tks to Ruebenwurzel)
 06 Jan-2012 Build 1563 Dietmar Woellbrink (Luisehahne)
-! add linebreak in backend message for 'delete install folder...' 
+! add linebreak in backend message for 'delete install folder...'
 05 Jan-2012 Build 1562 Dietmar Woellbrink (Luisehahne)
 ! only superadmin can start the upgrade-script from backend
 05 Jan-2012 Build 1561 Dietmar Woellbrink (Luisehahne)
@@ -1535,7 +1537,7 @@
 04 Jan-2012 Build 1560 Dietmar Woellbrink (Luisehahne)
 ! upgrade script start automatically after uploading a new version and login to the backend
 04 Jan-2012 Build 1559 Dietmar Woellbrink (Luisehahne)
-! change quickSkin to alpha status, ATTENTION rename folder to quickSkin_alpha 
+! change quickSkin to alpha status, ATTENTION rename folder to quickSkin_alpha
 02 Jan-2012 Build 1558 Dietmar Woellbrink (Luisehahne)
 # remove backslash in $_CONFIG['extensions_dir']
 ! update editor.css for allcssand round  (Tks to Ruebenwurzel)
@@ -1543,7 +1545,7 @@
 02 Jan-2012 Build 1556 Dietmar Woellbrink (Luisehahne)
 # typofix in function make_dir
 02 Jan-2012 Build 1555 Dietmar Woellbrink (Luisehahne)
-! wb_quickSkin_28.php create _skin folders with folder protect file 
+! wb_quickSkin_28.php create _skin folders with folder protect file
 ! add a 3th parameter to function make_dir to allows the creation of nested directories specified in the pathname. Defaults to TRUE
 01 Jan-2012 Build 1554 Dietmar Woellbrink (Luisehahne)
 # typofixes in DE languages files (Tks to Ruebenwurzel)
@@ -1567,8 +1569,8 @@
 + forgot a file in quickSkin Folder
 18 Dez-2011 Build 1546 Dietmar Woellbrink (Luisehahne)
 ! recoded /account/forgot_form.php
-! update quickSkin 
-! update languages files 
+! update quickSkin
+! update languages files
 + add /temp/quickSkin/ folder
 ! begin fixing sec_anchor in urls
 15 Dez-2011 Build 1545 Dietmar Woellbrink (Luisehahne)
@@ -1577,7 +1579,7 @@
 # fix droplet import after new wb installtion
 14 Dez-2011 Build 1543 Dietmar Woellbrink (Luisehahne)
 # fix droplet sectionPicker
-# fix install config.php not writeable 
+# fix install config.php not writeable
 # check table droplet if empty import examples
 12 Dez-2011 Build 1542 Dietmar Woellbrink (Luisehahne)
 # fix wrong background url in "Website Under Construction"
@@ -1597,7 +1599,7 @@
 + add FolderProtectFile to quickskin
 10 Dez-2011 Build 1535 Dietmar Woellbrink (Luisehahne)
 ! changes in code modul
-+ add function getTableEngine to class.database 
++ add function getTableEngine to class.database
 + add Quickskin to include folder
 + add reworkes Droplet SectionPicker to load modules frontend.css
 08 Dez-2011 Build 1534 Manuela v.d.Decken(DarkViper)
@@ -1620,7 +1622,7 @@
 + add new backend theme handling (Tks to Stefek)
 ----------------------------------- Fixes 2.8.2 --------------------------------
 23 Nov-2011 Build 1528 Dietmar Woellbrink (Luisehahne)
-! rework login and show_menu in templates allcss and round 
+! rework login and show_menu in templates allcss and round
 22 Nov-2011 Build 1527 Dietmar Woellbrink (Luisehahne)
 # fix redirect login
 20 Nov-2011 Build 1526 Dietmar Woellbrink (Luisehahne)
@@ -1630,7 +1632,7 @@
 13 Nov-2011 Build 1524 Dietmar Woellbrink (Luisehahne)
 ! fix secureform was not uploaded
 13 Nov-2011 Build 1523 Dietmar Woellbrink (Luisehahne)
-# fix fingerprint in secureform 
+# fix fingerprint in secureform
 ! update jquery to version 1.7
 12 Nov-2011 Build 1522 Manuela v.d.Decken(DarkViper)
 # /modules/output_filter/filter-routines.php little fix to inserting mdcr.js
@@ -1701,7 +1703,7 @@
 11 Aug-2011 Build 1495 Manuela v.d.Decken(DarkViper)
 # fix SQL-statements to SQL-strict
 11 Aug-2011 Build 1494 Dietmar Woellbrink (Luisehahne)
-# Fixed save wrong template directory in database 
+# Fixed save wrong template directory in database
 11 Aug-2011 Build 1493 Dietmar Woellbrink (Luisehahne)
 # Ticket #1106 FatalError in groups module
 11 Aug-2011 Build 1492 Dietmar Woellbrink (Luisehahne)
@@ -1743,7 +1745,7 @@
 21 Jul-2011 Build 1477 Dietmar Woellbrink (Luisehahne)
 ! update DA language (Tks to Achrist)
 ! update some languages variables (Tks to Rübenwurzel, Testör)
-! move function url_encode from admin/pages to framework/functions.php 
+! move function url_encode from admin/pages to framework/functions.php
 ! add missing svn properties in some headerinfos
 ! font-size correction in wb_theme (Tks to Rübenwurzel)
 13 Jul-2011 Build 1476 Dietmar Woellbrink (Luisehahne)
@@ -1762,7 +1764,7 @@
 # change lang variable to remove upgrade-script
 ! reworked add sections in pages
 ! fix set empty href in show_menu2
-! set show_menu2 version to 4.9.6 
+! set show_menu2 version to 4.9.6
 ! reworked Droplet LoginBox, add redirect query
 - remove unneeded folder js
 ! set Droplet to version 1.1.0
@@ -1781,7 +1783,7 @@
 07 Jul-2011 Build 1472 Dietmar Woellbrink (Luisehahne)
 # fixed version.php
 07 Jul-2011 Build 1471 Dietmar Woellbrink (Luisehahne)
-! change to Release Candiate 7 
+! change to Release Candiate 7
 07 Jul-2011 Build 1470 Dietmar Woellbrink (Luisehahne)
 # languages Typo fix (Tks to pcwacht)
 ! update intro, fixed saving
@@ -1802,7 +1804,7 @@
 # fix form modul (tks to our Tester)
 01 Jul-2011 Build 1465 Dietmar Woellbrink (Luisehahne)
 # bugfix in initialize including SecureForm
-! update admintools FTAN handling 
+! update admintools FTAN handling
 01 Jul-2011 Build 1464 Manuela v.d.Decken(DarkViper)
 #  Ticket 1102 fixed little bug in moveCssToHead() (Tks to Crnogorac081)
 01 Jul-2011 Build 1463 Dietmar Woellbrink (Luisehahne)
@@ -1835,7 +1837,7 @@
 # in /framework/functions.php::media_filename - replace whitespaces by _
 # /upgrade-script.php - some small fixes
 02 Jun-2011 Build 1453 Dietmar Woellbrink (Luisehahne)
-# fix target in admin/media/browse.php 
+# fix target in admin/media/browse.php
 # http://www.websitebaker2.org/forum/index.php/topic,21688.msg145812.html#msg145812
 # Tks to the community
 02 Jun-2011 Build 1452 Dietmar Woellbrink (Luisehahne)
@@ -1856,7 +1858,7 @@
 27 Apr-2011 Build 1445 Dietmar Woellbrink (Luisehahne)
 # small validation fixes in backend themes
 22 Apr-2011 Build 1444 Dietmar Woellbrink (Luisehahne)
-# fix wrong url in captacha 
+# fix wrong url in captacha
 19 Apr-2011 Build 1443 Dietmar Woellbrink (Luisehahne)
 ! remove auto including YUI Framework in backend for modules, enable with ->print_footer(true)
 ! ->print_error and ->print_success too accept a message as array
@@ -1870,7 +1872,7 @@
 # security fixes remove defined WB_PATH for backend templates
 # fixed class.admin.php missing $TEXT declaration, add get_section_details
 26 Mar-2011 Build 1440 Dietmar Woellbrink (Luisehahne)
-# add missing methode is_group_match in class.wb.php 
+# add missing methode is_group_match in class.wb.php
 17 Mar-2011 Build 1439 Manuela v.d.Decken(DarkViper)
 ! syncronice version (no data changes)
 17 Mar-2011 Build 1438 Manuela v.d.Decken(DarkViper)
@@ -1883,11 +1885,11 @@
 # fix entities converting in select languages (Tks to the community)
 # see http://www.websitebaker2.org/forum/index.php/topic,20547.msg140512.html#msg140512
 13 Mar-2011 Build 1433 Dietmar Woellbrink (Luisehahne)
-# fixed bug : Call to undefined method wb::preprocess() 
+# fixed bug : Call to undefined method wb::preprocess()
 14 Feb-2011 Build 1432 Dietmar Woellbrink (Luisehahne)
 # update NL language file (Tks to Argos)
 11 Feb-2011 Build 1431 Dietmar Woellbrink (Luisehahne)
-+ add page position in get_page_details 
++ add page position in get_page_details
 11 Feb-2011 Build 1430 Dietmar Woellbrink (Luisehahne)
 # fix save settings dir and file mode (Tks to the community)
 09 Feb-2011 Build 1429 Dietmar Woellbrink (Luisehahne)
@@ -1928,23 +1930,23 @@
 23 Jan-2011 Build 1413 Frank Heyne (FrankH)
 # Bugfix for Ticket 900
 23 Jan-2011 Build 1412 Manuela v.d.Decken(DarkViper)
-# fixed wb::password_chars 
+# fixed wb::password_chars
 23 Jan-2011 Build 1411 Frank Heyne (FrankH)
 # Bugfix for Tickets 965, 966 and 910
 23 Jan-2011 Build 1410 Frank Heyne (FrankH)
 # Bugfix for build 1409
 23 Jan-2011 Build 1409 Frank Heyne (FrankH)
-+ Ticket 1058 added warn_page_leave (currently only in wysiwyg) 
++ Ticket 1058 added warn_page_leave (currently only in wysiwyg)
 23 Jan-2011 Build 1408 Manuela v.d.Decken(DarkViper)
 # small changes in sm2menu() [SM2_NO_TITLE + SM2_XHTML_STRICT]
 22 Jan-2011 Build 1407 Frank Heyne (FrankH)
-# various Security fixes, thanks to secunia and others 
+# various Security fixes, thanks to secunia and others
 22 Jan-2011 Build 1406 Frank Heyne (FrankH)
-# Security fix to stop users from changing module contents without permission, thanks to Michael Schwarz 
+# Security fix to stop users from changing module contents without permission, thanks to Michael Schwarz
 22 Jan-2011 Build 1405 Frank Heyne (FrankH)
-# Security fix (XSS) in form module, thanks to Michael Schwarz 
+# Security fix (XSS) in form module, thanks to Michael Schwarz
 22 Jan-2011 Build 1404 Dietmar Woellbrink (Luisehahne)
-# Security fix in pages 
+# Security fix in pages
 22 Jan-2011 Build 1403 Dietmar Woellbrink (Luisehahne)
 ! small fix
 22 Jan-2011 Build 1402 Dietmar Woellbrink (Luisehahne)
@@ -1952,7 +1954,7 @@
 21 Jan-2011 Build 1401 Frank Heyne (FrankH)
 ! fixed changelog
 21 Jan-2011 Build 1400 Frank Heyne (FrankH)
-# Security fix in account 
+# Security fix in account
 # Security fix in admin/media, thanks to hal 9000
 21 Jan-2011 Build 1399 Dietmar Woellbrink (Luisehahne)
 # Ticket 1090 fix wrong translation
@@ -1961,7 +1963,7 @@
 20 Jan-2011 Build 1397 Dietmar Woellbrink (Luisehahne)
 ! recoded rediect timer in print_success (tks to Chio)
 19 Jan-2011 Build 1396 M.von den Decken (DarkViper)
-! remove header redirect and add a die message 
+! remove header redirect and add a die message
 17 Jan-2011 Build 1395 Frank Heyne (FrankH)
 # Security fix in admin/addons
 16 Jan-2011 Build 1394 Dietmar Woellbrink (Luisehahne)
@@ -1993,7 +1995,7 @@
 13 Jan-2011 Build 1380 Dietmar Woellbrink (Luisehahne)
 + output fixings, known error in jsadmin will be fix later
 13 Jan-2011 Build 1379 M.von den Decken (DarkViper)
-# fix class.admin 
+# fix class.admin
 13 Jan-2011 Build 1378 M.von den Decken (DarkViper)
 ! fixed inclusion of SecureForm
 + added IDNA/Punycode to  wb::validate_email()
@@ -2000,8 +2002,8 @@
 11 Jan-2011 Build 1377 Frank Heyne (FrankH)
 # Security fix for modules jsadmin, menu_link and output_filter
 11 Jan-2011 Build 1376 Frank Heyne (FrankH)
-# Security fix for WYSIWYG module 
-# Security fix for Wrapper module 
+# Security fix for WYSIWYG module
+# Security fix for Wrapper module
 10 Jan-2011 Build 1375 Frank Heyne (FrankH)
 # Security fix for Form module (new version is 2.8)
 # bugfix for delete_field in Form module
@@ -2021,15 +2023,15 @@
 ! update bind jquery in frontend, jquery-include.js and jquery-insert.js are included
 31 Dec-2010 Build 1368 Dietmar Woellbrink (Luisehahne)
 - delete class.secureform.php
-+ add newest SecureForm 
++ add newest SecureForm
 # fixed Call to a member function read() on a non-object in function register_frontend_modfiles
 29 Dec-2010 Build 1367 Dietmar Woellbrink (Luisehahne)
 # securtiy fix in class.login
 # see http://www.websitebaker2.org/forum/index.php/topic,20347.msg137554.html#msg137554
 29 Dec-2010 Build 1366 Dietmar Woellbrink (Luisehahne)
-# fixed showing system_default for search_template 
+# fixed showing system_default for search_template
 29 Dec-2010 Build 1365 Dietmar Woellbrink (Luisehahne)
-! added some functions 
+! added some functions
 ! set status to 2.8.2 RC3
 29 Dec-2010 Build 1364 Dietmar Woellbrink (Luisehahne)
 ! added function 'db_update_key_value()'
@@ -2049,7 +2051,7 @@
 ! validation fixes in pages backend theme
 27 Dec-2010 Build 1357 Frank Heyne (FrankH)
 # security fix: in path admin/pages/ - added FTAN check
-! had to enhance parameter for getFTAN() in framework/class.secureform.php 
+! had to enhance parameter for getFTAN() in framework/class.secureform.php
 27 Dec-2010 Build 1356 Dietmar Woellbrink (Luisehahne)
 # more little fixes in settings
 ! change to RC2
@@ -2106,19 +2108,19 @@
 !	insert modulename in sections, even for missing module, you can style it with class selector: module_disabled
 27-Apr-2010 Dietmar Woellbrink (Luisehahne)
 +	add an extra class class.secureform.php and extends it to class.wb.php
-!	check for installed modules before loading in content 
+!	check for installed modules before loading in content
 27-Apr-2010 Dietmar Woellbrink (Luisehahne)
 !	remove forgotten debug line
 27-Apr-2010 Dietmar Woellbrink (Luisehahne)
 #	Fixed update search settings
-#	Fixed bug in /modules/admin.php 
+#	Fixed bug in /modules/admin.php
 22-Apr-2010 Dietmar Woellbrink (Luisehahne)
-#	Fixed bug in /modules/admin.php 
+#	Fixed bug in /modules/admin.php
 22-Apr-2010 Dietmar Woellbrink (Luisehahne)
-!	start recoding without style display:none	
+!	start recoding without style display:none
 21-Apr-2010 Dietmar Woellbrink (Luisehahne)
 !	Ticket #995 update jquery-ui.css and images (Tks to Ruebenwurzel)
-+	add languages files for jquery datepicker (tks to Ralf)	
++	add languages files for jquery datepicker (tks to Ralf)
 !	Ticket #994 WYSIWYG editors sorted by name (tks to Aldus)
 20-Apr-2010 Dietmar Woellbrink (Luisehahne)
 !	update class.login.php (tks to Ruud)
@@ -2140,7 +2142,7 @@
 #	Typo fixes with german umlaute
 14-Apr-2010 Dietmar Woellbrink (Luisehahne)
 #	Ticket #985 With #1318 no login in backend possible
-#	Ticket #986 Typo inside the german language file 
+#	Ticket #986 Typo inside the german language file
 #	Ticket #982 Unnessesary heredoc causes on errors while installation!
 #	Ticket #926/Ticket #928 Mail Notification on new user registration
 14-Apr-2010 Dietmar Woellbrink (Luisehahne)
@@ -2193,10 +2195,10 @@
 #	Fixed e-mail preg pattern, because issues with some php versions
 07-Mar-2010 Dietmar Woellbrink (Luisehahne)
 #	fixed search_modext.php ( Tks to Thorn )
-#	Ticket #953 is already fixed 
+#	Ticket #953 is already fixed
 #	Ticket #954 styles issues in theme.css ( Tks to Ruebenwurzel )
 07-Mar-2010 Dietmar Woellbrink (Luisehahne)
-#	Tickets #932 change deprecated eregi functions 
+#	Tickets #932 change deprecated eregi functions
 #	Tickets #948 fixed Multiple use of same parametrised droplet - parameter handling
 !	Upgrade Droplets to Version 1.0.3
 !	update some headerinfos
@@ -2209,11 +2211,11 @@
 20-Feb-2010 Dietmar Woellbrink (Luisehahne)
 #	fix corrupted changelog
 20-Feb-2010 Dietmar Woellbrink (Luisehahne)
-#	Ticket #945 fixed reloads function 
+#	Ticket #945 fixed reloads function
 19-Feb-2010 Dietmar Woellbrink (Luisehahne)
 !	update headerinfo in module droplets
 19-Feb-2010 Dietmar Woellbrink (Luisehahne)
-!	Beginning with Ticket #901 
+!	Beginning with Ticket #901
 +	add siteadd.png to backend themes
 !	change icon add child page
 19-Feb-2010 Dietmar Woellbrink (Luisehahne)
@@ -2232,7 +2234,7 @@
 !	recoded function preprocess in /framework/class.frontend.php
 !	optimize function getVersion in /framework/addon.precheck.inc.php
 19-Feb-2010 Dietmar Woellbrink (Luisehahne)
-!	change constant EDIT_ONE_SECTION to default false	
+!	change constant EDIT_ONE_SECTION to default false
 ------------------------------------- 2.8.1 -------------------------------------
 08-Feb-2010 Dietmar Woellbrink (Luisehahne)
 !	missunderstanding back to old logo
@@ -2244,7 +2246,7 @@
 !	Fixed wrong themes path in jquery_theme.js, that plugins works correctly
 +	images icons to run base theme
 01-Feb-2010 Dietmar Woellbrink (Luisehahne)
-!	to hold content, install don't drop existing tables (code, form, menu_link, news, wrapper, wysiwyg) 
+!	to hold content, install don't drop existing tables (code, form, menu_link, news, wrapper, wysiwyg)
 !	otherwise do it with uninstall
 30-Jan-2010 Dietmar Woellbrink (Luisehahne)
 #	Ticket #931 bug in admin/access/index.php
@@ -2265,7 +2267,7 @@
 28-Jan-2010 Dietmar Woellbrink (Luisehahne)
 !	update headertext
 28-Jan-2010 Dietmar Woellbrink (Luisehahne)
-!	update jquery 1.4.0 to 1.4.1, 
+!	update jquery 1.4.0 to 1.4.1,
 -	removed include/jquery/plugins
 !	update backend themes
 #24-Jan-2010 Dietmar Woellbrink (Luisehahne)
@@ -2279,7 +2281,7 @@
 !	fix upgradescript
 23-Jan-2010 Dietmar Woellbrink (Luisehahne)
 !	update jquery to version 1.4, rename old one to jquery-min132.js
-#	fixed argos theme  
+#	fixed argos theme
 22-Jan-2010 Dietmar Woellbrink (Luisehahne)
 !	continue update header info
 22-Jan-2010 Dietmar Woellbrink (Luisehahne)
@@ -2292,11 +2294,11 @@
 22-Jan-2010 Dietmar Woellbrink (Luisehahne)
 !	update fckeditor, forgotten to upload a file
 22-Jan-2010 Dietmar Woellbrink (Luisehahne)
-#	Ticket #917 Update backend themes 
+#	Ticket #917 Update backend themes
 22-Jan-2010 Dietmar Woellbrink (Luisehahne)
 !	Ticket #909 WYSIWYG Editor width destroyes backend layout
-!	Set EDITOR_WIDTH to 0, This way backend theme developper 
-!	can style the WYSIWYG Editor according to their themes.  
+!	Set EDITOR_WIDTH to 0, This way backend theme developper
+!	can style the WYSIWYG Editor according to their themes.
 22-Jan-2010 Dietmar Woellbrink (Luisehahne)
 !	Ticket #916 Update backend theme footer
 21-Jan-2010 Dietmar Woellbrink (Luisehahne)
@@ -2325,7 +2327,7 @@
 19-Jan-2010 Dietmar Woellbrink (Luisehahne)
 #	fix some more small css-errors in WB Backend (thanks to Ruebenwurzel)
 14-Jan-2010 Dietmar Woellbrink (Luisehahne)
-#	fixed snippets including frontend.css and frontend.js 
+#	fixed snippets including frontend.css and frontend.js
 #	without register_frontend_modfiles
 14-Jan-2010 Dietmar Woellbrink (Luisehahne)
 +	Ticket #877 add slovak lang in Captcha and Advanced-Spam-Protection
@@ -2378,7 +2380,7 @@
 28-Dec-2009 Dietmar Woellbrink (Luisehahne)
 #	fix syntax error
 28-Dec-2009 Dietmar Woellbrink (Luisehahne)
-!	update header, check that all tables in WB package are installed 
+!	update header, check that all tables in WB package are installed
 28-Dec-2009 Dietmar Woellbrink (Luisehahne)
 !	update header, change variable
 28-Dec-2009 Dietmar Woellbrink (Luisehahne)
@@ -2398,21 +2400,21 @@
 #	Ticket #894: Bugfixes in newsmodule > rss.php
 16-DEC-2009 Manuel Lang (MaGnaL)
 #	Minor bugfixes: Use localized messages in preference forms on frontend and backend,
-	correct html/php syntax in upgrade-script.php and NL localization of show_menu2 snippet  
+	correct html/php syntax in upgrade-script.php and NL localization of show_menu2 snippet
 14-DEC-2009 Manuel lang (MaGnaL)
 #	Ticket #832: Fix wrong configuration of timezone-handling when saving
-	preferences-form on backend and frontend 
+	preferences-form on backend and frontend
 12-DEC-2009 Manuel Lang (MaGnaL)
 #	Ticket #827: Fix false form-parameter when javascript is deactivated
 	on users and groups temps (admintool).
 12-DEC-2009 Manuel Lang	(MaGnaL)
 #	Bugfix of rev. 1211 search_modext.php (ticket #863): Use isset and
-	given unknown-user instead of counting all users. 
+	given unknown-user instead of counting all users.
 12-Dez-2009 Dietrich Roland Pehlke (Aldus)
 #	Bugfix inside "search_modext.php" to avoid warings if the search found
 	a page last modified by a user witch has been deleted. (ticket #863)
 03-Dez-2009 Dietmar Woellbrink (Luisehahne)
-!	Ticket #890 fixed visability proprty uses non valid value 'none' 
+!	Ticket #890 fixed visability proprty uses non valid value 'none'
 03-Dez-2009 Dietmar Woellbrink (Luisehahne)
 !	change searchstring mdcr.js, workout crypt emails in output_filter/filter-routines.php
 !	comment out ob_end_flush line 259 in form/view.php
@@ -2447,13 +2449,13 @@
 27-Nov-2009 Dietmar Woellbrink (Luisehahne)
 !	fixes language file SK.php
 27-Nov-2009 Dietmar Woellbrink (Luisehahne)
-!	fixed parse error ticket #878 
+!	fixed parse error ticket #878
 26-Nov-2009 Dietmar Woellbrink (Luisehahne)
 !	found and fix some deprecated functions
 26-Nov-2009 Dietmar Woellbrink (Luisehahne)
 !	validate some output files
 26-Nov-2009 Dietmar Woellbrink (Luisehahne)
-!	fix some PHP 5.3 deprecated functions 
+!	fix some PHP 5.3 deprecated functions
 25-Nov-2009 Dietmar Woellbrink (Luisehahne)
 !	Fix to load edit_full_area only if needed
 25-Nov-2009 Dietmar Woellbrink (Luisehahne)
@@ -2461,8 +2463,8 @@
 25-Nov-2009 Dietmar Woellbrink (Luisehahne)
 !	more bug fixes language file SK.php
 25-Nov-2009 Dietmar Woellbrink (Luisehahne)
-!	Many hosts disable error_log() in various and sundry ways. 
-	In WB we do something like this to avoid triggering warnings and errors. 
+!	Many hosts disable error_log() in various and sundry ways.
+	In WB we do something like this to avoid triggering warnings and errors.
 	Even this is sometimes not sufficient to avoid problems with some hosts, but accommodates most.
 25-Nov-2009 Dietmar Woellbrink (Luisehahne)
 !	fix show_menu2 include.php, page crashes, if php error_log is disabled
@@ -2479,7 +2481,7 @@
 24-Nov-2009 Dietmar Woellbrink (Luisehahne)
 +	add register_frontend_modfiles('jquery'); adds jquery basis scripts in head
 +	add register_frontend_modfiles_body('jquery'); adds jquery basis scripts before body end
-+	add jquery_theme.js to choose a ui theme, basis is loaded, can be change 
++	add jquery_theme.js to choose a ui theme, basis is loaded, can be change
 24-Nov-2009 Dietmar Woellbrink (Luisehahne)
 +	add a child page is cumbersome when the parent dropdown list gets to be too large. (Ticket #821)
 24-Nov-2009 Dietmar Woellbrink (Luisehahne)
@@ -2494,7 +2496,7 @@
 !	security update FCKeditor (tks to Ruebenwurzel)
 12-Oct-2009 Dietmar Woellbrink
 +	added old version of fancybox.js
-!	rename new version fancybox 
+!	rename new version fancybox
 +	added missing language variables in newsmodul
 12-Oct-2009 Dietmar Woellbrink
 #	fixes Bugs headersend errors in some core files
@@ -2504,7 +2506,7 @@
 !	set breakcrumb in div container class="breadcrumb"
 !	set separator in span tag class="separator"
 12-Oct-2009 Dietmar Woellbrink
-!	update jquery fancybox from 1.0 to 1.2.1 
+!	update jquery fancybox from 1.0 to 1.2.1
 +	fancybox imagefolder incl. fancybox.css
 12-Oct-2009 Dietmar Woellbrink
 !	shows more details in wysiwyg editor
@@ -2517,7 +2519,7 @@
 09-Oct-2009 Dietmar Woellbrink
 +	upgrade.php to reset newsfiles to created dates
 09-Oct-2009 Dietmar Woellbrink
-#	Ticket #770, #785, #792, #807, #809, 
+#	Ticket #770, #785, #792, #807, #809,
 #	fixes and recoded news module
 09-Oct-2009 Dietmar Woellbrink
 #	Ticket #815 Fix Warning: open_basedir restriction in effect. File is in wrong directory in load_module
@@ -2548,7 +2550,7 @@
 #	Fixed bug in upgrate-script. Constant 'DEFAULT_THEME' doesn't exists (ticket #784).
 25-Aug-2009 Ruud Eisinga
 #	Fixed bug in droplets. Multiple droplets with the same parameter did not extract the new parameter.
-	(problem introduced by code optimisations for WB2.8) 
+	(problem introduced by code optimisations for WB2.8)
 #	Fixed usage of the depriciated (PHP 5.3.0) split() function in class.wb. (ticket #772)
 #	Fixed notice ob_end_clean..failed to delete buffer. (ticket #779)
 22-Aug-2009 Ruud Eisinga
@@ -2595,7 +2597,7 @@
 #	Fixed some display issues in argos_theme (Thanks to Argos)
 30-July-2009 Ruud Eisinga (Ruud)
 #	Fixed a bug in the /admin/media resizer parameters for dirs with whitespaces (thnx to tiesy)
-#	Fixed a bug in FCKeditor include.php. Now the editor can be used from other 
+#	Fixed a bug in FCKeditor include.php. Now the editor can be used from other
 	subdirectories than WB_PATH/modules/mymodule
 29-July 2009 Dietrich Roland Pehlke (Aldus)
 #	changes in framework/class.wb.php to avoid the "print->footer()" bug in the frontend,
@@ -2624,7 +2626,7 @@
 22-July 2009 Matthias Gallas
 !	set Version to RC2
 !	small modification on german language file (ticket #746)
-#	Fixed E_ALL&E_STRICT warning on PHP5 servers (Thanks to Aldus) 
+#	Fixed E_ALL&E_STRICT warning on PHP5 servers (Thanks to Aldus)
 #	Fixed bug with home folders are viewable and writable from other users
 	(ticket #605 and #748) (Thanks to Aldus)
 20-July 2009 Matthias Gallas
@@ -2673,9 +2675,9 @@
 	to avoid warnings and strict messages. See #741. Minor cosmetic changes.
 #	News-Modul: add the unlink-routine for the ".news" folder inside uninstall.php
 	so the groupe-images are also unlink.
-!	News-Modul: add <tr><td> and </td></tr>-tags to the "none found" part in the view.php to 
+!	News-Modul: add <tr><td> and </td></tr>-tags to the "none found" part in the view.php to
 	get valid output inside a table.
-!	Change the setting of $display_image and $display_groupe to avoid the 
+!	Change the setting of $display_image and $display_groupe to avoid the
 	empty display roule problematic (<tr style="display: ">) for valid output.
 !	Add &gt;&gt; in "add.php" instead of >> to avoid invalid output.
 11-July-2009 Ruud Eisinga
@@ -2780,7 +2782,7 @@
 !	Moving the html-template inside a "htt" folder and rename the suffix to ".htt" to
 	keep it consitant to other modules. Minor cosmetic changes inside the code.
 22-June-2009 Ruud Eisinga
-#	Fixed a bug in Menu_link module that made childpages of the menu_link page 
+#	Fixed a bug in Menu_link module that made childpages of the menu_link page
 	not selectable. (thnx to Luisehahne)
 21-June-2009 Matthias Gallas
 #	Fixed small bug introduced in changeset [999]
@@ -2855,7 +2857,7 @@
 #	Fixed not defined language variable in account/email.php (Thanks to BlackTiger)
 #	Fixed Typo in group_form.htt (ticket #705)
 01-Mar-2009 Christian Sommer
-!	Added disclaimer to upgrade-script.php	
+!	Added disclaimer to upgrade-script.php
 28-Feb-2009 Christian Sommer
 #	Removed hardcoded admin path from JSAdmin module (jsadmin/js/dragdrop.js)
 25-Feb-2009 Matthias Gallas
@@ -2886,7 +2888,7 @@
 #	fixed bug if language folder contains none language files (XX.php) or sub folders
 +	added option to invoke module upgrade.php/uninstall.php files from backend (for modules uploaded via FTP)
 18-Feb-2009 Dietrich Roland Pehlke (aldus)
-#	fixed: typos in the section_id inside the action-link 
+#	fixed: typos in the section_id inside the action-link
 !	Remove test_trash and unused variables in query, added suggetions from #588
 #	Bugfix for form bug (ticket #688)
 17-Feb-2009 Christian Sommer
@@ -2937,7 +2939,7 @@
 08-Jan-2009 Christian Sommer
 #	fixed error message in admin class if type array not defined
 05-Jan-2009 Dietrich Roland Pehlke
-#	Code-Snippets are no longer shown as type: unknown. 
+#	Code-Snippets are no longer shown as type: unknown.
 +	Additional key in the languagefiles "$TEXT['CODE_SNIPPET']";
 #	fixed bug for the rss of news, see ticket #609
 04-Jan-2009 Matthias Gallas
@@ -2958,15 +2960,15 @@
 29-Dec-2008 Matthias Gallas
 !	set version to 2.8 BETA
 #	replaced in news modul special chars with entities to get valid output
-!	changed SESSION ID Separator from '&' to '&amp;' to get valid output 
--	Removed the <p> tag around the news as it is added from the editor  
+!	changed SESSION ID Separator from '&' to '&amp;' to get valid output
+-	Removed the <p> tag around the news as it is added from the editor
 28-Dec-2008 Dietrich Roland Pehlke (aldus)
 +	ticket 610: add ip-address to the email-body in the form-modul.
 +	ticket 607: include the frontend.css in the comment_page.php file of the news-module.
 #	File: admin/admintools/index.php - add "order by name" to the query to display the admintools in alphabetic order.
-#	File: admin/modules/uninstall.php - remove a db-query to a db-field that doesn't exists in wb 2.7 anymore 
+#	File: admin/modules/uninstall.php - remove a db-query to a db-field that doesn't exists in wb 2.7 anymore
 26-Dec-2008 Thomas Hornik
-#	fixed two issues with searchresult-highlighting: do not highlight in <pre>/<code>-tags, do not convert &lt; to &amp;lt; anymore. 
+#	fixed two issues with searchresult-highlighting: do not highlight in <pre>/<code>-tags, do not convert &lt; to &amp;lt; anymore.
 13-Dec-2008 Christian Sommer
 !	changed mailer to not extract line break of alternative body text (thanks to freeSbee)
 28-Oct-2008 Christian Sommer
@@ -3227,7 +3229,7 @@
 #	fixed some errors in standard german language file
 +	added new colloquially german language file
 10-Feb-2008 Thomas Hornik
-#	CAPTCHA: Wrong text for calc_ttf-captcha. 
+#	CAPTCHA: Wrong text for calc_ttf-captcha.
 10-Feb-2008 Christian Sommer
 #	fixed E_NOTICE warning with already defined module frontend constants
 -	removed all stuff other than page_content from the blank template
@@ -3333,7 +3335,7 @@
 !	Improved security: CAPTCHAS can't be loaded from outside WB
 !	CAPTCHA ttf_image: added variant. Adjusted character-pool and one background for better readability.
 26-Jan-2008 Christian Sommer
-!	changed WYSIWYG content field from text to longtext (allows more than 65'534 characters) 
+!	changed WYSIWYG content field from text to longtext (allows more than 65'534 characters)
 +	Added Javascript Admin module (developed by Stepan Riha, adapted for WB2.7 by Swen Uth)
 26-Jan-2008 Matthias Gallas
 #	fixed bug in Javascript Admin module
@@ -3374,7 +3376,7 @@
 22-Jan-2008 Thomas Hornik
 +	manage-sections: changed calendar-icon to clock-icon, added second icon to empty date-field.
 21-Jan-2008 Christian Sommer
-!	Removed the manage section icon from the page admin (sections managed by publish by date function) 
+!	Removed the manage section icon from the page admin (sections managed by publish by date function)
 #	Fixed bug with the edit module CSS file implementation (IE7, Opera)
 21-Jan-2008 Thomas Hornik
 +	Unique session-identifier for each website baker installation. fixes #354
@@ -3387,7 +3389,7 @@
 !	upgrade-script.php: added code to update menu_links
 #	fixed a typo in upgrade-script.php
 !	updated admin/pages/sections.php to changed jscalendar-api from changeset 571
-!	module menu_link: after adding a menu_link, the anchor dropdown shows "#"; fixed 
+!	module menu_link: after adding a menu_link, the anchor dropdown shows "#"; fixed
 #	fixed E_NOTICE-warning in news-module (about SECTION_ID in comment.php)
 19-Jan-2008 Christian Sommer
 !	Reduced the success time out and set WYSIWSY background to white
@@ -3418,7 +3420,7 @@
 #	fixed bug in frontend login and multiple groups (only in conjunction with E_ALL)
 !	removed the PAGE_EXTENSION from frontend login
 17-Jan-2008 Matthias Gallas
-#	Reintroduced changes from changeset 520 and 540 wich where overwritten 
+#	Reintroduced changes from changeset 520 and 540 wich where overwritten
 	by changeset 546
 #	Revoked changeset 541 end removed all PAGE_EXTENSION variables and the related
 	option in WB settings as this function only works on Apache Servers
@@ -3439,11 +3441,11 @@
 #	Replaced hardcoded text in login.php with language variables (fixes ticket 386)
 14-Jan-2008 Christian Sommer
 !	added a missing </tr> tag
-#	re-introduced bugfix of Changeset 472 (fixes ticket 402) accidentally 
+#	re-introduced bugfix of Changeset 472 (fixes ticket 402) accidentally
 	removed by Changeset 529 (enhanced pages admin)
 13-Jan-2008 Christian Sommer
 #	moved administration tools from Settings to the new section Admin-Tools
-#	this bugfix closes the ticket 529 (WB upgrades modules with identical version)	
+#	this bugfix closes the ticket 529 (WB upgrades modules with identical version)
 !	increased redirection time after success message, corrected HOME link of the login panel
 !	updated PHPMailer framework to version 2.0.0 (/include/phpmailer)
 #	this bugfix closes ticket 412 (direct call of admin/settings/save.php clears database)
@@ -3516,10 +3518,10 @@
 16-Feb-2007 Christian Sommer
 !	Suppressed PHP warnings and errors when reading empty intro.php
 16-Feb-2007 Christian Sommer
-#	Applied fix to enable parsing of PHP code in the intro.php 
+#	Applied fix to enable parsing of PHP code in the intro.php
 12-Feb-2007 Christian Sommer
 !	Added functions page_css and page_javascript which allow to include optional
-	module files module.css and module.js into the <head> section. This allows to 
+	module files module.css and module.js into the <head> section. This allows to
 	create valid (X)HTML, as CSS definitions of modules are included in the head section
 12-Feb-2007 Christian Sommer
 !	Security enhancement (reduced number of login trials from 50 to 3)
@@ -3563,7 +3565,7 @@
 #	Fixed a little typo error in class.admin.php (#364)
 26-Nov-2006 Ryan Djurovich
 +	Added new script that could possibly be apart of 2.7.x as a replacement
-	for having the pages directory 
+	for having the pages directory
 17-Nov-2006 Matthias Gallas
 #	Fixed fatal error in line 46 news/comment.php (thanks to eki)(#358)
 15-Nov-2006 Matthias Gallas
@@ -3625,7 +3627,7 @@
 !	Changed link target selection. Now self, top and new. (Ticket #145)
 #	Fixed ticket #143. Charset setting is now used in admin login and forgot
 	password pages.
-#	Some changes to the SQL code in the install script for improved 
+#	Some changes to the SQL code in the install script for improved
 	compatibility with new MySQL versions
 #	Fixed ticket #134 - error on browsing media.
 +	Improved backup module: new choice between full database or WB-related
@@ -3634,7 +3636,7 @@
 #	Fixed e-mail sending problems due to additional parameter in mail call.
 #	Applied fix regarding ticket #138: new users now get deleted if
 	sending e-mail fails.
-#	Fixed ticket #137: Last Reset timer not reset in frontend forgotten 
+#	Fixed ticket #137: Last Reset timer not reset in frontend forgotten
 	password process
 #	Removed duplicate expression from modules/news/install.php which caused
 	problems in installation
@@ -3641,19 +3643,19 @@
 
 01-Mar-2006 Stefan Braunewell
 #	Fixed ticket #68 - Safari problem with displaying all parents.
-#	Fixed ticket #136 - mailing forgotten password in admin login screen leads 
+#	Fixed ticket #136 - mailing forgotten password in admin login screen leads
 	to fatal error.
 !	Renamed tag [PROCESSTIME] to [PROCESS_TIME]
 ------------------------------------- 2.6.2 -------------------------------------
 03-Feb-2006 Stefan Braunewell (very big special thanks to John and Alex)
 #	Fixed ticket #104 - commas in form field descriptions not allowed.
-#	Cookie REMEMBER_KEY wasn't cleared in account/logout 
+#	Cookie REMEMBER_KEY wasn't cleared in account/logout
 	and expiration date is now set to time in the past.
 #	Smart login not working.
 !	Changed mail calls to new function $wb->mail.
-#	Form: ticket 124 added captcha settings check 
-#	Ticket 118 added formfield type to check for email/text 
-#	Ticket 115 changed comparision /modules/form/view.php 
+#	Form: ticket 124 added captcha settings check
+#	Ticket 118 added formfield type to check for email/text
+#	Ticket 115 changed comparision /modules/form/view.php
 #	Added correct timecheck in form submissions
 !	Changed captcha.php call to include timestamp
 !	Changed the e-mail validation code and added a mail function to class wb.
@@ -3676,14 +3678,14 @@
 #	Bug #122. Replaced empty field check by check that setting name is
 	not "wb_version".
 #	Replaced all remaining occurrences of '/media' by MEDIA_DIRECTORY - bug #108.
-#	Fixed bug #99 and two additional instances of typo 
+#	Fixed bug #99 and two additional instances of typo
 	catpcha instead of captcha.
 #	Fixed some typos
 #	Fixed some notices and warnings.
 #	Fixed bug #105 - back buttons in addon detail pages not editable.
-!	Replace 'admin' by 'wb' in all account pages. 
+!	Replace 'admin' by 'wb' in all account pages.
 !/#	Moved print_success and print_error code to class.wb.php.
-	Added correct parameters to these functions in account pages. 
+	Added correct parameters to these functions in account pages.
 ------------------------------------- 2.6.1 -------------------------------------
 12-Dec-2005 Ryan Djurovich
 #	Fixed security vulnerability in class.login.php
@@ -3735,10 +3737,10 @@
 11-Sep-2005 Stefan Braunewell
 !	HTMLArea is now a module instead of a core component. Files moved
 	from "include" to "modules".
-+	Implemented Installation of modules on top of an older version. This is 
++	Implemented Installation of modules on top of an older version. This is
 	done via checking $module_version. Instead of install.php, upgrade.php
-	is then called if it exists in the module package. 
-	For module developers: $module_version and $new_module_version are 
+	is then called if it exists in the module package.
+	For module developers: $module_version and $new_module_version are
 	accessible in upgrade.php to find out what upgrade steps need to be taken.
 !	Changed column names in mod_news_posts from short,long to content_short,
 	content_long.
@@ -3779,7 +3781,7 @@
 !	Removed 'USER_LANGUAGE' and 'GET_LANGUAGE' constants.
 	A GET['lang'] now sets the session language variable.
 26-Aug-2005 Stefan Braunewell
-!	Moved redundant code into the new class functions. Created 
+!	Moved redundant code into the new class functions. Created
 	'compatibility.php' for backward compatibility with
 	modules and templates. Variables and functions can still be accessed
 	in the old way.
@@ -3955,7 +3957,7 @@
 !	Imporved interface for basic group permissions
 26-Mar-2005 Stefan Braunewell
 #	Fixed bug with front-end logins
-#	Fixed bug when saving intro page 
+#	Fixed bug when saving intro page
 +	Added check on sign-up if e-mail exists (thanks to P. Melief)
 #	Fixed bugs concerning moving/deleting pages
 #	Fixed list of parents in page settings
@@ -4057,7 +4059,7 @@
 !	Changed name of "Default" template to "Round"
 +	Added "All CSS" template
 +	Added "Jump"
-+	Added 
++	Added
 !	Modified "Box" template to support multiple page levels
 +	Added "Menu Link" module
 +	Added "News" module
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 2122)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 2123)
@@ -41,7 +41,7 @@
  * @version      	$Id$
  * @filesource		$HeadURL$
  * @lastmodified    $Date$
- * 
+ *
  */
 
 if(!defined('WB_URL')) {
@@ -51,5 +51,5 @@
 
 // check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
 if(!defined('VERSION')) define('VERSION', '2.8.4');
-if(!defined('REVISION')) define('REVISION', '2122');
+if(!defined('REVISION')) define('REVISION', '2123');
 if(!defined('SP')) define('SP', '');
Index: branches/2.8.x/wb/framework/SqlImport.php
===================================================================
--- branches/2.8.x/wb/framework/SqlImport.php	(revision 2122)
+++ branches/2.8.x/wb/framework/SqlImport.php	(revision 2123)
@@ -25,14 +25,16 @@
  * @copyright    Manuela v.d.Decken <manuela@isteam.de>
  * @author       Manuela v.d.Decken <manuela@isteam.de>
  * @license      http://www.gnu.org/licenses/gpl.html   GPL License
- * @version      0.0.1
+ * @version      0.0.2
  * @revision     $Revision: 2070 $
  * @lastmodified $Date: 2014-01-03 02:21:42 +0100 (Fr, 03 Jan 2014) $
  * @since        File available since 30.11.2014
  * @description  can handle different actions with SQL-Import files
  */
-class SqlImport {
 
+class SqlImport
+{
+
 /** WbDatabase object */
     protected $oDb          = null;
 /** valide structure file to use for import */
@@ -52,13 +54,11 @@
         'upgrade'
     );
 /** collected additional replacements pairs */
-    protected $aReplacements = array('key'=>array(), 'value'=>array());
+    protected $aAdditionalReplacements = array('key'=>array(), 'value'=>array());
 /** possible engines to use */
     protected $aEngineTypesAvail = array(
-        'memory'     => 'MEMORY',
         'myisam'     => 'MyISAM',
-        'innodb'     => 'InnoDB',
-        'archive'    => 'ARCHIVE'
+        'innodb'     => 'InnoDB'
     );
 /** SQL objects witch can be handled */
     protected $aAvailSqlObjects = array(
@@ -70,6 +70,9 @@
         'TRIGGER',
         'EVENT'
     );
+/** prepared batch lists for all SQL statements */
+    protected $aBatchLists = array();
+/* ****************************************************************** */
 /**
  * Constructor
  * @param WbDatabase $oDb
@@ -79,14 +82,269 @@
     {
         $this->oDb = $oDb;
         $this->sTablePrefix = $oDb->TablePrefix;
-        if (file_exists($sStructFile)) {
-            $this->sStructFile = str_replace('\\', '/', $sStructFile);
-        } else {
-            $this->sStructFile = '';
-            $this->aErrMsg[] = 'file with structure not available! ['.$sStructFile.']';
+        $sStructFile = str_replace('\\', '/', $sStructFile);
+        if (!file_exists($sStructFile)) {
+            throw new SqlImportException('no existing import file defined');
         }
+        $this->sStructFile = $sStructFile;
     }
+// ---------------------------------------------------------------------
 /**
+ * Start and execute the import
+ * @param string $sAction
+ * @return boolean
+ */
+    public function doImport($sAction)
+    {
+        try{
+            $sAction           = $this->getSanitizeAction($sAction);
+            $aRawCommandSource = $this->getSorceFile($this->sStructFile);
+            $aSqlCommandList   = $this->doNormalizeSource($aRawCommandSource);
+            $aSqlCommandList   = $this->replacePlaceholders($aSqlCommandList);
+            $this->splitStatementsListIntoBatchLists($aSqlCommandList, $sAction);
+            unset($aRawCommandSource, $aSqlCommandList); // free never needed memory
+            $this->executeBatchStack();
+        } catch(SqlImportException $e) {
+            $this->aErrMsg[] = (string)$e;
+            return false;
+        }
+        return true;
+    }
+// ---------------------------------------------------------------------
+/**
+ * Sanitize Action and get a valid value
+ * @param string $sAction simple command or filename/filepath
+ * @return string valid command
+ */
+    protected function getSanitizeAction($sAction)
+    {
+        $sAction = strtolower( // extract command from given argument
+            preg_replace(
+                '/^.*?('.implode('|', $this->aActions).')(\.php)?$/i',
+                '$1',
+                $sAction
+            )
+        );
+        // return 'install' if no command found
+        return ($sAction == '' ? 'install' : $sAction);
+    }
+// ---------------------------------------------------------------------
+/**
+ * Get content of structure file
+ * @param string $sStructFile filepath of the structure file
+ * @return array raw list of commands (including comments)
+ */
+    protected function getSorceFile($sStructFile)
+    {
+        if (!$sStructFile) {
+        // no file found so ignore import method
+            throw new SqlImportException('no import file defined');
+        }
+        if (!is_readable($sStructFile)) {
+        // file fond but it's not readable
+            throw new SqlImportException('not readable file ['.$sStructFile.']');
+        }
+        if (!($aCommandSource = file($sStructFile, FILE_SKIP_EMPTY_LINES|FILE_IGNORE_NEW_LINES))) {
+        // file fond but it's not readable
+            throw new SqlImportException('unable to import file ['.$sStructFile.']');
+        }
+        return $aCommandSource;
+    }
+// ---------------------------------------------------------------------
+/**
+ * Normalize SQL statements from source
+ * @param array $aSqlCommandSource array of all lines from source file
+ * @return array list of complete SQL statements with placeholders
+ * @description concate each Statement into one line; remove all comments; remove possible BOM
+ */
+    protected function doNormalizeSource(array $aRawCommandSource)
+    {
+        $aSqlCommandList = array();
+        // remove possible ByteOrderMark
+        $aRawCommandSource[0] = preg_replace('/^[\xAA-\xFF]{3}/', '', $aRawCommandSource[0]);
+        // init empty statement line
+        $sStatementLine = '';
+        // iterate through all lines of the source
+        foreach ($aRawCommandSource as $iKey => $sRawLine) {
+            // remove trailing and leading whitespaces
+            $sRawLine = trim($sRawLine);
+            // skip line if it's a comment
+            if (preg_match('/^--/', $sRawLine)) { continue; }
+            // attach line to buffer
+            $sStatementLine .= ' '.$sRawLine;
+            // detect end of statement
+            if ((substr($sStatementLine,-1,1) == ';')) {
+                $aSqlCommandList[] = trim($sStatementLine);
+                $sStatementLine = '';
+            }
+        }
+        return $aSqlCommandList;
+    }
+// ---------------------------------------------------------------------
+/**
+ * Replace all Placeholders in all SQL statements
+ * @param array $aSqlCommandList  list of SQL statements with placeholders
+ * @return array finished list of SQL statements
+ */
+    protected function replacePlaceholders(array $aSqlCommandList)
+    {
+        // sanitize arguments and extract Charset from Collation
+        $aTmp = preg_split('/_/', $this->sCollation, null, PREG_SPLIT_NO_EMPTY);
+        $sCharset = $aTmp[0];
+        // get from addReplacements
+        $aSearch  = $this->aAdditionalReplacements['key'];
+        /* ***  ATTENTION:: Do Not Change The Order Of Search-Replace Statements !! *** */
+        // define basic array of searches
+        $aSearch[] = '/\{TABLE_PREFIX\}/';                                        /* step 0 */
+        $aSearch[] = '/\{FIELD_CHARSET\}/';                                       /* step 1 */
+        $aSearch[] = '/\{FIELD_COLLATION\}/';                                     /* step 2 */
+        $aSearch[] = '/\{TABLE_ENGINE\}/';                                        /* step 3 */
+        $aSearch[] = '/\{TABLE_ENGINE=([a-zA-Z_0-9]*)\}/';                        /* step 4 */
+        $aSearch[] = '/\{CHARSET\}/';                                             /* step 5 */
+        $aSearch[] = '/\{COLLATION\}/';                                           /* step 6 */
+        // get from addReplacements
+        $aReplace = $this->aAdditionalReplacements['value'];
+        // define basic array of replacements
+        $aReplace[] = $this->sTablePrefix;                                        /* step 0 */
+        $aReplace[] = ' CHARACTER SET {CHARSET}';                                 /* step 1 */
+        $aReplace[] = ' COLLATE {COLLATION}';                                     /* step 2 */
+        $aReplace[] = ' {TABLE_ENGINE='.$this->sEngine.'}';                       /* step 3 */
+        $aReplace[] = ' ENGINE=$1 DEFAULT CHARSET={CHARSET} COLLATE={COLLATION}'; /* step 4 */
+        $aReplace[] = $sCharset;                                                  /* step 5 */
+        $aReplace[] = $this->sCollation;                                          /* step 6 */
+        // replace placeholders in statement
+        $aSqlCommandList = preg_replace($aSearch, $aReplace, $aSqlCommandList);
+        return $aSqlCommandList;
+    }
+// ---------------------------------------------------------------------
+/**
+ * Split list of commands into a batch list structure
+ * @param array $aSqlCommandList normalized list of SQL statements
+ * @param string $sAction a valid name of an action
+ *
+ */
+    protected function splitStatementsListIntoBatchLists(array $aSqlCommandList, $sAction)
+    {
+        // initialize lists
+        $this->aBatchLists = array(
+            'Set'    => array(
+                            'Header' => array(), // all SET before DROP/CREATE/ALTER
+                            'Footer' => array()  // all SET after DROP/CREATE/ALTER
+                        ),
+            'Drop'   => array(),
+            'Create' => array(),
+            'Alter'  => array()
+        );
+        $sSetType = 'Header'; // start with 'before'
+        foreach ($aSqlCommandList as $sSqlCommand) {
+            if (preg_match('/^\s*DROP\s*/si', $sSqlCommand)) {
+                switch ($sAction) {
+                    case 'uninstall':
+                    case 'install';
+                        $this->aBatchLists['Drop'][] = $sSqlCommand;
+                        break;
+                    default: // skip DROP TABLE
+                        break;
+                }
+                $sSetType = 'Footer'; // switch to 'after'
+            } elseif (preg_match('/^\s*ALTER\s*/si', $sSqlCommand)) {
+                switch ($sAction) {
+                    case 'upgrade':
+                    case 'install';
+                        $this->aBatchLists['Alter'][] = $sSqlCommand;
+                        break;
+                    default: // skip ALTER TABLE
+                        break;
+                }
+                $sSetType = 'Footer'; // switch to 'after'
+            } elseif (preg_match('/^\s*\/\*\![^\s]+\s+SET\s|^\s*SET\s*/si', $sSqlCommand)) {
+                $this->aBatchLists['Set'][$sSetType][] = $sSqlCommand;
+            } else {
+                switch ($sAction) {
+                    case 'upgrade':
+                    case 'install';
+                        $this->aBatchLists['Create'][] = $sSqlCommand;
+                        break;
+                    default: // skip CREATE TABLE
+                        break;
+                }
+                $sSetType = 'Footer'; // switch to 'after'
+            }
+        }
+    }
+// ---------------------------------------------------------------------
+/**
+ * Scan database for all matching tables
+ * @return array List of matchng tables
+ */
+    protected function getAllExistingTablenames()
+    {
+        $aRetval = array();
+        $sql = 'SHOW TABLES LIKE \''.addcslashes($this->sTablePrefix, '_%').'%\'';
+        if ((($oRecordSet = $this->oDb->doQuery($sql)))) {
+            while (($aRecord = $oRecordSet->fetchArray(MYSQLI_NUM))) {
+                $aRetval[] = $aRecord[0];
+            }
+        }
+        return $aRetval;
+    }
+// ---------------------------------------------------------------------
+/**
+ * Execute a stack of batch lists with SQL statements
+ * @param array $aAllowed  list of tables which are allowed to be altered
+ * @return boolean
+ */
+    protected function executeBatchStack()
+    {
+        if ($this->aBatchLists['Set']['Header']) {
+            $this->executeBatchList($this->aBatchLists['Set']['Header']);
+        }
+        if ($this->aBatchLists['Drop']) {
+            $this->executeBatchList($this->aBatchLists['Drop']);
+        }
+        if ($this->aBatchLists['Create']) {
+            $aTablesListBeforeCreate = $this->getAllExistingTablenames();
+            $this->executeBatchList($this->aBatchLists['Create']);
+            $aTablesListAfterCreate = $this->getAllExistingTablenames();
+        }
+        if ($this->aBatchLists['Alter']) {
+            $this->executeBatchList(
+                $this->aBatchLists['Alter'],
+                array_diff($aTablesListAfterCreate, $aTablesListBeforeCreate)
+            );
+        }
+        if ($this->aBatchLists['Set']['Footer']) {
+            $this->executeBatchList($this->aBatchLists['Set']['Footer']);
+        }
+    }
+// ---------------------------------------------------------------------
+/**
+ * Execute a list of SQL statements
+ * @param array $aList the list to execute
+ * @param array $aAllowedTables list with allowed tables
+ * @description Execute a list of SQL statements. The list can be restricted
+ *              using $aAllowedTables
+ */
+    protected function executeBatchList(array $aList, array $aAllowedTables = null)
+    {
+        foreach ($aList as $sSql) {
+            if ($aAllowedTables) {
+                // extract name of table
+                $sTableName = preg_replace('/^[^\`]*?\`([^\`]*?)\`.*$/si', '$1', $sSql);
+                if (!in_array($sTableName, $aAllowedTables)) {
+                // if table is not in allowed list then use next statement
+                    continue;
+                }
+            }
+            // execute statement
+            if (!$this->oDb->doQuery(trim($sSql))) {
+                throw new SqlImportException($this->oDb->getError());
+                break;
+            }
+        }
+    }
+// ---------------------------------------------------------------------
+/**
  * Add Key-Value pairs for additional placeholders
  * @param string $sKey
  * @param mixed $sValue
@@ -94,9 +352,10 @@
     public function addReplacement($sKey, $sValue = '')
     {
         $sKey = strtoupper(preg_replace('/([a-z0-9])([A-Z])/', '\1_\2', ltrim($sKey, 'a..z')));
-        $this->aReplacements['key'][]  = '/\{'.$sKey.'\}/';
-        $this->aReplacements['value'][] = $sValue;
+        $this->aAdditionalReplacements['key'][]  = '/\{'.$sKey.'\}/';
+        $this->aAdditionalReplacements['value'][] = $sValue;
     }
+// ---------------------------------------------------------------------
 /**
  * define another collation then default utf8_unicode_ci
  * @param string $sCollation
@@ -116,8 +375,9 @@
         }
         return $bRetval;
     }
+// ---------------------------------------------------------------------
 /**
- * define another prefix then 'MyISAM'
+ * define another default engine then 'MyISAM'
  * @param string $sEngine
  * @return boolean
  */
@@ -131,6 +391,7 @@
         }
         return $bRetval;
     }
+// ---------------------------------------------------------------------
 /**
  * define another prefix then default in Wbdatabase
  * @param string $sTablePrefix
@@ -150,121 +411,19 @@
         }
         return $bRetval;
     }
+// ---------------------------------------------------------------------
 /**
- * Start and execute the import
- * @param string $sAction
- * @return boolean
- */
-    public function doImport($sAction)
-    {
-        if (! $this->sStructFile) {
-        // no file found so ignore import method
-            return true;
-        }
-        if (! is_readable($this->sStructFile)) {
-        // file fond but it's not readable
-            $this->aErrMsg[] = 'unable to read file ['.$this->sStructFile.']';
-            return false;
-        }
-        $sAction = strtolower(
-            preg_replace(
-                '/^.*?('.implode('|', $this->aActions).')(\.php)?$/i',
-                '$1',
-                $sAction
-            )
-        );
-        if ($this->importSql(($sAction == '' ? 'install' : $sAction))) {
-            return true;
-        } else {
-            $this->aErrMsg[] = $this->oDb->getError();
-            return false;
-        }
-    }
-/**
  * return errorstrings, concatet by LF
  * @return string
  */
     public function getError()
     {
-        return implode(PHP_EOL, $this->aErrMsg);
+        return implode("\n", $this->aErrMsg);
     }
-/**
- * Import an SQl-Dumpfile witch can include unlimited additional placeholders for values
- * @param string $sAction 'install' || 'uninstall' || 'upgrade'
- * @return bool  false on error
- */
-    protected function importSql($sAction = 'install')
-    {
-        $retval = true;
-        $this->error = '';
-        // sanitize arguments
-        $aTmp = preg_split('/_/', $this->sCollation, null, PREG_SPLIT_NO_EMPTY);
-        $sCharset = $aTmp[0];
-        // get from addReplacements
-        $aSearch  = $this->aReplacements['key'];
-        /* ***  ATTENTION:: Do Not Change The Order Of Search-Replace Statements !! *** */
-        // define basic array of searches
-        $aSearch[] = '/\{TABLE_PREFIX\}/';                                        /* step 0 */
-        $aSearch[] = '/\{FIELD_CHARSET\}/';                                       /* step 1 */
-        $aSearch[] = '/\{FIELD_COLLATION\}/';                                     /* step 2 */
-        $aSearch[] = '/\{TABLE_ENGINE\}/';                                        /* step 3 */
-        $aSearch[] = '/\{TABLE_ENGINE=([a-zA-Z_0-9]*)\}/';                        /* step 4 */
-        $aSearch[] = '/\{CHARSET\}/';                                             /* step 5 */
-        $aSearch[] = '/\{COLLATION\}/';                                           /* step 6 */
-        // get from addReplacements
-        $aReplace = $this->aReplacements['value'];
-        // define basic array of replacements
-        $aReplace[] = $this->sTablePrefix;                                        /* step 0 */
-        $aReplace[] = ' CHARACTER SET {CHARSET}';                                 /* step 1 */
-        $aReplace[] = ' COLLATE {COLLATION}';                                     /* step 2 */
-        $aReplace[] = ' {TABLE_ENGINE='.$this->sEngine.'}';                       /* step 3 */
-        $aReplace[] = ' ENGINE=$1 DEFAULT CHARSET={CHARSET} COLLATE={COLLATION}'; /* step 4 */
-        $aReplace[] = $sCharset;                                                  /* step 5 */
-        $aReplace[] = $this->sCollation;                                          /* step 6 */
 
-        $sql = ''; // buffer for statements
-        $aSql = file($this->sStructFile, FILE_SKIP_EMPTY_LINES|FILE_IGNORE_NEW_LINES);
-        //  remove possible ByteOrderMark
-        $aSql[0] = preg_replace('/^[\xAA-\xFF]{3}/', '', $aSql[0]);
-    // iterate file line by line
-        while (sizeof($aSql) > 0) {
-            // remove trailing and leading whitespaces
-            $sSqlLine = trim(array_shift($aSql));
-            // skip line if it's a comment
-            if (preg_match('/^--/', $sSqlLine)) { continue; }
-            // attach line to buffer
-            $sql = $sql.' '.$sSqlLine;
-            // detect end of statement
-            if ((substr($sql,-1,1) == ';')) {
-                // replace placeholders in statement
-                $sql = trim(preg_replace($aSearch, $aReplace, $sql));
-                $sAvailSqlObjects = implode('|', $this->aAvailSqlObjects);
-                switch ($sAction) {
-                    case 'uninstall': // execute DROP - skip CREATE
-                        if (preg_match('/^\s*CREATE ('.$sAvailSqlObjects.') /si', $sql)) {
-                            $sql = ''; // clear buffer
-                            continue 2; // read next statement
-                        }
-                        break;
-                    case 'upgrade': // skip DROP; execute CREATE
-                        if (preg_match('/^\s*DROP ('.$sAvailSqlObjects.') /si', $sql)) {
-                            $sql = ''; // clear buffer
-                            continue 2; // read next statement
-                        }
-                        break;
-                    default: // install:  execute DROP; execute CREATE
-                        break;
-                }
-                if (!$this->oDb->doQuery($sql)) {
-                    $retval = false;
-                    $this->aErrMsg[] = $this->oDb->getError();
-                    unset($aSql);
-                    break;
-                }
-                $sql = ''; // clear buffer
-            }
-        }
-        return $retval;
-    } // end of function importSql()
+} // end of class SqlImport
+// ---------------------------------------------------------------------
+// ---------------------------------------------------------------------
 
-}
\ No newline at end of file
+class SqlImportException extends AppException {}
+
