Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1222)
+++ branches/2.8.x/CHANGELOG	(revision 1223)
@@ -12,6 +12,8 @@
 
 ------------------------------------- 2.8.1 -------------------------------------
 28-Dec-2009 Dietmar Woellbrink (Luisehahne)
+!	validate code
+28-Dec-2009 Dietmar Woellbrink (Luisehahne)
 !	change page_title to menu_title in dropdown list
 !	validate code
 23-Dec-2009 Dietmar Woellbrink (Luisehahne)
Index: branches/2.8.x/wb/modules/code/htt/modify.htt
===================================================================
--- branches/2.8.x/wb/modules/code/htt/modify.htt	(revision 1222)
+++ branches/2.8.x/wb/modules/code/htt/modify.htt	(revision 1223)
@@ -1,24 +1,23 @@
-{REGISTER_EDIT_AREA}
-
-<!-- BEGIN main_block -->
-<form action="{WB_URL}/modules/code/save.php" method="post">
-
-<input type="hidden" name="page_id" value="{PAGE_ID}" />
-<input type="hidden" name="section_id" value="{SECTION_ID}" />
-
-<textarea id="content{SECTION}" name="content" style="WIDTH: 100%; HEIGHT: 380px">{CONTENT}</textarea>
-
-<table cellpadding="0" cellspacing="0" border="0" width="100%">
-<tr>
-	<td align="left">
-		<input type="submit" value="{TEXT_SAVE}" style="width: 100px; margin-top: 5px;" />
-	</td>
-	<td align="right">
-		</form>
-		<input type="button" value="{TEXT_CANCEL}" onclick="javascript: window.location = 'index.php';" style="width: 100px; margin-top: 5px;" />
-	</td>
-</tr>
-</table>
-</form>
-<p>&nbsp;</p>
+<!-- BEGIN main_block -->
+{REGISTER_EDIT_AREA}
+
+<form action="{WB_URL}/modules/code/save.php" method="post">
+
+<input type="hidden" name="page_id" value="{PAGE_ID}" />
+<input type="hidden" name="section_id" value="{SECTION_ID}" />
+
+<textarea cols="2" rows="20"  id="content{SECTION}" name="content" style="width: 100%; height: 380px">{CONTENT}</textarea>
+
+<table cellpadding="0" cellspacing="0" border="0" width="100%" >
+<tr>
+	<td align="left">
+		<input type="submit" value="{TEXT_SAVE}" style="width: 100px; margin-top: 5px;" />
+	</td>
+	<td align="right">
+		<input type="button" value="{TEXT_CANCEL}" onclick="javascript: window.location = 'index.php';" style="width: 100px; margin-top: 5px;" />
+	</td>
+</tr>
+</table>
+</form>
+<p>&nbsp;</p>
 <!-- END main_block -->
\ No newline at end of file
Index: branches/2.8.x/wb/modules/code/info.php
===================================================================
--- branches/2.8.x/wb/modules/code/info.php	(revision 1222)
+++ branches/2.8.x/wb/modules/code/info.php	(revision 1223)
@@ -1,35 +1,72 @@
-<?php
-
-// $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
-
-*/
-
-$module_directory	= 'code';
-$module_name		= 'Code';
-$module_function	= 'page';
-$module_version		= '2.8';
-$module_platform	= '2.7 | 2.8.x';
-$module_author		= 'Ryan Djurovich';
-$module_license		= 'GNU General Public License';
-$module_description	= 'This module allows you to execute PHP commands (limit access to users you trust!!)';
-
+<?php
+/***************************************************************************
+* SVN Version information:
+*
+* $Id$
+*
+*****************************************************************************
+*                          WebsiteBaker
+*
+* WebsiteBaker Project <http://www.websitebaker2.org/>
+* Copyright (C) 2009, Website Baker Org. e.V.
+*         http://start.websitebaker2.org/impressum-datenschutz.php
+* Copyright (C) 2004-2009, Ryan Djurovich
+*
+*                        About WebsiteBaker
+*
+* Website Baker is a PHP-based Content Management System (CMS)
+* designed with one goal in mind: to enable its users to produce websites
+* with ease.
+*
+*****************************************************************************
+
+*****************************************************************************
+*                        LICENSE INFORMATION
+*
+* WebsiteBaker 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.
+*
+* WebsiteBaker 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 this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+****************************************************************************
+
+*****************************************************************************
+*                   WebsiteBaker Extra Information
+*
+*
+*
+*
+*****************************************************************************/
+/**
+ *
+ * @category     modules
+ * @package      code
+ * @author       Ryan Djurovich
+ * @copyright    2004-2009, Ryan Djurovich
+ * @copyright    2009, Website Baker Org. e.V.
+ * @version      $Id$
+ * @platform     WebsiteBaker 2.8.x
+ * @requirements >= PHP 4.3.4
+ * @license      http://www.gnu.org/licenses/gpl.html
+ *
+ *
+ */
+
+$module_directory	= 'code';
+$module_name		= 'Code';
+$module_function	= 'page';
+$module_version		= '2.8.1';
+$module_platform	= '2.7 | 2.8.x';
+$module_author		= 'Ryan Djurovich';
+$module_license		= 'GNU General Public License';
+$module_description	= 'This module allows you to execute PHP commands (limit access to users you trust!!)';
+
 ?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/code/save.php
===================================================================
--- branches/2.8.x/wb/modules/code/save.php	(revision 1222)
+++ branches/2.8.x/wb/modules/code/save.php	(revision 1223)
@@ -1,50 +1,87 @@
-<?php
-
-// $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
-
-*/
-
-require('../../config.php');
-
-// Include WB admin wrapper script
-$update_when_modified = true; // Tells script to update when this page was last updated
-require(WB_PATH.'/modules/admin.php');
-
-// Update the mod_wysiwygs table with the contents
-if(isset($_POST['content'])) {
-	$tags = array('<?php', '?>' , '<?');
-	$content = $admin->add_slashes(str_replace($tags, '', $_POST['content']));
-	$query = "UPDATE ".TABLE_PREFIX."mod_code SET content = '$content' WHERE section_id = '$section_id'";
-	$database->query($query);	
-}
-
-// Check if there is a database error, otherwise say successful
-if($database->is_error()) {
-	$admin->print_error($database->get_error(), $js_back);
-} else {
-	$admin->print_success($MESSAGE['PAGES']['SAVED'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-}
-
-// Print admin footer
-$admin->print_footer();
-
+<?php
+/***************************************************************************
+* SVN Version information:
+*
+* $Id$
+*
+*****************************************************************************
+*                          WebsiteBaker
+*
+* WebsiteBaker Project <http://www.websitebaker2.org/>
+* Copyright (C) 2009, Website Baker Org. e.V.
+*         http://start.websitebaker2.org/impressum-datenschutz.php
+* Copyright (C) 2004-2009, Ryan Djurovich
+*
+*                        About WebsiteBaker
+*
+* Website Baker is a PHP-based Content Management System (CMS)
+* designed with one goal in mind: to enable its users to produce websites
+* with ease.
+*
+*****************************************************************************
+
+*****************************************************************************
+*                        LICENSE INFORMATION
+*
+* WebsiteBaker 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.
+*
+* WebsiteBaker 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 this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+****************************************************************************
+
+*****************************************************************************
+*                   WebsiteBaker Extra Information
+*
+*
+*
+*
+*****************************************************************************/
+/**
+ *
+ * @category     modules
+ * @package      code
+ * @author       Ryan Djurovich
+ * @copyright    2004-2009, Ryan Djurovich
+ * @copyright    2009, Website Baker Org. e.V.
+ * @version      $Id$
+ * @platform     WebsiteBaker 2.8.x
+ * @requirements >= PHP 4.3.4
+ * @license      http://www.gnu.org/licenses/gpl.html
+ *
+ *
+ */
+
+require('../../config.php');
+
+// Include WB admin wrapper script
+$update_when_modified = true; // Tells script to update when this page was last updated
+require(WB_PATH.'/modules/admin.php');
+
+// Update the mod_wysiwygs table with the contents
+if(isset($_POST['content'])) {
+	$tags = array('<?php', '?>' , '<?');
+	$content = $admin->add_slashes(str_replace($tags, '', $_POST['content']));
+	$query = "UPDATE ".TABLE_PREFIX."mod_code SET content = '$content' WHERE section_id = '$section_id'";
+	$database->query($query);	
+}
+
+// Check if there is a database error, otherwise say successful
+if($database->is_error()) {
+	$admin->print_error($database->get_error(), $js_back);
+} else {
+	$admin->print_success($MESSAGE['PAGES']['SAVED'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+}
+
+// Print admin footer
+$admin->print_footer();
+
 ?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/code/index.php
===================================================================
--- branches/2.8.x/wb/modules/code/index.php	(revision 1222)
+++ branches/2.8.x/wb/modules/code/index.php	(revision 1223)
@@ -1,28 +1,64 @@
-<?php
-
-// $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
-
-*/
-
-header('Location: ../index.php');
-
+<?php
+/***************************************************************************
+* SVN Version information:
+*
+* $Id$
+*
+*****************************************************************************
+*                          WebsiteBaker
+*
+* WebsiteBaker Project <http://www.websitebaker2.org/>
+* Copyright (C) 2009, Website Baker Org. e.V.
+*         http://start.websitebaker2.org/impressum-datenschutz.php
+* Copyright (C) 2004-2009, Ryan Djurovich
+*
+*                        About WebsiteBaker
+*
+* Website Baker is a PHP-based Content Management System (CMS)
+* designed with one goal in mind: to enable its users to produce websites
+* with ease.
+*
+*****************************************************************************
+
+*****************************************************************************
+*                        LICENSE INFORMATION
+*
+* WebsiteBaker 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.
+*
+* WebsiteBaker 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 this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+****************************************************************************
+*
+*                   WebsiteBaker Extra Information
+*
+*
+*
+*
+*****************************************************************************/
+/**
+ *
+ * @category     modules
+ * @package      code
+ * @author       Ryan Djurovich
+ * @copyright    2004-2009, Ryan Djurovich
+ * @copyright    2009, Website Baker Org. e.V.
+ * @version      $Id$
+ * @platform     WebsiteBaker 2.8.x
+ * @requirements >= PHP 4.3.4
+ * @license      http://www.gnu.org/licenses/gpl.html
+ *
+ *
+ */
+
+header('Location: ../index.php');
+
 ?>
\ No newline at end of file
Index: branches/2.8.x/wb/modules/code/modify.php
===================================================================
--- branches/2.8.x/wb/modules/code/modify.php	(revision 1222)
+++ branches/2.8.x/wb/modules/code/modify.php	(revision 1223)
@@ -1,56 +1,93 @@
-<?php
-
-// $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
-
-*/
-
-// Setup template object
-$template = new Template(WB_PATH.'/modules/code');
-$template->set_file('page', 'htt/modify.htt');
-$template->set_block('page', 'main_block', 'main');
-
-// Get page content
-$query = "SELECT content FROM ".TABLE_PREFIX."mod_code WHERE section_id = '$section_id'";
-$get_content = $database->query($query);
-$content = $get_content->fetchRow();
-$content = (htmlspecialchars($content['content']));
-
-// Insert vars
-$template->set_var(
-	array(
-		'PAGE_ID'				=> $page_id,
-		'SECTION_ID'			=> $section_id,
-		'REGISTER_EDIT_AREA'	=> function_exists('registerEditArea') ? registerEditArea('content'.$section_id, 'php', false) : '',
-		'WB_URL'				=> WB_URL,
-		'CONTENT'				=> $content,
-		'TEXT_SAVE'				=> $TEXT['SAVE'],
-		'TEXT_CANCEL'			=> $TEXT['CANCEL'],
-		'SECTION'				=> $section_id
-	)
-);
-
-// Parse template object
-$template->set_unknowns('keep');
-$template->parse('main', 'main_block', false);
-$template->pparse('output', 'page', false);
-
+<?php
+/***************************************************************************
+* SVN Version information:
+*
+* $Id$
+*
+*****************************************************************************
+*                          WebsiteBaker
+*
+* WebsiteBaker Project <http://www.websitebaker2.org/>
+* Copyright (C) 2009, Website Baker Org. e.V.
+*         http://start.websitebaker2.org/impressum-datenschutz.php
+* Copyright (C) 2004-2009, Ryan Djurovich
+*
+*                        About WebsiteBaker
+*
+* Website Baker is a PHP-based Content Management System (CMS)
+* designed with one goal in mind: to enable its users to produce websites
+* with ease.
+*
+*****************************************************************************
+
+*****************************************************************************
+*                        LICENSE INFORMATION
+*
+* WebsiteBaker 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.
+*
+* WebsiteBaker 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 this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+****************************************************************************
+
+*****************************************************************************
+*                   WebsiteBaker Extra Information
+*
+*
+*
+*
+*****************************************************************************/
+/**
+ *
+ * @category     modules
+ * @package      code
+ * @author       Ryan Djurovich
+ * @copyright    2004-2009, Ryan Djurovich
+ * @copyright    2009, Website Baker Org. e.V.
+ * @version      $Id$
+ * @platform     WebsiteBaker 2.8.x
+ * @requirements >= PHP 4.3.4
+ * @license      http://www.gnu.org/licenses/gpl.html
+ *
+ *
+ */
+
+// Setup template object
+$template = new Template(WB_PATH.'/modules/code');
+$template->set_file('page', 'htt/modify.htt');
+$template->set_block('page', 'main_block', 'main');
+
+// Get page content
+$query = "SELECT content FROM ".TABLE_PREFIX."mod_code WHERE section_id = '$section_id'";
+$get_content = $database->query($query);
+$content = $get_content->fetchRow();
+$content = htmlspecialchars($content['content']);
+
+// Insert vars
+$template->set_var(
+	array(
+		'PAGE_ID'				=> $page_id,
+		'SECTION_ID'			=> $section_id,
+		'REGISTER_EDIT_AREA'	=> function_exists('registerEditArea') ? registerEditArea('content'.$section_id, 'php', false) : '',
+		'WB_URL'				=> WB_URL,
+		'CONTENT'				=> $content,
+		'TEXT_SAVE'				=> $TEXT['SAVE'],
+		'TEXT_CANCEL'			=> $TEXT['CANCEL'],
+		'SECTION'				=> $section_id
+	)
+);
+
+// Parse template object
+$template->set_unknowns('keep');
+$template->parse('main', 'main_block', false);
+$template->pparse('output', 'page', false);
+
 ?>
\ No newline at end of file
