Index: branches/2.8.x/LICENSE
===================================================================
--- branches/2.8.x/LICENSE	(revision 1276)
+++ branches/2.8.x/LICENSE	(revision 1277)
@@ -3,4 +3,20 @@
 WebsiteBaker is released under the GNU General Public License,
 Copyright (C) 2004-2009 Ryan Djurovich.
 Copyright (C) 2009-2010 Website Baker Org. e.V.
-Please refer to the COPYING file for a copy of the license.
\ No newline at end of file
+Please refer to the COPYING file for a copy of the license.
+
+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. 
\ No newline at end of file
Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1276)
+++ branches/2.8.x/CHANGELOG	(revision 1277)
@@ -11,7 +11,9 @@
 ! = Update/Change
  
 ------------------------------------- 2.8.1 -------------------------------------
-24-Jan-2010 Dietmar Woellbrink (Luisehahne)
+28-Jan-2010 Dietmar Woellbrink (Luisehahne)
+!	update headertext
+28-Jan-2010 Dietmar Woellbrink (Luisehahne)
 !	update jquery 1.4.0 to 1.4.1, 
 -	removed include/jquery/plugins
 !	update backend themes
Index: branches/2.8.x/wb/include/yui/connection/index.php
===================================================================
--- branches/2.8.x/wb/include/yui/connection/index.php	(revision 1276)
+++ branches/2.8.x/wb/include/yui/connection/index.php	(revision 1277)
@@ -1,51 +1,17 @@
 <?php
-/*
-*
-*                       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        backend
+ * @category        framework
  * @package         yui
- * @author          Ryan Djurovich
+ * @author          WebsiteBaker Project
  * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2010, Website Baker Org. e.V.
- * @filesource		$HeadURL$
- * @author          Ryan Djurovich
- * @copyright       2004-2009, Ryan Djurovich
- *
- * @author          WebsiteBaker Project
  * @link			http://www.websitebaker2.org/
- * @copyright       2009-2010, Website Baker Org. e.V.
- * @link			http://start.websitebaker2.org/impressum-datenschutz.php
  * @license         http://www.gnu.org/licenses/gpl.html
- * @version         $Id$
  * @platform        WebsiteBaker 2.8.x
  * @requirements    PHP 4.3.4 and higher
+ * @version      	$Id$
+ * @filesource		$HeadURL$
  * @lastmodified    $Date$
  *
  */
Index: branches/2.8.x/wb/include/yui/dom/index.php
===================================================================
--- branches/2.8.x/wb/include/yui/dom/index.php	(revision 1276)
+++ branches/2.8.x/wb/include/yui/dom/index.php	(revision 1277)
@@ -1,55 +1,22 @@
 <?php
-/*
-*
-*                       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        backend
+ * @category        framework
  * @package         yui
- * @author          Ryan Djurovich
+ * @author          WebsiteBaker Project
  * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2010, Website Baker Org. e.V.
- * @filesource		$HeadURL$
- * @author          Ryan Djurovich
- * @copyright       2004-2009, Ryan Djurovich
- *
- * @author          WebsiteBaker Project
  * @link			http://www.websitebaker2.org/
- * @copyright       2009-2010, Website Baker Org. e.V.
- * @link			http://start.websitebaker2.org/impressum-datenschutz.php
  * @license         http://www.gnu.org/licenses/gpl.html
- * @version         $Id$
  * @platform        WebsiteBaker 2.8.x
  * @requirements    PHP 4.3.4 and higher
+ * @version      	$Id$
+ * @filesource		$HeadURL$
  * @lastmodified    $Date$
  *
  */
 
+
 header("Location: ../../../index.php");
 
 ?>
\ No newline at end of file
Index: branches/2.8.x/wb/include/yui/yahoo/index.php
===================================================================
--- branches/2.8.x/wb/include/yui/yahoo/index.php	(revision 1276)
+++ branches/2.8.x/wb/include/yui/yahoo/index.php	(revision 1277)
@@ -1,35 +1,7 @@
 <?php
-/*
-*
-*                       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        backend
+ * @category        framework
  * @package         yui
  * @author          WebsiteBaker Project
  * @copyright       2004-2009, Ryan Djurovich
Index: branches/2.8.x/wb/include/yui/event/index.php
===================================================================
--- branches/2.8.x/wb/include/yui/event/index.php	(revision 1276)
+++ branches/2.8.x/wb/include/yui/event/index.php	(revision 1277)
@@ -1,35 +1,7 @@
 <?php
-/*
-*
-*                       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        backend
+ * @category        framework
  * @package         yui
  * @author          WebsiteBaker Project
  * @copyright       2004-2009, Ryan Djurovich
Index: branches/2.8.x/wb/include/yui/dragdrop/index.php
===================================================================
--- branches/2.8.x/wb/include/yui/dragdrop/index.php	(revision 1276)
+++ branches/2.8.x/wb/include/yui/dragdrop/index.php	(revision 1277)
@@ -1,35 +1,8 @@
 <?php
-/*
-*
-*                       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        backend
+ * @category        framework
  * @package         yui
  * @author          WebsiteBaker Project
  * @copyright       2004-2009, Ryan Djurovich
Index: branches/2.8.x/wb/admin/groups/groups.php
===================================================================
--- branches/2.8.x/wb/admin/groups/groups.php	(revision 1276)
+++ branches/2.8.x/wb/admin/groups/groups.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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        admin
@@ -42,7 +14,7 @@
  * @filesource		$HeadURL$
  * @lastmodified    $Date$
  *
-*/
+ */
 
 // Include config file and admin class file
 require('../../config.php');
Index: branches/2.8.x/wb/admin/start/index.php
===================================================================
--- branches/2.8.x/wb/admin/start/index.php	(revision 1276)
+++ branches/2.8.x/wb/admin/start/index.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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        admin
@@ -66,22 +38,28 @@
 						);
 
 // Insert permission values into the template object
-if($admin->get_permission('pages') != true) {
+if($admin->get_permission('pages') != true)
+{
 	$template->set_var('DISPLAY_PAGES', 'display:none;');
 }
-if($admin->get_permission('media') != true) {
+if($admin->get_permission('media') != true)
+{
 	$template->set_var('DISPLAY_MEDIA', 'display:none;');
 }
-if($admin->get_permission('addons') != true) {
+if($admin->get_permission('addons') != true)
+{
 	$template->set_var('DISPLAY_ADDONS', 'display:none;');
 }
-if($admin->get_permission('access') != true) {
+if($admin->get_permission('access') != true)
+{
 	$template->set_var('DISPLAY_ACCESS', 'display:none;');
 }
-if($admin->get_permission('settings') != true) {
+if($admin->get_permission('settings') != true)
+{
 	$template->set_var('DISPLAY_SETTINGS', 'display:none;');
 }
-if($admin->get_permission('admintools') != true) {
+if($admin->get_permission('admintools') != true)
+{
 	$template->set_var('DISPLAY_ADMINTOOLS', 'display:none;');
 }
 
@@ -88,7 +66,8 @@
 // Check if installation directory still exists
 if(file_exists(WB_PATH.'/install/')) {
 	// Check if user is part of Adminstrators group
-	if(in_array(1, $admin->get_groups_id())) {
+	if(in_array(1, $admin->get_groups_id()))
+    {
 		$template->set_var('WARNING', $MESSAGE['START']['INSTALL_DIR_EXISTS']);
 	} else {
 		$template->set_var('DISPLAY_WARNING', 'display:none;');
@@ -100,16 +79,19 @@
 // Insert "Add-ons" section overview (pretty complex compared to normal)
 $addons_overview = $TEXT['MANAGE'].' ';
 $addons_count = 0;
-if($admin->get_permission('modules') == true) {
+if($admin->get_permission('modules') == true)
+{
 	$addons_overview .= '<a href="'.ADMIN_URL.'/modules/index.php">'.$MENU['MODULES'].'</a>';
 	$addons_count = 1;
 }
-if($admin->get_permission('templates') == true) {
+if($admin->get_permission('templates') == true)
+{
 	if($addons_count == 1) { $addons_overview .= ', '; }
 	$addons_overview .= '<a href="'.ADMIN_URL.'/templates/index.php">'.$MENU['TEMPLATES'].'</a>';
 	$addons_count = 1;
 }
-if($admin->get_permission('languages') == true) {
+if($admin->get_permission('languages') == true)
+{
 	if($addons_count == 1) { $addons_overview .= ', '; }
 	$addons_overview .= '<a href="'.ADMIN_URL.'/languages/index.php">'.$MENU['LANGUAGES'].'</a>';
 }
Index: branches/2.8.x/wb/admin/pages/settings.php
===================================================================
--- branches/2.8.x/wb/admin/pages/settings.php	(revision 1276)
+++ branches/2.8.x/wb/admin/pages/settings.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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        admin
@@ -42,10 +14,11 @@
  * @filesource		$HeadURL$
  * @lastmodified    $Date$
  *
-*/
+ */
 
 // Get page id
-if(!isset($_GET['page_id']) OR !is_numeric($_GET['page_id'])) {
+if(!isset($_GET['page_id']) OR !is_numeric($_GET['page_id']))
+{
 	header("Location: index.php");
 	exit(0);
 } else {
@@ -61,29 +34,37 @@
 require_once(WB_PATH.'/framework/functions-utf8.php');
 
 // Get perms
-$database = new database();
-$results = $database->query("SELECT * FROM ".TABLE_PREFIX."pages WHERE page_id = '$page_id'");
+/*$database = new database(); */
+
+$sql = 'SELECT * FROM `'.TABLE_PREFIX.'pages` WHERE `page_id` = '.$page_id;
+$results = $database->query($sql);
 $results_array = $results->fetchRow();
+
 $old_admin_groups = explode(',', $results_array['admin_groups']);
 $old_admin_users = explode(',', $results_array['admin_users']);
 
 // Work-out if we should check for existing page_code
-$field_sql = $database->query("DESCRIBE ".TABLE_PREFIX."pages page_code");
+$sql = 'DESCRIBE `'.TABLE_PREFIX.'pages` `page_code`';
+$field_sql = $database->query($sql);
 $field_set = $field_sql->numRows();
+
 $in_old_group = FALSE;
-foreach($admin->get_groups_id() as $cur_gid){
-	if (in_array($cur_gid, $old_admin_groups)) {
+foreach($admin->get_groups_id() as $cur_gid)
+{
+	if (in_array($cur_gid, $old_admin_groups))
+    {
 		$in_old_group = TRUE;
 	}
 }
-if((!$in_old_group) AND !is_numeric(array_search($admin->get_user_id(), $old_admin_users))) {
+if((!$in_old_group) AND !is_numeric(array_search($admin->get_user_id(), $old_admin_users)))
+{
 	$admin->print_error($MESSAGE['PAGES']['INSUFFICIENT_PERMISSIONS']);
 }
 
 // Get page details
 /* $database = new database();  */
-$query = "SELECT * FROM ".TABLE_PREFIX."pages WHERE page_id = '$page_id'";
-$results = $database->query($query);
+$sql = 'SELECT * FROM `'.TABLE_PREFIX.'pages` WHERE `page_id`='.$page_id;
+$results = $database->query($sql);
 if($database->is_error()) {
 	$admin->print_header();
 	$admin->print_error($database->get_error());
@@ -98,7 +79,8 @@
 $user=$admin->get_user_details($results_array['modified_by']);
 
 // Convert the unix ts for modified_when to human a readable form
-if($results_array['modified_when'] != 0) {
+if($results_array['modified_when'] != 0)
+{
 	$modified_ts = gmdate(TIME_FORMAT.', '.DATE_FORMAT, $results_array['modified_when']+TIMEZONE);
 } else {
 	$modified_ts = 'Unknown';
@@ -126,10 +108,13 @@
 		);
 
 // Work-out if we should show the "manage sections" link
-$query_sections = $database->query("SELECT section_id FROM ".TABLE_PREFIX."sections WHERE page_id = '$page_id' AND module = 'menu_link'");
-if($query_sections->numRows() > 0) {
-	$template->set_var('DISPLAY_MANAGE_SECTIONS', 'display:none;');
-} elseif(MANAGE_SECTIONS == 'enabled') {
+$sql = 'SELECT `section_id` FROM `'.TABLE_PREFIX.'sections` WHERE `page_id`='.$page_id.' AND `module`="menu_link"';
+$query_sections = $database->query($sql);
+if($query_sections->numRows() > 0)
+{
+    $template->set_var('DISPLAY_MANAGE_SECTIONS', 'display:none;');
+} elseif(MANAGE_SECTIONS == 'enabled')
+{
 	$template->set_var('TEXT_MANAGE_SECTIONS', $HEADING['MANAGE_SECTIONS']);
 } else {
 	$template->set_var('DISPLAY_MANAGE_SECTIONS', 'display:none;');
@@ -150,9 +135,9 @@
 // Group list 1 (admin_groups)
 	$admin_groups = explode(',', str_replace('_', '', $results_array['admin_groups']));
 
-	$query = "SELECT * FROM ".TABLE_PREFIX."groups";
-	
-	$get_groups = $database->query($query);
+	$sql = 'SELECT * FROM `'.TABLE_PREFIX.'groups`';
+    $get_groups = $database->query($sql);
+
 	$template->set_block('main_block', 'group_list_block', 'group_list');
 	// Insert admin group and current group first
 	$admin_group_name = $get_groups->fetchRow();
@@ -204,9 +189,9 @@
 // Group list 2 (viewing_groups)
 	$viewing_groups = explode(',', str_replace('_', '', $results_array['viewing_groups']));
 
-	$query = "SELECT * FROM ".TABLE_PREFIX."groups";
+    $sql = 'SELECT * FROM `'.TABLE_PREFIX.'groups`';
+    $get_groups = $database->query($sql);
 
-	$get_groups = $database->query($query);
 	$template->set_block('main_block', 'group_list_block2', 'group_list2');
 	// Insert admin group and current group first
 	$admin_group_name = $get_groups->fetchRow();
@@ -222,13 +207,15 @@
 							);
 	$template->parse('group_list2', 'group_list_block2', true);
 
-	while($group = $get_groups->fetchRow()) {
+	while($group = $get_groups->fetchRow())
+    {
 		// check if the user is a member of this group
 		$flag_disabled = '';
 		$flag_checked =  '';
 		$flag_cursor =   'pointer';
 		$flag_color =    '';
-		if (in_array($group["group_id"], $admin->get_groups_id())) {
+		if (in_array($group["group_id"], $admin->get_groups_id()))
+        {
 			$flag_disabled = ''; //' disabled';
 			$flag_checked =  ''; //' checked';
 			$flag_cursor =   'default';
@@ -245,15 +232,20 @@
 										'CHECKED' => $flag_checked
 										)
 								);
-		if(is_numeric(array_search($group['group_id'], $viewing_groups))) {
+		if(is_numeric(array_search($group['group_id'], $viewing_groups)))
+        {
 			$template->set_var('CHECKED', 'checked="checked"');
 		} else {
-			if (!$flag_checked) $template->set_var('CHECKED', '');
+			if (!$flag_checked) {$template->set_var('CHECKED', '');}
 		}
+
 		$template->parse('group_list2', 'group_list_block2', true);
+
 	}
+
 // Show private viewers
-if($results_array['visibility'] == 'private' OR $results_array['visibility'] == 'registered') {
+if($results_array['visibility'] == 'private' OR $results_array['visibility'] == 'registered')
+{
 	$template->set_var('DISPLAY_VIEWERS', '');
 } else {
 	$template->set_var('DISPLAY_VIEWERS', 'display:none;');
@@ -261,6 +253,7 @@
 
 //-- insert page_code 20090904-->
 $template->set_var('DISPLAY_CODE_PAGE_LIST', ' id="multi_lingual" style="display:none;"');
+
 // Work-out if page languages feature is enabled
 if((defined('PAGE_LANGUAGES') && PAGE_LANGUAGES) && $field_set && file_exists(WB_PATH.'/modules/mod_multilingual/update_keys.php') )
 {
@@ -274,28 +267,35 @@
 
 	// Page_code list
    /* 	$database = new database();  */
-	function page_code_list($parent) {
+	function page_code_list($parent)
+    {
 		global $admin, $database, $template, $results_array, $pageCode;
 		$default_language = DEFAULT_LANGUAGE;
-		$query = "SELECT * FROM ".TABLE_PREFIX."pages WHERE parent = '$parent' AND language = '$default_language' ORDER BY position ASC";
-		$get_pages = $database->query($query);
-		while($page = $get_pages->fetchRow()) {
+
+        $sql = 'SELECT * FROM `'.TABLE_PREFIX.'pages` WHERE `parent` = '.$parent.' AND `language` = "'.$default_language.'" ORDER BY `position` ASC';
+        $get_pages = $database->query($sql);
+
+		while($page = $get_pages->fetchRow())
+        {
 			if($admin->page_is_visible($page)==false)
 				continue;
 			$template->set_var('FLAG_CODE_ICON',' none ');
-			if( $page['parent'] == 0 ) {
+			if( $page['parent'] == 0 )
+            {
 				$template->set_var('FLAG_CODE_ICON','url('.THEME_URL.'/images/flags/'.strtolower($page['language']).'.png)');
 			}
 			// If the current page cannot be parent, then its children neither
 			$list_next_level = true;
 			// Stop users from adding pages with a level of more than the set page level limit
-			if($page['level']+1 < PAGE_LEVEL_LIMIT) {
+			if($page['level']+1 < PAGE_LEVEL_LIMIT)
+            {
 				// Get user perms
 				$admin_groups = explode(',', str_replace('_', '', $page['admin_groups']));
 				$admin_users = explode(',', str_replace('_', '', $page['admin_users']));
 
 				$in_group = FALSE;
-				foreach($admin->get_groups_id() as $cur_gid){
+				foreach($admin->get_groups_id() as $cur_gid)
+                {
 					if (in_array($cur_gid, $admin_groups))
 					{
 						$in_group = TRUE;
@@ -302,7 +302,8 @@
 					}
 				}
 
-				if(($in_group) OR is_numeric(array_search($admin->get_user_id(), $admin_users))) {
+				if(($in_group) OR is_numeric(array_search($admin->get_user_id(), $admin_users)))
+                {
 					$can_modify = true;
 				} else {
 					$can_modify = false;
@@ -333,6 +334,7 @@
 				page_code_list($page['page_id']);
 		}
 	}
+
 	// Insert code_page values from page to modify
 	$template->set_block('main_block', 'page_code_list_block', 'page_code_list');
 	if($admin->get_permission('pages_add_l0') == true OR $results_array['level'] == 0) {
@@ -347,38 +349,50 @@
 		$template->parse('page_code_list', 'page_code_list_block', true);
 	}
 	// get pagecode form this page_id
-	page_code_list(0);
+   	page_code_list(0);
 }
 //-- page code -->
 
 // Parent page list
 /* $database = new database();  */
-function parent_list($parent) {
+function parent_list($parent)
+{
 	global $admin, $database, $template, $results_array,$field_set;
-	$query = "SELECT * FROM ".TABLE_PREFIX."pages WHERE parent = '$parent' ORDER BY position ASC";
-	$get_pages = $database->query($query);
-	while($page = $get_pages->fetchRow()) {
+
+    $sql = 'SELECT * FROM `'.TABLE_PREFIX.'pages` WHERE `parent` = '.$parent.' ORDER BY `position` ASC';
+    $get_pages = $database->query($sql);
+
+	while($page = $get_pages->fetchRow())
+    {
 		if($admin->page_is_visible($page)==false)
-			continue;
+        {
+          continue;
+        }
+
 		// if parent = 0 set flag_icon
 		$template->set_var('FLAG_ROOT_ICON',' none ');
-		if( $page['parent'] == 0  && $field_set) {
+		if( $page['parent'] == 0  && $field_set)
+        {
 			$template->set_var('FLAG_ROOT_ICON','url('.THEME_URL.'/images/flags/'.strtolower($page['language']).'.png)');
 		}
 		// If the current page cannot be parent, then its children neither
 		$list_next_level = true;
 		// Stop users from adding pages with a level of more than the set page level limit
-		if($page['level']+1 < PAGE_LEVEL_LIMIT) {
+		if($page['level']+1 < PAGE_LEVEL_LIMIT)
+        {
 			// Get user perms
 			$admin_groups = explode(',', str_replace('_', '', $page['admin_groups']));
 			$admin_users = explode(',', str_replace('_', '', $page['admin_users']));
 			$in_group = FALSE;
-			foreach($admin->get_groups_id() as $cur_gid){
-				if (in_array($cur_gid, $admin_groups)) {
+			foreach($admin->get_groups_id() as $cur_gid)
+            {
+				if (in_array($cur_gid, $admin_groups))
+                {
 					$in_group = TRUE;
 				}
 			}
-			if(($in_group) OR is_numeric(array_search($admin->get_user_id(), $admin_users))) {
+			if(($in_group) OR is_numeric(array_search($admin->get_user_id(), $admin_users)))
+            {
 				$can_modify = true;
 			} else {
 				$can_modify = false;
@@ -394,12 +408,15 @@
 											'FLAG_ICON' => ' none ',
 											));
 
-			if($results_array['parent'] == $page['page_id']) {
+			if($results_array['parent'] == $page['page_id'])
+            {
 				$template->set_var('SELECTED', ' selected="selected"');
-			} elseif($results_array['page_id'] == $page['page_id']) {
+			} elseif($results_array['page_id'] == $page['page_id'])
+            {
 				$template->set_var('SELECTED', ' disabled="disabled" class="disabled"');
 				$list_next_level=false;
-			} elseif($can_modify != true) {
+			} elseif($can_modify != true)
+            {
 				$template->set_var('SELECTED', ' disabled="disabled" class="disabled"');
 			} else {
 				$template->set_var('SELECTED', '');
@@ -407,13 +424,17 @@
 			$template->parse('page_list2', 'page_list_block2', true);
 		}
 		if ($list_next_level)
-			parent_list($page['page_id']);
+        {
+          parent_list($page['page_id']);
+        }
+
 	}
 }
 
 $template->set_block('main_block', 'page_list_block2', 'page_list2');
 if($admin->get_permission('pages_add_l0') == true OR $results_array['level'] == 0) {
-	if($results_array['parent'] == 0) {
+	if($results_array['parent'] == 0)
+    {
 		$selected = ' selected="selected"';
 	} else { 
 		$selected = '';
@@ -428,21 +449,30 @@
 }
 parent_list(0);
 
-if($modified_ts == 'Unknown') {
+if($modified_ts == 'Unknown')
+{
 	$template->set_var('DISPLAY_MODIFIED', 'hide');
 } else {
 	$template->set_var('DISPLAY_MODIFIED', '');
 }
+
 // Templates list
 $template->set_block('main_block', 'template_list_block', 'template_list');
-$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' and function = 'template' order by name");
-if($result->numRows() > 0) {
-	while($addon = $result->fetchRow()) { 
+
+$sql = 'SELECT * FROM `'.TABLE_PREFIX.'addons` WHERE `type` = "template" AND `function` = "template" order by `name`';
+$result = $database->query($sql);
+
+if($result->numRows() > 0)
+{
+	while($addon = $result->fetchRow())
+    {
 		// Check if the user has perms to use this template
-		if($addon['directory'] == $results_array['template'] OR $admin->get_permission($addon['directory'], 'template') == true) {
+		if($addon['directory'] == $results_array['template'] OR $admin->get_permission($addon['directory'], 'template') == true)
+        {
 			$template->set_var('VALUE', $addon['directory']);
 			$template->set_var('NAME', $addon['name']);
-			if($addon['directory'] == $results_array['template']) {
+			if($addon['directory'] == $results_array['template'])
+            {
 				$template->set_var('SELECTED', ' selected="selected"');
 			} else {
 				$template->set_var('SELECTED', '');
@@ -453,29 +483,35 @@
 }
 
 // Menu list
-if(MULTIPLE_MENUS == false) {
+if(MULTIPLE_MENUS == false)
+{
 	$template->set_var('DISPLAY_MENU_LIST', 'display:none;');
 }
 // Include template info file (if it exists)
-if($results_array['template'] != '') {
+if($results_array['template'] != '')
+{
 	$template_location = WB_PATH.'/templates/'.$results_array['template'].'/info.php';
 } else {
 	$template_location = WB_PATH.'/templates/'.DEFAULT_TEMPLATE.'/info.php';
 }
-if(file_exists($template_location)) {
+if(file_exists($template_location))
+{
 	require($template_location);
 }
 // Check if $menu is set
-if(!isset($menu[1]) OR $menu[1] == '') {
+if(!isset($menu[1]) OR $menu[1] == '')
+{
 	// Make our own menu list
 	$menu[1] = $TEXT['MAIN'];
 }
 // Add menu options to the list
 $template->set_block('main_block', 'menu_list_block', 'menu_list');
-foreach($menu AS $number => $name) {
+foreach($menu AS $number => $name)
+{
 	$template->set_var('NAME', $name);
 	$template->set_var('VALUE', $number);
-	if($results_array['menu'] == $number) {
+	if($results_array['menu'] == $number)
+    {
 		$template->set_var('SELECTED', ' selected="selected"');
 	} else {
 		$template->set_var('SELECTED', '');
@@ -485,14 +521,20 @@
 
 // Insert language values
 $template->set_block('main_block', 'language_list_block', 'language_list');
-$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'language' order by name");
-if($result->numRows() > 0) {
-	while($addon = $result->fetchRow()) {
+
+$sql = 'SELECT * FROM `'.TABLE_PREFIX.'addons` WHERE `type` = "language" ORDER BY `name`';
+$result = $database->query($sql);
+
+if($result->numRows() > 0)
+{
+	while($addon = $result->fetchRow())
+    {
 		$l_codes[$addon['name']] = $addon['directory'];
 		$l_names[$addon['name']] = entities_to_7bit($addon['name']); // sorting-problem workaround
 	}
 	asort($l_names);
-	foreach($l_names as $l_name=>$v) {
+	foreach($l_names as $l_name=>$v)
+    {
 		// Insert code and name
 		$template->set_var(array(
 								'VALUE' => $l_codes[$l_name],
@@ -500,7 +542,8 @@
 								'FLAG_LANG_ICONS' => 'url('.THEME_URL.'/images/flags/'.strtolower($l_codes[$l_name]).'.png)',
 								));
 		// Check if it is selected
-		if($results_array['language'] == $l_codes[$l_name]) {
+		if($results_array['language'] == $l_codes[$l_name])
+        {
 			$template->set_var('SELECTED', ' selected="selected"');
 		} else {
 			$template->set_var('SELECTED', '');
@@ -510,11 +553,13 @@
 }
 
 // Select disabled if searching is disabled
-if($results_array['searching'] == 0) {
+if($results_array['searching'] == 0)
+{
 	$template->set_var('SEARCHING_DISABLED', ' selected="selected"');
 }
 // Select what the page target is
-switch ($results_array['target']) {
+switch ($results_array['target'])
+{
 	case '_top':
 		$template->set_var('TOP_SELECTED', ' selected="selected"');
 		break;
@@ -525,7 +570,6 @@
 		$template->set_var('BLANK_SELECTED', ' selected="selected"');
 		break;
 }
-	
 
 // Insert language text
 $template->set_var(array(
Index: branches/2.8.x/wb/admin/pages/index.php
===================================================================
--- branches/2.8.x/wb/admin/pages/index.php	(revision 1276)
+++ branches/2.8.x/wb/admin/pages/index.php	(revision 1277)
@@ -1,28 +1,21 @@
 <?php
+/**
+ *
+ * @category        admin
+ * @package         pages
+ * @author          WebsiteBaker Project
+ * @copyright       2004-2009, Ryan Djurovich
+ * @copyright       2009-2010, 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 4.3.4 and higher
+ * @version         $Id$
+ * @filesource		$HeadURL:  $
+ * @lastmodified    $Date:  $
+ *
+ */
 
-// $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');
 require_once(WB_PATH.'/framework/class.admin.php');
 $admin = new admin('Pages', 'pages');
@@ -40,14 +33,21 @@
 	?>
 	<ul id="p<?php echo $parent; ?>" <?php if($parent != 0) { echo 'class="page_list" '; if(isset($_COOKIE['p'.$parent]) && $_COOKIE['p'.$parent] == '1'){ echo 'style="display:block"'; }} ?>>
 	<?php
+	// $database = new database();
+
 	// Get page list from database
-	$database = new database();
-	if(PAGE_TRASH != 'inline') {
-		$query = "SELECT * FROM ".TABLE_PREFIX."pages WHERE parent = '$parent' AND visibility != 'deleted' ORDER BY position ASC";
+    $sql = 'SELECT * FROM `'.TABLE_PREFIX.'pages` WHERE `parent` = '.$parent;
+    $sql .= (PAGE_TRASH != 'inline') ?  ' AND `visibility` != "deleted"' : '';
+    $sql .= ' ORDER BY `position` ASC';
+	$get_pages = $database->query($sql);
+/*
+	if(PAGE_TRASH != 'inline')
+    {
+		$sql = "SELECT * FROM ".TABLE_PREFIX."pages WHERE parent = '$parent' AND visibility != 'deleted' ORDER BY position ASC";
 	} else {
-		$query = "SELECT * FROM ".TABLE_PREFIX."pages WHERE parent = '$parent' ORDER BY position ASC";
+		$sql = "SELECT * FROM ".TABLE_PREFIX."pages WHERE parent = '$parent' ORDER BY position ASC";
 	}
-	$get_pages = $database->query($query);
+*/
 	// Insert values into main page list
 	if($get_pages->numRows() > 0) {
 		while($page = $get_pages->fetchRow()) {
@@ -55,25 +55,32 @@
 			$admin_groups = explode(',', str_replace('_', '', $page['admin_groups']));
 			$admin_users = explode(',', str_replace('_', '', $page['admin_users']));
 			$in_group = FALSE;
-			foreach($admin->get_groups_id() as $cur_gid) {
-				if (in_array($cur_gid, $admin_groups)) {
+			foreach($admin->get_groups_id() as $cur_gid)
+            {
+				if (in_array($cur_gid, $admin_groups))
+                {
 					$in_group = TRUE;
 				}
 			}
-			if(($in_group) OR is_numeric(array_search($admin->get_user_id(), $admin_users))) {
-				if($page['visibility'] == 'deleted') {
-					if(PAGE_TRASH == 'inline') {
+			if(($in_group) OR is_numeric(array_search($admin->get_user_id(), $admin_users)))
+            {
+				if($page['visibility'] == 'deleted')
+                {
+					if(PAGE_TRASH == 'inline')
+                    {
 						$can_modify = true;
 						$editable_pages = $editable_pages+1;
 					} else {
 						$can_modify = false;
 					}
-				} elseif($page['visibility'] != 'deleted') {
+				} elseif($page['visibility'] != 'deleted')
+                {
 					$can_modify = true;
 					$editable_pages = $editable_pages+1;
 				}
 			} else {
-				if($page['visibility'] == 'private') {
+				if($page['visibility'] == 'private')
+                {
 					continue;
 				}
 				else {
@@ -81,12 +88,20 @@
 				}
 			}
 			// Work out if we should show a plus or not
-			if(PAGE_TRASH != 'inline') {
+            $sql = 'SELECT `page_id`,`admin_groups`,`admin_users` FROM `'.TABLE_PREFIX.'pages` WHERE `parent` = '.$page['page_id'];
+            $sql .= (PAGE_TRASH != 'inline') ?  ' AND `visibility` != "deleted"' : '';
+            // $sql .= ' ORDER BY `position` ASC';
+        	$get_page_subs = $database->query($sql);
+/*
+			if(PAGE_TRASH != 'inline')
+            {
 				$get_page_subs = $database->query("SELECT page_id,admin_groups,admin_users FROM ".TABLE_PREFIX."pages WHERE parent = '".$page['page_id']."' AND visibility!='deleted'");
 			} else {
 				$get_page_subs = $database->query("SELECT page_id,admin_groups,admin_users FROM ".TABLE_PREFIX."pages WHERE parent = '".$page['page_id']."'");
 			}
-			if($get_page_subs->numRows() > 0) {
+*/
+			if($get_page_subs->numRows() > 0)
+            {
 				$display_plus = true;
 			} else {
 				$display_plus = false;
@@ -175,25 +190,36 @@
 				<td class="list_actions">
 				<?php
 				// Work-out if we should show the "manage dates" link
-				if(MANAGE_SECTIONS == 'enabled' && $admin->get_permission('pages_modify')==true && $can_modify==true) {
-					$query_sections = $database->query("SELECT publ_start, publ_end FROM ".TABLE_PREFIX."sections WHERE page_id = '{$page['page_id']}' AND module != 'menu_link'");
-					if($query_sections->numRows() > 0) {
+				if(MANAGE_SECTIONS == 'enabled' && $admin->get_permission('pages_modify')==true && $can_modify==true)
+                {
+
+                    $sql = 'SELECT `publ_start`, `publ_end` FROM `'.TABLE_PREFIX.'sections`';
+                    $sql .= ' WHERE `page_id` = '.$page['page_id'].' AND `module` != "menu_link"';
+                    $query_sections = $database->query($sql);
+
+					// $query_sections = $database->query("SELECT publ_start, publ_end FROM ".TABLE_PREFIX."sections WHERE page_id = '{$page['page_id']}' AND module != 'menu_link'");
+
+					if($query_sections->numRows() > 0)
+                    {
 						$mdate_display=false;
-						while($mdate_res = $query_sections->fetchRow()) {
-							if($mdate_res['publ_start']!='0' || $mdate_res['publ_end']!='0') {
+						while($mdate_res = $query_sections->fetchRow())
+                        {
+							if($mdate_res['publ_start']!='0' || $mdate_res['publ_end']!='0')
+                            {
 								$mdate_display=true;
 								break;
 							}
 						}
-						if($mdate_display==1) {
+						if($mdate_display==1)
+                        {
 							$file=$admin->page_is_active($page)?"clock_16.png":"clock_red_16.png";
 							?>
 							<a href="<?php echo ADMIN_URL; ?>/pages/sections.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $HEADING['MANAGE_SECTIONS']; ?>">
-							<img src="<?php echo THEME_URL."/images/$file"; ?>" border="0" alt="<?php echo $HEADING['MANAGE_SECTIONS']; ?>" />	
+							<img src="<?php echo THEME_URL."/images/$file"; ?>" border="0" alt="<?php echo $HEADING['MANAGE_SECTIONS']; ?>" />
 							</a>
 						<?php } else { ?>
 							<a href="<?php echo ADMIN_URL; ?>/pages/sections.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $HEADING['MANAGE_SECTIONS']; ?>">
-							<img src="<?php echo THEME_URL; ?>/images/noclock_16.png" border="0" alt="<?php echo $HEADING['MANAGE_SECTIONS']; ?>" /></a>	
+							<img src="<?php echo THEME_URL; ?>/images/noclock_16.png" border="0" alt="<?php echo $HEADING['MANAGE_SECTIONS']; ?>" /></a>
 						<?php } ?>
 					<?php } ?>
 				<?php } ?>
@@ -245,7 +271,8 @@
 			</table>
 			</li>
 			<?php
-			if ( $page['parent'] = 0) {
+			if ( $page['parent'] = 0)
+            {
 				$page_tmp_id = $page['page_id'];
 			}
 			// Get subs
@@ -440,8 +467,9 @@
 
 
 // Parent page list
-$database = new database();
-function parent_list($parent) {
+// $database = new database();
+function parent_list($parent)
+{
 	global $admin, $database, $template, $field_set;
 	$query = "SELECT * FROM ".TABLE_PREFIX."pages WHERE parent = '$parent' AND visibility!='deleted' ORDER BY position ASC";
 	$get_pages = $database->query($query);
Index: branches/2.8.x/wb/admin/pages/settings2.php
===================================================================
--- branches/2.8.x/wb/admin/pages/settings2.php	(revision 1276)
+++ branches/2.8.x/wb/admin/pages/settings2.php	(revision 1277)
@@ -1,39 +1,24 @@
 <?php
+/**
+ *
+ * @category        admin
+ * @package         pages
+ * @author          WebsiteBaker Project
+ * @copyright       2004-2009, Ryan Djurovich
+ * @copyright       2009-2010, 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 4.3.4 and higher
+ * @version         $Id$
+ * @filesource		$HeadURL:  $
+ * @lastmodified    $Date:  $
+ *
+ */
 
-// $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
-
- * @category   backend
- * @package    pages
- * @author(s)  Dietmar Wöllbrink <Luisehahne>, Dietrich Roland Pehlke <Aldus>
- * @platform   WB 2.8.x
- * @require    PHP 5.2.11
- * @license    http://www.gnu.org/licenses/gpl.html
- * @link       http://project.websitebaker2.org/browser/branches/2.8.x/wb/pages
- * @changeset  2009/11/30 workout for page_code field, ex catchwords and multilangual
-
-*/
-
 // Get page id
-if(!isset($_POST['page_id']) OR !is_numeric($_POST['page_id'])) {
+if(!isset($_POST['page_id']) OR !is_numeric($_POST['page_id']))
+{
 	header("Location: index.php");
 	exit(0);
 } else {
@@ -68,16 +53,21 @@
 $menu = $admin->get_post_escaped('menu');
 
 // Validate data
-if($page_title == '' || substr($page_title,0,1)=='.') {
+if($page_title == '' || substr($page_title,0,1)=='.')
+{
 	$admin->print_error($MESSAGE['PAGES']['BLANK_PAGE_TITLE']);
 }
-if($menu_title == '' || substr($menu_title,0,1)=='.') {
+if($menu_title == '' || substr($menu_title,0,1)=='.')
+{
 	$admin->print_error($MESSAGE['PAGES']['BLANK_MENU_TITLE']);
 }
 
 // Get existing perms
-$database = new database();
-$results = $database->query("SELECT parent,link,position,admin_groups,admin_users FROM ".TABLE_PREFIX."pages WHERE page_id = '$page_id'");
+// $database = new database();
+
+$sql = 'SELECT `parent`,`link`,`position`,`admin_groups`,`admin_users` FROM `'.TABLE_PREFIX.'pages` WHERE `page_id`='.$page_id;
+$results = $database->query($sql);
+
 $results_array = $results->fetchRow();
 $old_parent = $results_array['parent'];
 $old_link = $results_array['link'];
@@ -86,7 +76,8 @@
 $old_admin_users = explode(',', str_replace('_', '', $results_array['admin_users']));
 
 // Work-out if we should check for existing page_code
-$field_sql = $database->query("DESCRIBE ".TABLE_PREFIX."pages page_code");
+$sql = 'DESCRIBE `'.TABLE_PREFIX.'pages` `page_code`';
+$field_sql = $database->query($sql);
 $field_set = $field_sql->numRows();
 
 $in_old_group = FALSE;
@@ -95,7 +86,8 @@
 	$in_old_group = TRUE;
     }
 }
-if((!$in_old_group) AND !is_numeric(array_search($admin->get_user_id(), $old_admin_users))) {
+if((!$in_old_group) AND !is_numeric(array_search($admin->get_user_id(), $old_admin_users)))
+{
 	$admin->print_error($MESSAGE['PAGES']['INSUFFICIENT_PERMISSIONS']);
 }
 
@@ -113,7 +105,8 @@
 $viewing_groups = implode(',', $viewing_groups);
 
 // If needed, get new order
-if($parent != $old_parent) {
+if($parent != $old_parent)
+{
 	// Include ordering class
 	require(WB_PATH.'/framework/class.order.php');
 	$order = new order(TABLE_PREFIX.'pages', 'position', 'page_id', 'parent');
@@ -126,7 +119,8 @@
 }
 
 // Work out level and root parent
-if ($parent!='0') {
+if ($parent!='0')
+{
 	$level = level_count($parent)+1;
 	$root_parent = root_parent($parent);
 }
@@ -136,54 +130,82 @@
 }
 
 // Work-out what the link should be
-if($parent == '0') {
+if($parent == '0')
+{
 	$link = '/'.page_filename($menu_title);
 	// rename menu titles: index && intro to prevent clashes with intro page feature and WB core file /pages/index.php
-	if($link == '/index' || $link == '/intro') {
+	if($link == '/index' || $link == '/intro')
+    {
 		$link .= '_' .$page_id;
 		$filename = WB_PATH.PAGES_DIRECTORY.'/'.page_filename($menu_title).'_'.$page_id .PAGE_EXTENSION;
 	} else {
-		$filename = WB_PATH.PAGES_DIRECTORY.'/'.page_filename($menu_title).PAGE_EXTENSION; 
+		$filename = WB_PATH.PAGES_DIRECTORY.'/'.page_filename($menu_title).PAGE_EXTENSION;
 	}
 } else {
 	$parent_section = '';
 	$parent_titles = array_reverse(get_parent_titles($parent));
-	foreach($parent_titles AS $parent_title) {
+	foreach($parent_titles AS $parent_title)
+    {
 		$parent_section .= page_filename($parent_title).'/';
 	}
-	if($parent_section == '/') { $parent_section = ''; }
+	if($parent_section == '/')
+    {
+      $parent_section = '';
+    }
 	$link = '/'.$parent_section.page_filename($menu_title);
-	$filename = WB_PATH.PAGES_DIRECTORY.'/'.$parent_section.page_filename($menu_title).PAGE_EXTENSION;  
+	$filename = WB_PATH.PAGES_DIRECTORY.'/'.$parent_section.page_filename($menu_title).PAGE_EXTENSION;
 }
 
 // Check if a page with same page filename exists
-$database = new database();
-$get_same_page = $database->query("SELECT page_id,page_title FROM ".TABLE_PREFIX."pages WHERE link = '$link' and page_id != '$page_id'");
-if($get_same_page->numRows() > 0) {
+// $database = new database();
+$sql = 'SELECT `page_id`,`page_title` FROM `'.TABLE_PREFIX.'pages` WHERE `link` = "'.$link.'" AND `page_id` != '.$page_id;
+$get_same_page = $database->query($sql);
+
+if($get_same_page->numRows() > 0)
+{
 	$admin->print_error($MESSAGE['PAGES']['PAGE_EXISTS']);
 }
 
 // Update page with new order
-$query = "UPDATE ".TABLE_PREFIX."pages SET parent = '$parent', position = '$position' WHERE page_id = '$page_id'";
-$database = new database();
-$database->query($query);
+$sql = 'UPDATE `'.TABLE_PREFIX.'pages` SET `parent`='.$parent.', `position`='.$position.' WHERE `page_id`='.$page_id.'';
+// $database = new database();
+$database->query($sql);
 
 // Get page trail
 $page_trail = get_page_trail($page_id);
 
 // Update page settings in the pages table
-if((defined('PAGE_LANGUAGES') && PAGE_LANGUAGES) && $field_set )
+$sql  = 'UPDATE `'.TABLE_PREFIX.'pages` SET ';
+$sql .= '`parent` = '.$parent.', ';
+$sql .= '`page_title` = "'.$page_title.'", ';
+$sql .= '`menu_title` = "'.$menu_title.'", ';
+$sql .= '`menu` = '.$menu.', ';
+$sql .= '`level` = '.$level.', ';
+$sql .= '`page_trail` = "'.$page_trail.'", ';
+$sql .= '`root_parent` = '.$root_parent.', ';
+$sql .= '`link` = "'.$link.'", ';
+$sql .= '`template` = "'.$template.'", ';
+$sql .= '`target` = "'.$target.'", ';
+$sql .= '`description` = "'.$description.'", ';
+$sql .= '`keywords` = "'.$keywords.'", ';
+$sql .= '`position` = '.$position.', ';
+$sql .= '`visibility` = "'.$visibility.'", ';
+$sql .= '`searching` = '.$searching.', ';
+$sql .= '`language` = "'.$language.'", ';
+$sql .= '`admin_groups` = "'.$admin_groups.'", ';
+$sql .= '`viewing_groups` = "'.$viewing_groups.'"';
+$sql .= (defined('PAGE_LANGUAGES') && PAGE_LANGUAGES) && $field_set && (file_exists(WB_PATH.'/modules/mod_multilingual/update_keys.php')) ? ', `page_code` = "'.$page_code.'" ' : ' ';
+$sql .= 'WHERE `page_id` = '.$page_id;
+$database->query($sql);
+
+$target_url = ADMIN_URL.'/pages/settings.php?page_id='.$page_id;
+if($database->is_error())
 {
-$query = "UPDATE ".TABLE_PREFIX."pages SET parent = '$parent', page_title = '$page_title', menu_title = '$menu_title', menu = '$menu', level = '$level', page_trail = '$page_trail', root_parent = '$root_parent', link = '$link', template = '$template', target = '$target', description = '$description', keywords = '$keywords', position = '$position', visibility = '$visibility', searching = '$searching', language = '$language', admin_groups = '$admin_groups', viewing_groups = '$viewing_groups', page_code = '$page_code' WHERE page_id = '$page_id'";
-} else
-{
-$query = "UPDATE ".TABLE_PREFIX."pages SET parent = '$parent', page_title = '$page_title', menu_title = '$menu_title', menu = '$menu', level = '$level', page_trail = '$page_trail', root_parent = '$root_parent', link = '$link', template = '$template', target = '$target', description = '$description', keywords = '$keywords', position = '$position', visibility = '$visibility', searching = '$searching', language = '$language', admin_groups = '$admin_groups', viewing_groups = '$viewing_groups' WHERE page_id = '$page_id'";
+	$admin->print_error($database->get_error(), $target_url );
 }
-
-$database->query($query);
-
 // Clean old order if needed
-if($parent != $old_parent) {
+if($parent != $old_parent)
+{
 	$order->clean($old_parent);
 }
 
@@ -190,29 +212,38 @@
 /* BEGIN page "access file" code */
 
 // Create a new file in the /pages dir if title changed
-if(!is_writable(WB_PATH.PAGES_DIRECTORY.'/')) {
+if(!is_writable(WB_PATH.PAGES_DIRECTORY.'/'))
+{
 	$admin->print_error($MESSAGE['PAGES']['CANNOT_CREATE_ACCESS_FILE']);
 } else {
 	// First check if we need to create a new file
-	if($old_link != $link) {
+	if($old_link != $link)
+    {
 		// Delete old file
 		$old_filename = WB_PATH.PAGES_DIRECTORY.$old_link.PAGE_EXTENSION;
-		if(file_exists($old_filename)) {
+		if(file_exists($old_filename))
+        {
 			unlink($old_filename);
 		}
 		// Create access file
 		create_access_file($filename,$page_id,$level);
 		// Move a directory for this page
-		if(file_exists(WB_PATH.PAGES_DIRECTORY.$old_link.'/') AND is_dir(WB_PATH.PAGES_DIRECTORY.$old_link.'/')) {
+		if(file_exists(WB_PATH.PAGES_DIRECTORY.$old_link.'/') AND is_dir(WB_PATH.PAGES_DIRECTORY.$old_link.'/'))
+        {
 			rename(WB_PATH.PAGES_DIRECTORY.$old_link.'/', WB_PATH.PAGES_DIRECTORY.$link.'/');
 		}
 		// Update any pages that had the old link with the new one
 		$old_link_len = strlen($old_link);
+        $sql = '';
 		$query_subs = $database->query("SELECT page_id,link,level FROM ".TABLE_PREFIX."pages WHERE link LIKE '%$old_link/%' ORDER BY LEVEL ASC");
-		if($query_subs->numRows() > 0) {
-			while($sub = $query_subs->fetchRow()) {
+
+		if($query_subs->numRows() > 0)
+        {
+			while($sub = $query_subs->fetchRow())
+            {
 				// Double-check to see if it contains old link
-				if(substr($sub['link'], 0, $old_link_len) == $old_link) {
+				if(substr($sub['link'], 0, $old_link_len) == $old_link)
+                {
 					// Get new link
 					$replace_this = $old_link;
 					$old_sub_link_len =strlen($sub['link']);
@@ -223,7 +254,8 @@
 					$database->query("UPDATE ".TABLE_PREFIX."pages SET link = '$new_sub_link', level = '$new_sub_level' WHERE page_id = '".$sub['page_id']."' LIMIT 1");
 					// Re-write the access file for this page
 					$old_subpage_file = WB_PATH.PAGES_DIRECTORY.$new_sub_link.PAGE_EXTENSION;
-					if(file_exists($old_subpage_file)) {
+					if(file_exists($old_subpage_file))
+                    {
 						unlink($old_subpage_file);
 					}
 					create_access_file(WB_PATH.PAGES_DIRECTORY.$new_sub_link.PAGE_EXTENSION, $sub['page_id'], $new_sub_level);
@@ -234,17 +266,21 @@
 }
 
 // Function to fix page trail of subs
-function fix_page_trail($parent,$root_parent) {
+function fix_page_trail($parent,$root_parent)
+{
 	// Get objects and vars from outside this function
 	global $admin, $template, $database, $TEXT, $MESSAGE;
 	// Get page list from database
-	$database = new database();
+	// $database = new database();
 	$query = "SELECT page_id FROM ".TABLE_PREFIX."pages WHERE parent = '$parent'";
 	$get_pages = $database->query($query);
 	// Insert values into main page list
-	if($get_pages->numRows() > 0)	{
-		while($page = $get_pages->fetchRow()) {
+	if($get_pages->numRows() > 0)
+    {
+		while($page = $get_pages->fetchRow())
+        {
 			// Fix page trail
+
 			$database->query("UPDATE ".TABLE_PREFIX."pages SET ".($root_parent != 0 ?"root_parent = '$root_parent', ":"")." page_trail = '".get_page_trail($page['page_id'])."' WHERE page_id = '".$page['page_id']."'");
 			// Run this query on subs
 			fix_page_trail($page['page_id'],$root_parent);
@@ -251,19 +287,23 @@
 		}
 	}
 }
+
 // Fix sub-pages page trail
 fix_page_trail($page_id,$root_parent);
 
 /* END page "access file" code */
 
+$pagetree_url = ADMIN_URL.'/pages/index.php';
+$target_url = ADMIN_URL.'/pages/settings.php?page_id='.$page_id;
 // Check if there is a db error, otherwise say successful
-if($database->is_error()) {
-	$admin->print_error($database->get_error(), ADMIN_URL.'/pages/settings.php?page_id='.$page_id);
+if($database->is_error())
+{
+	$admin->print_error($database->get_error(), $target_url );
 } else {
-	$admin->print_success($MESSAGE['PAGES']['SAVED_SETTINGS'], ADMIN_URL.'/pages/index.php');
+	$admin->print_success($MESSAGE['PAGES']['SAVED_SETTINGS'], $target_url );
 }
 
 // Print admin footer
 $admin->print_footer();
 
-?>
+?>
\ No newline at end of file
Index: branches/2.8.x/wb/admin/pages/sections.php
===================================================================
--- branches/2.8.x/wb/admin/pages/sections.php	(revision 1276)
+++ branches/2.8.x/wb/admin/pages/sections.php	(revision 1277)
@@ -1,28 +1,21 @@
 <?php
+/**
+ *
+ * @category        admin
+ * @package         pages
+ * @author          WebsiteBaker Project
+ * @copyright       2004-2009, Ryan Djurovich
+ * @copyright       2009-2010, 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 4.3.4 and higher
+ * @version         $Id$
+ * @filesource		$HeadURL$
+ * @lastmodified    $Date$
+ *
+ */
 
-// $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
-
-*/
-
 // Include config file
 require('../../config.php');
 
@@ -59,6 +52,7 @@
 	if(file_exists(WB_PATH.'/modules/'.$section['module'].'/delete.php')) {
 		require(WB_PATH.'/modules/'.$section['module'].'/delete.php');
 	}
+    $sql = '';
 	$database->query("DELETE FROM ".TABLE_PREFIX."sections WHERE section_id = '$section_id' LIMIT 1");
 	if($database->is_error()) {
 		$admin->print_error($database->get_error());

Property changes on: branches/2.8.x/wb/admin/pages/sections.php
___________________________________________________________________
Modified: svn:keywords
## -1 +1,4 ##
-Id
\ No newline at end of property
+Id
+Revision
+HeadURL
+Date
\ No newline at end of property
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1276)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1277)
@@ -52,6 +52,6 @@
 
 // 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.1');
-if(!defined('REVISION')) define('REVISION', '1276');
+if(!defined('REVISION')) define('REVISION', '1277');
 
 ?>
\ No newline at end of file
Index: branches/2.8.x/wb/admin/settings/index.php
===================================================================
--- branches/2.8.x/wb/admin/settings/index.php	(revision 1276)
+++ branches/2.8.x/wb/admin/settings/index.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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        admin
Index: branches/2.8.x/wb/account/logout.php
===================================================================
--- branches/2.8.x/wb/account/logout.php	(revision 1276)
+++ branches/2.8.x/wb/account/logout.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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        frontend
Index: branches/2.8.x/wb/account/login_form.php
===================================================================
--- branches/2.8.x/wb/account/login_form.php	(revision 1276)
+++ branches/2.8.x/wb/account/login_form.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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        frontend
Index: branches/2.8.x/wb/account/forgot.php
===================================================================
--- branches/2.8.x/wb/account/forgot.php	(revision 1276)
+++ branches/2.8.x/wb/account/forgot.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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        frontend
Index: branches/2.8.x/wb/account/preferences.php
===================================================================
--- branches/2.8.x/wb/account/preferences.php	(revision 1276)
+++ branches/2.8.x/wb/account/preferences.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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        frontend
Index: branches/2.8.x/wb/account/password.php
===================================================================
--- branches/2.8.x/wb/account/password.php	(revision 1276)
+++ branches/2.8.x/wb/account/password.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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        frontend
Index: branches/2.8.x/wb/account/forgot_form.php
===================================================================
--- branches/2.8.x/wb/account/forgot_form.php	(revision 1276)
+++ branches/2.8.x/wb/account/forgot_form.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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        frontend
Index: branches/2.8.x/wb/account/details.php
===================================================================
--- branches/2.8.x/wb/account/details.php	(revision 1276)
+++ branches/2.8.x/wb/account/details.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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        frontend
Index: branches/2.8.x/wb/account/email.php
===================================================================
--- branches/2.8.x/wb/account/email.php	(revision 1276)
+++ branches/2.8.x/wb/account/email.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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        frontend
Index: branches/2.8.x/wb/account/index.php
===================================================================
--- branches/2.8.x/wb/account/index.php	(revision 1276)
+++ branches/2.8.x/wb/account/index.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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        frontend
Index: branches/2.8.x/wb/account/login.php
===================================================================
--- branches/2.8.x/wb/account/login.php	(revision 1276)
+++ branches/2.8.x/wb/account/login.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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        frontend
Index: branches/2.8.x/wb/framework/class.admin.php
===================================================================
--- branches/2.8.x/wb/framework/class.admin.php	(revision 1276)
+++ branches/2.8.x/wb/framework/class.admin.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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        frontend
Index: branches/2.8.x/wb/framework/class.login.php
===================================================================
--- branches/2.8.x/wb/framework/class.login.php	(revision 1276)
+++ branches/2.8.x/wb/framework/class.login.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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        backend
@@ -42,7 +14,7 @@
  * @filesource		$HeadURL$
  * @lastmodified    $Date$
  *
-*/
+ */
 
 // Stop this file from being accessed directly
 if(!defined('WB_URL')) {
@@ -54,6 +26,8 @@
 
 // Load the other required class files if they are not already loaded
 require_once(WB_PATH."/framework/class.admin.php");
+// Get WB version
+require_once(ADMIN_PATH.'/interface/version.php');
 
 class login extends admin {
 	function login($config_array) {
@@ -400,6 +374,8 @@
 											'MAX_PASSWORD_LEN' => $this->max_password_len,
 											'WB_URL' => WB_URL,
 											'THEME_URL' => THEME_URL,
+                                            'VERSION' => VERSION,
+                                            'REVISION' => REVISION,
 											'LANGUAGE' => strtolower(LANGUAGE),
 											'FORGOTTEN_DETAILS_APP' => $this->forgotten_details_app,
 											'TEXT_FORGOTTEN_DETAILS' => $TEXT['FORGOTTEN_DETAILS'],
Index: branches/2.8.x/wb/framework/class.wb.php
===================================================================
--- branches/2.8.x/wb/framework/class.wb.php	(revision 1276)
+++ branches/2.8.x/wb/framework/class.wb.php	(revision 1277)
@@ -1,36 +1,21 @@
 <?php
+/**
+ *
+ * @category        frontend
+ * @package         framework
+ * @author          WebsiteBaker Project
+ * @copyright       2004-2009, Ryan Djurovich
+ * @copyright       2009-2010, 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 4.3.4 and higher
+ * @version         $Id$
+ * @filesource		$HeadURL: $
+ * @lastmodified    $Date:  $
+ *
+ */
 
-// $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
-
-*/
-
-/*
-
-wb class
-
-This class is the basis for admin and frontend classes.
-
-*/
-
 // Include PHPLIB template class
 require_once(WB_PATH."/include/phplib/template.inc");
 
@@ -45,7 +30,7 @@
 	// performed when frontend or backend is loaded.
 	function wb() {
 	}
-	
+
 	// Check whether a page is visible or not.
 	// This will check page-visibility and user- and group-rights.
 	/* page_is_visible() returns
@@ -52,28 +37,37 @@
 		false: if page-visibility is 'none' or 'deleted', or page-vis. is 'registered' or 'private' and user isn't allowed to see the page.
 		true: if page-visibility is 'public' or 'hidden', or page-vis. is 'registered' or 'private' and user _is_ allowed to see the page.
 	*/
-	function page_is_visible($page) {
+	function page_is_visible($page)
+    {
 		$show_it = false; // shall we show the page?
 		$page_id = $page['page_id'];
 		$visibility = $page['visibility'];
 		$viewing_groups = $page['viewing_groups'];
 		$viewing_users = $page['viewing_users'];
+
 		// First check if visibility is 'none', 'deleted'
-		if($visibility == 'none') {
+		if($visibility == 'none')
+        {
 			return(false);
-		} elseif($visibility == 'deleted') {
+		} elseif($visibility == 'deleted')
+        {
 			return(false);
 		}
+
 		// Now check if visibility is 'hidden', 'private' or 'registered'
 		if($visibility == 'hidden') { // hidden: hide the menu-link, but show the page
 			$show_it = true;
-		} elseif($visibility == 'private' || $visibility == 'registered') {
+		} elseif($visibility == 'private' || $visibility == 'registered')
+        {
 			// Check if the user is logged in
-			if($this->is_authenticated() == true) {
+			if($this->is_authenticated() == true)
+            {
 				// Now check if the user has perms to view the page
 				$in_group = false;
-				foreach($this->get_groups_id() as $cur_gid){
-				    if(in_array($cur_gid, explode(',', $viewing_groups))) {
+				foreach($this->get_groups_id() as $cur_gid)
+                {
+				    if(in_array($cur_gid, explode(',', $viewing_groups)))
+                    {
 				        $in_group = true;
 				    }
 				}
@@ -93,15 +87,19 @@
 		return($show_it);
 	}
 	// Check if there is at least one active section on this page
-	function page_is_active($page) {
+	function page_is_active($page)
+    {
 		global $database;
 		$has_active_sections = false;
 		$page_id = $page['page_id'];
 		$now = time();
 		$query_sections = $database->query("SELECT publ_start,publ_end FROM ".TABLE_PREFIX."sections WHERE page_id = '$page_id'");
-		if($query_sections->numRows() != 0) {
-			while($section = $query_sections->fetchRow()) {
-				if($now<$section['publ_end'] && ($now>$section['publ_start'] || $section['publ_start']==0) || $now>$section['publ_start'] && $section['publ_end']==0) {
+		if($query_sections->numRows() != 0)
+        {
+			while($section = $query_sections->fetchRow())
+            {
+				if($now<$section['publ_end'] && ($now>$section['publ_start'] || $section['publ_start']==0) || $now>$section['publ_start'] && $section['publ_end']==0)
+                {
 					$has_active_sections = true;
 					break;
 				}
@@ -111,8 +109,10 @@
 	}
 
 	// Check whether we should show a page or not (for front-end)
-	function show_page($page) {
-		if($this->page_is_visible($page) && $this->page_is_active($page)) {
+	function show_page($page)
+    {
+		if($this->page_is_visible($page) && $this->page_is_active($page))
+        {
 			return true;
 		} else {
 			return false;
@@ -121,12 +121,14 @@
 
 	// Check if the user is already authenticated or not
 	function is_authenticated() {
-		if(isset($_SESSION['USER_ID']) AND $_SESSION['USER_ID'] != "" AND is_numeric($_SESSION['USER_ID'])) {
+		if(isset($_SESSION['USER_ID']) AND $_SESSION['USER_ID'] != "" AND is_numeric($_SESSION['USER_ID']))
+        {
 			return true;
 		} else {
 			return false;
 		}
 	}
+
 	// Modified addslashes function which takes into account magic_quotes
 	function add_slashes($input) {
 		if ( get_magic_quotes_gpc() || ( !is_string($input) ) ) {
Index: branches/2.8.x/wb/framework/initialize.php
===================================================================
--- branches/2.8.x/wb/framework/initialize.php	(revision 1276)
+++ branches/2.8.x/wb/framework/initialize.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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        framework
Index: branches/2.8.x/wb/framework/class.frontend.php
===================================================================
--- branches/2.8.x/wb/framework/class.frontend.php	(revision 1276)
+++ branches/2.8.x/wb/framework/class.frontend.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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        frontend
Index: branches/2.8.x/wb/framework/frontend.functions.php
===================================================================
--- branches/2.8.x/wb/framework/frontend.functions.php	(revision 1276)
+++ branches/2.8.x/wb/framework/frontend.functions.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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        frontend
Index: branches/2.8.x/wb/framework/functions.php
===================================================================
--- branches/2.8.x/wb/framework/functions.php	(revision 1276)
+++ branches/2.8.x/wb/framework/functions.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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        frontend
Index: branches/2.8.x/wb/modules/edit_module_files.php
===================================================================
--- branches/2.8.x/wb/modules/edit_module_files.php	(revision 1276)
+++ branches/2.8.x/wb/modules/edit_module_files.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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        backend
@@ -42,7 +14,7 @@
  * @filesource		$HeadURL$
  * @lastmodified    $Date$
  *
-*/
+ */
 
 // prevent this file from being accessed directly
 if(!(isset($_POST['page_id']) && isset($_POST['section_id']) && isset($_POST['action'])
Index: branches/2.8.x/wb/modules/backup/languages/NL.php
===================================================================
--- branches/2.8.x/wb/modules/backup/languages/NL.php	(revision 1276)
+++ branches/2.8.x/wb/modules/backup/languages/NL.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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
Index: branches/2.8.x/wb/modules/backup/languages/NO.php
===================================================================
--- branches/2.8.x/wb/modules/backup/languages/NO.php	(revision 1276)
+++ branches/2.8.x/wb/modules/backup/languages/NO.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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
@@ -42,7 +14,7 @@
  * @filesource		$HeadURL$
  * @lastmodified    $Date$
  *
-*/
+ */
 
 // text outputs
 $MOD_BACKUP['BACKUP_ALL_TABLES']	='Sikkerhetskopier alle tabellene i databsen';
Index: branches/2.8.x/wb/modules/backup/languages/EN.php
===================================================================
--- branches/2.8.x/wb/modules/backup/languages/EN.php	(revision 1276)
+++ branches/2.8.x/wb/modules/backup/languages/EN.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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
@@ -42,7 +14,7 @@
  * @filesource		$HeadURL$
  * @lastmodified    $Date$
  *
-*/
+ */
 
 // text outputs
 $MOD_BACKUP['BACKUP_ALL_TABLES'] 	= 	'Backup all tables in database';
Index: branches/2.8.x/wb/modules/backup/languages/DA.php
===================================================================
--- branches/2.8.x/wb/modules/backup/languages/DA.php	(revision 1276)
+++ branches/2.8.x/wb/modules/backup/languages/DA.php	(revision 1277)
@@ -1,36 +1,8 @@
 <?php
-/*
-*
-*                       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         backup
+ * @category        backup
+ * @package         language
  * @author          WebsiteBaker Project
  * @copyright       2004-2009, Ryan Djurovich
  * @copyright       2009-2010, Website Baker Org. e.V.
@@ -42,7 +14,7 @@
  * @filesource		$HeadURL$
  * @lastmodified    $Date$
  *
-*/
+ */
 
 // text outputs
 $MOD_BACKUP['BACKUP_ALL_TABLES'] = 'Tag backup af alle tabeller i databasen';
Index: branches/2.8.x/wb/modules/backup/languages/RU.php
===================================================================
--- branches/2.8.x/wb/modules/backup/languages/RU.php	(revision 1276)
+++ branches/2.8.x/wb/modules/backup/languages/RU.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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
@@ -42,7 +14,7 @@
  * @filesource		$HeadURL$
  * @lastmodified    $Date$
  *
-*/
+ */
 
 // text outputs
 $MOD_BACKUP['BACKUP_ALL_TABLES'] 	= 	'Backup &#1074;&#1089;&#1077;&#1093; &#1090;&#1072;&#1073;&#1083;&#1080;&#1094; &#1073;&#1072;&#1079;&#1099;';
Index: branches/2.8.x/wb/modules/backup/languages/FR.php
===================================================================
--- branches/2.8.x/wb/modules/backup/languages/FR.php	(revision 1276)
+++ branches/2.8.x/wb/modules/backup/languages/FR.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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
@@ -42,7 +14,7 @@
  * @filesource		$HeadURL$
  * @lastmodified    $Date$
  *
-*/
+ */
 
 //Module Description
 $module_description = 'Ce module permets de sauvegarder votre base de donn&eacute;es';
Index: branches/2.8.x/wb/modules/backup/languages/index.php
===================================================================
--- branches/2.8.x/wb/modules/backup/languages/index.php	(revision 1276)
+++ branches/2.8.x/wb/modules/backup/languages/index.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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
@@ -42,7 +14,7 @@
  * @filesource		$HeadURL$
  * @lastmodified    $Date$
  *
-*/
+ */
 
 header("Location: ../../../index.php");
 
Index: branches/2.8.x/wb/modules/backup/languages/DE.php
===================================================================
--- branches/2.8.x/wb/modules/backup/languages/DE.php	(revision 1276)
+++ branches/2.8.x/wb/modules/backup/languages/DE.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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
@@ -42,7 +14,7 @@
  * @filesource		$HeadURL$
  * @lastmodified    $Date$
  *
-*/
+ */
 
 // Deutsche Modulbeschreibung
 $module_description = 'Dieses Modul erm&ouml;glicht die Erstellung einer Datenbanksicherung.';
Index: branches/2.8.x/wb/modules/code/info.php
===================================================================
--- branches/2.8.x/wb/modules/code/info.php	(revision 1276)
+++ branches/2.8.x/wb/modules/code/info.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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
Index: branches/2.8.x/wb/modules/code/save.php
===================================================================
--- branches/2.8.x/wb/modules/code/save.php	(revision 1276)
+++ branches/2.8.x/wb/modules/code/save.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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
@@ -42,7 +14,7 @@
  * @filesource		$HeadURL$
  * @lastmodified    $Date$
  *
-*/
+ */
 
 require('../../config.php');
 
Index: branches/2.8.x/wb/modules/code/index.php
===================================================================
--- branches/2.8.x/wb/modules/code/index.php	(revision 1276)
+++ branches/2.8.x/wb/modules/code/index.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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
Index: branches/2.8.x/wb/modules/code/modify.php
===================================================================
--- branches/2.8.x/wb/modules/code/modify.php	(revision 1276)
+++ branches/2.8.x/wb/modules/code/modify.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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
@@ -42,7 +14,7 @@
  * @filesource		$HeadURL$
  * @lastmodified    $Date$
  *
-*/
+ */
 
 // Setup template object
 $template = new Template(WB_PATH.'/modules/code');
Index: branches/2.8.x/wb/modules/fckeditor/include.php
===================================================================
--- branches/2.8.x/wb/modules/fckeditor/include.php	(revision 1276)
+++ branches/2.8.x/wb/modules/fckeditor/include.php	(revision 1277)
@@ -1,32 +1,4 @@
 <?php
-/*
-*
-*                       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
@@ -42,7 +14,7 @@
  * @filesource		$HeadURL$
  * @lastmodified    $Date$
  *
-*/
+ */
 
 function reverse_htmlentities($mixed) {
 	$mixed = str_replace(array('&gt;','&lt;','&quot;','&amp;'), array('>','<','"','&'), $mixed);
Index: branches/2.8.x/wb/modules/fckeditor/install.php
===================================================================
--- branches/2.8.x/wb/modules/fckeditor/install.php	(nonexistent)
+++ branches/2.8.x/wb/modules/fckeditor/install.php	(revision 1277)
@@ -0,0 +1,19 @@
+<?php
+/**
+ *
+ * @category        modules
+ * @package         wysiwyg
+ * @author          WebsiteBaker Project
+ * @copyright       2004-2009, Ryan Djurovich
+ * @copyright       2009-2010, 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 4.3.4 and higher
+ * @version      	$Id$
+ * @filesource		$HeadURL$
+ * @lastmodified    $Date$
+ *
+ */
+
+?>
\ No newline at end of file

Property changes on: branches/2.8.x/wb/modules/fckeditor/install.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1,4 ##
+Id
+Revision
+HeadURL
+Date
\ No newline at end of property
Index: branches/2.8.x/wb/modules/news/install.php
===================================================================
--- branches/2.8.x/wb/modules/news/install.php	(revision 1276)
+++ branches/2.8.x/wb/modules/news/install.php	(revision 1277)
@@ -1,178 +1,174 @@
-<?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
-
-*/
-
-if(defined('WB_URL')) {
-	
-	// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_posts`");
-	$mod_news = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_news_posts` ( '
-					 . '`post_id` INT NOT NULL AUTO_INCREMENT,'
-					 . '`section_id` INT NOT NULL DEFAULT \'0\','
-					 . '`page_id` INT NOT NULL DEFAULT \'0\','
-					 . '`group_id` INT NOT NULL DEFAULT \'0\','
-					 . '`active` INT NOT NULL DEFAULT \'0\','
-					 . '`position` INT NOT NULL DEFAULT \'0\','
-					 . '`title` VARCHAR(255) NOT NULL DEFAULT \'\','
-					 . '`link` TEXT NOT NULL ,'
-					 . '`content_short` TEXT NOT NULL ,'
-					 . '`content_long` TEXT NOT NULL ,'
-					 . '`commenting` VARCHAR(7) NOT NULL DEFAULT \'\','
-					 . '`published_when` INT NOT NULL DEFAULT \'0\','
-					 . '`published_until` INT NOT NULL DEFAULT \'0\','
-					 . '`posted_when` INT NOT NULL DEFAULT \'0\','
-					 . '`posted_by` INT NOT NULL DEFAULT \'0\','
-					 . 'PRIMARY KEY (post_id)'
-					 . ' )';
-	$database->query($mod_news);
-	
-	// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_groups`");
-	$mod_news = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_news_groups` ( '
-					 . '`group_id` INT NOT NULL AUTO_INCREMENT,'
-					 . '`section_id` INT NOT NULL DEFAULT \'0\','
-					 . '`page_id` INT NOT NULL DEFAULT \'0\','
-					 . '`active` INT NOT NULL DEFAULT \'0\','
-					 . '`position` INT NOT NULL DEFAULT \'0\','
-					 . '`title` VARCHAR(255) NOT NULL DEFAULT \'\','
-					 . 'PRIMARY KEY (group_id)'
-                . ' )';
-	$database->query($mod_news);
-	
-	// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_comments`");
-	$mod_news = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_news_comments` ( '
-					 . '`comment_id` INT NOT NULL AUTO_INCREMENT,'
-					 . '`section_id` INT NOT NULL DEFAULT \'0\','
-					 . '`page_id` INT NOT NULL DEFAULT \'0\','
-					 . '`post_id` INT NOT NULL DEFAULT \'0\','
-					 . '`title` VARCHAR(255) NOT NULL DEFAULT \'\','
-					 . '`comment` TEXT NOT NULL ,'
-		   	    . '`commented_when` INT NOT NULL DEFAULT \'0\','
-					 . '`commented_by` INT NOT NULL DEFAULT \'0\','
-					 . 'PRIMARY KEY (comment_id)'
-                . ' )';
-	$database->query($mod_news);
-	
-	// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_settings`");
-	$mod_news = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_news_settings` ( '
-					 . '`section_id` INT NOT NULL DEFAULT \'0\','
-					 . '`page_id` INT NOT NULL DEFAULT \'0\','
-					 . '`header` TEXT NOT NULL ,'
-					 . '`post_loop` TEXT NOT NULL ,'
-					 . '`footer` TEXT NOT NULL ,'
-					 . '`posts_per_page` INT NOT NULL DEFAULT \'0\','
-					 . '`post_header` TEXT NOT NULL,'
-					 . '`post_footer` TEXT NOT NULL,'
-					 . '`comments_header` TEXT NOT NULL,'
-					 . '`comments_loop` TEXT NOT NULL,'
-					 . '`comments_footer` TEXT NOT NULL,'
-					 . '`comments_page` TEXT NOT NULL,'
-					 . '`commenting` VARCHAR(7) NOT NULL DEFAULT \'\','
-					 . '`resize` INT NOT NULL DEFAULT \'0\','
-					 . ' `use_captcha` INT NOT NULL DEFAULT \'0\','
-					 . 'PRIMARY KEY (section_id)'
-                . ' )';
-	$database->query($mod_news);
-		
-    $mod_search = "SELECT * FROM ".TABLE_PREFIX."search  WHERE value = 'mod_wysiwyg_query'";
-    $database->query($mod_search);
-    $insert_search = $database->is_error();
-
-    if( $insert_search )
-    {
-    	// 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', 'news', '$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_news_posts, [TP]mod_news_groups, [TP]mod_news_comments, [TP]mod_news_settings, [TP]pages WHERE ";
-    	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_start', '$query_start_code', 'news')");
-    	// Query body
-    	$query_body_code = "
-    	[TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.title LIKE \'%[STRING]%\'
-    	OR [TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.content_short LIKE \'%[STRING]%\'
-    	OR [TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.content_long LIKE \'%[STRING]%\'
-    	OR [TP]pages.page_id = [TP]mod_news_comments.page_id AND [TP]mod_news_comments.title LIKE \'%[STRING]%\'
-    	OR [TP]pages.page_id = [TP]mod_news_comments.page_id AND [TP]mod_news_comments.comment LIKE \'%[STRING]%\'
-    	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.header LIKE \'%[STRING]%\'
-    	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.footer LIKE \'%[STRING]%\'
-    	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.post_header LIKE \'%[STRING]%\'
-    	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.post_footer LIKE \'%[STRING]%\'
-    	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.comments_header LIKE \'%[STRING]%\'
-    	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.comments_footer LIKE \'%[STRING]%\'";
-    	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_body', '$query_body_code', 'news')");
-    	// Query end
-    	$query_end_code = "";
-    	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_end', '$query_end_code', 'news')");
-
-    	// Insert blank row (there needs to be at least on row for the search to work)
-    	$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_posts (section_id,page_id) VALUES ('0', '0')");
-    	$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_groups (section_id,page_id) VALUES ('0', '0')");
-    	$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_comments (section_id,page_id) VALUES ('0', '0')");
-    	$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_settings (section_id,page_id) VALUES ('0', '0')");
-    }
-
-	// Make news post access files dir
-	require_once(WB_PATH.'/framework/functions.php');
-	if(make_dir(WB_PATH.PAGES_DIRECTORY.'/posts')) {
-		// Add a index.php file to prevent directory spoofing
-		$content = ''.
-"<?php
-
-/*
-
- 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: ../');
-?>";
-		$handle = fopen(WB_PATH.PAGES_DIRECTORY.'/posts/index.php', 'w');
-		fwrite($handle, $content);
-		fclose($handle);
-		change_mode(WB_PATH.PAGES_DIRECTORY.'/posts/index.php', 'file');
-	}
-};
-
+<?php
+/**
+ *
+ * @category        modules
+ * @package         news
+ * @author          WebsiteBaker Project
+ * @copyright       2004-2009, Ryan Djurovich
+ * @copyright       2009-2010, 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 4.3.4 and higher
+ * @version      	$Id$
+ * @filesource		$HeadURL$
+ * @lastmodified    $Date$
+ *
+ */
+
+if(defined('WB_URL'))
+{
+	
+	// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_posts`");
+	$mod_news = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_news_posts` ( '
+					 . '`post_id` INT NOT NULL AUTO_INCREMENT,'
+					 . '`section_id` INT NOT NULL DEFAULT \'0\','
+					 . '`page_id` INT NOT NULL DEFAULT \'0\','
+					 . '`group_id` INT NOT NULL DEFAULT \'0\','
+					 . '`active` INT NOT NULL DEFAULT \'0\','
+					 . '`position` INT NOT NULL DEFAULT \'0\','
+					 . '`title` VARCHAR(255) NOT NULL DEFAULT \'\','
+					 . '`link` TEXT NOT NULL ,'
+					 . '`content_short` TEXT NOT NULL ,'
+					 . '`content_long` TEXT NOT NULL ,'
+					 . '`commenting` VARCHAR(7) NOT NULL DEFAULT \'\','
+					 . '`published_when` INT NOT NULL DEFAULT \'0\','
+					 . '`published_until` INT NOT NULL DEFAULT \'0\','
+					 . '`posted_when` INT NOT NULL DEFAULT \'0\','
+					 . '`posted_by` INT NOT NULL DEFAULT \'0\','
+					 . 'PRIMARY KEY (post_id)'
+					 . ' )';
+	$database->query($mod_news);
+	
+	// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_groups`");
+	$mod_news = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_news_groups` ( '
+					 . '`group_id` INT NOT NULL AUTO_INCREMENT,'
+					 . '`section_id` INT NOT NULL DEFAULT \'0\','
+					 . '`page_id` INT NOT NULL DEFAULT \'0\','
+					 . '`active` INT NOT NULL DEFAULT \'0\','
+					 . '`position` INT NOT NULL DEFAULT \'0\','
+					 . '`title` VARCHAR(255) NOT NULL DEFAULT \'\','
+					 . 'PRIMARY KEY (group_id)'
+                . ' )';
+	$database->query($mod_news);
+	
+	// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_comments`");
+	$mod_news = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_news_comments` ( '
+					 . '`comment_id` INT NOT NULL AUTO_INCREMENT,'
+					 . '`section_id` INT NOT NULL DEFAULT \'0\','
+					 . '`page_id` INT NOT NULL DEFAULT \'0\','
+					 . '`post_id` INT NOT NULL DEFAULT \'0\','
+					 . '`title` VARCHAR(255) NOT NULL DEFAULT \'\','
+					 . '`comment` TEXT NOT NULL ,'
+		   	    . '`commented_when` INT NOT NULL DEFAULT \'0\','
+					 . '`commented_by` INT NOT NULL DEFAULT \'0\','
+					 . 'PRIMARY KEY (comment_id)'
+                . ' )';
+
+	$database->query($mod_news);
+	
+	// $database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_settings`");
+	$mod_news = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_news_settings` ( '
+					 . '`section_id` INT NOT NULL DEFAULT \'0\','
+					 . '`page_id` INT NOT NULL DEFAULT \'0\','
+					 . '`header` TEXT NOT NULL ,'
+					 . '`post_loop` TEXT NOT NULL ,'
+					 . '`footer` TEXT NOT NULL ,'
+					 . '`posts_per_page` INT NOT NULL DEFAULT \'0\','
+					 . '`post_header` TEXT NOT NULL,'
+					 . '`post_footer` TEXT NOT NULL,'
+					 . '`comments_header` TEXT NOT NULL,'
+					 . '`comments_loop` TEXT NOT NULL,'
+					 . '`comments_footer` TEXT NOT NULL,'
+					 . '`comments_page` TEXT NOT NULL,'
+					 . '`commenting` VARCHAR(7) NOT NULL DEFAULT \'\','
+					 . '`resize` INT NOT NULL DEFAULT \'0\','
+					 . ' `use_captcha` INT NOT NULL DEFAULT \'0\','
+					 . 'PRIMARY KEY (section_id)'
+                . ' )';
+
+	$database->query($mod_news);
+		
+    $mod_search = "SELECT * FROM ".TABLE_PREFIX."search  WHERE value = 'mod_wysiwyg_query'";
+    $database->query($mod_search);
+    $insert_search = $database->is_error();
+
+    if( $insert_search )
+    {
+    	// 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', 'news', '$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_news_posts, [TP]mod_news_groups, [TP]mod_news_comments, [TP]mod_news_settings, [TP]pages WHERE ";
+    	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_start', '$query_start_code', 'news')");
+    	// Query body
+    	$query_body_code = "
+    	[TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.title LIKE \'%[STRING]%\'
+    	OR [TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.content_short LIKE \'%[STRING]%\'
+    	OR [TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.content_long LIKE \'%[STRING]%\'
+    	OR [TP]pages.page_id = [TP]mod_news_comments.page_id AND [TP]mod_news_comments.title LIKE \'%[STRING]%\'
+    	OR [TP]pages.page_id = [TP]mod_news_comments.page_id AND [TP]mod_news_comments.comment LIKE \'%[STRING]%\'
+    	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.header LIKE \'%[STRING]%\'
+    	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.footer LIKE \'%[STRING]%\'
+    	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.post_header LIKE \'%[STRING]%\'
+    	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.post_footer LIKE \'%[STRING]%\'
+    	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.comments_header LIKE \'%[STRING]%\'
+    	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.comments_footer LIKE \'%[STRING]%\'";
+    	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_body', '$query_body_code', 'news')");
+    	// Query end
+    	$query_end_code = "";
+    	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_end', '$query_end_code', 'news')");
+
+    	// Insert blank row (there needs to be at least on row for the search to work)
+    	$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_posts (section_id,page_id) VALUES ('0', '0')");
+    	$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_groups (section_id,page_id) VALUES ('0', '0')");
+    	$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_comments (section_id,page_id) VALUES ('0', '0')");
+    	$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_settings (section_id,page_id) VALUES ('0', '0')");
+    }
+
+	// Make news post access files dir
+	require_once(WB_PATH.'/framework/functions.php');
+	if(make_dir(WB_PATH.PAGES_DIRECTORY.'/posts')) {
+		// Add a index.php file to prevent directory spoofing
+		$content = ''.
+"<?php
+
+/*
+
+ 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: ../');
+?>";
+		$handle = fopen(WB_PATH.PAGES_DIRECTORY.'/posts/index.php', 'w');
+		fwrite($handle, $content);
+		fclose($handle);
+		change_mode(WB_PATH.PAGES_DIRECTORY.'/posts/index.php', 'file');
+	}
+};
+
 ?>
\ No newline at end of file

Property changes on: branches/2.8.x/wb/modules/news/install.php
___________________________________________________________________
Modified: svn:keywords
## -1 +1,4 ##
-Id
\ No newline at end of property
+Id
+Revision
+HeadURL
+Date
\ No newline at end of property
