Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1537)
+++ branches/2.8.x/CHANGELOG	(revision 1538)
@@ -11,6 +11,9 @@
 ! = Update/Change
 
 =========================== add small Features 2.8.2 ==========================
+10 Dez-2011 Build 1538 Dietmar Woellbrink (Luisehahne)
+! add table db engine in module install scripts
+! some small updates in modules
 10 Dez-2011 Build 1537 Dietmar Woellbrink (Luisehahne)
 ! continue updating headerinfos, adding upgrade scripts to module
 10 Dez-2011 Build 1536 Dietmar Woellbrink (Luisehahne)
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1537)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1538)
@@ -52,5 +52,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.2');
-if(!defined('REVISION')) define('REVISION', '1537');
+if(!defined('REVISION')) define('REVISION', '1538');
 if(!defined('SP')) define('SP', 'SP2');
Index: branches/2.8.x/wb/modules/wrapper/view.php
===================================================================
--- branches/2.8.x/wb/modules/wrapper/view.php	(revision 1537)
+++ branches/2.8.x/wb/modules/wrapper/view.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         wrapper
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -17,7 +16,13 @@
  */
 
 // Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 
 // check if module language file exists for the language set by the user (e.g. DE, EN)
 if(!file_exists(WB_PATH .'/modules/wrapper/languages/'.LANGUAGE .'.php')) {
Index: branches/2.8.x/wb/modules/wrapper/info.php
===================================================================
--- branches/2.8.x/wb/modules/wrapper/info.php	(revision 1537)
+++ branches/2.8.x/wb/modules/wrapper/info.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         wrapper
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -15,14 +14,20 @@
  * @lastmodified    $Date: 2011-01-10 13:21:47 +0100 (Mo, 10 Jan 2011) $
  *
  */
+// Must include code to stop this file being access directly
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 
 $module_directory = 'wrapper';
-$module_name = 'Wrapper';
+$module_name = 'Wrapper 2.8.3';
 $module_function = 'page';
-$module_version = '2.8';
+$module_version = '2.8.3';
 $module_platform = '2.7 | 2.8.x';
 $module_author = 'Ryan Djurovich';
 $module_license = 'GNU General Public License';
 $module_description = 'This module allows you to wrap your site around another using an inline frame';
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/wrapper/save.php
===================================================================
--- branches/2.8.x/wb/modules/wrapper/save.php	(revision 1537)
+++ branches/2.8.x/wb/modules/wrapper/save.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         wrapper
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -50,5 +49,3 @@
 
 // Print admin footer
 $admin->print_footer();
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/wrapper/delete.php
===================================================================
--- branches/2.8.x/wb/modules/wrapper/delete.php	(revision 1537)
+++ branches/2.8.x/wb/modules/wrapper/delete.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         wrapper
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -17,9 +16,13 @@
  */
 
 // Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 
 // Delete page from mod_wrapper
 $database->query("DELETE FROM ".TABLE_PREFIX."mod_wrapper WHERE section_id = '$section_id'");
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/wrapper/install.php
===================================================================
--- branches/2.8.x/wb/modules/wrapper/install.php	(revision 1537)
+++ branches/2.8.x/wb/modules/wrapper/install.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         wrapper
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -26,8 +25,6 @@
 		. ' `url` TEXT NOT NULL,'
 		. ' `height` INT NOT NULL DEFAULT \'0\','
 		. ' PRIMARY KEY ( `section_id` ) '
-		. ' )';
+		. ' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci';
 	$database->query($mod_wrapper);
 }
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/wrapper/modify.php
===================================================================
--- branches/2.8.x/wb/modules/wrapper/modify.php	(revision 1537)
+++ branches/2.8.x/wb/modules/wrapper/modify.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         wrapper
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -17,7 +16,13 @@
  */
 
 // Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 
 // Setup template object
 $template = new Template(WB_PATH.'/modules/wrapper');
@@ -49,5 +54,3 @@
 // Parse template object
 $template->parse('main', 'main_block', false);
 $template->pparse('output', 'page');
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/wrapper/upgrade.php
===================================================================
--- branches/2.8.x/wb/modules/wrapper/upgrade.php	(nonexistent)
+++ branches/2.8.x/wb/modules/wrapper/upgrade.php	(revision 1538)
@@ -0,0 +1,37 @@
+<?php
+/**
+ *
+ * @category        modules
+ * @package         wrapper
+ * @author          WebsiteBaker Project
+ * @copyright       2009-2011, Website Baker Org. e.V.
+ * @link			http://www.websitebaker2.org/
+ * @license         http://www.gnu.org/licenses/gpl.html
+ * @platform        WebsiteBaker 2.8.x
+ * @requirements    PHP 5.2.2 and higher
+ * @version      	$Id$
+ * @filesource		$HeadURL$
+ * @lastmodified    $Date$
+ *
+ */
+// Must include code to stop this file being access directly
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
+
+$msg = '';
+$sTable = TABLE_PREFIX.'mod_wrapper';
+if(($sOldType = $database->getTableEngine($sTable))) {
+	if(('myisam' != strtolower($sOldType))) {
+		if(!$database->query('ALTER TABLE `'.$sTable.'` Engine = \'MyISAM\' ')) {
+			$msg = $database->get_error();
+		}
+	}
+} else {
+	$msg = $database->get_error();
+}
+// ------------------------------------
\ No newline at end of file

Property changes on: branches/2.8.x/wb/modules/wrapper/upgrade.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/modules/wrapper/add.php
===================================================================
--- branches/2.8.x/wb/modules/wrapper/add.php	(revision 1537)
+++ branches/2.8.x/wb/modules/wrapper/add.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         wrapper
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -17,9 +16,13 @@
  */
 
 // Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 
 // Insert an extra row into the database
 $database->query("INSERT INTO ".TABLE_PREFIX."mod_wrapper (page_id,section_id,height) VALUES ('$page_id','$section_id','400')");
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/wysiwyg/view.php
===================================================================
--- branches/2.8.x/wb/modules/wysiwyg/view.php	(revision 1537)
+++ branches/2.8.x/wb/modules/wysiwyg/view.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         wysiwyg
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -16,7 +15,13 @@
  *
  */
 // Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 // Get content
 $get_content = $database->query("SELECT content FROM ".TABLE_PREFIX."mod_wysiwyg WHERE section_id = '$section_id'");
 $fetch_content = $get_content->fetchRow();
@@ -23,5 +28,3 @@
 $content = ($fetch_content['content']);
 
 echo $content;
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/wysiwyg/info.php
===================================================================
--- branches/2.8.x/wb/modules/wysiwyg/info.php	(revision 1537)
+++ branches/2.8.x/wb/modules/wysiwyg/info.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         wysiwyg
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -15,11 +14,18 @@
  * @lastmodified    $Date$
  *
  */
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 
 $module_directory = 'wysiwyg';
-$module_name = 'WYSIWYG';
+$module_name = 'WYSIWYG 2.8.3';
 $module_function = 'page';
-$module_version = '2.8.2';
+$module_version = '2.8.3';
 $module_platform = '2.8.2';
 $module_author = 'Ryan Djurovich';
 $module_license = 'GNU General Public License';
Index: branches/2.8.x/wb/modules/wysiwyg/save.php
===================================================================
--- branches/2.8.x/wb/modules/wysiwyg/save.php	(revision 1537)
+++ branches/2.8.x/wb/modules/wysiwyg/save.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        backend
  * @package         wysiwyg
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -61,5 +60,3 @@
 
 // Print admin footer
 $admin->print_footer();
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/wysiwyg/delete.php
===================================================================
--- branches/2.8.x/wb/modules/wysiwyg/delete.php	(revision 1537)
+++ branches/2.8.x/wb/modules/wysiwyg/delete.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         wysiwyg
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -16,8 +15,12 @@
  *
  */
 // Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 // Delete record from the database
 $database->query("DELETE FROM ".TABLE_PREFIX."mod_wysiwyg WHERE section_id = '$section_id'");
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/wysiwyg/install.php
===================================================================
--- branches/2.8.x/wb/modules/wysiwyg/install.php	(revision 1537)
+++ branches/2.8.x/wb/modules/wysiwyg/install.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         wysiwyg
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -15,10 +14,18 @@
  * @lastmodified    $Date$
  *
  */
+// Must include code to stop this file being access directly
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 
 if(defined('WB_URL'))
 {
-	
+
 	// Create table
 	//$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_wysiwyg`");
 	$mod_wysiwyg = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_wysiwyg` ( '
@@ -27,10 +34,10 @@
 		. ' `content` LONGTEXT NOT NULL ,'
 		. ' `text` LONGTEXT NOT NULL ,'
 		. ' PRIMARY KEY ( `section_id` ) '
-		. ' )';
+		. ' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci';
 	$database->query($mod_wysiwyg);
-	
 
+
     $mod_search = "SELECT * FROM ".TABLE_PREFIX."search  WHERE value = 'wysiwyg'";
     $insert_search = $database->query($mod_search);
     if( $insert_search->numRows() == 0 )
@@ -62,5 +69,3 @@
 
     }
 }
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/wysiwyg/modify.php
===================================================================
--- branches/2.8.x/wb/modules/wysiwyg/modify.php	(revision 1537)
+++ branches/2.8.x/wb/modules/wysiwyg/modify.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         wysiwyg
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -16,7 +15,13 @@
  *
  */
 
-if(!defined('WB_PATH')) exit('Direct access to this file is not allowed');
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 
 // Get page content
 $query = "SELECT content FROM ".TABLE_PREFIX."mod_wysiwyg WHERE section_id = '$section_id'";
Index: branches/2.8.x/wb/modules/wysiwyg/upgrade.php
===================================================================
--- branches/2.8.x/wb/modules/wysiwyg/upgrade.php	(nonexistent)
+++ branches/2.8.x/wb/modules/wysiwyg/upgrade.php	(revision 1538)
@@ -0,0 +1,37 @@
+<?php
+/**
+ *
+ * @category        modules
+ * @package         wysiwyg
+ * @author          WebsiteBaker Project
+ * @copyright       2009-2011, Website Baker Org. e.V.
+ * @link			http://www.websitebaker2.org/
+ * @license         http://www.gnu.org/licenses/gpl.html
+ * @platform        WebsiteBaker 2.8.x
+ * @requirements    PHP 5.2.2 and higher
+ * @version      	$Id$
+ * @filesource		$HeadURL$
+ * @lastmodified    $Date$
+ *
+ */
+// Must include code to stop this file being access directly
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
+
+$msg = '';
+$sTable = TABLE_PREFIX.'mod_wysiwyg';
+if(($sOldType = $database->getTableEngine($sTable))) {
+	if(('myisam' != strtolower($sOldType))) {
+		if(!$database->query('ALTER TABLE `'.$sTable.'` Engine = \'MyISAM\' ')) {
+			$msg = $database->get_error();
+		}
+	}
+} else {
+	$msg = $database->get_error();
+}
+// ------------------------------------
\ No newline at end of file

Property changes on: branches/2.8.x/wb/modules/wysiwyg/upgrade.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/modules/wysiwyg/add.php
===================================================================
--- branches/2.8.x/wb/modules/wysiwyg/add.php	(revision 1537)
+++ branches/2.8.x/wb/modules/wysiwyg/add.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         wysiwyg
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -16,8 +15,13 @@
  *
  */
 // Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 // Insert an extra row into the database
 $database->query("INSERT INTO ".TABLE_PREFIX."mod_wysiwyg (page_id,section_id) VALUES ('$page_id','$section_id')");
 
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/SecureFormSwitcher/uninstall.php
===================================================================
--- branches/2.8.x/wb/modules/SecureFormSwitcher/uninstall.php	(revision 1537)
+++ branches/2.8.x/wb/modules/SecureFormSwitcher/uninstall.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         SecureFormSwitcher
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link            http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -17,7 +16,13 @@
  */
 
 // Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 
 require_once(WB_PATH.'/framework/class.database.php');
 require_once(WB_PATH.'/framework/functions.php');
@@ -37,5 +42,3 @@
 	@unlink($dest_to_delete);
 }
 
-
-
Index: branches/2.8.x/wb/modules/SecureFormSwitcher/info.php
===================================================================
--- branches/2.8.x/wb/modules/SecureFormSwitcher/info.php	(revision 1537)
+++ branches/2.8.x/wb/modules/SecureFormSwitcher/info.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         SecureFormSwitcher
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link            http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -16,6 +15,14 @@
  *
  */
 
+// Must include code to stop this file being access directly
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 $module_directory = 'SecureFormSwitcher';
 $module_name = 'SecureForm Switcher';
 $module_function = 'tool';
Index: branches/2.8.x/wb/modules/SecureFormSwitcher/tool.php
===================================================================
--- branches/2.8.x/wb/modules/SecureFormSwitcher/tool.php	(revision 1537)
+++ branches/2.8.x/wb/modules/SecureFormSwitcher/tool.php	(revision 1538)
@@ -3,8 +3,7 @@
  *
  * @category        modules
  * @package         SecureFormSwitcher
- * @author          WebsiteBaker Project
- * @copyright       (C) 2011, D Woellbrink
+ * @author          WebsiteBaker Project, D Woellbrink
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
Index: branches/2.8.x/wb/modules/SecureFormSwitcher/language_load.php
===================================================================
--- branches/2.8.x/wb/modules/SecureFormSwitcher/language_load.php	(revision 1537)
+++ branches/2.8.x/wb/modules/SecureFormSwitcher/language_load.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         SecureFormSwitcher
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
Index: branches/2.8.x/wb/modules/SecureFormSwitcher/install.php
===================================================================
--- branches/2.8.x/wb/modules/SecureFormSwitcher/install.php	(revision 1537)
+++ branches/2.8.x/wb/modules/SecureFormSwitcher/install.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         SecureFormSwitcher
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link            http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -17,7 +16,13 @@
  */
 
 // Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 
 require_once(WB_PATH.'/framework/class.database.php');
 require_once(WB_PATH.'/framework/functions.php');
@@ -37,4 +42,3 @@
 
 db_update_key_value('settings', $aDefault );
 
-
Index: branches/2.8.x/wb/modules/SecureFormSwitcher/upgrade.php
===================================================================
--- branches/2.8.x/wb/modules/SecureFormSwitcher/upgrade.php	(revision 1537)
+++ branches/2.8.x/wb/modules/SecureFormSwitcher/upgrade.php	(revision 1538)
@@ -16,4 +16,10 @@
  */
 
 // Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
Index: branches/2.8.x/wb/modules/form/modify_field.php
===================================================================
--- branches/2.8.x/wb/modules/form/modify_field.php	(revision 1537)
+++ branches/2.8.x/wb/modules/form/modify_field.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        module
  * @package         Form
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
Index: branches/2.8.x/wb/modules/form/add_field.php
===================================================================
--- branches/2.8.x/wb/modules/form/add_field.php	(revision 1537)
+++ branches/2.8.x/wb/modules/form/add_field.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        module
  * @package         Form
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -13,7 +12,7 @@
  * @version         $Id$
  * @filesource		$HeadURL$
  * @lastmodified    $Date$
- * @description     
+ * @description
  */
 
 require('../../config.php');
@@ -42,5 +41,3 @@
 
 // Print admin footer
 $admin->print_footer();
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/form/info.php
===================================================================
--- branches/2.8.x/wb/modules/form/info.php	(revision 1537)
+++ branches/2.8.x/wb/modules/form/info.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        module
  * @package         Form
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -16,13 +15,20 @@
  * @description     
  */
 
+// Must include code to stop this file being access directly
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 $module_directory = 'form';
 $module_name = 'Form';
 $module_function = 'page';
-$module_version = '2.8.1';
+$module_version = '2.8.3';
 $module_platform = '2.8.x';
 $module_author = 'Ryan Djurovich & Rudolph Lartey - additions John Maats - PCWacht';
 $module_license = 'GNU General Public License';
 $module_description = 'This module allows you to create customised online forms, such as a feedback form. '.
 'Thank-you to Rudolph Lartey who help enhance this module, providing code for extra field types, etc.';
-
Index: branches/2.8.x/wb/modules/form/save_field.php
===================================================================
--- branches/2.8.x/wb/modules/form/save_field.php	(revision 1537)
+++ branches/2.8.x/wb/modules/form/save_field.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        module
  * @package         Form
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
Index: branches/2.8.x/wb/modules/form/delete.php
===================================================================
--- branches/2.8.x/wb/modules/form/delete.php	(revision 1537)
+++ branches/2.8.x/wb/modules/form/delete.php	(revision 1538)
@@ -1,30 +1,28 @@
 <?php
+/**
+ *
+ * @category        module
+ * @package         Form
+ * @author          WebsiteBaker Project
+ * @copyright       2009-2011, Website Baker Org. e.V.
+ * @link			http://www.websitebaker2.org/
+ * @license         http://www.gnu.org/licenses/gpl.html
+ * @platform        WebsiteBaker 2.8.x
+ * @requirements    PHP 5.2.2 and higher
+ * @version         $Id$
+ * @filesource		$HeadURL$
+ * @lastmodified    $Date$
+ * @description
+ */
 
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2009, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
 // Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 
 // Delete page from mod_wysiwyg
 $database->query("DELETE FROM ".TABLE_PREFIX."mod_form_fields WHERE page_id = '$page_id' AND section_id='$section_id'");
Index: branches/2.8.x/wb/modules/form/search.php
===================================================================
--- branches/2.8.x/wb/modules/form/search.php	(revision 1537)
+++ branches/2.8.x/wb/modules/form/search.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        module
  * @package         Form
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -16,7 +15,13 @@
  * @description     
  */
 // Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 
 function form_search($func_vars) {
 	extract($func_vars, EXTR_PREFIX_ALL, 'func');
@@ -56,5 +61,3 @@
 	}
 	return $result;
 }
-
-?>
Index: branches/2.8.x/wb/modules/form/delete_field.php
===================================================================
--- branches/2.8.x/wb/modules/form/delete_field.php	(revision 1537)
+++ branches/2.8.x/wb/modules/form/delete_field.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        module
  * @package         Form
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
Index: branches/2.8.x/wb/modules/form/install.php
===================================================================
--- branches/2.8.x/wb/modules/form/install.php	(revision 1537)
+++ branches/2.8.x/wb/modules/form/install.php	(revision 1538)
@@ -1,107 +1,104 @@
-<?php
-/**
- *
- * @category        modules
- * @package         form
- * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
- * @copyright       2009-2011, Website Baker Org. e.V.
- * @link			http://www.websitebaker2.org/
- * @license         http://www.gnu.org/licenses/gpl.html
- * @platform        WebsiteBaker 2.8.x
- * @requirements    PHP 5.2.2 and higher
- * @version      	$Id$
- * @filesource		$HeadURL$
- * @lastmodified    $Date$
- *
- */
-
-if(defined('WB_URL'))
-{
-		
-	// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_fields`");
-	// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_submissions`");
-	// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_settings`");
-
-	// Create tables
-	$mod_form = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_form_fields` ( `field_id` INT NOT NULL AUTO_INCREMENT,'
-		. ' `section_id` INT NOT NULL DEFAULT \'0\' ,'
-		. ' `page_id` INT NOT NULL DEFAULT \'0\' ,'
-		. ' `position` INT NOT NULL DEFAULT \'0\' ,'
-		. ' `title` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
-		. ' `type` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
-		. ' `required` INT NOT NULL DEFAULT \'0\' ,'
-		. ' `value` TEXT NOT NULL ,'
-		. ' `extra` TEXT NOT NULL ,'
-		. ' PRIMARY KEY ( `field_id` ) '
-		. ' )';
-	$database->query($mod_form);
-
-	$mod_form = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_form_settings` ('
-		. ' `section_id` INT NOT NULL DEFAULT \'0\' ,'
-		. ' `page_id` INT NOT NULL DEFAULT \'0\' ,'
-		. ' `header` TEXT NOT NULL ,'
-		. ' `field_loop` TEXT NOT NULL ,'
-		. ' `footer` TEXT NOT NULL ,'
-		. ' `email_to` TEXT NOT NULL ,'
-		. ' `email_from` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
-		. ' `email_fromname` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
-		. ' `email_subject` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
-		. ' `success_page` TEXT NOT NULL ,'
-		. ' `success_email_to` TEXT NOT NULL ,'
-		. ' `success_email_from` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
-		. ' `success_email_fromname` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
-		. ' `success_email_text` TEXT NOT NULL ,'
-		. ' `success_email_subject` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
-		. ' `stored_submissions` INT NOT NULL DEFAULT \'0\' ,'
-		. ' `max_submissions` INT NOT NULL DEFAULT \'0\' ,'
-		. ' `use_captcha` INT NOT NULL DEFAULT \'0\' ,'
-		. ' PRIMARY KEY ( `section_id` ) '
-		. ' )';
-	$database->query($mod_form);
-	
-	$mod_form = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_form_submissions` ( `submission_id` INT NOT NULL AUTO_INCREMENT,'
-		. ' `section_id` INT NOT NULL DEFAULT \'0\' ,'
-		. ' `page_id` INT NOT NULL DEFAULT \'0\' ,'
-		. ' `submitted_when` INT NOT NULL DEFAULT \'0\' ,'
-		. ' `submitted_by` INT NOT NULL DEFAULT \'0\','
-		. ' `body` TEXT NOT NULL,'
-		. ' PRIMARY KEY ( `submission_id` ) '
-		. ' )';
-	$database->query($mod_form);
-		
-    $mod_search = "SELECT * FROM ".TABLE_PREFIX."search  WHERE value = 'form'";
-    $insert_search = $database->query($mod_search);
-    if( $insert_search->numRows() == 0 )
-    {
-    	// Insert info into the search table
-    	// Module query info
-    	$field_info = array();
-    	$field_info['page_id'] = 'page_id';
-    	$field_info['title'] = 'page_title';
-    	$field_info['link'] = 'link';
-    	$field_info['description'] = 'description';
-    	$field_info['modified_when'] = 'modified_when';
-    	$field_info['modified_by'] = 'modified_by';
-    	$field_info = serialize($field_info);
-    	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('module', 'form', '$field_info')");
-    	// Query start
-    	$query_start_code = "SELECT [TP]pages.page_id, [TP]pages.page_title,	[TP]pages.link, [TP]pages.description, [TP]pages.modified_when, [TP]pages.modified_by	FROM [TP]mod_form_fields, [TP]mod_form_settings, [TP]pages WHERE ";
-    	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_start', '$query_start_code', 'form')");
-    	// Query body
-    	$query_body_code = " [TP]pages.page_id = [TP]mod_form_settings.page_id AND [TP]mod_form_settings.header LIKE \'%[STRING]%\'
-    	OR [TP]pages.page_id = [TP]mod_form_settings.page_id AND [TP]mod_form_settings.footer LIKE \'%[STRING]%\'
-    	OR [TP]pages.page_id = [TP]mod_form_fields.page_id AND [TP]mod_form_fields.title LIKE \'%[STRING]%\' ";
-    	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_body', '$query_body_code', 'form')");
-    	// Query end
-    	$query_end_code = "";
-    	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_end', '$query_end_code', 'form')");
-
-    	// Insert blank row (there needs to be at least on row for the search to work)
-    	$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_fields (page_id,section_id) VALUES ('0','0')");
-    	$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_settings (page_id,section_id) VALUES ('0','0')");
-
-    }
-}
-
-?>
\ No newline at end of file
+<?php
+/**
+ *
+ * @category        modules
+ * @package         form
+ * @author          WebsiteBaker Project
+ * @copyright       2009-2011, Website Baker Org. e.V.
+ * @link			http://www.websitebaker2.org/
+ * @license         http://www.gnu.org/licenses/gpl.html
+ * @platform        WebsiteBaker 2.8.x
+ * @requirements    PHP 5.2.2 and higher
+ * @version      	$Id$
+ * @filesource		$HeadURL$
+ * @lastmodified    $Date$
+ *
+ */
+
+if(defined('WB_URL'))
+{
+		
+	// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_fields`");
+	// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_submissions`");
+	// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_settings`");
+
+	// Create tables
+	$mod_form = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_form_fields` ( `field_id` INT NOT NULL AUTO_INCREMENT,'
+		. ' `section_id` INT NOT NULL DEFAULT \'0\' ,'
+		. ' `page_id` INT NOT NULL DEFAULT \'0\' ,'
+		. ' `position` INT NOT NULL DEFAULT \'0\' ,'
+		. ' `title` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
+		. ' `type` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
+		. ' `required` INT NOT NULL DEFAULT \'0\' ,'
+		. ' `value` TEXT NOT NULL ,'
+		. ' `extra` TEXT NOT NULL ,'
+		. ' PRIMARY KEY ( `field_id` ) '
+		. ' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci';
+	$database->query($mod_form);
+
+	$mod_form = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_form_settings` ('
+		. ' `section_id` INT NOT NULL DEFAULT \'0\' ,'
+		. ' `page_id` INT NOT NULL DEFAULT \'0\' ,'
+		. ' `header` TEXT NOT NULL ,'
+		. ' `field_loop` TEXT NOT NULL ,'
+		. ' `footer` TEXT NOT NULL ,'
+		. ' `email_to` TEXT NOT NULL ,'
+		. ' `email_from` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
+		. ' `email_fromname` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
+		. ' `email_subject` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
+		. ' `success_page` TEXT NOT NULL ,'
+		. ' `success_email_to` TEXT NOT NULL ,'
+		. ' `success_email_from` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
+		. ' `success_email_fromname` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
+		. ' `success_email_text` TEXT NOT NULL ,'
+		. ' `success_email_subject` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
+		. ' `stored_submissions` INT NOT NULL DEFAULT \'0\' ,'
+		. ' `max_submissions` INT NOT NULL DEFAULT \'0\' ,'
+		. ' `use_captcha` INT NOT NULL DEFAULT \'0\' ,'
+		. ' PRIMARY KEY ( `section_id` ) '
+		. ' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci';
+	$database->query($mod_form);
+	
+	$mod_form = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_form_submissions` ( `submission_id` INT NOT NULL AUTO_INCREMENT,'
+		. ' `section_id` INT NOT NULL DEFAULT \'0\' ,'
+		. ' `page_id` INT NOT NULL DEFAULT \'0\' ,'
+		. ' `submitted_when` INT NOT NULL DEFAULT \'0\' ,'
+		. ' `submitted_by` INT NOT NULL DEFAULT \'0\','
+		. ' `body` TEXT NOT NULL,'
+		. ' PRIMARY KEY ( `submission_id` ) '
+		. ' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci';
+	$database->query($mod_form);
+		
+    $mod_search = "SELECT * FROM ".TABLE_PREFIX."search  WHERE value = 'form'";
+    $insert_search = $database->query($mod_search);
+    if( $insert_search->numRows() == 0 )
+    {
+    	// Insert info into the search table
+    	// Module query info
+    	$field_info = array();
+    	$field_info['page_id'] = 'page_id';
+    	$field_info['title'] = 'page_title';
+    	$field_info['link'] = 'link';
+    	$field_info['description'] = 'description';
+    	$field_info['modified_when'] = 'modified_when';
+    	$field_info['modified_by'] = 'modified_by';
+    	$field_info = serialize($field_info);
+    	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('module', 'form', '$field_info')");
+    	// Query start
+    	$query_start_code = "SELECT [TP]pages.page_id, [TP]pages.page_title,	[TP]pages.link, [TP]pages.description, [TP]pages.modified_when, [TP]pages.modified_by	FROM [TP]mod_form_fields, [TP]mod_form_settings, [TP]pages WHERE ";
+    	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_start', '$query_start_code', 'form')");
+    	// Query body
+    	$query_body_code = " [TP]pages.page_id = [TP]mod_form_settings.page_id AND [TP]mod_form_settings.header LIKE \'%[STRING]%\'
+    	OR [TP]pages.page_id = [TP]mod_form_settings.page_id AND [TP]mod_form_settings.footer LIKE \'%[STRING]%\'
+    	OR [TP]pages.page_id = [TP]mod_form_fields.page_id AND [TP]mod_form_fields.title LIKE \'%[STRING]%\' ";
+    	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_body', '$query_body_code', 'form')");
+    	// Query end
+    	$query_end_code = "";
+    	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_end', '$query_end_code', 'form')");
+
+    	// Insert blank row (there needs to be at least on row for the search to work)
+    	$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_fields (page_id,section_id) VALUES ('0','0')");
+    	$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_settings (page_id,section_id) VALUES ('0','0')");
+
+    }
+}
Index: branches/2.8.x/wb/modules/form/modify_settings.php
===================================================================
--- branches/2.8.x/wb/modules/form/modify_settings.php	(revision 1537)
+++ branches/2.8.x/wb/modules/form/modify_settings.php	(revision 1538)
@@ -1,247 +1,246 @@
-<?php
-/**
- *
- * @category        module
- * @package         Form
- * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
- * @copyright       2009-2011, Website Baker Org. e.V.
- * @link			http://www.websitebaker2.org/
- * @license         http://www.gnu.org/licenses/gpl.html
- * @platform        WebsiteBaker 2.8.x
- * @requirements    PHP 5.2.2 and higher
- * @version         $Id$
- * @filesource		$HeadURL$
- * @lastmodified    $Date$
- * @description     
- */
-
-require('../../config.php');
-
-$print_info_banner = true;
-// Tells script to update when this page was last updated
-$update_when_modified = false;
-// Include WB admin wrapper script
-require(WB_PATH.'/modules/admin.php');
-
-// include core functions of WB 2.7 to edit the optional module CSS files (frontend.css, backend.css)
-@include_once(WB_PATH .'/framework/module.functions.php');
-
-// load module language file
-$lang = (dirname(__FILE__)) . '/languages/' . LANGUAGE . '.php';
-require_once(!file_exists($lang) ? (dirname(__FILE__)) . '/languages/EN.php' : $lang );
-
-// Get header and footer
-$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_form_settings WHERE section_id = '$section_id'");
-$setting = $query_content->fetchRow();
-
-// Set raw html <'s and >'s to be replace by friendly html code
-$raw = array('<', '>');
-$friendly = array('&lt;', '&gt;');
-/*
-// check if backend.css file needs to be included into the <body></body> of modify.php
-if(!method_exists($admin, 'register_backend_modfiles') && file_exists(WB_PATH ."/modules/form/backend.css")) {
-	echo '<style type="text/css">';
-	include(WB_PATH .'/modules/form/backend.css');
-	echo "\n</style>\n";
-}
-*/
-?>
-<h2><?php echo $MOD_FORM['SETTINGS']; ?></h2>
-<?php
-// include the button to edit the optional module CSS files
-// Note: CSS styles for the button are defined in backend.css (div class="mod_moduledirectory_edit_css")
-// Place this call outside of any <form></form> construct!!!
-if(function_exists('edit_module_css')) {
-	edit_module_css('form');
-}
-?>
-
-<form name="edit" action="<?php echo WB_URL; ?>/modules/form/save_settings.php" method="post" style="margin: 0;">
-
-<input type="hidden" name="page_id" value="<?php echo $page_id; ?>" />
-<input type="hidden" name="section_id" value="<?php echo $section_id; ?>" />
-<?php echo $admin->getFTAN(); ?>
-
-<table class="row_a" cellpadding="2" cellspacing="0" border="0" width="100%">
-	<tr>
-		<td colspan="2"><strong><?php echo $HEADING['GENERAL_SETTINGS']; ?></strong></td>
-	</tr>
-	<tr>
-		<td class="setting_name"><?php echo $TEXT['CAPTCHA_VERIFICATION']; ?>:</td>
-		<td>
-			<input type="radio" name="use_captcha" id="use_captcha_true" value="1"<?php if($setting['use_captcha'] == true) { echo ' checked="checked"'; } ?> />
-			<label for="use_captcha_true"><?php echo $TEXT['ENABLED']; ?></label>
-			<input type="radio" name="use_captcha" id="use_captcha_false" value="0"<?php if($setting['use_captcha'] == false) { echo ' checked="checked"'; } ?> />
-			<label for="use_captcha_false"><?php echo $TEXT['DISABLED']; ?></label>
-		</td>
-	</tr>
-	<tr>
-		<td class="setting_name"><?php echo $TEXT['MAX_SUBMISSIONS_PER_HOUR']; ?>:</td>
-		<td class="setting_value">
-			<input type="text" name="max_submissions" style="width: 30px;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['max_submissions'])); ?>" />
-		</td>
-	</tr>
-	<tr>
-		<td class="setting_name"><?php echo $TEXT['SUBMISSIONS_STORED_IN_DATABASE']; ?>:</td>
-		<td class="setting_value">
-			<input type="text" name="stored_submissions" style="width: 30px;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['stored_submissions'])); ?>" />
-		</td>
-	</tr>
-	<tr>
-		<td class="setting_name"><?php echo $TEXT['HEADER']; ?>:</td>
-		<td class="setting_value">
-			<textarea name="header" cols="80" rows="6" style="width: 98%; height: 80px;"><?php echo ($setting['header']); ?></textarea>
-		</td>
-	</tr>
-	<tr>
-		<td class="setting_name"><?php echo $TEXT['FIELD'].' '.$TEXT['LOOP']; ?>:</td>
-		<td class="setting_value">
-			<textarea name="field_loop" cols="80" rows="6" style="width: 98%; height: 80px;"><?php echo ($setting['field_loop']); ?></textarea>
-		</td>
-	</tr>
-	<tr>
-		<td class="setting_name"><?php echo $TEXT['FOOTER']; ?>:</td>
-		<td class="setting_value">
-			<textarea name="footer" cols="80" rows="6" style="width: 98%; height: 80px;"><?php echo str_replace($raw, $friendly, ($setting['footer'])); ?></textarea>
-		</td>
-	</tr>
-</table>	
-
-<table class="row_a" cellpadding="2" cellspacing="0" border="0" width="100%" style="margin-top: 3px;">
-	<tr>
-		<td colspan="2"><strong><?php echo $TEXT['EMAIL'].' '.$TEXT['SETTINGS']; ?></strong></td>
-	</tr>
-	<tr>
-		<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['TO']; ?>:</td>
-		<td class="setting_value">
-			<input type="text" name="email_to" style="width: 98%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['email_to'])); ?>" />
-		</td>
-	</tr>
-	<tr>
-		<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['FROM']; ?>:</td>
-		<td class="setting_value">
-			<select name="email_from_field" style="width: 98%;">
-			<option value="" onclick="javascript: document.getElementById('email_from').style.display = 'block';"><?php echo $TEXT['CUSTOM']; ?>:</option>
-			<?php
-			$email_from_value = str_replace($raw, $friendly, ($setting['email_from']));
-			$query_email_fields = $database->query("SELECT field_id,title FROM ".TABLE_PREFIX."mod_form_fields WHERE section_id = '$section_id' AND ( type = 'textfield' OR  type = 'email' ) ORDER BY position ASC");
-			if($query_email_fields->numRows() > 0) {
-				while($field = $query_email_fields->fetchRow()) {
-					?>
-					<option value="field<?php echo $field['field_id']; ?>"<?php if($email_from_value == 'field'.$field['field_id']) { echo ' selected'; $selected = true; } ?> onclick="javascript: document.getElementById('email_from').style.display = 'none';">
-						<?php echo $TEXT['FIELD'].': '.$field['title']; ?>
-					</option>
-					<?php
-				}
-			}
-			?>
-			</select>
-			<input type="text" name="email_from" id="email_from" style="width: 98%; display: <?php if(isset($selected) AND $selected == true) { echo 'none'; } else { echo 'block'; } ?>;" maxlength="255" value="<?php if(substr($email_from_value, 0, 5) != 'field') { echo $email_from_value; } ?>" />
-		</td>
-	</tr>
-	<tr>
-		<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['NAME']; ?>:</td>
-		<td class="setting_value">
-			<input type="text" name="email_fromname" style="width: 98%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['email_fromname'])); ?>" />
-		</td>
-	</tr>
-	<tr>
-		<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['SUBJECT']; ?>:</td>
-		<td class="setting_value">
-			<input type="text" name="email_subject" style="width: 98%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['email_subject'])); ?>" />
-		</td>
-	</tr>
-</table>	
-
-<table class="row_a" cellpadding="2" cellspacing="0" border="0" width="100%" style="margin-top: 3px;">
-	<tr>
-		<td colspan="2"><strong><?php echo $TEXT['SUCCESS'].' '.$TEXT['SETTINGS']; ?></strong></td>
-	</tr>
-	<tr>
-		<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['TO']; ?>:</td>
-		<td class="setting_value">
-			<select name="success_email_to" style="width: 98%;">
-			<option value="" onclick="javascript: document.getElementById('success_email_to').style.display = 'block';"><?php echo $TEXT['NONE']; ?></option>
-			<?php
-			$success_email_to = str_replace($raw, $friendly, ($setting['success_email_to']));
-			$query_email_fields = $database->query("SELECT field_id,title FROM ".TABLE_PREFIX."mod_form_fields WHERE section_id = '$section_id' AND ( type = 'textfield' OR  type = 'email' ) ORDER BY position ASC");
-			if($query_email_fields->numRows() > 0) {
-				while($field = $query_email_fields->fetchRow()) {
-					?>
-					<option value="field<?php echo $field['field_id']; ?>"<?php if($success_email_to == 'field'.$field['field_id']) { echo ' selected'; $selected = true; } ?> onclick="javascript: document.getElementById('email_from').style.display = 'none';">
-						<?php echo $TEXT['FIELD'].': '.$field['title']; ?>
-					</option>
-					<?php
-				}
-			}
-			?>
-			</select>
-		</td>
-	</tr>
-	<tr>
-		<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['FROM']; ?>:</td>
-		<td class="setting_value">
-			<input type="text" name="success_email_from" style="width: 98%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['success_email_from'])); ?>" />
-		</td>
-	</tr>
-	<tr>
-		<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['NAME']; ?>:</td>
-		<td class="setting_value">
-			<input type="text" name="success_email_fromname" style="width: 98%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['success_email_fromname'])); ?>" />
-		</td>
-	</tr>
-	<tr>
-		<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['SUBJECT']; ?>:</td>
-		<td class="setting_value">
-			<input type="text" name="success_email_subject" style="width: 98%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['success_email_subject'])); ?>" />
-		</td>
-	</tr>
-	<tr>
-		<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['TEXT']; ?>:</td>
-		<td class="setting_value">
-			<textarea name="success_email_text" cols="80" rows="1" style="width: 98%; height: 80px;"><?php echo str_replace($raw, $friendly, ($setting['success_email_text'])); ?></textarea>
-		</td>
-	</tr>
-	<tr>
-		<td class="newsection"><?php echo $TEXT['SUCCESS'].' '.$TEXT['PAGE']; ?>:</td>
-		<td class="newsection">
-			<select name="success_page">
-			<option value="none"><?php echo $TEXT['NONE']; ?></option>
-			<?php 
-			// Get exisiting pages and show the pagenames
-			$query = $database->query("SELECT * FROM ".TABLE_PREFIX."pages WHERE visibility <> 'deleted'");
-			while($mail_page = $query->fetchRow()) {
-				if(!$admin->page_is_visible($mail_page))
-					continue;
-				$mail_pagename = $mail_page['menu_title'];		
-				$success_page = $mail_page['page_id'];
-			  //	echo $success_page.':'.$setting['success_page'].':'; not vailde
-				if($setting['success_page'] == $success_page) {
-					$selected = ' selected="selected"';
-				} else { 
-					$selected = '';
-				}
-				echo '<option value="'.$success_page.'"'.$selected.'>'.$mail_pagename.'</option>';
-		 	}
-			?>
-			</select>
-		</td>
-	</tr>
-</table>
-
-<table cellpadding="0" cellspacing="0" border="0" width="100%">
-	<tr>
-		<td align="left">
-			<input name="save" type="submit" value="<?php echo $TEXT['SAVE']; ?>" style="width: 100px; margin-top: 5px;">
-		</td>
-		<td align="right">
-			<input type="button" value="<?php echo $TEXT['CANCEL']; ?>" onclick="javascript: window.location = '<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page_id; ?>';" style="width: 100px; margin-top: 5px;" />
-		</td>
-	</tr>
-</table>
-</form>
-<?php
-
-// Print admin footer
-$admin->print_footer();
+<?php
+/**
+ *
+ * @category        module
+ * @package         Form
+ * @author          WebsiteBaker Project
+ * @copyright       2009-2011, Website Baker Org. e.V.
+ * @link			http://www.websitebaker2.org/
+ * @license         http://www.gnu.org/licenses/gpl.html
+ * @platform        WebsiteBaker 2.8.x
+ * @requirements    PHP 5.2.2 and higher
+ * @version         $Id$
+ * @filesource		$HeadURL$
+ * @lastmodified    $Date$
+ * @description     
+ */
+
+require('../../config.php');
+
+$print_info_banner = true;
+// Tells script to update when this page was last updated
+$update_when_modified = false;
+// Include WB admin wrapper script
+require(WB_PATH.'/modules/admin.php');
+
+// include core functions of WB 2.7 to edit the optional module CSS files (frontend.css, backend.css)
+@include_once(WB_PATH .'/framework/module.functions.php');
+
+// load module language file
+$lang = (dirname(__FILE__)) . '/languages/' . LANGUAGE . '.php';
+require_once(!file_exists($lang) ? (dirname(__FILE__)) . '/languages/EN.php' : $lang );
+
+// Get header and footer
+$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_form_settings WHERE section_id = '$section_id'");
+$setting = $query_content->fetchRow();
+
+// Set raw html <'s and >'s to be replace by friendly html code
+$raw = array('<', '>');
+$friendly = array('&lt;', '&gt;');
+/*
+// check if backend.css file needs to be included into the <body></body> of modify.php
+if(!method_exists($admin, 'register_backend_modfiles') && file_exists(WB_PATH ."/modules/form/backend.css")) {
+	echo '<style type="text/css">';
+	include(WB_PATH .'/modules/form/backend.css');
+	echo "\n</style>\n";
+}
+*/
+?>
+<h2><?php echo $MOD_FORM['SETTINGS']; ?></h2>
+<?php
+// include the button to edit the optional module CSS files
+// Note: CSS styles for the button are defined in backend.css (div class="mod_moduledirectory_edit_css")
+// Place this call outside of any <form></form> construct!!!
+if(function_exists('edit_module_css')) {
+	edit_module_css('form');
+}
+?>
+
+<form name="edit" action="<?php echo WB_URL; ?>/modules/form/save_settings.php" method="post" style="margin: 0;">
+
+<input type="hidden" name="page_id" value="<?php echo $page_id; ?>" />
+<input type="hidden" name="section_id" value="<?php echo $section_id; ?>" />
+<?php echo $admin->getFTAN(); ?>
+
+<table class="row_a" cellpadding="2" cellspacing="0" border="0" width="100%">
+	<tr>
+		<td colspan="2"><strong><?php echo $HEADING['GENERAL_SETTINGS']; ?></strong></td>
+	</tr>
+	<tr>
+		<td class="setting_name"><?php echo $TEXT['CAPTCHA_VERIFICATION']; ?>:</td>
+		<td>
+			<input type="radio" name="use_captcha" id="use_captcha_true" value="1"<?php if($setting['use_captcha'] == true) { echo ' checked="checked"'; } ?> />
+			<label for="use_captcha_true"><?php echo $TEXT['ENABLED']; ?></label>
+			<input type="radio" name="use_captcha" id="use_captcha_false" value="0"<?php if($setting['use_captcha'] == false) { echo ' checked="checked"'; } ?> />
+			<label for="use_captcha_false"><?php echo $TEXT['DISABLED']; ?></label>
+		</td>
+	</tr>
+	<tr>
+		<td class="setting_name"><?php echo $TEXT['MAX_SUBMISSIONS_PER_HOUR']; ?>:</td>
+		<td class="setting_value">
+			<input type="text" name="max_submissions" style="width: 30px;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['max_submissions'])); ?>" />
+		</td>
+	</tr>
+	<tr>
+		<td class="setting_name"><?php echo $TEXT['SUBMISSIONS_STORED_IN_DATABASE']; ?>:</td>
+		<td class="setting_value">
+			<input type="text" name="stored_submissions" style="width: 30px;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['stored_submissions'])); ?>" />
+		</td>
+	</tr>
+	<tr>
+		<td class="setting_name"><?php echo $TEXT['HEADER']; ?>:</td>
+		<td class="setting_value">
+			<textarea name="header" cols="80" rows="6" style="width: 98%; height: 80px;"><?php echo ($setting['header']); ?></textarea>
+		</td>
+	</tr>
+	<tr>
+		<td class="setting_name"><?php echo $TEXT['FIELD'].' '.$TEXT['LOOP']; ?>:</td>
+		<td class="setting_value">
+			<textarea name="field_loop" cols="80" rows="6" style="width: 98%; height: 80px;"><?php echo ($setting['field_loop']); ?></textarea>
+		</td>
+	</tr>
+	<tr>
+		<td class="setting_name"><?php echo $TEXT['FOOTER']; ?>:</td>
+		<td class="setting_value">
+			<textarea name="footer" cols="80" rows="6" style="width: 98%; height: 80px;"><?php echo str_replace($raw, $friendly, ($setting['footer'])); ?></textarea>
+		</td>
+	</tr>
+</table>	
+
+<table class="row_a" cellpadding="2" cellspacing="0" border="0" width="100%" style="margin-top: 3px;">
+	<tr>
+		<td colspan="2"><strong><?php echo $TEXT['EMAIL'].' '.$TEXT['SETTINGS']; ?></strong></td>
+	</tr>
+	<tr>
+		<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['TO']; ?>:</td>
+		<td class="setting_value">
+			<input type="text" name="email_to" style="width: 98%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['email_to'])); ?>" />
+		</td>
+	</tr>
+	<tr>
+		<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['FROM']; ?>:</td>
+		<td class="setting_value">
+			<select name="email_from_field" style="width: 98%;">
+			<option value="" onclick="javascript: document.getElementById('email_from').style.display = 'block';"><?php echo $TEXT['CUSTOM']; ?>:</option>
+			<?php
+			$email_from_value = str_replace($raw, $friendly, ($setting['email_from']));
+			$query_email_fields = $database->query("SELECT field_id,title FROM ".TABLE_PREFIX."mod_form_fields WHERE section_id = '$section_id' AND ( type = 'textfield' OR  type = 'email' ) ORDER BY position ASC");
+			if($query_email_fields->numRows() > 0) {
+				while($field = $query_email_fields->fetchRow()) {
+					?>
+					<option value="field<?php echo $field['field_id']; ?>"<?php if($email_from_value == 'field'.$field['field_id']) { echo ' selected'; $selected = true; } ?> onclick="javascript: document.getElementById('email_from').style.display = 'none';">
+						<?php echo $TEXT['FIELD'].': '.$field['title']; ?>
+					</option>
+					<?php
+				}
+			}
+			?>
+			</select>
+			<input type="text" name="email_from" id="email_from" style="width: 98%; display: <?php if(isset($selected) AND $selected == true) { echo 'none'; } else { echo 'block'; } ?>;" maxlength="255" value="<?php if(substr($email_from_value, 0, 5) != 'field') { echo $email_from_value; } ?>" />
+		</td>
+	</tr>
+	<tr>
+		<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['NAME']; ?>:</td>
+		<td class="setting_value">
+			<input type="text" name="email_fromname" style="width: 98%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['email_fromname'])); ?>" />
+		</td>
+	</tr>
+	<tr>
+		<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['SUBJECT']; ?>:</td>
+		<td class="setting_value">
+			<input type="text" name="email_subject" style="width: 98%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['email_subject'])); ?>" />
+		</td>
+	</tr>
+</table>	
+
+<table class="row_a" cellpadding="2" cellspacing="0" border="0" width="100%" style="margin-top: 3px;">
+	<tr>
+		<td colspan="2"><strong><?php echo $TEXT['SUCCESS'].' '.$TEXT['SETTINGS']; ?></strong></td>
+	</tr>
+	<tr>
+		<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['TO']; ?>:</td>
+		<td class="setting_value">
+			<select name="success_email_to" style="width: 98%;">
+			<option value="" onclick="javascript: document.getElementById('success_email_to').style.display = 'block';"><?php echo $TEXT['NONE']; ?></option>
+			<?php
+			$success_email_to = str_replace($raw, $friendly, ($setting['success_email_to']));
+			$query_email_fields = $database->query("SELECT field_id,title FROM ".TABLE_PREFIX."mod_form_fields WHERE section_id = '$section_id' AND ( type = 'textfield' OR  type = 'email' ) ORDER BY position ASC");
+			if($query_email_fields->numRows() > 0) {
+				while($field = $query_email_fields->fetchRow()) {
+					?>
+					<option value="field<?php echo $field['field_id']; ?>"<?php if($success_email_to == 'field'.$field['field_id']) { echo ' selected'; $selected = true; } ?> onclick="javascript: document.getElementById('email_from').style.display = 'none';">
+						<?php echo $TEXT['FIELD'].': '.$field['title']; ?>
+					</option>
+					<?php
+				}
+			}
+			?>
+			</select>
+		</td>
+	</tr>
+	<tr>
+		<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['FROM']; ?>:</td>
+		<td class="setting_value">
+			<input type="text" name="success_email_from" style="width: 98%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['success_email_from'])); ?>" />
+		</td>
+	</tr>
+	<tr>
+		<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['NAME']; ?>:</td>
+		<td class="setting_value">
+			<input type="text" name="success_email_fromname" style="width: 98%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['success_email_fromname'])); ?>" />
+		</td>
+	</tr>
+	<tr>
+		<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['SUBJECT']; ?>:</td>
+		<td class="setting_value">
+			<input type="text" name="success_email_subject" style="width: 98%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, ($setting['success_email_subject'])); ?>" />
+		</td>
+	</tr>
+	<tr>
+		<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['TEXT']; ?>:</td>
+		<td class="setting_value">
+			<textarea name="success_email_text" cols="80" rows="1" style="width: 98%; height: 80px;"><?php echo str_replace($raw, $friendly, ($setting['success_email_text'])); ?></textarea>
+		</td>
+	</tr>
+	<tr>
+		<td class="newsection"><?php echo $TEXT['SUCCESS'].' '.$TEXT['PAGE']; ?>:</td>
+		<td class="newsection">
+			<select name="success_page">
+			<option value="none"><?php echo $TEXT['NONE']; ?></option>
+			<?php 
+			// Get exisiting pages and show the pagenames
+			$query = $database->query("SELECT * FROM ".TABLE_PREFIX."pages WHERE visibility <> 'deleted'");
+			while($mail_page = $query->fetchRow()) {
+				if(!$admin->page_is_visible($mail_page))
+					continue;
+				$mail_pagename = $mail_page['menu_title'];		
+				$success_page = $mail_page['page_id'];
+			  //	echo $success_page.':'.$setting['success_page'].':'; not vailde
+				if($setting['success_page'] == $success_page) {
+					$selected = ' selected="selected"';
+				} else { 
+					$selected = '';
+				}
+				echo '<option value="'.$success_page.'"'.$selected.'>'.$mail_pagename.'</option>';
+		 	}
+			?>
+			</select>
+		</td>
+	</tr>
+</table>
+
+<table cellpadding="0" cellspacing="0" border="0" width="100%">
+	<tr>
+		<td align="left">
+			<input name="save" type="submit" value="<?php echo $TEXT['SAVE']; ?>" style="width: 100px; margin-top: 5px;">
+		</td>
+		<td align="right">
+			<input type="button" value="<?php echo $TEXT['CANCEL']; ?>" onclick="javascript: window.location = '<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page_id; ?>';" style="width: 100px; margin-top: 5px;" />
+		</td>
+	</tr>
+</table>
+</form>
+<?php
+
+// Print admin footer
+$admin->print_footer();
Index: branches/2.8.x/wb/modules/form/uninstall.php
===================================================================
--- branches/2.8.x/wb/modules/form/uninstall.php	(revision 1537)
+++ branches/2.8.x/wb/modules/form/uninstall.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        module
  * @package         Form
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -17,7 +16,13 @@
  */
 
 // Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 
 $database->query("DELETE FROM ".TABLE_PREFIX."search WHERE name = 'module' AND value = 'form'");
 $database->query("DELETE FROM ".TABLE_PREFIX."search WHERE extra = 'form'");
@@ -25,5 +30,3 @@
 $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_fields`");
 $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_settings`");
 $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_submissions`");
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/form/view.php
===================================================================
--- branches/2.8.x/wb/modules/form/view.php	(revision 1537)
+++ branches/2.8.x/wb/modules/form/view.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        module
  * @package         Form
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -17,7 +16,13 @@
  */
 
 // Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 
 // check if frontend.css file needs to be included into the <body></body> of view.php
 if((!function_exists('register_frontend_modfiles') || !defined('MOD_FRONTEND_CSS_REGISTERED')) &&
Index: branches/2.8.x/wb/modules/form/delete_submission.php
===================================================================
--- branches/2.8.x/wb/modules/form/delete_submission.php	(revision 1537)
+++ branches/2.8.x/wb/modules/form/delete_submission.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        module
  * @package         Form
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
Index: branches/2.8.x/wb/modules/form/save_settings.php
===================================================================
--- branches/2.8.x/wb/modules/form/save_settings.php	(revision 1537)
+++ branches/2.8.x/wb/modules/form/save_settings.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        module
  * @package         Form
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -79,5 +78,3 @@
 
 // Print admin footer
 $admin->print_footer();
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/form/modify.php
===================================================================
--- branches/2.8.x/wb/modules/form/modify.php	(revision 1537)
+++ branches/2.8.x/wb/modules/form/modify.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        module
  * @package         Form
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -17,7 +16,13 @@
  */
 
 // Must include code to stop this file being access directly
-if(!defined('WB_PATH')) { exit("Cannot access this file directly"); }
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 
 //overwrite php.ini on Apache servers for valid SESSION ID Separator
 if(function_exists('ini_set')) {
@@ -181,5 +186,3 @@
 } else {
 	echo $TEXT['NONE_FOUND'];
 }
-
-?>
Index: branches/2.8.x/wb/modules/form/upgrade.php
===================================================================
--- branches/2.8.x/wb/modules/form/upgrade.php	(nonexistent)
+++ branches/2.8.x/wb/modules/form/upgrade.php	(revision 1538)
@@ -0,0 +1,40 @@
+<?php
+/**
+ *
+ * @category        module
+ * @package         Form
+ * @author          WebsiteBaker Project
+ * @copyright       2009-2011, Website Baker Org. e.V.
+ * @link			http://www.websitebaker2.org/
+ * @license         http://www.gnu.org/licenses/gpl.html
+ * @platform        WebsiteBaker 2.8.x
+ * @requirements    PHP 5.2.2 and higher
+ * @version         $Id$
+ * @filesource		$HeadURL$
+ * @lastmodified    $Date$
+ * @description
+ */
+
+// Must include code to stop this file being access directly
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
+
+$msg = array();
+$aTable = array('mod_form_fields','mod_form_settings','mod_form_submissions');
+for($x=0; $x<sizeof($aTable);$x++) {
+	if(($sOldType = $database->getTableEngine(TABLE_PREFIX.$aTable[$x]))) {
+		if(('myisam' != strtolower($sOldType))) {
+			if(!$database->query('ALTER TABLE `'.TABLE_PREFIX.$aTable[$x].'` Engine = \'MyISAM\' ')) {
+				$msg[] = $database->get_error();
+			}
+		}
+	} else {
+		$msg[] = $database->get_error();
+	}
+}
+// ------------------------------------

Property changes on: branches/2.8.x/wb/modules/form/upgrade.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/modules/form/add.php
===================================================================
--- branches/2.8.x/wb/modules/form/add.php	(revision 1537)
+++ branches/2.8.x/wb/modules/form/add.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        module
  * @package         Form
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -13,10 +12,17 @@
  * @version         $Id$
  * @filesource		$HeadURL$
  * @lastmodified    $Date$
- * @description     
+ * @description
  */
+
 // Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 
 // Insert an extra rows into the database
 $header = '<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"98%\" summary=\"form\">';
@@ -42,5 +48,3 @@
 $stored_submissions = 50;
 $use_captcha = true;
 $database->query("INSERT INTO ".TABLE_PREFIX."mod_form_settings (page_id,section_id,header,field_loop,footer,email_to,email_from,email_fromname,email_subject,success_page,success_email_to,success_email_from,success_email_fromname,success_email_text,success_email_subject,max_submissions,stored_submissions,use_captcha) VALUES ('$page_id','$section_id','$header','$field_loop','$footer','$email_to','$email_from','$email_fromname','$email_subject','$success_page','$success_email_to','$success_email_from','$success_email_fromname','$success_email_text','$success_email_subject','$max_submissions','$stored_submissions','$use_captcha')");
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/output_filter/install.php
===================================================================
--- branches/2.8.x/wb/modules/output_filter/install.php	(revision 1537)
+++ branches/2.8.x/wb/modules/output_filter/install.php	(revision 1538)
@@ -23,13 +23,13 @@
 $table = TABLE_PREFIX .'mod_output_filter';
 $database->query("DROP TABLE IF EXISTS `$table`");
 
-$database->query("CREATE TABLE `$table` (
+$database->query("CREATE TABLE IF NOT EXISTS `$table` (
 	`sys_rel` INT NOT NULL DEFAULT '0',
 	`email_filter` VARCHAR(1) NOT NULL DEFAULT '0',
 	`mailto_filter` VARCHAR(1) NOT NULL DEFAULT '0',
 	`at_replacement` VARCHAR(255) NOT NULL DEFAULT '(at)',
 	`dot_replacement` VARCHAR(255) NOT NULL DEFAULT '(dot)'
-	)"
+	) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci"
 );
 
 // add default values to the module table
Index: branches/2.8.x/wb/modules/output_filter/upgrade.php
===================================================================
--- branches/2.8.x/wb/modules/output_filter/upgrade.php	(revision 1537)
+++ branches/2.8.x/wb/modules/output_filter/upgrade.php	(revision 1538)
@@ -14,12 +14,27 @@
  * @lastmodified    $Date$
  *
  */
+// Must include code to stop this file being access directly
 /* -------------------------------------------------------- */
-// Must include code to stop this file being accessed directly
-require_once( dirname(dirname(dirname(__FILE__))).'/framework/globalExceptionHandler.php');
-if(!defined('WB_PATH')) { throw new IllegalFileException(); }
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
 /* -------------------------------------------------------- */
-global $i;
+
+$msg = '';
+$sTable = TABLE_PREFIX.'mod_output_filter';
+if(($sOldType = $database->getTableEngine($sTable))) {
+	if(('myisam' != strtolower($sOldType))) {
+		if(!$database->query('ALTER TABLE `'.$sTable.'` Engine = \'MyISAM\' ')) {
+			$msg = $database->get_error();
+		}
+	}
+} else {
+	$msg = $database->get_error();
+}
+// ------------------------------------global $i;
 $table_name = TABLE_PREFIX .'mod_output_filter';
 $field_name = 'sys_rel';
 $i = (!isset($i) ? 1 : $i);
Index: branches/2.8.x/wb/modules/news/info.php
===================================================================
--- branches/2.8.x/wb/modules/news/info.php	(revision 1537)
+++ branches/2.8.x/wb/modules/news/info.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         news
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -16,10 +15,18 @@
  *
  */
 
+// Must include code to stop this file being access directly
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 $module_directory   = 'news';
-$module_name        = 'News v3.5.5';
+$module_name        = 'News 3.5.6';
 $module_function    = 'page';
-$module_version     = '3.5.5';
+$module_version     = '3.5.6';
 $module_platform    = '2.8.2';
 $module_author      = 'Ryan Djurovich, Rob Smith, Werner v.d.Decken';
 $module_license     = 'GNU General Public License';
Index: branches/2.8.x/wb/modules/news/add_post.php
===================================================================
--- branches/2.8.x/wb/modules/news/add_post.php	(revision 1537)
+++ branches/2.8.x/wb/modules/news/add_post.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         news
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -47,5 +46,3 @@
 
 // Print admin footer
 $admin->print_footer();
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/news/search.php
===================================================================
--- branches/2.8.x/wb/modules/news/search.php	(revision 1537)
+++ branches/2.8.x/wb/modules/news/search.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         news
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -138,5 +137,3 @@
 	}
 	return $result;
 }
-
-?>
Index: branches/2.8.x/wb/modules/news/modify_settings.php
===================================================================
--- branches/2.8.x/wb/modules/news/modify_settings.php	(revision 1537)
+++ branches/2.8.x/wb/modules/news/modify_settings.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         news
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -204,5 +203,3 @@
 
 // Print admin footer
 $admin->print_footer();
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/news/delete_post.php
===================================================================
--- branches/2.8.x/wb/modules/news/delete_post.php	(revision 1537)
+++ branches/2.8.x/wb/modules/news/delete_post.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         news
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
Index: branches/2.8.x/wb/modules/news/uninstall.php
===================================================================
--- branches/2.8.x/wb/modules/news/uninstall.php	(revision 1537)
+++ branches/2.8.x/wb/modules/news/uninstall.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         news
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
Index: branches/2.8.x/wb/modules/news/modify_comment.php
===================================================================
--- branches/2.8.x/wb/modules/news/modify_comment.php	(revision 1537)
+++ branches/2.8.x/wb/modules/news/modify_comment.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         news
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -74,5 +73,3 @@
 
 // Print admin footer
 $admin->print_footer();
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/news/view.php
===================================================================
--- branches/2.8.x/wb/modules/news/view.php	(revision 1537)
+++ branches/2.8.x/wb/modules/news/view.php	(revision 1538)
@@ -1,20 +1,28 @@
 <?php
 /**
  *
- * @category        WebsiteBaker
- * @package         modules
- * @subpackage      news
- * @author          Ryan Djurovich, Rob Smith, Werner v.d.Decken
- * @copyright       2004-2011, Ryan Djurovich
+ * @category        modules
+ * @package         news
+ * @author          WebsiteBaker Project
+ * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
+ * @platform        WebsiteBaker 2.8.x
+ * @requirements    PHP 5.2.2 and higher
  * @version         $Id$
  * @filesource		$HeadURL$
+ * @lastmodified    $Date$
  *
  */
 
 // Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 global $post_id, $post_section,$TEXT,$MESSAGE;
 
 // load module language file
Index: branches/2.8.x/wb/modules/news/save_group.php
===================================================================
--- branches/2.8.x/wb/modules/news/save_group.php	(revision 1537)
+++ branches/2.8.x/wb/modules/news/save_group.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         news
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
Index: branches/2.8.x/wb/modules/news/save_settings.php
===================================================================
--- branches/2.8.x/wb/modules/news/save_settings.php	(revision 1537)
+++ branches/2.8.x/wb/modules/news/save_settings.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         news
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -79,5 +78,3 @@
 
 // Print admin footer
 $admin->print_footer();
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/news/delete_comment.php
===================================================================
--- branches/2.8.x/wb/modules/news/delete_comment.php	(revision 1537)
+++ branches/2.8.x/wb/modules/news/delete_comment.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         news
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
Index: branches/2.8.x/wb/modules/news/upgrade.php
===================================================================
--- branches/2.8.x/wb/modules/news/upgrade.php	(revision 1537)
+++ branches/2.8.x/wb/modules/news/upgrade.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        WebsiteBaker
  * @package         modules
  * @subpackage      news
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -17,7 +16,12 @@
  */
 
 // Must include code to stop this file being access directly
-if(!defined('WB_URL')) { throw new Exception('illegal file access!! ['.$_SERVER['PHP_SELF'].']'); }
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
 
 /* **** START UPGRADE ******************************************************* */
 if(!function_exists('mod_news_Upgrade'))
@@ -24,7 +28,7 @@
 {
 	function mod_news_Upgrade()
 	{
-		global $database, $admin, $MESSAGE;
+		global $database, $msg, $admin, $MESSAGE;
 		$callingScript = $_SERVER["SCRIPT_NAME"];
 		$tmp = 'upgrade-script.php';
 		$globalStarted = substr_compare($callingScript, $tmp,(0-strlen($tmp)),strlen($tmp)) === 0;
@@ -37,9 +41,9 @@
 				make_dir(WB_PATH.PAGES_DIRECTORY.'/posts/');
 			}else {
 				if(!$globalStarted){
-					$admin->print_error($MESSAGE['PAGES_CANNOT_CREATE_ACCESS_FILE']);
+					$msg[] = ($MESSAGE['PAGES_CANNOT_CREATE_ACCESS_FILE']);
 				}else {
-					echo $MESSAGE['PAGES_CANNOT_CREATE_ACCESS_FILE'].'<br />';
+					$msg[] = $MESSAGE['PAGES_CANNOT_CREATE_ACCESS_FILE'].'<br />';
 					return;
 				}
 			}
@@ -104,7 +108,7 @@
 		}
 		unset($oDir);
 		if($globalStarted && $count > 0) {
-			echo 'save date of creation from '.$count.' old accessfiles and delete these files.<br />';
+			$msg[] = 'save date of creation from '.$count.' old accessfiles and delete these files.<br />';
 		}
 // ************************************************
 	// Check the validity of 'create-file-timestamp' and balance against 'posted-timestamp'
@@ -151,19 +155,33 @@
 					change_mode($file);
 				}else {
 					if($globalStarted){
-						echo $MESSAGE['PAGES_CANNOT_CREATE_ACCESS_FILE'].'<br />';
+						$msg[] = $MESSAGE['PAGES_CANNOT_CREATE_ACCESS_FILE'].'<br />';
 						return;
 					}else {
-						$admin->print_error($MESSAGE['PAGES_CANNOT_CREATE_ACCESS_FILE']);
+						$msg[] = ($MESSAGE['PAGES_CANNOT_CREATE_ACCESS_FILE']);
 					}
 				}
 				$count++;
 			}
 		}
-		if($globalStarted) { echo 'created '.$count.' new accessfiles.'; }
-		if(!$globalStarted) { $admin->print_footer(); }
+		if($globalStarted) { $msg[] = 'created '.$count.' new accessfiles.'; }
+		// if(!$globalStarted) { $admin->print_footer(); }
 	}
 }
 
+$msg = array();
+$aTable = array('mod_news_posts','mod_news_groups','mod_news_comments','mod_news_settings');
+for($x=0; $x<sizeof($aTable);$x++) {
+	if(($sOldType = $database->getTableEngine(TABLE_PREFIX.$aTable[$x]))) {
+		if(('myisam' != strtolower($sOldType))) {
+			if(!$database->query('ALTER TABLE `'.TABLE_PREFIX.$aTable[$x].'` Engine = \'MyISAM\' ')) {
+				$msg[] = $database->get_error();
+			}
+		}
+	} else {
+		$msg[] = $database->get_error();
+	}
+}
+// ------------------------------------
 	mod_news_Upgrade();
 /* **** END UPGRADE ********************************************************* */
Index: branches/2.8.x/wb/modules/news/modify.php
===================================================================
--- branches/2.8.x/wb/modules/news/modify.php	(revision 1537)
+++ branches/2.8.x/wb/modules/news/modify.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         news
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -17,7 +16,13 @@
  */
 
 // Must include code to stop this file being access directly
-if(!defined('WB_PATH')) { exit("Cannot access this file directly"); }
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 
 $database->query("DELETE FROM ".TABLE_PREFIX."mod_news_posts  WHERE page_id = '$page_id' and section_id = '$section_id' and title=''"); 
 $database->query("DELETE FROM ".TABLE_PREFIX."mod_news_groups  WHERE page_id = '$page_id' and section_id = '$section_id' and title=''"); 
@@ -209,4 +214,3 @@
 } else {
 	echo $TEXT['NONE_FOUND'];
 }
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/news/add.php
===================================================================
--- branches/2.8.x/wb/modules/news/add.php	(revision 1537)
+++ branches/2.8.x/wb/modules/news/add.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         news
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -17,7 +16,13 @@
  */
 
 // Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 
 $header = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"loop-header\">'."\n";
 $post_loop = '<tr class=\"post-top\">
Index: branches/2.8.x/wb/modules/news/modify_post.php
===================================================================
--- branches/2.8.x/wb/modules/news/modify_post.php	(revision 1537)
+++ branches/2.8.x/wb/modules/news/modify_post.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         news
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -253,6 +252,5 @@
 	echo $TEXT['NONE_FOUND'];
 }
 
-
 // Print admin footer
 $admin->print_footer();
Index: branches/2.8.x/wb/modules/news/comment_page.php
===================================================================
--- branches/2.8.x/wb/modules/news/comment_page.php	(revision 1537)
+++ branches/2.8.x/wb/modules/news/comment_page.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         news
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -16,9 +15,14 @@
  *
  */
 
-
 // Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
+/* -------------------------------------------------------- */
+if(defined('WB_PATH') == false)
+{
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
+}
+/* -------------------------------------------------------- */
 
 /* check if frontend.css file needs to be included into the <body></body> of page  */
 if ( (!function_exists('register_frontend_modfiles') || !defined('MOD_FRONTEND_CSS_REGISTERED')) && file_exists(WB_PATH .'/modules/news/frontend.css')) {
@@ -125,5 +129,3 @@
 	</form>
 	<?php
 }
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/news/delete.php
===================================================================
--- branches/2.8.x/wb/modules/news/delete.php	(revision 1537)
+++ branches/2.8.x/wb/modules/news/delete.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         news
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -17,10 +16,13 @@
  */
 
 // Must include code to stop this file being access directly
+/* -------------------------------------------------------- */
 if(defined('WB_PATH') == false)
 {
-  exit("Cannot access this file directly");
+	// Stop this file being access directly
+		die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
 }
+/* -------------------------------------------------------- */
 
 //get and remove all php files created for the news section
 $query_details = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_posts WHERE section_id = '$section_id'");
@@ -45,5 +47,3 @@
 $database->query("DELETE FROM ".TABLE_PREFIX."mod_news_groups WHERE section_id = '$section_id'");
 $database->query("DELETE FROM ".TABLE_PREFIX."mod_news_comments WHERE section_id = '$section_id'");
 $database->query("DELETE FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '$section_id'");
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/news/comment.php
===================================================================
--- branches/2.8.x/wb/modules/news/comment.php	(revision 1537)
+++ branches/2.8.x/wb/modules/news/comment.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         news
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -89,5 +88,3 @@
 		require(WB_PATH.'/index.php');
 	}
 }
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/news/modify_group.php
===================================================================
--- branches/2.8.x/wb/modules/news/modify_group.php	(revision 1537)
+++ branches/2.8.x/wb/modules/news/modify_group.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         news
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
Index: branches/2.8.x/wb/modules/news/save_post.php
===================================================================
--- branches/2.8.x/wb/modules/news/save_post.php	(revision 1537)
+++ branches/2.8.x/wb/modules/news/save_post.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         news
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
Index: branches/2.8.x/wb/modules/news/add_group.php
===================================================================
--- branches/2.8.x/wb/modules/news/add_group.php	(revision 1537)
+++ branches/2.8.x/wb/modules/news/add_group.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         news
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
Index: branches/2.8.x/wb/modules/news/install.php
===================================================================
--- branches/2.8.x/wb/modules/news/install.php	(revision 1537)
+++ branches/2.8.x/wb/modules/news/install.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         news
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -39,7 +38,7 @@
 					 . '`posted_when` INT NOT NULL DEFAULT \'0\','
 					 . '`posted_by` INT NOT NULL DEFAULT \'0\','
 					 . 'PRIMARY KEY (post_id)'
-					 . ' )';
+					 . ' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci';
 	$database->query($mod_news);
 	
 	// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_groups`");
@@ -51,7 +50,7 @@
 					 . '`position` INT NOT NULL DEFAULT \'0\','
 					 . '`title` VARCHAR(255) NOT NULL DEFAULT \'\','
 					 . 'PRIMARY KEY (group_id)'
-                . ' )';
+                . ' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci';
 	$database->query($mod_news);
 	
 	// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_comments`");
@@ -65,7 +64,7 @@
 					 . '`commented_when` INT NOT NULL DEFAULT \'0\','
 					 . '`commented_by` INT NOT NULL DEFAULT \'0\','
 					 . 'PRIMARY KEY (comment_id)'
-                . ' )';
+                . ' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci';
 
 	$database->query($mod_news);
 	
@@ -87,7 +86,7 @@
 					 . '`resize` INT NOT NULL DEFAULT \'0\','
 					 . ' `use_captcha` INT NOT NULL DEFAULT \'0\','
 					 . 'PRIMARY KEY (section_id)'
-                . ' )';
+                . ' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci';
 
 	$database->query($mod_news);
 		
Index: branches/2.8.x/wb/modules/news/delete_group.php
===================================================================
--- branches/2.8.x/wb/modules/news/delete_group.php	(revision 1537)
+++ branches/2.8.x/wb/modules/news/delete_group.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         news
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -43,5 +42,3 @@
 
 // Print admin footer
 $admin->print_footer();
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/news/save_comment.php
===================================================================
--- branches/2.8.x/wb/modules/news/save_comment.php	(revision 1537)
+++ branches/2.8.x/wb/modules/news/save_comment.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         news
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
@@ -78,5 +77,3 @@
 
 // Print admin footer
 $admin->print_footer();
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/news/submit_comment.php
===================================================================
--- branches/2.8.x/wb/modules/news/submit_comment.php	(revision 1537)
+++ branches/2.8.x/wb/modules/news/submit_comment.php	(revision 1538)
@@ -4,7 +4,6 @@
  * @category        modules
  * @package         news
  * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2011, Website Baker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
