Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1261)
+++ branches/2.8.x/CHANGELOG	(revision 1262)
@@ -12,6 +12,8 @@
  
 ------------------------------------- 2.8.1 -------------------------------------
 21-Jan-2010 Dietmar Woellbrink (Luisehahne)
+!	Beginning header information update
+21-Jan-2010 Dietmar Woellbrink (Luisehahne)
 #	fix login_form.php sometimes produce javascript errors in IE
 21-Jan-2010 Dietmar Woellbrink (Luisehahne)
 #	fix more small css-errors in WB Backend (thanks to Ruebenwurzel)
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1261)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1262)
@@ -55,6 +55,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', '1261');
+if(!defined('REVISION')) define('REVISION', '1262');
 
 ?>
\ No newline at end of file
Index: branches/2.8.x/wb/account/logout.php
===================================================================
--- branches/2.8.x/wb/account/logout.php	(revision 1261)
+++ branches/2.8.x/wb/account/logout.php	(revision 1262)
@@ -1,49 +1,76 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2009, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-require("../config.php");
-
-if(isset($_COOKIE['REMEMBER_KEY'])) {
-	setcookie('REMEMBER_KEY', '', time()-3600, '/');
-}
-
-$_SESSION['USER_ID'] = null;
-$_SESSION['GROUP_ID'] = null;
-$_SESSION['GROUPS_ID'] = null;
-$_SESSION['USERNAME'] = null;
-$_SESSION['PAGE_PERMISSIONS'] = null;
-$_SESSION['SYSTEM_PERMISSIONS'] = null;
-$_SESSION = array();
-session_unset();
-unset($_COOKIE[session_name()]);
-session_destroy();
-
-if(INTRO_PAGE) {
-	header('Location: '.WB_URL.PAGES_DIRECTORY.'/index.php');
-} else {
-	header('Location: '.WB_URL.'/index.php');
-}
-
+<?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
+ * @package         account
+ * @author          Ryan Djurovich
+ * @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
+ * @lastmodified    $Date$
+ *
+ */
+
+require("../config.php");
+
+if(isset($_COOKIE['REMEMBER_KEY'])) {
+	setcookie('REMEMBER_KEY', '', time()-3600, '/');
+}
+
+$_SESSION['USER_ID'] = null;
+$_SESSION['GROUP_ID'] = null;
+$_SESSION['GROUPS_ID'] = null;
+$_SESSION['USERNAME'] = null;
+$_SESSION['PAGE_PERMISSIONS'] = null;
+$_SESSION['SYSTEM_PERMISSIONS'] = null;
+$_SESSION = array();
+session_unset();
+unset($_COOKIE[session_name()]);
+session_destroy();
+
+if(INTRO_PAGE) {
+	header('Location: '.WB_URL.PAGES_DIRECTORY.'/index.php');
+} else {
+	header('Location: '.WB_URL.'/index.php');
+}
+
 ?>
\ No newline at end of file

Property changes on: branches/2.8.x/wb/account/logout.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/account/login_form.php
===================================================================
--- branches/2.8.x/wb/account/login_form.php	(revision 1261)
+++ branches/2.8.x/wb/account/login_form.php	(revision 1262)
@@ -1,27 +1,54 @@
 <?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
-
+*
+*                       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
+ * @package         account
+ * @author          Ryan Djurovich
+ * @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
+ * @lastmodified    $Date$
+ *
+ */
 
 if(!defined('WB_URL')) die(header('Location: ../../index.php'));
 

Property changes on: branches/2.8.x/wb/account/login_form.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/account/forgot.php
===================================================================
--- branches/2.8.x/wb/account/forgot.php	(revision 1261)
+++ branches/2.8.x/wb/account/forgot.php	(revision 1262)
@@ -1,59 +1,86 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2009, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-require_once('../config.php');
-
-// Required page details
-$page_id = 0;
-$page_description = '';
-$page_keywords = '';
-define('PAGE_ID', 0);
-define('ROOT_PARENT', 0);
-define('PARENT', 0);
-define('LEVEL', 0);
-define('PAGE_TITLE', $MENU['FORGOT']);
-define('MENU_TITLE', $MENU['FORGOT']);
-define('VISIBILITY', 'public');
-
-if(!FRONTEND_LOGIN) {
-	if(INTRO_PAGE) {
-		header('Location: '.WB_URL.PAGES_DIRECTORY.'/index.php');
-		exit(0);
-	} else {
-		header('Location: '.WB_URL.'/index.php');
-		exit(0);
-	}
-}
-
-// Set the page content include file
-define('PAGE_CONTENT', WB_PATH.'/account/forgot_form.php');
-
-// Set auto authentication to false
-$auto_auth = false;
-
-// Include the index (wrapper) file
-require(WB_PATH.'/index.php');
-
+<?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
+ * @package         account
+ * @author          Ryan Djurovich
+ * @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
+ * @lastmodified    $Date$
+ *
+ */
+
+require_once('../config.php');
+
+// Required page details
+$page_id = 0;
+$page_description = '';
+$page_keywords = '';
+define('PAGE_ID', 0);
+define('ROOT_PARENT', 0);
+define('PARENT', 0);
+define('LEVEL', 0);
+define('PAGE_TITLE', $MENU['FORGOT']);
+define('MENU_TITLE', $MENU['FORGOT']);
+define('VISIBILITY', 'public');
+
+if(!FRONTEND_LOGIN) {
+	if(INTRO_PAGE) {
+		header('Location: '.WB_URL.PAGES_DIRECTORY.'/index.php');
+		exit(0);
+	} else {
+		header('Location: '.WB_URL.'/index.php');
+		exit(0);
+	}
+}
+
+// Set the page content include file
+define('PAGE_CONTENT', WB_PATH.'/account/forgot_form.php');
+
+// Set auto authentication to false
+$auto_auth = false;
+
+// Include the index (wrapper) file
+require(WB_PATH.'/index.php');
+
 ?>
\ No newline at end of file

Property changes on: branches/2.8.x/wb/account/forgot.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/account/preferences.php
===================================================================
--- branches/2.8.x/wb/account/preferences.php	(revision 1261)
+++ branches/2.8.x/wb/account/preferences.php	(revision 1262)
@@ -1,72 +1,99 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2009, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-require_once('../config.php');
-
-if(!FRONTEND_LOGIN) {
-	if(INTRO_PAGE) {
-		header('Location: '.WB_URL.PAGES_DIRECTORY.'/index.php');
-		exit(0);
-	} else {
-		header('Location: '.WB_URL.'/index.php');
-		exit(0);
-	}
-}
-
-require_once(WB_PATH.'/framework/class.wb.php');
-$wb_inst = new wb();
-if ($wb_inst->is_authenticated()==false) {
-	header('Location: '.WB_URL.'/account/login.php');
-	exit(0);
-}
-
-// Required page details
-$page_id = 0;
-$page_description = '';
-$page_keywords = '';
-define('PAGE_ID', 0);
-define('ROOT_PARENT', 0);
-define('PARENT', 0);
-define('LEVEL', 0);
-define('PAGE_TITLE', $MENU['PREFERENCES']);
-define('MENU_TITLE', $MENU['PREFERENCES']);
-define('MODULE', '');
-define('VISIBILITY', 'public');
-
-// Set the page content include file
-if(isset($_POST['current_password']) AND isset($_POST['new_password'])) {
-	define('PAGE_CONTENT', WB_PATH.'/account/password.php');
-} elseif(isset($_POST['current_password']) AND isset($_POST['email'])) {
-	define('PAGE_CONTENT', WB_PATH.'/account/email.php');
-} elseif(isset($_POST['display_name'])) {
-	define('PAGE_CONTENT', WB_PATH.'/account/details.php');
-} else {
-	define('PAGE_CONTENT', WB_PATH.'/account/preferences_form.php');
-}
-
-// Include the index (wrapper) file
-require(WB_PATH.'/index.php');
-
+<?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
+ * @package         account
+ * @author          Ryan Djurovich
+ * @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
+ * @lastmodified    $Date$
+ *
+ */
+
+require_once('../config.php');
+
+if(!FRONTEND_LOGIN) {
+	if(INTRO_PAGE) {
+		header('Location: '.WB_URL.PAGES_DIRECTORY.'/index.php');
+		exit(0);
+	} else {
+		header('Location: '.WB_URL.'/index.php');
+		exit(0);
+	}
+}
+
+require_once(WB_PATH.'/framework/class.wb.php');
+$wb_inst = new wb();
+if ($wb_inst->is_authenticated()==false) {
+	header('Location: '.WB_URL.'/account/login.php');
+	exit(0);
+}
+
+// Required page details
+$page_id = 0;
+$page_description = '';
+$page_keywords = '';
+define('PAGE_ID', 0);
+define('ROOT_PARENT', 0);
+define('PARENT', 0);
+define('LEVEL', 0);
+define('PAGE_TITLE', $MENU['PREFERENCES']);
+define('MENU_TITLE', $MENU['PREFERENCES']);
+define('MODULE', '');
+define('VISIBILITY', 'public');
+
+// Set the page content include file
+if(isset($_POST['current_password']) AND isset($_POST['new_password'])) {
+	define('PAGE_CONTENT', WB_PATH.'/account/password.php');
+} elseif(isset($_POST['current_password']) AND isset($_POST['email'])) {
+	define('PAGE_CONTENT', WB_PATH.'/account/email.php');
+} elseif(isset($_POST['display_name'])) {
+	define('PAGE_CONTENT', WB_PATH.'/account/details.php');
+} else {
+	define('PAGE_CONTENT', WB_PATH.'/account/preferences_form.php');
+}
+
+// Include the index (wrapper) file
+require(WB_PATH.'/index.php');
+
 ?>
\ No newline at end of file

Property changes on: branches/2.8.x/wb/account/preferences.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/account/password.php
===================================================================
--- branches/2.8.x/wb/account/password.php	(revision 1261)
+++ branches/2.8.x/wb/account/password.php	(revision 1262)
@@ -1,69 +1,96 @@
-<?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')) {
-	header('Location: ../index.php');
-	exit(0);
-}
-
-// Get the values entered
-$current_password = $_POST['current_password'];
-$new_password = $_POST['new_password'];
-$new_password2 = $_POST['new_password2'];
-
-// Create a javascript back link
-$js_back = "javascript: history.go(-1);";
-
-// Get existing password
-$database = new database();
-$query = "SELECT user_id FROM ".TABLE_PREFIX."users WHERE user_id = '".$wb->get_user_id()."' AND password = '".md5($current_password)."'";
-$results = $database->query($query);
-
-// Validate values
-if($results->numRows() == 0) {
-	$wb->print_error($MESSAGE['PREFERENCES']['CURRENT_PASSWORD_INCORRECT'], $js_back, false);
-}
-if(strlen($new_password) < 3) {
-	$wb->print_error($MESSAGE['USERS']['PASSWORD_TOO_SHORT'], $js_back, false);
-}
-if($new_password != $new_password2) {
-	$wb->print_error($MESSAGE['USERS']['PASSWORD_MISMATCH'], $js_back, false);
-}
-
-// MD5 the password
-$md5_password = md5($new_password);
-
-// Update the database
-$database = new database();
-$query = "UPDATE ".TABLE_PREFIX."users SET password = '$md5_password' WHERE user_id = '".$wb->get_user_id()."'";
-$database->query($query);
-if($database->is_error()) {
-	$wb->print_error($database->get_error, 'index.php', false);
-} else {
-	$wb->print_success($MESSAGE['PREFERENCES']['PASSWORD_CHANGED'], WB_URL.'/account/preferences.php');
-}
-
-
+<?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
+ * @package         account
+ * @author          Ryan Djurovich
+ * @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
+ * @lastmodified    $Date$
+ *
+ */
+
+if(!defined('WB_URL')) {
+	header('Location: ../index.php');
+	exit(0);
+}
+
+// Get the values entered
+$current_password = $_POST['current_password'];
+$new_password = $_POST['new_password'];
+$new_password2 = $_POST['new_password2'];
+
+// Create a javascript back link
+$js_back = "javascript: history.go(-1);";
+
+// Get existing password
+$database = new database();
+$query = "SELECT user_id FROM ".TABLE_PREFIX."users WHERE user_id = '".$wb->get_user_id()."' AND password = '".md5($current_password)."'";
+$results = $database->query($query);
+
+// Validate values
+if($results->numRows() == 0) {
+	$wb->print_error($MESSAGE['PREFERENCES']['CURRENT_PASSWORD_INCORRECT'], $js_back, false);
+}
+if(strlen($new_password) < 3) {
+	$wb->print_error($MESSAGE['USERS']['PASSWORD_TOO_SHORT'], $js_back, false);
+}
+if($new_password != $new_password2) {
+	$wb->print_error($MESSAGE['USERS']['PASSWORD_MISMATCH'], $js_back, false);
+}
+
+// MD5 the password
+$md5_password = md5($new_password);
+
+// Update the database
+$database = new database();
+$query = "UPDATE ".TABLE_PREFIX."users SET password = '$md5_password' WHERE user_id = '".$wb->get_user_id()."'";
+$database->query($query);
+if($database->is_error()) {
+	$wb->print_error($database->get_error, 'index.php', false);
+} else {
+	$wb->print_success($MESSAGE['PREFERENCES']['PASSWORD_CHANGED'], WB_URL.'/account/preferences.php');
+}
+
+
 ?>
\ No newline at end of file

Property changes on: branches/2.8.x/wb/account/password.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/account/forgot_form.php
===================================================================
--- branches/2.8.x/wb/account/forgot_form.php	(revision 1261)
+++ branches/2.8.x/wb/account/forgot_form.php	(revision 1262)
@@ -1,27 +1,54 @@
 <?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
-
+*
+*                       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
+ * @package         account
+ * @author          Ryan Djurovich
+ * @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
+ * @lastmodified    $Date$
+ *
+ */
 
 if(!defined('WB_URL')) {
 	header('Location: ../pages/index.php');

Property changes on: branches/2.8.x/wb/account/forgot_form.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/account/preferences_form.php
===================================================================
--- branches/2.8.x/wb/account/preferences_form.php	(revision 1261)
+++ branches/2.8.x/wb/account/preferences_form.php	(revision 1262)
@@ -1,39 +1,14 @@
 <?php
-
-/****************************************************************************
-* SVN Version information:
+/*
 *
-* $Id$
+*                       About WebsiteBaker
 *
-*****************************************************************************
-*
-*****************************************************************************
-*                          WebsiteBaker
-*
-* WebsiteBaker Project <http://www.websitebaker2.org/>
-* Copyright (C) 2009, Website Baker Org. e.V.
-*         http://start.websitebaker2.org/impressum-datenschutz.php
-* Copyright (C) 2004-2009, Ryan Djurovich
-*
-*                        About WebsiteBaker
-*
 * Website Baker is a PHP-based Content Management System (CMS)
 * designed with one goal in mind: to enable its users to produce websites
 * with ease.
 *
-*****************************************************************************
+*                       LICENSE INFORMATION
 *
-*****************************************************************************
-*                   WebsiteBaker Extra Information (where needed)
-*
-* @author       : Ryan Djurovich, stefan, Matthias Gallas, Manuel Lang
-* @platform     : WebsiteBaker 2.8
-*
-*****************************************************************************
-*
-*****************************************************************************
-*                        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
@@ -47,7 +22,33 @@
 * 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
+ * @package         account
+ * @author          Ryan Djurovich
+ * @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
+ * @lastmodified    $Date$
+ *
+ */
 
 if(!defined('WB_URL')) die(header('Location: ../../index.php'));
 

Property changes on: branches/2.8.x/wb/account/preferences_form.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/account/details.php
===================================================================
--- branches/2.8.x/wb/account/details.php	(revision 1261)
+++ branches/2.8.x/wb/account/details.php	(revision 1262)
@@ -1,103 +1,104 @@
-<?php
-
-/****************************************************************************
-* SVN Version information:
-*
-* $Id$
-*
-*****************************************************************************
-*
-*****************************************************************************
-*                          WebsiteBaker
-*
-* WebsiteBaker Project <http://www.websitebaker2.org/>
-* Copyright (C) 2009, Website Baker Org. e.V.
-*         http://start.websitebaker2.org/impressum-datenschutz.php
-* Copyright (C) 2004-2009, Ryan Djurovich
-*
-*                        About WebsiteBaker
-*
-* Website Baker is a PHP-based Content Management System (CMS)
-* designed with one goal in mind: to enable its users to produce websites
-* with ease.
-*
-*****************************************************************************
-*
-*****************************************************************************
-*                   WebsiteBaker Extra Information
-*
-* @author       : Ryan Djurovich, stefan, Matthias Gallas, thorn, Manuel Lang
-* @platform     : WebsiteBaker 2.8
-*
-*****************************************************************************
-*
-*****************************************************************************
-*                        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.
-*****************************************************************************/
-
-if(!defined('WB_URL')) {
-	header('Location: ../pages/index.php');
-	exit(0);
-}
-
-// Get entered values
-$display_name = $wb->add_slashes(strip_tags($wb->get_post('display_name')));
-$language = $wb->get_post_escaped('language');
-$timezone = $wb->get_post_escaped('timezone')*60*60;
-$date_format = $wb->get_post_escaped('date_format');
-$time_format = $wb->get_post_escaped('time_format');
-
-// Create a javascript back link
-$js_back = "javascript: history.go(-1);";
-
-// Update the database
-$database = new database();
-$query = "UPDATE ".TABLE_PREFIX."users SET display_name = '$display_name', language = '$language', timezone = '$timezone', date_format = '$date_format', time_format = '$time_format' WHERE user_id = '".$wb->get_user_id()."'";
-$database->query($query);
-if($database->is_error()) {
-	$wb->print_error($database->get_error,'index.php',false);
-} else {
-	$wb->print_success($MESSAGE['PREFERENCES']['DETAILS_SAVED'], WB_URL.'/account/preferences.php');
-	$_SESSION['DISPLAY_NAME'] = $display_name;
-	$_SESSION['LANGUAGE'] = $language;
-	// Update date format
-	if($date_format != '') {
-		$_SESSION['DATE_FORMAT'] = $date_format;
-		if(isset($_SESSION['USE_DEFAULT_DATE_FORMAT'])) { unset($_SESSION['USE_DEFAULT_DATE_FORMAT']); }
-	} else {
-		$_SESSION['USE_DEFAULT_DATE_FORMAT'] = true;
-		if(isset($_SESSION['DATE_FORMAT'])) { unset($_SESSION['DATE_FORMAT']); }
-	}
-	// Update time format
-	if($time_format != '') {
-		$_SESSION['TIME_FORMAT'] = $time_format;
-		if(isset($_SESSION['USE_DEFAULT_TIME_FORMAT'])) { unset($_SESSION['USE_DEFAULT_TIME_FORMAT']); }
-	} else {
-		$_SESSION['USE_DEFAULT_TIME_FORMAT'] = true;
-		if(isset($_SESSION['TIME_FORMAT'])) { unset($_SESSION['TIME_FORMAT']); }
-	}
-	// Update timezone
-	if($timezone != '-72000') {
-		$_SESSION['TIMEZONE'] = $timezone;
-		if(isset($_SESSION['USE_DEFAULT_TIMEZONE'])) { unset($_SESSION['USE_DEFAULT_TIMEZONE']); }
-	} else {
-		$_SESSION['USE_DEFAULT_TIMEZONE'] = true;
-		if(isset($_SESSION['TIMEZONE'])) { unset($_SESSION['TIMEZONE']); }
-	}
-}
-
+<?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
+ * @package         account
+ * @author          Ryan Djurovich
+ * @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
+ * @lastmodified    $Date$
+ *
+ */
+
+if(!defined('WB_URL')) {
+	header('Location: ../pages/index.php');
+	exit(0);
+}
+
+// Get entered values
+$display_name = $wb->add_slashes(strip_tags($wb->get_post('display_name')));
+$language = $wb->get_post_escaped('language');
+$timezone = $wb->get_post_escaped('timezone')*60*60;
+$date_format = $wb->get_post_escaped('date_format');
+$time_format = $wb->get_post_escaped('time_format');
+
+// Create a javascript back link
+$js_back = "javascript: history.go(-1);";
+
+// Update the database
+$database = new database();
+$query = "UPDATE ".TABLE_PREFIX."users SET display_name = '$display_name', language = '$language', timezone = '$timezone', date_format = '$date_format', time_format = '$time_format' WHERE user_id = '".$wb->get_user_id()."'";
+$database->query($query);
+if($database->is_error()) {
+	$wb->print_error($database->get_error,'index.php',false);
+} else {
+	$wb->print_success($MESSAGE['PREFERENCES']['DETAILS_SAVED'], WB_URL.'/account/preferences.php');
+	$_SESSION['DISPLAY_NAME'] = $display_name;
+	$_SESSION['LANGUAGE'] = $language;
+	// Update date format
+	if($date_format != '') {
+		$_SESSION['DATE_FORMAT'] = $date_format;
+		if(isset($_SESSION['USE_DEFAULT_DATE_FORMAT'])) { unset($_SESSION['USE_DEFAULT_DATE_FORMAT']); }
+	} else {
+		$_SESSION['USE_DEFAULT_DATE_FORMAT'] = true;
+		if(isset($_SESSION['DATE_FORMAT'])) { unset($_SESSION['DATE_FORMAT']); }
+	}
+	// Update time format
+	if($time_format != '') {
+		$_SESSION['TIME_FORMAT'] = $time_format;
+		if(isset($_SESSION['USE_DEFAULT_TIME_FORMAT'])) { unset($_SESSION['USE_DEFAULT_TIME_FORMAT']); }
+	} else {
+		$_SESSION['USE_DEFAULT_TIME_FORMAT'] = true;
+		if(isset($_SESSION['TIME_FORMAT'])) { unset($_SESSION['TIME_FORMAT']); }
+	}
+	// Update timezone
+	if($timezone != '-72000') {
+		$_SESSION['TIMEZONE'] = $timezone;
+		if(isset($_SESSION['USE_DEFAULT_TIMEZONE'])) { unset($_SESSION['USE_DEFAULT_TIMEZONE']); }
+	} else {
+		$_SESSION['USE_DEFAULT_TIMEZONE'] = true;
+		if(isset($_SESSION['TIMEZONE'])) { unset($_SESSION['TIMEZONE']); }
+	}
+}
+
 ?>
\ No newline at end of file

Property changes on: branches/2.8.x/wb/account/details.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/account/signup.php
===================================================================
--- branches/2.8.x/wb/account/signup.php	(revision 1261)
+++ branches/2.8.x/wb/account/signup.php	(revision 1262)
@@ -1,83 +1,110 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2009, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-require_once('../config.php');
-
-if(!is_numeric(FRONTEND_SIGNUP)) {
-	if(INTRO_PAGE) {
-		header('Location: '.WB_URL.PAGES_DIRECTORY.'/index.php');
-		exit(0);
-	} else {
-		header('Location: '.WB_URL.'/index.php');
-		exit(0);
-	}
-}
-
-if(ENABLED_ASP && isset($_POST['username']) && ( // form faked? Check the honeypot-fields.
-	(!isset($_POST['submitted_when']) OR !isset($_SESSION['submitted_when'])) OR 
-	($_POST['submitted_when'] != $_SESSION['submitted_when']) OR
-	(!isset($_POST['email-address']) OR $_POST['email-address']) OR
-	(!isset($_POST['name']) OR $_POST['name']) OR
-	(!isset($_POST['full_name']) OR $_POST['full_name'])
-)) {
-	exit(header("Location: ".WB_URL.PAGES_DIRECTORY.""));
-}
-
-// Load the language file
-if(!file_exists(WB_PATH.'/languages/'.DEFAULT_LANGUAGE.'.php')) {
-	exit('Error loading language file '.DEFAULT_LANGUAGE.', please check configuration');
-} else {
-	require_once(WB_PATH.'/languages/'.DEFAULT_LANGUAGE.'.php');
-	$load_language = false;
-}
-
-
-// Required page details
-$page_id = 0;
-$page_description = '';
-$page_keywords = '';
-define('PAGE_ID', 0);
-define('ROOT_PARENT', 0);
-define('PARENT', 0);
-define('LEVEL', 0);
-define('PAGE_TITLE', $TEXT['SIGNUP']);
-define('MENU_TITLE', $TEXT['SIGNUP']);
-define('MODULE', '');
-define('VISIBILITY', 'public');
-
-// Set the page content include file
-if(isset($_POST['username'])) {
-	define('PAGE_CONTENT', WB_PATH.'/account/signup2.php');
-} else {
-	define('PAGE_CONTENT', WB_PATH.'/account/signup_form.php');
-}
-
-// Set auto authentication to false
-$auto_auth = false;
-
-// Include the index (wrapper) file
-require(WB_PATH.'/index.php');
-
+<?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
+ * @package         account
+ * @author          Ryan Djurovich
+ * @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
+ * @lastmodified    $Date$
+ *
+ */
+
+require_once('../config.php');
+
+if(!is_numeric(FRONTEND_SIGNUP)) {
+	if(INTRO_PAGE) {
+		header('Location: '.WB_URL.PAGES_DIRECTORY.'/index.php');
+		exit(0);
+	} else {
+		header('Location: '.WB_URL.'/index.php');
+		exit(0);
+	}
+}
+
+if(ENABLED_ASP && isset($_POST['username']) && ( // form faked? Check the honeypot-fields.
+	(!isset($_POST['submitted_when']) OR !isset($_SESSION['submitted_when'])) OR 
+	($_POST['submitted_when'] != $_SESSION['submitted_when']) OR
+	(!isset($_POST['email-address']) OR $_POST['email-address']) OR
+	(!isset($_POST['name']) OR $_POST['name']) OR
+	(!isset($_POST['full_name']) OR $_POST['full_name'])
+)) {
+	exit(header("Location: ".WB_URL.PAGES_DIRECTORY.""));
+}
+
+// Load the language file
+if(!file_exists(WB_PATH.'/languages/'.DEFAULT_LANGUAGE.'.php')) {
+	exit('Error loading language file '.DEFAULT_LANGUAGE.', please check configuration');
+} else {
+	require_once(WB_PATH.'/languages/'.DEFAULT_LANGUAGE.'.php');
+	$load_language = false;
+}
+
+
+// Required page details
+$page_id = 0;
+$page_description = '';
+$page_keywords = '';
+define('PAGE_ID', 0);
+define('ROOT_PARENT', 0);
+define('PARENT', 0);
+define('LEVEL', 0);
+define('PAGE_TITLE', $TEXT['SIGNUP']);
+define('MENU_TITLE', $TEXT['SIGNUP']);
+define('MODULE', '');
+define('VISIBILITY', 'public');
+
+// Set the page content include file
+if(isset($_POST['username'])) {
+	define('PAGE_CONTENT', WB_PATH.'/account/signup2.php');
+} else {
+	define('PAGE_CONTENT', WB_PATH.'/account/signup_form.php');
+}
+
+// Set auto authentication to false
+$auto_auth = false;
+
+// Include the index (wrapper) file
+require(WB_PATH.'/index.php');
+
 ?>
\ No newline at end of file

Property changes on: branches/2.8.x/wb/account/signup.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/account/email.php
===================================================================
--- branches/2.8.x/wb/account/email.php	(revision 1261)
+++ branches/2.8.x/wb/account/email.php	(revision 1262)
@@ -1,65 +1,92 @@
-<?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')) {
-	header('Location: ../index.php');
-	exit(0);
-}
-
-// Get the values entered
-$current_password = $wb->get_post('current_password');
-$email = $wb->get_post('email');
-
-// Create a javascript back link
-$js_back = "javascript: history.go(-1);";
-
-// Get existing password
-$database = new database();
-$query = "SELECT user_id FROM ".TABLE_PREFIX."users WHERE user_id = '".$wb->get_user_id()."' AND password = '".md5($current_password)."'";
-$results = $database->query($query);
-
-// Validate values
-if($results->numRows() == 0) {
-	$wb->print_error($MESSAGE['PREFERENCES']['CURRENT_PASSWORD_INCORRECT'], $js_back, false);
-}
-// Validate values
-if(!$wb->validate_email($email)) {
-	$wb->print_error($MESSAGE['USERS']['INVALID_EMAIL'], $js_back, false);
-}
-
-$email = $wb->add_slashes($email);
-
-// Update the database
-$database = new database();
-$query = "UPDATE ".TABLE_PREFIX."users SET email = '$email' WHERE user_id = '".$wb->get_user_id()."' AND password = '".md5($current_password)."'";
-$database->query($query);
-if($database->is_error()) {
-	$wb->print_error($database->get_error,'index.php', false);
-} else {
-	$wb->print_success($MESSAGE['PREFERENCES']['EMAIL_UPDATED'], WB_URL.'/account/preferences.php');
-	$_SESSION['EMAIL'] = $email;
-}
-
+<?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
+ * @package         account
+ * @author          Ryan Djurovich
+ * @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
+ * @lastmodified    $Date$
+ *
+ */
+
+if(!defined('WB_URL')) {
+	header('Location: ../index.php');
+	exit(0);
+}
+
+// Get the values entered
+$current_password = $wb->get_post('current_password');
+$email = $wb->get_post('email');
+
+// Create a javascript back link
+$js_back = "javascript: history.go(-1);";
+
+// Get existing password
+$database = new database();
+$query = "SELECT user_id FROM ".TABLE_PREFIX."users WHERE user_id = '".$wb->get_user_id()."' AND password = '".md5($current_password)."'";
+$results = $database->query($query);
+
+// Validate values
+if($results->numRows() == 0) {
+	$wb->print_error($MESSAGE['PREFERENCES']['CURRENT_PASSWORD_INCORRECT'], $js_back, false);
+}
+// Validate values
+if(!$wb->validate_email($email)) {
+	$wb->print_error($MESSAGE['USERS']['INVALID_EMAIL'], $js_back, false);
+}
+
+$email = $wb->add_slashes($email);
+
+// Update the database
+$database = new database();
+$query = "UPDATE ".TABLE_PREFIX."users SET email = '$email' WHERE user_id = '".$wb->get_user_id()."' AND password = '".md5($current_password)."'";
+$database->query($query);
+if($database->is_error()) {
+	$wb->print_error($database->get_error,'index.php', false);
+} else {
+	$wb->print_success($MESSAGE['PREFERENCES']['EMAIL_UPDATED'], WB_URL.'/account/preferences.php');
+	$_SESSION['EMAIL'] = $email;
+}
+
 ?>
\ No newline at end of file

Property changes on: branches/2.8.x/wb/account/email.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/account/index.php
===================================================================
--- branches/2.8.x/wb/account/index.php	(revision 1261)
+++ branches/2.8.x/wb/account/index.php	(revision 1262)
@@ -1,28 +1,55 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2009, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-header("Location: ../index.php");
-
+<?php
+/*
+*
+*                       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
+ * @package         account
+ * @author          Ryan Djurovich
+ * @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
+ * @lastmodified    $Date$
+ *
+ */
+
+header("Location: ../index.php");
+
 ?>
\ No newline at end of file

Property changes on: branches/2.8.x/wb/account/index.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/account/signup2.php
===================================================================
--- branches/2.8.x/wb/account/signup2.php	(revision 1261)
+++ branches/2.8.x/wb/account/signup2.php	(revision 1262)
@@ -1,136 +1,163 @@
-<?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')) {
-	header('Location: ../pages/index.php');
-	exit(0);
-}
-
-require_once(WB_PATH.'/framework/class.wb.php');
-$wb = new wb('Start', 'start', false, false);
-
-// Create new database object
-$database = new database();
-
-// Get details entered
-$groups_id = FRONTEND_SIGNUP;
-$active = 1;
-$username = strtolower(strip_tags($wb->get_post_escaped('username')));
-$display_name = strip_tags($wb->get_post_escaped('display_name'));
-$email = $wb->get_post('email');
-
-// Create a javascript back link
-$js_back = "javascript: history.go(-1);";
-
-// Check values
-if($groups_id == "") {
-	$wb->print_error($MESSAGE['USERS']['NO_GROUP'], $js_back, false);
-}
-if(strlen($username) < 3) {
-	$wb->print_error($MESSAGE['USERS']['USERNAME_TOO_SHORT'], $js_back, false);
-}
-if($email != "") {
-	if($wb->validate_email($email) == false) {
-		$wb->print_error($MESSAGE['USERS']['INVALID_EMAIL'], $js_back, false);
-	}
-} else {
-	$wb->print_error($MESSAGE['SIGNUP']['NO_EMAIL'], $js_back, false);
-}
-
-$email = $wb->add_slashes($email);
-
-// Captcha
-if(ENABLED_CAPTCHA) {
-	if(isset($_POST['captcha']) AND $_POST['captcha'] != ''){
-		// Check for a mismatch
-		if(!isset($_POST['captcha']) OR !isset($_SESSION['captcha']) OR $_POST['captcha'] != $_SESSION['captcha']) {
-			$wb->print_error($MESSAGE['MOD_FORM']['INCORRECT_CAPTCHA'], $js_back, false);
-		}
-	} else {
-		$wb->print_error($MESSAGE['MOD_FORM']['INCORRECT_CAPTCHA'], $js_back, false);
-	}
-}
-if(isset($_SESSION['captcha'])) { unset($_SESSION['captcha']); }
-
-// Generate a random password then update the database with it
-$new_pass = '';
-$salt = "abchefghjkmnpqrstuvwxyz0123456789";
-srand((double)microtime()*1000000);
-$i = 0;
-while ($i <= 7) {
-	$num = rand() % 33;
-	$tmp = substr($salt, $num, 1);
-	$new_pass = $new_pass . $tmp;
-	$i++;
-}
-$md5_password = md5($new_pass);
-
-// Check if username already exists
-$results = $database->query("SELECT user_id FROM ".TABLE_PREFIX."users WHERE username = '$username'");
-if($results->numRows() > 0) {
-	$wb->print_error($MESSAGE['USERS']['USERNAME_TAKEN'], $js_back, false);
-}
-
-// Check if the email already exists
-$results = $database->query("SELECT user_id FROM ".TABLE_PREFIX."users WHERE email = '".$wb->add_slashes($email)."'");
-if($results->numRows() > 0) {
-	if(isset($MESSAGE['USERS']['EMAIL_TAKEN'])) {
-		$wb->print_error($MESSAGE['USERS']['EMAIL_TAKEN'], $js_back, false);
-	} else {
-		$wb->print_error($MESSAGE['USERS']['INVALID_EMAIL'], $js_back, false);
-	}
-}
-
-// MD5 supplied password
-$md5_password = md5($new_pass);
-
-// Inser the user into the database
-$query = "INSERT INTO ".TABLE_PREFIX."users (group_id,groups_id,active,username,password,display_name,email) VALUES ('$groups_id', '$groups_id', '$active', '$username','$md5_password','$display_name','$email')";
-$database->query($query);
-
-if($database->is_error()) {
-	// Error updating database
-	$message = $database->get_error();
-} else {
-	// Setup email to send
-	$mail_to = $email;
-	$mail_subject = $MESSAGE['SIGNUP2']['SUBJECT_LOGIN_INFO'];
-
-	// Replace placeholders from language variable with values
-	$search = array('{LOGIN_DISPLAY_NAME}', '{LOGIN_WEBSITE_TITLE}', '{LOGIN_NAME}', '{LOGIN_PASSWORD}');
-	$replace = array($display_name, WEBSITE_TITLE, $username, $new_pass); 
-	$mail_message = str_replace($search, $replace, $MESSAGE['SIGNUP2']['BODY_LOGIN_INFO']);
-
-	// Try sending the email
-	if($wb->mail(SERVER_EMAIL,$mail_to,$mail_subject,$mail_message)) { 
-		$display_form = false;
-		$wb->print_success($MESSAGE['FORGOT_PASS']['PASSWORD_RESET'], WB_URL.'/account/login.php');
-	} else {
-		$database->query("DELETE FROM ".TABLE_PREFIX."users WHERE username = '$username'");
-		$wb->print_error($MESSAGE['FORGOT_PASS']['CANNOT_EMAIL'], $js_back, false);
-	}
-}
-
-?>
+<?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
+ * @package         account
+ * @author          Ryan Djurovich
+ * @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
+ * @lastmodified    $Date$
+ *
+ */
+
+if(!defined('WB_URL')) {
+	header('Location: ../pages/index.php');
+	exit(0);
+}
+
+require_once(WB_PATH.'/framework/class.wb.php');
+$wb = new wb('Start', 'start', false, false);
+
+// Create new database object
+$database = new database();
+
+// Get details entered
+$groups_id = FRONTEND_SIGNUP;
+$active = 1;
+$username = strtolower(strip_tags($wb->get_post_escaped('username')));
+$display_name = strip_tags($wb->get_post_escaped('display_name'));
+$email = $wb->get_post('email');
+
+// Create a javascript back link
+$js_back = "javascript: history.go(-1);";
+
+// Check values
+if($groups_id == "") {
+	$wb->print_error($MESSAGE['USERS']['NO_GROUP'], $js_back, false);
+}
+if(strlen($username) < 3) {
+	$wb->print_error($MESSAGE['USERS']['USERNAME_TOO_SHORT'], $js_back, false);
+}
+if($email != "") {
+	if($wb->validate_email($email) == false) {
+		$wb->print_error($MESSAGE['USERS']['INVALID_EMAIL'], $js_back, false);
+	}
+} else {
+	$wb->print_error($MESSAGE['SIGNUP']['NO_EMAIL'], $js_back, false);
+}
+
+$email = $wb->add_slashes($email);
+
+// Captcha
+if(ENABLED_CAPTCHA) {
+	if(isset($_POST['captcha']) AND $_POST['captcha'] != ''){
+		// Check for a mismatch
+		if(!isset($_POST['captcha']) OR !isset($_SESSION['captcha']) OR $_POST['captcha'] != $_SESSION['captcha']) {
+			$wb->print_error($MESSAGE['MOD_FORM']['INCORRECT_CAPTCHA'], $js_back, false);
+		}
+	} else {
+		$wb->print_error($MESSAGE['MOD_FORM']['INCORRECT_CAPTCHA'], $js_back, false);
+	}
+}
+if(isset($_SESSION['captcha'])) { unset($_SESSION['captcha']); }
+
+// Generate a random password then update the database with it
+$new_pass = '';
+$salt = "abchefghjkmnpqrstuvwxyz0123456789";
+srand((double)microtime()*1000000);
+$i = 0;
+while ($i <= 7) {
+	$num = rand() % 33;
+	$tmp = substr($salt, $num, 1);
+	$new_pass = $new_pass . $tmp;
+	$i++;
+}
+$md5_password = md5($new_pass);
+
+// Check if username already exists
+$results = $database->query("SELECT user_id FROM ".TABLE_PREFIX."users WHERE username = '$username'");
+if($results->numRows() > 0) {
+	$wb->print_error($MESSAGE['USERS']['USERNAME_TAKEN'], $js_back, false);
+}
+
+// Check if the email already exists
+$results = $database->query("SELECT user_id FROM ".TABLE_PREFIX."users WHERE email = '".$wb->add_slashes($email)."'");
+if($results->numRows() > 0) {
+	if(isset($MESSAGE['USERS']['EMAIL_TAKEN'])) {
+		$wb->print_error($MESSAGE['USERS']['EMAIL_TAKEN'], $js_back, false);
+	} else {
+		$wb->print_error($MESSAGE['USERS']['INVALID_EMAIL'], $js_back, false);
+	}
+}
+
+// MD5 supplied password
+$md5_password = md5($new_pass);
+
+// Inser the user into the database
+$query = "INSERT INTO ".TABLE_PREFIX."users (group_id,groups_id,active,username,password,display_name,email) VALUES ('$groups_id', '$groups_id', '$active', '$username','$md5_password','$display_name','$email')";
+$database->query($query);
+
+if($database->is_error()) {
+	// Error updating database
+	$message = $database->get_error();
+} else {
+	// Setup email to send
+	$mail_to = $email;
+	$mail_subject = $MESSAGE['SIGNUP2']['SUBJECT_LOGIN_INFO'];
+
+	// Replace placeholders from language variable with values
+	$search = array('{LOGIN_DISPLAY_NAME}', '{LOGIN_WEBSITE_TITLE}', '{LOGIN_NAME}', '{LOGIN_PASSWORD}');
+	$replace = array($display_name, WEBSITE_TITLE, $username, $new_pass); 
+	$mail_message = str_replace($search, $replace, $MESSAGE['SIGNUP2']['BODY_LOGIN_INFO']);
+
+	// Try sending the email
+	if($wb->mail(SERVER_EMAIL,$mail_to,$mail_subject,$mail_message)) { 
+		$display_form = false;
+		$wb->print_success($MESSAGE['FORGOT_PASS']['PASSWORD_RESET'], WB_URL.'/account/login.php');
+	} else {
+		$database->query("DELETE FROM ".TABLE_PREFIX."users WHERE username = '$username'");
+		$wb->print_error($MESSAGE['FORGOT_PASS']['CANNOT_EMAIL'], $js_back, false);
+	}
+}
+
+?>

Property changes on: branches/2.8.x/wb/account/signup2.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/account/login.php
===================================================================
--- branches/2.8.x/wb/account/login.php	(revision 1261)
+++ branches/2.8.x/wb/account/login.php	(revision 1262)
@@ -1,27 +1,54 @@
 <?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
-
+*
+*                       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
+ * @package         account
+ * @author          Ryan Djurovich
+ * @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
+ * @lastmodified    $Date$
+ *
+ */
 
 require_once("../config.php");
 

Property changes on: branches/2.8.x/wb/account/login.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/account/signup_form.php
===================================================================
--- branches/2.8.x/wb/account/signup_form.php	(revision 1261)
+++ branches/2.8.x/wb/account/signup_form.php	(revision 1262)
@@ -1,194 +1,124 @@
-<?php+<?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
+ * @package         account
+ * @author          Ryan Djurovich
+ * @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
+ * @lastmodified    $Date$
+ *
+ */
 
-+if(!defined('WB_URL')) {
+	header('Location: ../index.php');
+	exit(0);
+}
+require_once(WB_PATH.'/include/captcha/captcha.php');
 
-// $Id$+?>
 
-+<h1>&nbsp;<?php echo $TEXT['SIGNUP']; ?></h1>
 
-/*+<form name="user" action="<?php echo WB_URL.'/account/signup.php'; ?>" method="post">
 
-+	<?php if(ENABLED_ASP) { // add some honeypot-fields
+	?>
+    <div style="display:none;">
+	<input type="hidden" name="submitted_when" value="<?php $t=time(); echo $t; $_SESSION['submitted_when']=$t; ?>" />
+	<p class="nixhier">
+	email-address:
+	<label for="email-address">Leave this field email-address blank:</label>
+	<input id="email-address" name="email-address" size="60" value="" /><br />
+	username (id):
+	<label for="name">Leave this field name blank:</label>
+	<input id="name" name="name" size="60" value="" /><br />
+	Full Name:
+	<label for="full_name">Leave this field full_name blank:</label>
+	<input id="full_name" name="full_name" size="60" value="" /><br />
+	</p>
+	<?php }
+	?>
+    </div>
+<table cellpadding="5" cellspacing="0" border="0" width="90%">
+<tr>
+	<td width="180"><?php echo $TEXT['USERNAME']; ?>:</td>
+	<td class="value_input">
+		<input type="text" name="username" maxlength="30" style="width:300px;"/>
+	</td>
+</tr>
+<tr>
+	<td><?php echo $TEXT['DISPLAY_NAME']; ?> (<?php echo $TEXT['FULL_NAME']; ?>):</td>
+	<td class="value_input">
+		<input type="text" name="display_name" maxlength="255" style="width:300px;" />
+	</td>
+</tr>
+<tr>
+	<td><?php echo $TEXT['EMAIL']; ?>:</td>
+	<td class="value_input">
+		<input type="text" name="email" maxlength="255" style="width:300px;"/>
+	</td>
+</tr>
+<?php
+// Captcha
+if(ENABLED_CAPTCHA) {
+	?><tr>
+		<td class="field_title"><?php echo $TEXT['VERIFICATION']; ?>:</td>
+		<td><?php call_captcha(); ?></td>
+		</tr>
+	<?php
+}
+?>
+<tr>
+	<td>&nbsp;</td>
+	<td>
+		<input type="submit" name="submit" value="<?php echo $TEXT['SIGNUP']; ?>" />
+		<input type="reset" name="reset" value="<?php echo $TEXT['RESET']; ?>" />
+	</td>
+</tr>
+</table>
 
- Website Baker Project <http://www.websitebaker.org/>+</form>
 
- 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')) {-
-	header('Location: ../index.php');-
-	exit(0);-
-}-
-require_once(WB_PATH.'/include/captcha/captcha.php');-
--
-?>-
--
-<h1>&nbsp;<?php echo $TEXT['SIGNUP']; ?></h1>-
--
-<form name="user" action="<?php echo WB_URL.'/account/signup.php'; ?>" method="post">-
--
-	<?php if(ENABLED_ASP) { // add some honeypot-fields-
-	?>-
-    <div style="display:none;">-
-	<input type="hidden" name="submitted_when" value="<?php $t=time(); echo $t; $_SESSION['submitted_when']=$t; ?>" />-
-	<p class="nixhier">-
-	email-address:-
-	<label for="email-address">Leave this field email-address blank:</label>-
-	<input id="email-address" name="email-address" size="60" value="" /><br />-
-	username (id):-
-	<label for="name">Leave this field name blank:</label>-
-	<input id="name" name="name" size="60" value="" /><br />-
-	Full Name:-
-	<label for="full_name">Leave this field full_name blank:</label>-
-	<input id="full_name" name="full_name" size="60" value="" /><br />-
-	</p>-
-	<?php }-
-	?>-
-    </div>-
-<table cellpadding="5" cellspacing="0" border="0" width="90%">-
-<tr>-
-	<td width="180"><?php echo $TEXT['USERNAME']; ?>:</td>-
-	<td class="value_input">-
-		<input type="text" name="username" maxlength="30" style="width:300px;"/>-
-	</td>-
-</tr>-
-<tr>-
-	<td><?php echo $TEXT['DISPLAY_NAME']; ?> (<?php echo $TEXT['FULL_NAME']; ?>):</td>-
-	<td class="value_input">-
-		<input type="text" name="display_name" maxlength="255" style="width:300px;" />-
-	</td>-
-</tr>-
-<tr>-
-	<td><?php echo $TEXT['EMAIL']; ?>:</td>-
-	<td class="value_input">-
-		<input type="text" name="email" maxlength="255" style="width:300px;"/>-
-	</td>-
-</tr>-
-<?php-
-// Captcha-
-if(ENABLED_CAPTCHA) {-
-	?><tr>-
-		<td class="field_title"><?php echo $TEXT['VERIFICATION']; ?>:</td>-
-		<td><?php call_captcha(); ?></td>-
-		</tr>-
-	<?php-
-}-
-?>-
-<tr>-
-	<td>&nbsp;</td>-
-	<td>-
-		<input type="submit" name="submit" value="<?php echo $TEXT['SIGNUP']; ?>" />-
-		<input type="reset" name="reset" value="<?php echo $TEXT['RESET']; ?>" />-
-	</td>-
-</tr>-
-</table>-
--
-</form>-
--
-<br />-
-&nbsp; -
+<br />
+&nbsp; 

Property changes on: branches/2.8.x/wb/account/signup_form.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/search/search.php
===================================================================
--- branches/2.8.x/wb/search/search.php	(revision 1261)
+++ branches/2.8.x/wb/search/search.php	(revision 1262)
@@ -31,6 +31,9 @@
  *
  * @category        frontend
  * @package         search
+ * @author          Ryan Djurovich
+ * @copyright       2004-2009, Ryan Djurovich
+ * @copyright       2009-2010, Website Baker Org. e.V.
  * @filesource		$HeadURL$
  * @author          Ryan Djurovich
  * @copyright       2004-2009, Ryan Djurovich
@@ -43,11 +46,11 @@
  * @version         $Id$
  * @platform        WebsiteBaker 2.8.x
  * @requirements    PHP 4.3.4 and higher
- * @lastmodified    $Date: $
+ * @lastmodified    $Date$
  *
  */
 
-if(!defined('WB_URL')) { 
+if(!defined('WB_URL')) {
 	header('Location: index.php');
 	exit(0);
 }

Property changes on: branches/2.8.x/wb/search/search.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/search/search_convert.php
===================================================================
--- branches/2.8.x/wb/search/search_convert.php	(revision 1261)
+++ branches/2.8.x/wb/search/search_convert.php	(revision 1262)
@@ -1,98 +1,122 @@
-<?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
-
-*/
-
-/*
-Character Conversion file
-for search-/highlighting-related character-translations
-*/
-
-if(!defined('WB_URL')) {
-	header('Location: ../index.php');
-	exit(0);
-}
-if(!isset($search_lang)) $search_lang = LANGUAGE;
-
-// umlaut to '(upper|lower)' for preg_match()
-// this is UTF-8-encoded
-// there is no need for a translation-table anymore since we use u-switch (utf-8) for preg-functions
-// remember that we use the i-switch, too. [No need for (ae|Ae)]
-
-$string_ul_umlaut = array();
-$string_ul_regex = array();
-
-// but add some national stuff
-if($search_lang=='DE') { // add special handling for german umlauts (ä==ae, ...)
-	$string_ul_umlaut_add = array(
-		"\xc3\x9f", // german SZ-Ligatur
-		"\xc3\xa4", // german ae
-		"\xc3\xb6", // german oe
-		"\xc3\xbc", // german ue
-		"\xc3\x84", // german Ae
-		"\xc3\x96", // german Oe
-		"\xc3\x9c", // german Ue
-		// these are not that usual
-		"\xEF\xAC\x84", // german ffl-ligatur
-		"ffl",          // german ffl-ligatur
-		"\xEF\xAC\x83", // german ffi-ligatur
-		"ffi",          // german ffi-ligatur
-		"0xEF\xAC\x80", // german ff-Ligatur
-		"ff",           // german ff-Ligatur
-		"\xEF\xAC\x81", // german fi-ligatur
-		"fi",           // german fi-ligatur
-		"\xEF\xAC\x82", // german fl-ligatur
-		"fl",           // german fl-ligatur
-		"\xEF\xAC\x85", // german st-Ligatur (long s)
-		"st",           // german st-Ligatur
-		"\xEF\xAC\x86"  // german st-ligatur (round-s)
-	);
-	$string_ul_regex_add = array(
-		"(\xc3\x9f|ss)", // german SZ.Ligatur
-		"(\xc3\xa4|ae)", // german ae
-		"(\xc3\xb6|oe)", // german oe
-		"(\xc3\xbc|ue)", // german ue
-		"(\xc3\x84|Ae)", // german Ae
-		"(\xc3\x96|Oe)", // german Oe
-		"(\xc3\x9c|Ue)", // german Ue
-		// these are not that usual
-		"(\xEF\xAC\x84|ffl)", // german ffl-ligatur
-		"(\xEF\xAC\x84|ffl)", // german ffl-ligatur
-		"(\xEF\xAC\x83|ffi)", // german ffi-ligatur
-		"(\xEF\xAC\x83|ffi)", // german ffi-ligatur
-		"(\xEF\xAC\x80|ff)",  // german ff-Ligatur
-		"(\xEF\xAC\x80|ff)",  // german ff-Ligatur
-		"(\xEF\xAC\x81|fi)",  // german fi-Ligatur
-		"(\xEF\xAC\x81|fi)",  // german fi-Ligatur
-		"(\xEF\xAC\x82|fl)",  // german fl-ligatur
-		"(\xEF\xAC\x82|fl)",  // german fl-ligatur
-		"(\xEF\xAC\x85|st)",  // german st-Ligatur (long s)
-		"(\xEF\xAC\x85|st|\xEF\xAC\x86)",  // german st-Ligaturs
-		"(\xEF\xAC\x86|st)"  // german st-ligatur (round-s)
-	);
-	$string_ul_umlaut = array_merge($string_ul_umlaut_add, $string_ul_umlaut);
-	$string_ul_regex = array_merge($string_ul_regex_add, $string_ul_regex);
-}
-
-
+<?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
+*
+* Character Conversion file
+* for search-/highlighting-related character-translations
+*
+*/
+/**
+ *
+ * @category        frontend
+ * @package         search
+ * @author          Ryan Djurovich
+ * @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
+ * @lastmodified    $Date$
+ *
+ */
+
+if(!defined('WB_URL')) {
+	header('Location: ../index.php');
+	exit(0);
+}
+if(!isset($search_lang)) $search_lang = LANGUAGE;
+
+// umlaut to '(upper|lower)' for preg_match()
+// this is UTF-8-encoded
+// there is no need for a translation-table anymore since we use u-switch (utf-8) for preg-functions
+// remember that we use the i-switch, too. [No need for (ae|Ae)]
+
+$string_ul_umlaut = array();
+$string_ul_regex = array();
+
+// but add some national stuff
+if($search_lang=='DE') { // add special handling for german umlauts (ä==ae, ...)
+	$string_ul_umlaut_add = array(
+		"\xc3\x9f", // german SZ-Ligatur
+		"\xc3\xa4", // german ae
+		"\xc3\xb6", // german oe
+		"\xc3\xbc", // german ue
+		"\xc3\x84", // german Ae
+		"\xc3\x96", // german Oe
+		"\xc3\x9c", // german Ue
+		// these are not that usual
+		"\xEF\xAC\x84", // german ffl-ligatur
+		"ffl",          // german ffl-ligatur
+		"\xEF\xAC\x83", // german ffi-ligatur
+		"ffi",          // german ffi-ligatur
+		"0xEF\xAC\x80", // german ff-Ligatur
+		"ff",           // german ff-Ligatur
+		"\xEF\xAC\x81", // german fi-ligatur
+		"fi",           // german fi-ligatur
+		"\xEF\xAC\x82", // german fl-ligatur
+		"fl",           // german fl-ligatur
+		"\xEF\xAC\x85", // german st-Ligatur (long s)
+		"st",           // german st-Ligatur
+		"\xEF\xAC\x86"  // german st-ligatur (round-s)
+	);
+	$string_ul_regex_add = array(
+		"(\xc3\x9f|ss)", // german SZ.Ligatur
+		"(\xc3\xa4|ae)", // german ae
+		"(\xc3\xb6|oe)", // german oe
+		"(\xc3\xbc|ue)", // german ue
+		"(\xc3\x84|Ae)", // german Ae
+		"(\xc3\x96|Oe)", // german Oe
+		"(\xc3\x9c|Ue)", // german Ue
+		// these are not that usual
+		"(\xEF\xAC\x84|ffl)", // german ffl-ligatur
+		"(\xEF\xAC\x84|ffl)", // german ffl-ligatur
+		"(\xEF\xAC\x83|ffi)", // german ffi-ligatur
+		"(\xEF\xAC\x83|ffi)", // german ffi-ligatur
+		"(\xEF\xAC\x80|ff)",  // german ff-Ligatur
+		"(\xEF\xAC\x80|ff)",  // german ff-Ligatur
+		"(\xEF\xAC\x81|fi)",  // german fi-Ligatur
+		"(\xEF\xAC\x81|fi)",  // german fi-Ligatur
+		"(\xEF\xAC\x82|fl)",  // german fl-ligatur
+		"(\xEF\xAC\x82|fl)",  // german fl-ligatur
+		"(\xEF\xAC\x85|st)",  // german st-Ligatur (long s)
+		"(\xEF\xAC\x85|st|\xEF\xAC\x86)",  // german st-Ligaturs
+		"(\xEF\xAC\x86|st)"  // german st-ligatur (round-s)
+	);
+	$string_ul_umlaut = array_merge($string_ul_umlaut_add, $string_ul_umlaut);
+	$string_ul_regex = array_merge($string_ul_regex_add, $string_ul_regex);
+}
+
+
 ?>
\ No newline at end of file

Property changes on: branches/2.8.x/wb/search/search_convert.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/search/search_modext.php
===================================================================
--- branches/2.8.x/wb/search/search_modext.php	(revision 1261)
+++ branches/2.8.x/wb/search/search_modext.php	(revision 1262)
@@ -1,409 +1,436 @@
-<?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
-
-*/
-
-// make the url-string for highlighting
-function make_url_searchstring($search_match, $search_url_array) {
-	$link = "";
-	if ($search_match != 'exact') {
-		$str = implode(" ", $search_url_array);
-		$link = "?searchresult=1&amp;sstring=".urlencode($str);
-	} else {
-		$str = str_replace(' ', '_', $search_url_array[0]);
-		$link = "?searchresult=2&amp;sstring=".urlencode($str);
-	}
-	return $link;
-}
-
-// make date and time for "last modified by... on ..."-string
-function get_page_modified($page_modified_when) {
-	global $TEXT;
-	if($page_modified_when > 0) {
-		$date = gmdate(DATE_FORMAT, $page_modified_when+TIMEZONE);
-		$time = gmdate(TIME_FORMAT, $page_modified_when+TIMEZONE);
-	} else {
-		$date = $TEXT['UNKNOWN'].' '.$TEXT['DATE'];
-		$time = $TEXT['UNKNOWN'].' '.$TEXT['TIME'];
-	}
-	return array($date, $time);
-}
-
-// make username and displayname for "last modified by... on ..."-string
-function get_page_modified_by($page_modified_by, $users) {
-	global $TEXT;
-	// check for existing user-id
-	if(!isset($users[$page_modified_by]))
-		$page_modified_by = 0;
-	
-	$username = $users[$page_modified_by]['username'];
-	$displayname = $users[$page_modified_by]['display_name'];
-	return array($username, $displayname);
-}
-
-// checks if _all_ searchwords matches
-function is_all_matched($text, $search_words) {
-	$all_matched = true;
-	foreach ($search_words AS $word) {
-		if(!preg_match('/'.$word.'/ui', $text)) {
-			$all_matched = false;
-			break;
-		}
-	}
-	return $all_matched;
-}
-
-// checks if _any_ of the searchwords matches
-function is_any_matched($text, $search_words) {
-	$any_matched = false;
-	$word = '('.implode('|', $search_words).')';
-	if(preg_match('/'.$word.'/ui', $text)) {
-		$any_matched = true;
-	}
-	return $any_matched;
-}
-
-// collects the matches from text in excerpt_array
-function get_excerpts($text, $search_words, $max_excerpt_num) {
-	$match_array = array();
-	$excerpt_array = array();
-	$word = '('.implode('|', $search_words).')';
-
-	//Filter droplets from the page data
-	preg_match_all('~\[\[(.*?)\]\]~', $text, $matches);
-	foreach ($matches[1] as $match) {
-		$text = str_replace('[['.$match.']]', '', $text);					
-	}
-
-	// Build the regex-string
-	if(strpos(strtoupper(PHP_OS), 'WIN')===0) { // windows -> see below
-		$str1=".!?;";
-		$str2=".!?;";
-	} else { // linux & Co.
-		// start-sign: .!?; + INVERTED EXCLAMATION MARK - INVERTED QUESTION MARK - DOUBLE EXCLAMATION MARK - INTERROBANG - EXCLAMATION QUESTION MARK - QUESTION EXCLAMATION MARK - DOUBLE QUESTION MARK - HALFWIDTH IDEOGRAPHIC FULL STOP - IDEOGRAPHIC FULL STOP - IDEOGRAPHIC COMMA
-		$str1=".!?;"."\xC2\xA1"."\xC2\xBF"."\xE2\x80\xBC"."\xE2\x80\xBD"."\xE2\x81\x89"."\xE2\x81\x88"."\xE2\x81\x87"."\xEF\xBD\xA1"."\xE3\x80\x82"."\xE3\x80\x81";
-		// stop-sign: .!?; + DOUBLE EXCLAMATION MARK - INTERROBANG - EXCLAMATION QUESTION MARK - QUESTION EXCLAMATION MARK - DOUBLE QUESTION MARK - HALFWIDTH IDEOGRAPHIC FULL STOP - IDEOGRAPHIC FULL STOP - IDEOGRAPHIC COMMA
-		$str2=".!?;"."\xE2\x80\xBC"."\xE2\x80\xBD"."\xE2\x81\x89"."\xE2\x81\x88"."\xE2\x81\x87"."\xEF\xBD\xA1"."\xE3\x80\x82"."\xE3\x80\x81";
-	}
-	$regex='/(?:^|\b|['.$str1.'])([^'.$str1.']{0,200}?'.$word.'[^'.$str2.']{0,200}(?:['.$str2.']|\b|$))/uis';
-	if(version_compare(PHP_VERSION, '4.3.3', '>=') &&
-	   strpos(strtoupper(PHP_OS), 'WIN')!==0
-	) { // this may crash windows server, so skip if on windows
-		// jump from match to match, get excerpt, stop if $max_excerpt_num is reached
-		$last_end = 0; $offset = 0;
-		while(preg_match('/'.$word.'/uis', $text, $match_array, PREG_OFFSET_CAPTURE, $last_end)) {
-			$offset = ($match_array[0][1]-206 < $last_end)?$last_end:$match_array[0][1]-206;
-			if(preg_match($regex, $text, $matches, PREG_OFFSET_CAPTURE, $offset)) {
-				$last_end = $matches[1][1]+strlen($matches[1][0])-1;
-				if(!preg_match('/\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\./', $matches[1][0])) // skip excerpts with email-addresses
-					$excerpt_array[] = trim($matches[1][0]);
-				if(count($excerpt_array)>=$max_excerpt_num) {
-					$excerpt_array = array_unique($excerpt_array);
-					if(count($excerpt_array) >= $max_excerpt_num)
-						break;
-				}
-			} else { // problem: preg_match failed - can't find a start- or stop-sign
-				$last_end += 201; // jump forward and try again
-			}
-		}
-	} else { // compatible, but may be very slow with large pages
-		if(preg_match_all($regex, $text, $match_array)) {
-			foreach($match_array[1] AS $string) {
-				if(!preg_match('/\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\./', $string))  // skip excerpts with email-addresses
-					$excerpt_array[] = trim($string);
-				
-			}
-		}
-	}
-	return $excerpt_array;
-}
-
-// makes excerpt_array a string ready to print out
-function prepare_excerpts($excerpt_array, $search_words, $max_excerpt_num) {
-	// excerpts: text before and after a single excerpt, html-tag for markup
-	$EXCERPT_BEFORE =       '...&nbsp;';
-	$EXCERPT_AFTER =        '&nbsp;...<br />';
-	$EXCERPT_MARKUP_START = '<b>';
-	$EXCERPT_MARKUP_END =   '</b>';
-	// remove duplicate matches from $excerpt_array, if any.
-	$excerpt_array = array_unique($excerpt_array);
-	// use the first $max_excerpt_num excerpts only
-	if(count($excerpt_array) > $max_excerpt_num) {
-		$excerpt_array = array_slice($excerpt_array, 0, $max_excerpt_num);
-	}
-	// prepare search-string
-	$string = "(".implode("|", $search_words).")";
-	// we want markup on search-results page,
-	// but we need some 'magic' to prevent <br />, <b>... from being highlighted
-	$excerpt = '';
-	foreach($excerpt_array as $str) {
-		$excerpt .= '#,,#'.preg_replace("/($string)/iu","#,,,,#$1#,,,,,#",$str).'#,,,#';
-	}
-	$excerpt = str_replace(array('&','<','>','"','\'',"\xC2\xA0"), array('&amp;','&lt;','&gt;','&quot;','&#039;','&nbsp;'), $excerpt);
-	$excerpt = str_replace(array('#,,,,#','#,,,,,#'), array($EXCERPT_MARKUP_START,$EXCERPT_MARKUP_END), $excerpt);
-	$excerpt = str_replace(array('#,,#','#,,,#'), array($EXCERPT_BEFORE,$EXCERPT_AFTER), $excerpt);
-	// prepare to write out
-	if(DEFAULT_CHARSET != 'utf-8') {
-		$excerpt = umlauts_to_entities($excerpt, 'UTF-8');
-	}
-	return $excerpt;
-}
-
-// work out what the link-anchor should be
-function make_url_target($page_link_target, $text, $search_words) {
-	// 1. e.g. $page_link_target=="&monthno=5&year=2007" - module-dependent target. Do nothing.
-	// 2. $page_link_target=="#!wb_section_..." - the user wants the section-target, so do nothing.
-	// 3. $page_link_target=="#wb_section_..." - try to find a better target, use the section-target as fallback.
-	// 4. $page_link_target=="" - do nothing
-	if(version_compare(PHP_VERSION, '4.3.3', ">=") && substr($page_link_target,0,12)=='#wb_section_') {
-		$word = '('.implode('|', $search_words).')';
-		preg_match('/'.$word.'/ui', $text, $match, PREG_OFFSET_CAPTURE);
-		if($match && is_array($match[0])) {
-			$x=$match[0][1]; // position of first match
-			// is there an anchor nearby?
-			if(preg_match_all('/<(?:[^>]+id|\s*a[^>]+name)\s*=\s*"(.*)"/iU', substr($text,0,$x), $match, PREG_OFFSET_CAPTURE)) {
-				$anchor='';
-				foreach($match[1] AS $array) {
-					if($array[1] > $x) {
-						break;
-					}
-					$anchor = $array[0];
-				}
-				if($anchor != '') {
-					$page_link_target = '#'.$anchor;
-				}
-			}
-		}
-	}
-	elseif(substr($page_link_target,0,13)=='#!wb_section_') {
-		$page_link_target = '#'.substr($page_link_target, 2);
-	}
-	
-	// since wb 2.7.1 the section-anchor is configurable - SEC_ANCHOR holds the anchor name
-	if(substr($page_link_target,0,12)=='#wb_section_') {
-		if(defined('SEC_ANCHOR') && SEC_ANCHOR!='') {
-			$sec_id = substr($page_link_target, 12);
-			$page_link_target = '#'.SEC_ANCHOR.$sec_id;
-		} else { // section-anchors are disabled
-			$page_link_target = '';
-		}
-	}
-	
-	return $page_link_target;
-}
-
-// wrapper for compatibility with old print_excerpt()
-function print_excerpt($page_link, $page_link_target, $page_title, $page_description, $page_modified_when, $page_modified_by, $text, $max_excerpt_num, $func_vars, $pic_link="") {
-	$mod_vars = array(
-		'page_link' => $page_link,
-		'page_link_target' => $page_link_target,
-		'page_title' => $page_title,
-		'page_description' => $page_description,
-		'page_modified_when' => $page_modified_when,
-		'page_modified_by' => $page_modified_by,
-		'text' => $text,
-		'max_excerpt_num' => $max_excerpt_num,
-		'pic_link' => $pic_link
-	);
-	print_excerpt2($mod_vars, $func_vars);
-}
-
-/* These functions can be used in module-supplied search_funcs
- * -----------------------------------------------------------
- * print_excerpt2() - the main-function to use in all search_funcs
- * print_excerpt() - wrapper for compatibility-reason. Use print_excerpt2() instead.
- * list_files_dirs() - lists all files and dirs below a given directory
- * clear_filelist() - keeps only wanted or removes unwanted entries in file-list.
- */
- 
-// prints the excerpts for one section
-function print_excerpt2($mod_vars, $func_vars) {
-	extract($func_vars, EXTR_PREFIX_ALL, 'func');
-	extract($mod_vars, EXTR_PREFIX_ALL, 'mod');
-	global $TEXT;
-	// check $mod_...vars
-	if(!isset($mod_page_link))          $mod_page_link = $func_page_link;
-	if(!isset($mod_page_link_target))   $mod_page_link_target = "";
-	if(!isset($mod_page_title))         $mod_page_title = $func_page_title;
-	if(!isset($mod_page_description))   $mod_page_description = $func_page_description;
-	if(!isset($mod_page_modified_when)) $mod_page_modified_when = $func_page_modified_when;
-	if(!isset($mod_page_modified_by))   $mod_page_modified_by = $func_page_modified_by;
-	if(!isset($mod_text))               $mod_text = "";
-	if(!isset($mod_max_excerpt_num))    $mod_max_excerpt_num = $func_default_max_excerpt;
-	if(!isset($mod_pic_link))           $mod_pic_link = "";
-	if(!isset($mod_no_highlight))       $mod_no_highlight = false;
-	if(!isset($func_enable_flush))      $func_enable_flush = false; // set this in db: wb_search.cfg_enable_flush [READ THE DOC BEFORE]
-	if(isset($mod_ext_charset)) $mod_ext_charset = strtolower($mod_ext_charset);
-	else $mod_ext_charset = '';
-
-	if($mod_text == "") // nothing to do
-		{ return false; }
-
-	if($mod_no_highlight) // no highlighting
-		{ $mod_page_link_target = "&amp;nohighlight=1".$mod_page_link_target; }
-	// clean the text:
-	$mod_text = preg_replace('#<(!--.*--|style.*</style|script.*</script)>#iU', ' ', $mod_text);
-	$mod_text = preg_replace('#<(br( /)?|dt|/dd|/?(h[1-6]|tr|table|p|li|ul|pre|code|div|hr))[^>]*>#i', '.', $mod_text);
-	$mod_text = preg_replace('/(\v\s?|\s\s)+/', ' ', $mod_text);
-	$mod_text = preg_replace('/\s\./', '.', $mod_text);
-	if($mod_ext_charset!='') { // data from external database may have a different charset
-		require_once(WB_PATH.'/framework/functions-utf8.php');
-		switch($mod_ext_charset) {
-		case 'latin1':
-		case 'cp1252':
-			$mod_text = charset_to_utf8($mod_text, 'CP1252');
-			break;
-		case 'cp1251':
-			$mod_text = charset_to_utf8($mod_text, 'CP1251');
-			break;
-		case 'latin2':
-			$mod_text = charset_to_utf8($mod_text, 'ISO-8859-2');
-			break;
-		case 'hebrew':
-			$mod_text = charset_to_utf8($mod_text, 'ISO-8859-8');
-			break;
-		case 'greek':
-			$mod_text = charset_to_utf8($mod_text, 'ISO-8859-7');
-			break;
-		case 'latin5':
-			$mod_text = charset_to_utf8($mod_text, 'ISO-8859-9');
-			break;
-		case 'latin7':
-			$mod_text = charset_to_utf8($mod_text, 'ISO-8859-13');
-			break;
-		case 'utf8':
-		default:
-			$mod_text = charset_to_utf8($mod_text, 'UTF-8');
-		}
-	} else {
-	$mod_text = entities_to_umlauts($mod_text, 'UTF-8');
-	}
-	$anchor_text = $mod_text; // make an copy containing html-tags
-	$mod_text = strip_tags($mod_text);
-	$mod_text = str_replace(array('&gt;','&lt;','&amp;','&quot;','&#039;','&apos;','&nbsp;'), array('>','<','&','"','\'','\'',"\xC2\xA0"), $mod_text);
-	$mod_text = '.'.trim($mod_text).'.';
-	// Do a fast scan over $mod_text first. This will speedup things a lot.
-	if($func_search_match == 'all') {
-		if(!is_all_matched($mod_text, $func_search_words))
-			return false;
-	}
-	elseif(!is_any_matched($mod_text, $func_search_words)) {
-		return false;
-	}
-	// search for an better anchor - this have to be done before strip_tags() (may fail if search-string contains <, &, amp, gt, lt, ...)
-	$anchor =  make_url_target($mod_page_link_target, $anchor_text, $func_search_words);
-
-	// make the link from $mod_page_link, add anchor
-	$link = "";
-	$link = page_link($mod_page_link);
-	if(strpos($mod_page_link, 'http:')===FALSE)
-		$link .= make_url_searchstring($func_search_match, $func_search_url_array);
-	$link .= $anchor;
-
-	// now get the excerpt
-	$excerpt = "";
-	$excerpt_array = array();
-	if($mod_max_excerpt_num > 0) {
-		if(!$excerpt_array = get_excerpts($mod_text, $func_search_words, $mod_max_excerpt_num)) {
-			return false;
-		}
-		$excerpt = prepare_excerpts($excerpt_array, $func_search_words, $mod_max_excerpt_num);
-	}
-
-	// handle thumbs - to deactivate this look in the module's search.php: $show_thumb (or maybe in the module's settings-page)
-	if($mod_pic_link != "") {
-		$excerpt = '<table class="excerpt_thumb" width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td width="110" valign="top"><a href="'.$link.'"><img src="'.WB_URL.'/'.MEDIA_DIRECTORY.$mod_pic_link.'" alt="" /></a></td><td>'.$excerpt.'</td></tr></tbody></table>';
-	}
-
-	// print-out the excerpt
-	$vars = array();
-	$values = array();
-	list($date, $time) = get_page_modified($mod_page_modified_when);
-	list($username, $displayname) = get_page_modified_by($mod_page_modified_by, $func_users);
-	$vars = array('[LINK]', '[TITLE]', '[DESCRIPTION]', '[USERNAME]','[DISPLAY_NAME]','[DATE]','[TIME]','[TEXT_LAST_UPDATED_BY]','[TEXT_ON]','[EXCERPT]');
-	$values = array(
-		$link,
-		$mod_page_title,
-		$mod_page_description,
-		$username,
-		$displayname,
-		$date,
-		$time,
-		$TEXT['LAST_UPDATED_BY'],
-		$TEXT['ON'],
-		$excerpt
-	);
-	echo str_replace($vars, $values, $func_results_loop_string);
-	if($func_enable_flush) { // ATTN: this will bypass output-filters and may break template-layout or -filters
-		ob_flush();flush();
-	}
-	return true;
-}
-
-// list all files and dirs in $dir (recursive), omits '.', '..', and hidden files/dirs
-// returns an array of two arrays ($files[] and $dirs[]).
-// usage: list($files,$dirs) = list_files_dirs($directory);
-//        $depth: get subdirs (true/false)
-function list_files_dirs($dir, $depth=true, $files=array(), $dirs=array()) {
-	$dh=opendir($dir);
-	while(($file = readdir($dh)) !== false) {
-		if($file{0} == '.' || $file == '..') {
-			continue;
-		}
-		if(is_dir($dir.'/'.$file)) {
-			if($depth) {
-				$dirs[] = $dir.'/'.$file;
-				list($files, $dirs) = list_files_dirs($dir.'/'.$file, $depth, $files, $dirs);
-			}
-		} else {
-			$files[] = $dir.'/'.$file;
-		}
-	}
-	closedir($dh);
-	natcasesort($files);
-	natcasesort($dirs);
-	return(array($files, $dirs));
-}
-
-// keeps only wanted entries in array $files. $str have to be an eregi()-compatible regex
-function clear_filelist($files, $str, $keep=true) {
-	// options: $keep = true  : remove all non-matching entries
-	//          $keep = false : remove all matching entries
-	$c_filelist = array();
-	if($str == '')
-		return $files;
-	foreach($files as $file) {
-		if($keep) {
-			if(eregi($str, $file)) {
-				$c_filelist[] = $file;
-			}
-		} else {
-			if(!eregi($str, $file)) {
-				$c_filelist[] = $file;
-			}
-		}
-	}
-	return($c_filelist);
-}
-
-?>
+<?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
+ * @package         search
+ * @author          Ryan Djurovich
+ * @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
+ * @lastmodified    $Date$
+ *
+ */
+
+// make the url-string for highlighting
+function make_url_searchstring($search_match, $search_url_array) {
+	$link = "";
+	if ($search_match != 'exact') {
+		$str = implode(" ", $search_url_array);
+		$link = "?searchresult=1&amp;sstring=".urlencode($str);
+	} else {
+		$str = str_replace(' ', '_', $search_url_array[0]);
+		$link = "?searchresult=2&amp;sstring=".urlencode($str);
+	}
+	return $link;
+}
+
+// make date and time for "last modified by... on ..."-string
+function get_page_modified($page_modified_when) {
+	global $TEXT;
+	if($page_modified_when > 0) {
+		$date = gmdate(DATE_FORMAT, $page_modified_when+TIMEZONE);
+		$time = gmdate(TIME_FORMAT, $page_modified_when+TIMEZONE);
+	} else {
+		$date = $TEXT['UNKNOWN'].' '.$TEXT['DATE'];
+		$time = $TEXT['UNKNOWN'].' '.$TEXT['TIME'];
+	}
+	return array($date, $time);
+}
+
+// make username and displayname for "last modified by... on ..."-string
+function get_page_modified_by($page_modified_by, $users) {
+	global $TEXT;
+	// check for existing user-id
+	if(!isset($users[$page_modified_by]))
+		$page_modified_by = 0;
+	
+	$username = $users[$page_modified_by]['username'];
+	$displayname = $users[$page_modified_by]['display_name'];
+	return array($username, $displayname);
+}
+
+// checks if _all_ searchwords matches
+function is_all_matched($text, $search_words) {
+	$all_matched = true;
+	foreach ($search_words AS $word) {
+		if(!preg_match('/'.$word.'/ui', $text)) {
+			$all_matched = false;
+			break;
+		}
+	}
+	return $all_matched;
+}
+
+// checks if _any_ of the searchwords matches
+function is_any_matched($text, $search_words) {
+	$any_matched = false;
+	$word = '('.implode('|', $search_words).')';
+	if(preg_match('/'.$word.'/ui', $text)) {
+		$any_matched = true;
+	}
+	return $any_matched;
+}
+
+// collects the matches from text in excerpt_array
+function get_excerpts($text, $search_words, $max_excerpt_num) {
+	$match_array = array();
+	$excerpt_array = array();
+	$word = '('.implode('|', $search_words).')';
+
+	//Filter droplets from the page data
+	preg_match_all('~\[\[(.*?)\]\]~', $text, $matches);
+	foreach ($matches[1] as $match) {
+		$text = str_replace('[['.$match.']]', '', $text);					
+	}
+
+	// Build the regex-string
+	if(strpos(strtoupper(PHP_OS), 'WIN')===0) { // windows -> see below
+		$str1=".!?;";
+		$str2=".!?;";
+	} else { // linux & Co.
+		// start-sign: .!?; + INVERTED EXCLAMATION MARK - INVERTED QUESTION MARK - DOUBLE EXCLAMATION MARK - INTERROBANG - EXCLAMATION QUESTION MARK - QUESTION EXCLAMATION MARK - DOUBLE QUESTION MARK - HALFWIDTH IDEOGRAPHIC FULL STOP - IDEOGRAPHIC FULL STOP - IDEOGRAPHIC COMMA
+		$str1=".!?;"."\xC2\xA1"."\xC2\xBF"."\xE2\x80\xBC"."\xE2\x80\xBD"."\xE2\x81\x89"."\xE2\x81\x88"."\xE2\x81\x87"."\xEF\xBD\xA1"."\xE3\x80\x82"."\xE3\x80\x81";
+		// stop-sign: .!?; + DOUBLE EXCLAMATION MARK - INTERROBANG - EXCLAMATION QUESTION MARK - QUESTION EXCLAMATION MARK - DOUBLE QUESTION MARK - HALFWIDTH IDEOGRAPHIC FULL STOP - IDEOGRAPHIC FULL STOP - IDEOGRAPHIC COMMA
+		$str2=".!?;"."\xE2\x80\xBC"."\xE2\x80\xBD"."\xE2\x81\x89"."\xE2\x81\x88"."\xE2\x81\x87"."\xEF\xBD\xA1"."\xE3\x80\x82"."\xE3\x80\x81";
+	}
+	$regex='/(?:^|\b|['.$str1.'])([^'.$str1.']{0,200}?'.$word.'[^'.$str2.']{0,200}(?:['.$str2.']|\b|$))/uis';
+	if(version_compare(PHP_VERSION, '4.3.3', '>=') &&
+	   strpos(strtoupper(PHP_OS), 'WIN')!==0
+	) { // this may crash windows server, so skip if on windows
+		// jump from match to match, get excerpt, stop if $max_excerpt_num is reached
+		$last_end = 0; $offset = 0;
+		while(preg_match('/'.$word.'/uis', $text, $match_array, PREG_OFFSET_CAPTURE, $last_end)) {
+			$offset = ($match_array[0][1]-206 < $last_end)?$last_end:$match_array[0][1]-206;
+			if(preg_match($regex, $text, $matches, PREG_OFFSET_CAPTURE, $offset)) {
+				$last_end = $matches[1][1]+strlen($matches[1][0])-1;
+				if(!preg_match('/\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\./', $matches[1][0])) // skip excerpts with email-addresses
+					$excerpt_array[] = trim($matches[1][0]);
+				if(count($excerpt_array)>=$max_excerpt_num) {
+					$excerpt_array = array_unique($excerpt_array);
+					if(count($excerpt_array) >= $max_excerpt_num)
+						break;
+				}
+			} else { // problem: preg_match failed - can't find a start- or stop-sign
+				$last_end += 201; // jump forward and try again
+			}
+		}
+	} else { // compatible, but may be very slow with large pages
+		if(preg_match_all($regex, $text, $match_array)) {
+			foreach($match_array[1] AS $string) {
+				if(!preg_match('/\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\./', $string))  // skip excerpts with email-addresses
+					$excerpt_array[] = trim($string);
+				
+			}
+		}
+	}
+	return $excerpt_array;
+}
+
+// makes excerpt_array a string ready to print out
+function prepare_excerpts($excerpt_array, $search_words, $max_excerpt_num) {
+	// excerpts: text before and after a single excerpt, html-tag for markup
+	$EXCERPT_BEFORE =       '...&nbsp;';
+	$EXCERPT_AFTER =        '&nbsp;...<br />';
+	$EXCERPT_MARKUP_START = '<b>';
+	$EXCERPT_MARKUP_END =   '</b>';
+	// remove duplicate matches from $excerpt_array, if any.
+	$excerpt_array = array_unique($excerpt_array);
+	// use the first $max_excerpt_num excerpts only
+	if(count($excerpt_array) > $max_excerpt_num) {
+		$excerpt_array = array_slice($excerpt_array, 0, $max_excerpt_num);
+	}
+	// prepare search-string
+	$string = "(".implode("|", $search_words).")";
+	// we want markup on search-results page,
+	// but we need some 'magic' to prevent <br />, <b>... from being highlighted
+	$excerpt = '';
+	foreach($excerpt_array as $str) {
+		$excerpt .= '#,,#'.preg_replace("/($string)/iu","#,,,,#$1#,,,,,#",$str).'#,,,#';
+	}
+	$excerpt = str_replace(array('&','<','>','"','\'',"\xC2\xA0"), array('&amp;','&lt;','&gt;','&quot;','&#039;','&nbsp;'), $excerpt);
+	$excerpt = str_replace(array('#,,,,#','#,,,,,#'), array($EXCERPT_MARKUP_START,$EXCERPT_MARKUP_END), $excerpt);
+	$excerpt = str_replace(array('#,,#','#,,,#'), array($EXCERPT_BEFORE,$EXCERPT_AFTER), $excerpt);
+	// prepare to write out
+	if(DEFAULT_CHARSET != 'utf-8') {
+		$excerpt = umlauts_to_entities($excerpt, 'UTF-8');
+	}
+	return $excerpt;
+}
+
+// work out what the link-anchor should be
+function make_url_target($page_link_target, $text, $search_words) {
+	// 1. e.g. $page_link_target=="&monthno=5&year=2007" - module-dependent target. Do nothing.
+	// 2. $page_link_target=="#!wb_section_..." - the user wants the section-target, so do nothing.
+	// 3. $page_link_target=="#wb_section_..." - try to find a better target, use the section-target as fallback.
+	// 4. $page_link_target=="" - do nothing
+	if(version_compare(PHP_VERSION, '4.3.3', ">=") && substr($page_link_target,0,12)=='#wb_section_') {
+		$word = '('.implode('|', $search_words).')';
+		preg_match('/'.$word.'/ui', $text, $match, PREG_OFFSET_CAPTURE);
+		if($match && is_array($match[0])) {
+			$x=$match[0][1]; // position of first match
+			// is there an anchor nearby?
+			if(preg_match_all('/<(?:[^>]+id|\s*a[^>]+name)\s*=\s*"(.*)"/iU', substr($text,0,$x), $match, PREG_OFFSET_CAPTURE)) {
+				$anchor='';
+				foreach($match[1] AS $array) {
+					if($array[1] > $x) {
+						break;
+					}
+					$anchor = $array[0];
+				}
+				if($anchor != '') {
+					$page_link_target = '#'.$anchor;
+				}
+			}
+		}
+	}
+	elseif(substr($page_link_target,0,13)=='#!wb_section_') {
+		$page_link_target = '#'.substr($page_link_target, 2);
+	}
+	
+	// since wb 2.7.1 the section-anchor is configurable - SEC_ANCHOR holds the anchor name
+	if(substr($page_link_target,0,12)=='#wb_section_') {
+		if(defined('SEC_ANCHOR') && SEC_ANCHOR!='') {
+			$sec_id = substr($page_link_target, 12);
+			$page_link_target = '#'.SEC_ANCHOR.$sec_id;
+		} else { // section-anchors are disabled
+			$page_link_target = '';
+		}
+	}
+	
+	return $page_link_target;
+}
+
+// wrapper for compatibility with old print_excerpt()
+function print_excerpt($page_link, $page_link_target, $page_title, $page_description, $page_modified_when, $page_modified_by, $text, $max_excerpt_num, $func_vars, $pic_link="") {
+	$mod_vars = array(
+		'page_link' => $page_link,
+		'page_link_target' => $page_link_target,
+		'page_title' => $page_title,
+		'page_description' => $page_description,
+		'page_modified_when' => $page_modified_when,
+		'page_modified_by' => $page_modified_by,
+		'text' => $text,
+		'max_excerpt_num' => $max_excerpt_num,
+		'pic_link' => $pic_link
+	);
+	print_excerpt2($mod_vars, $func_vars);
+}
+
+/* These functions can be used in module-supplied search_funcs
+ * -----------------------------------------------------------
+ * print_excerpt2() - the main-function to use in all search_funcs
+ * print_excerpt() - wrapper for compatibility-reason. Use print_excerpt2() instead.
+ * list_files_dirs() - lists all files and dirs below a given directory
+ * clear_filelist() - keeps only wanted or removes unwanted entries in file-list.
+ */
+ 
+// prints the excerpts for one section
+function print_excerpt2($mod_vars, $func_vars) {
+	extract($func_vars, EXTR_PREFIX_ALL, 'func');
+	extract($mod_vars, EXTR_PREFIX_ALL, 'mod');
+	global $TEXT;
+	// check $mod_...vars
+	if(!isset($mod_page_link))          $mod_page_link = $func_page_link;
+	if(!isset($mod_page_link_target))   $mod_page_link_target = "";
+	if(!isset($mod_page_title))         $mod_page_title = $func_page_title;
+	if(!isset($mod_page_description))   $mod_page_description = $func_page_description;
+	if(!isset($mod_page_modified_when)) $mod_page_modified_when = $func_page_modified_when;
+	if(!isset($mod_page_modified_by))   $mod_page_modified_by = $func_page_modified_by;
+	if(!isset($mod_text))               $mod_text = "";
+	if(!isset($mod_max_excerpt_num))    $mod_max_excerpt_num = $func_default_max_excerpt;
+	if(!isset($mod_pic_link))           $mod_pic_link = "";
+	if(!isset($mod_no_highlight))       $mod_no_highlight = false;
+	if(!isset($func_enable_flush))      $func_enable_flush = false; // set this in db: wb_search.cfg_enable_flush [READ THE DOC BEFORE]
+	if(isset($mod_ext_charset)) $mod_ext_charset = strtolower($mod_ext_charset);
+	else $mod_ext_charset = '';
+
+	if($mod_text == "") // nothing to do
+		{ return false; }
+
+	if($mod_no_highlight) // no highlighting
+		{ $mod_page_link_target = "&amp;nohighlight=1".$mod_page_link_target; }
+	// clean the text:
+	$mod_text = preg_replace('#<(!--.*--|style.*</style|script.*</script)>#iU', ' ', $mod_text);
+	$mod_text = preg_replace('#<(br( /)?|dt|/dd|/?(h[1-6]|tr|table|p|li|ul|pre|code|div|hr))[^>]*>#i', '.', $mod_text);
+	$mod_text = preg_replace('/(\v\s?|\s\s)+/', ' ', $mod_text);
+	$mod_text = preg_replace('/\s\./', '.', $mod_text);
+	if($mod_ext_charset!='') { // data from external database may have a different charset
+		require_once(WB_PATH.'/framework/functions-utf8.php');
+		switch($mod_ext_charset) {
+		case 'latin1':
+		case 'cp1252':
+			$mod_text = charset_to_utf8($mod_text, 'CP1252');
+			break;
+		case 'cp1251':
+			$mod_text = charset_to_utf8($mod_text, 'CP1251');
+			break;
+		case 'latin2':
+			$mod_text = charset_to_utf8($mod_text, 'ISO-8859-2');
+			break;
+		case 'hebrew':
+			$mod_text = charset_to_utf8($mod_text, 'ISO-8859-8');
+			break;
+		case 'greek':
+			$mod_text = charset_to_utf8($mod_text, 'ISO-8859-7');
+			break;
+		case 'latin5':
+			$mod_text = charset_to_utf8($mod_text, 'ISO-8859-9');
+			break;
+		case 'latin7':
+			$mod_text = charset_to_utf8($mod_text, 'ISO-8859-13');
+			break;
+		case 'utf8':
+		default:
+			$mod_text = charset_to_utf8($mod_text, 'UTF-8');
+		}
+	} else {
+	$mod_text = entities_to_umlauts($mod_text, 'UTF-8');
+	}
+	$anchor_text = $mod_text; // make an copy containing html-tags
+	$mod_text = strip_tags($mod_text);
+	$mod_text = str_replace(array('&gt;','&lt;','&amp;','&quot;','&#039;','&apos;','&nbsp;'), array('>','<','&','"','\'','\'',"\xC2\xA0"), $mod_text);
+	$mod_text = '.'.trim($mod_text).'.';
+	// Do a fast scan over $mod_text first. This will speedup things a lot.
+	if($func_search_match == 'all') {
+		if(!is_all_matched($mod_text, $func_search_words))
+			return false;
+	}
+	elseif(!is_any_matched($mod_text, $func_search_words)) {
+		return false;
+	}
+	// search for an better anchor - this have to be done before strip_tags() (may fail if search-string contains <, &, amp, gt, lt, ...)
+	$anchor =  make_url_target($mod_page_link_target, $anchor_text, $func_search_words);
+
+	// make the link from $mod_page_link, add anchor
+	$link = "";
+	$link = page_link($mod_page_link);
+	if(strpos($mod_page_link, 'http:')===FALSE)
+		$link .= make_url_searchstring($func_search_match, $func_search_url_array);
+	$link .= $anchor;
+
+	// now get the excerpt
+	$excerpt = "";
+	$excerpt_array = array();
+	if($mod_max_excerpt_num > 0) {
+		if(!$excerpt_array = get_excerpts($mod_text, $func_search_words, $mod_max_excerpt_num)) {
+			return false;
+		}
+		$excerpt = prepare_excerpts($excerpt_array, $func_search_words, $mod_max_excerpt_num);
+	}
+
+	// handle thumbs - to deactivate this look in the module's search.php: $show_thumb (or maybe in the module's settings-page)
+	if($mod_pic_link != "") {
+		$excerpt = '<table class="excerpt_thumb" width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td width="110" valign="top"><a href="'.$link.'"><img src="'.WB_URL.'/'.MEDIA_DIRECTORY.$mod_pic_link.'" alt="" /></a></td><td>'.$excerpt.'</td></tr></tbody></table>';
+	}
+
+	// print-out the excerpt
+	$vars = array();
+	$values = array();
+	list($date, $time) = get_page_modified($mod_page_modified_when);
+	list($username, $displayname) = get_page_modified_by($mod_page_modified_by, $func_users);
+	$vars = array('[LINK]', '[TITLE]', '[DESCRIPTION]', '[USERNAME]','[DISPLAY_NAME]','[DATE]','[TIME]','[TEXT_LAST_UPDATED_BY]','[TEXT_ON]','[EXCERPT]');
+	$values = array(
+		$link,
+		$mod_page_title,
+		$mod_page_description,
+		$username,
+		$displayname,
+		$date,
+		$time,
+		$TEXT['LAST_UPDATED_BY'],
+		$TEXT['ON'],
+		$excerpt
+	);
+	echo str_replace($vars, $values, $func_results_loop_string);
+	if($func_enable_flush) { // ATTN: this will bypass output-filters and may break template-layout or -filters
+		ob_flush();flush();
+	}
+	return true;
+}
+
+// list all files and dirs in $dir (recursive), omits '.', '..', and hidden files/dirs
+// returns an array of two arrays ($files[] and $dirs[]).
+// usage: list($files,$dirs) = list_files_dirs($directory);
+//        $depth: get subdirs (true/false)
+function list_files_dirs($dir, $depth=true, $files=array(), $dirs=array()) {
+	$dh=opendir($dir);
+	while(($file = readdir($dh)) !== false) {
+		if($file{0} == '.' || $file == '..') {
+			continue;
+		}
+		if(is_dir($dir.'/'.$file)) {
+			if($depth) {
+				$dirs[] = $dir.'/'.$file;
+				list($files, $dirs) = list_files_dirs($dir.'/'.$file, $depth, $files, $dirs);
+			}
+		} else {
+			$files[] = $dir.'/'.$file;
+		}
+	}
+	closedir($dh);
+	natcasesort($files);
+	natcasesort($dirs);
+	return(array($files, $dirs));
+}
+
+// keeps only wanted entries in array $files. $str have to be an eregi()-compatible regex
+function clear_filelist($files, $str, $keep=true) {
+	// options: $keep = true  : remove all non-matching entries
+	//          $keep = false : remove all matching entries
+	$c_filelist = array();
+	if($str == '')
+		return $files;
+	foreach($files as $file) {
+		if($keep) {
+			if(eregi($str, $file)) {
+				$c_filelist[] = $file;
+			}
+		} else {
+			if(!eregi($str, $file)) {
+				$c_filelist[] = $file;
+			}
+		}
+	}
+	return($c_filelist);
+}
+
+?>

Property changes on: branches/2.8.x/wb/search/search_modext.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/search/index.php
===================================================================
--- branches/2.8.x/wb/search/index.php	(revision 1261)
+++ branches/2.8.x/wb/search/index.php	(revision 1262)
@@ -1,63 +1,90 @@
-<?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
-
-*/
-
-// Include the config file
-require('../config.php');
-
-// Required page details
-$page_id = 0;
-$page_description = '';
-$page_keywords = '';
-define('PAGE_ID', 0);
-define('ROOT_PARENT', 0);
-define('PARENT', 0);
-define('LEVEL', 0);
-define('PAGE_TITLE', $TEXT['SEARCH']);
-define('MENU_TITLE', $TEXT['SEARCH']);
-define('MODULE', '');
-define('VISIBILITY', 'public');
-define('PAGE_CONTENT', 'search.php');
-
-// Find out what the search template is
-$database = new database();
-$query_template = $database->query("SELECT value FROM ".TABLE_PREFIX."search WHERE name = 'template' LIMIT 1");
-$fetch_template = $query_template->fetchRow();
-$template = $fetch_template['value'];
-if($template != '') {
-	define('TEMPLATE', $template);
-}
-unset($template);
-
-//Get the referrer page ID if it exists
-if(isset($_REQUEST['referrer']) && is_numeric($_REQUEST['referrer']) && intval($_REQUEST['referrer']) > 0) {
-	define('REFERRER_ID', intval($_REQUEST['referrer']));
-} else {
-	define('REFERRER_ID', 0);
-}
-
-// Include index (wrapper) file
-require(WB_PATH.'/index.php');
-
+<?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
+ * @package         search
+ * @author          Ryan Djurovich
+ * @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
+ * @lastmodified    $Date$
+ *
+ */
+
+// Include the config file
+require('../config.php');
+
+// Required page details
+$page_id = 0;
+$page_description = '';
+$page_keywords = '';
+define('PAGE_ID', 0);
+define('ROOT_PARENT', 0);
+define('PARENT', 0);
+define('LEVEL', 0);
+define('PAGE_TITLE', $TEXT['SEARCH']);
+define('MENU_TITLE', $TEXT['SEARCH']);
+define('MODULE', '');
+define('VISIBILITY', 'public');
+define('PAGE_CONTENT', 'search.php');
+
+// Find out what the search template is
+$database = new database();
+$query_template = $database->query("SELECT value FROM ".TABLE_PREFIX."search WHERE name = 'template' LIMIT 1");
+$fetch_template = $query_template->fetchRow();
+$template = $fetch_template['value'];
+if($template != '') {
+	define('TEMPLATE', $template);
+}
+unset($template);
+
+//Get the referrer page ID if it exists
+if(isset($_REQUEST['referrer']) && is_numeric($_REQUEST['referrer']) && intval($_REQUEST['referrer']) > 0) {
+	define('REFERRER_ID', intval($_REQUEST['referrer']));
+} else {
+	define('REFERRER_ID', 0);
+}
+
+// Include index (wrapper) file
+require(WB_PATH.'/index.php');
+
 ?>
\ No newline at end of file

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