Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1759)
+++ branches/2.8.x/CHANGELOG	(revision 1760)
@@ -13,6 +13,12 @@
 
 
 
+18 Sep-2012 Build 1760 Dietmar Woellbrink (Luisehahne)
+! fallback changes in wysiwyg Revision 1754
+  because it's required that section_id is the PRIMARY KEY
+  Fallback will be done in upgrade-script until the final version  
+! build in extra input seo title in page settings
+! beginning rebranding wb_theme
 17 Sep-2012 Build 1759 Dietmar Woellbrink (Luisehahne)
 ! during Reformat/rebuild all existing access files in upgrade-script
   root_parent will be set to page_id
Index: branches/2.8.x/wb/upgrade-script.php
===================================================================
--- branches/2.8.x/wb/upgrade-script.php	(revision 1759)
+++ branches/2.8.x/wb/upgrade-script.php	(revision 1760)
@@ -489,10 +489,11 @@
 		$sql .= 'WHERE `name`=\'no_results\'';
 	    echo ($database->query($sql)) ? ' $OK<br />' : ' $FAIL<br />';
 	}
+
 	/**********************************************************
- *  - Add field "redirect_type" to table "mod_menu_link"
- *  has to be moved later to upgrade.php in modul menu_link, because modul can be removed
- */
+     *  - Add field "redirect_type" to table "mod_menu_link"
+     *  has to be moved later to upgrade.php in modul menu_link, because modul can be removed
+     */
 	$table_name = TABLE_PREFIX.'mod_menu_link';
 	$field_name = 'redirect_type';
 	$description = "INT NOT NULL DEFAULT '301' AFTER `target_page_id`";
@@ -514,8 +515,8 @@
 	echo ($database->field_modify($table_name, $field_name, $description) ? " $OK<br />" : " $FAIL!<br />");
 
 	/**********************************************************
- *  - Add field "page_icon" to table "pages"
- */
+     *  - Add field "page_icon" to table "pages"
+     */
 	$table_name = TABLE_PREFIX.'pages';
 	$field_name = 'page_icon';
 	$description = "VARCHAR( 512 ) NOT NULL DEFAULT '' AFTER `page_title`";
@@ -528,20 +529,6 @@
 	}
 
 	/**********************************************************
-	 *  - Add field "tooltip" to table "pages"
- */
-	$table_name = TABLE_PREFIX.'pages';
-	$field_name = 'tooltip';
-	$description = "VARCHAR( 512 ) NOT NULL DEFAULT '' AFTER `page_icon`";
-	if(!$database->field_exists($table_name,$field_name)) {
-		echo "Adding field tooltip to pages table";
-		echo ($database->field_add($table_name, $field_name, $description) ? " $OK<br />" : " $FAIL!<br />");
-	} else {
-	echo "Modify field tooltip to pages table";
-	echo ($database->field_modify($table_name, $field_name, $description) ? " $OK<br />" : " $FAIL!<br />");
-	}
-
-	/**********************************************************
 	 *  - Add field "page_code" to table "pages"
 	 */
 	$table_name = TABLE_PREFIX.'pages';
@@ -556,8 +543,8 @@
 	}
 
 	/**********************************************************
- *  - Add field "menu_icon_0" to table "pages"
- */
+     *  - Add field "menu_icon_0" to table "pages"
+     */
 	$table_name = TABLE_PREFIX.'pages';
 	$field_name = 'menu_icon_0';
 	$description = "VARCHAR( 512 ) NOT NULL DEFAULT '' AFTER `menu_title`";
@@ -571,7 +558,7 @@
 
 	/**********************************************************
 	 *  - Add field "menu_icon_1" to table "pages"
- */
+     */
 	$table_name = TABLE_PREFIX.'pages';
 	$field_name = 'menu_icon_1';
 	$description = "VARCHAR( 512 ) NOT NULL DEFAULT '' AFTER `menu_icon_0`";
@@ -585,7 +572,7 @@
 
 	/**********************************************************
 	 *  - Add field "tooltip" to table "pages"
- */
+     */
 	$table_name = TABLE_PREFIX.'pages';
 	$field_name = 'tooltip';
 	$description = "VARCHAR( 512 ) NOT NULL DEFAULT '' AFTER `menu_icon_1`";
@@ -599,7 +586,7 @@
 
 	/**********************************************************
 	 *  - Add field "admin_groups" to table "pages"
- */
+     */
 	$table_name = TABLE_PREFIX.'pages';
 	$field_name = 'admin_groups';
 	$description = "VARCHAR( 512 ) NOT NULL DEFAULT '1'";
@@ -633,20 +620,31 @@
 	echo "Modify field viewing_users to pages table";
 	echo ($database->field_modify($table_name, $field_name, $description) ? " $OK<br />" : " $FAIL!<br />");
 
+
+/**
+ * This part with changing in mod_wysiwyg will be removed in the final version
+ * special workout for the tester
+ */
 	/**********************************************************
 	 *  - Remove/add PRIMARY KEY from/to "section_id" from table "mod_wysiwygs"
 	 */
 	$sTable = TABLE_PREFIX.'mod_wysiwyg';
 	$field_name = 'wysiwyg_id';
-	if(!$database->field_exists($sTable,$field_name)) {
+	if($database->field_exists($sTable,$field_name)) {
     	echo "Remove PRIMARY KEY from table mod_wysiwygs";
-        $sql = 'ALTER TABLE `'.DB_NAME.'`.`'.$sTable.'` DROP PRIMARY KEY';
+//ALTER TABLE `wb283_mod_wysiwyg` DROP `wysiwyg_id`
+        $sql = 'ALTER TABLE `'.DB_NAME.'`.`'.$sTable.'` DROP `wysiwyg_id`';
         echo ($database->query($sql) ? " $OK<br />" : " $FAIL!<br />");
 
-    	echo "add new PRIMARY KEY to table mod_wysiwygs";
-        $sql = 'ALTER TABLE `'.$sTable.'`  ADD `wysiwyg_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST';
-        echo ($database->query($sql) ? " $OK<br />" : " $FAIL!<br />");
+//    	echo "add new PRIMARY KEY to table mod_wysiwygs";
+//        $sql = 'ALTER TABLE `'.$sTable.'` DROP `wysiwyg_id`';
+//        echo ($database->query($sql) ? " $OK<br />" : " $FAIL!<br />");
     }
+	echo "Change PRIMARY KEY from table mod_wysiwygs";
+    $sql = 'ALTER TABLE `'.DB_NAME.'`.`'.$sTable.'` ADD PRIMARY KEY (`section_id`)';
+    echo ($database->query($sql) ? " $OK<br />" : " $FAIL!<br />");
+
+
 }
 
 /**********************************************************
@@ -683,7 +681,7 @@
     ///**********************************************************
     // *  - Reformat/rebuild all existing access files
     // */
-    $msg[] = "All existing access files anew format";
+    $msg[] = "Refresh all existing access files ";
     $sql = 'SELECT `page_id`,`root_parent`,`link`, `level` FROM `'.TABLE_PREFIX.'pages` ORDER BY `link`';
     if (($oPage = $database->query($sql)))
     {
@@ -690,8 +688,19 @@
         $x = 0;
         while (($page = $oPage->fetchRow(MYSQL_ASSOC)))
         {
-            $sql = 'UPDATE `'.TABLE_PREFIX.'pages` '
-                 . 'SET `root_parent`='.$page['page_id'].' WHERE page_id = '.$page['page_id'];
+            // Work out level
+            $level = level_count($page['page_id']);
+            // Work out root parent
+            $root_parent = root_parent($page['page_id']);
+            // Work out page trail
+            $page_trail = get_page_trail($page['page_id']);
+            // Update page with new level and link
+            $sql  = 'UPDATE `'.TABLE_PREFIX.'pages` SET ';
+            $sql .= '`root_parent` = '.$root_parent.', ';
+            $sql .= '`level` = '.$level.', ';
+            $sql .= '`page_trail` = "'.$page_trail.'" ';
+            $sql .= 'WHERE `page_id` = '.$page['page_id'];
+
             if(!$database->query($sql)) {}
             $filename = WB_PATH.PAGES_DIRECTORY.$page['link'].PAGE_EXTENSION;
             $msg = create_access_file($filename, $page['page_id'], $page['level']);
Index: branches/2.8.x/wb/admin/skel/themes/htt/footer.htt
===================================================================
--- branches/2.8.x/wb/admin/skel/themes/htt/footer.htt	(revision 1759)
+++ branches/2.8.x/wb/admin/skel/themes/htt/footer.htt	(revision 1760)
@@ -16,7 +16,7 @@
 </tbody>
 </table>
 <!-- BEGIN show_debug_block -->
-<div class="mbox dev-info">
+<div class="mbox dev-info rounded shadow">
 	<div style="text-align:left; width: auto;">
 		<span class="">Memory Limit: {FILESIZE}&nbsp;|&nbsp;</span>
 		<span class="">Used Memory: {MEMORY}&nbsp;|&nbsp;</span>
Index: branches/2.8.x/wb/admin/skel/themes/htt/header.htt
===================================================================
--- branches/2.8.x/wb/admin/skel/themes/htt/header.htt	(revision 1759)
+++ branches/2.8.x/wb/admin/skel/themes/htt/header.htt	(revision 1760)
@@ -35,7 +35,7 @@
 <div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>
 <div class="main">
 
-<table  class="header layout">
+<table class="header layout">
 <tr>
 	<td class="logo">
 		<a href="{ADMIN_URL}" title="{TITLE_START}"><img src="{THEME_URL}/images/logo.png" alt="Logo" /></a>
@@ -55,7 +55,7 @@
 </tr>
 </table>
 
-<div class="table">
+<div class="table rounded shadow">
 
 	<div class="hmenu {LOGIN_DISPLAY_NONE}">
 		<ul>
Index: branches/2.8.x/wb/admin/skel/themes/htt/pages_settings.htt
===================================================================
--- branches/2.8.x/wb/admin/skel/themes/htt/pages_settings.htt	(revision 1759)
+++ branches/2.8.x/wb/admin/skel/themes/htt/pages_settings.htt	(revision 1760)
@@ -46,6 +46,10 @@
 				<label for="menu_title">{TEXT_MENU_TITLE}:</label>
 				<input type="text" id="menu_title" name="menu_title" value="{MENU_TITLE}" />
 			</div>
+			<div>
+				<label for="seo_title">{TEXT_SEO_TITLE}:</label>
+				<input type="text" id="seo_title" name="seo_title" value="{SEO_TITLE}" />
+			</div>
 			<div class="{PAGE_EXTENDED_HIDE}">
 				<label for="menu_icon_0" {p_menu_icon0_dir} style="background-image: url({THEME_URL}/icons/help_16.png);">{TEXT_MENU_ICON_0}:</label>
 					<select id="menu_icon_0" name="menu_icon_0">
Index: branches/2.8.x/wb/admin/pages/settings.php
===================================================================
--- branches/2.8.x/wb/admin/pages/settings.php	(revision 1759)
+++ branches/2.8.x/wb/admin/pages/settings.php	(revision 1760)
@@ -19,6 +19,7 @@
 require_once(WB_PATH.'/framework/class.admin.php');
 $admin = new admin('Pages', 'pages_settings');
 
+
 /*-- Parent page list ------------------------------------------------------------------*/
 	function parent_list($parent)
 	{
@@ -26,7 +27,7 @@
 		$sDisabled = ' disabled="disabled"';
 		$sSelected  = ' selected="selected"';
 
-		$sql = 'SELECT `page_id`, `level`, `parent`, `menu_title`, `page_title`, '
+		$sql = 'SELECT `page_id`, `level`, `link`, `parent`, `menu_title`, `page_title`, '
 		     .        '`language`, `admin_groups`, `admin_users`, `visibility`, '
 		     .        '`viewing_groups`, `viewing_users` '
 		     . 'FROM `'.TABLE_PREFIX.'pages` '
@@ -94,6 +95,8 @@
 	$sql = 'SELECT * FROM `'.TABLE_PREFIX.'pages` WHERE `page_id` = '.$page_id;
 	if( ($oPages = $database->query($sql)) ) {
 		$aCurrentPage = $oPages->fetchRow(MYSQL_ASSOC);
+		// Work-out if we should set seo_title
+        $aCurrentPage['seo_title'] = basename($aCurrentPage['link']);
 		// Work-out if we should check for existing page_code
 		$field_set = isset($aCurrentPage['page_code']);
 		if( !$admin->ami_group_member($aCurrentPage['admin_groups']) &&
@@ -130,7 +133,9 @@
 			'PAGE_ID'              => $aCurrentPage['page_id'],
 			'PAGE_IDKEY'           => $admin->getIDKEY($aCurrentPage['page_id']),
 			'PAGE_TITLE'           => ($aCurrentPage['page_title']),
+			'PAGE_LINK'            => ($aCurrentPage['link']),
 			'MENU_TITLE'           => ($aCurrentPage['menu_title']),
+			'SEO_TITLE'            => ($aCurrentPage['seo_title']=='') ? $aCurrentPage['menu_title'] : $aCurrentPage['seo_title'],
 			'DESCRIPTION'          => ($aCurrentPage['description']),
 			'KEYWORDS'             => ($aCurrentPage['keywords']),
 			'MODIFIED_BY'          => $user['display_name'],
Index: branches/2.8.x/wb/admin/pages/settings_save.php
===================================================================
--- branches/2.8.x/wb/admin/pages/settings_save.php	(revision 1759)
+++ branches/2.8.x/wb/admin/pages/settings_save.php	(revision 1760)
@@ -20,9 +20,15 @@
 require('../../config.php');
 require_once(WB_PATH.'/framework/class.admin.php');
 
+$lang_dir = dirname(__FILE__).'/languages/';
+$lang = file_exists($lang_dir.LANGUAGE.'.php') ? LANGUAGE : 'EN';
+require_once($lang_dir.$lang.'.php');
+
 // suppress to print the header, so no new FTAN will be set
 $admin = new admin('Pages', 'pages_settings',false);
 
+$pagetree_url = ADMIN_URL.'/pages/index.php';
+
 // Get page id
 if(!isset($_POST['page_id']) || (isset($_POST['page_id']) && preg_match('/[^0-9a-z]/i',$_POST['page_id'])) )
 {
@@ -33,7 +39,7 @@
 //	$page_id = (int)$_POST['page_id']; || preg_match('/[^0-9a-f]/i',$_POST['page_id'])
 	if((!($page_id = $admin->checkIDKEY('page_id')))) {
 		$admin->print_header();
-		$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], ADMIN_URL.'/pages/index.php');
+		$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], $pagetree_url);
 	}
 }
 
@@ -43,7 +49,6 @@
 	$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS']);
 }
 */
-$pagetree_url = ADMIN_URL.'/pages/index.php';
 $target_url = ADMIN_URL.'/pages/settings.php?page_id='.$page_id;
 
 if (!$admin->checkFTAN())
@@ -60,6 +65,7 @@
 // Get values
 $page_title = str_replace(array("[[", "]]"), '', htmlspecialchars($admin->get_post_escaped('page_title')));
 $menu_title = str_replace(array("[[", "]]"), '', htmlspecialchars($admin->get_post_escaped('menu_title')));
+$seo_title = str_replace(array("[[", "]]"), '', htmlspecialchars($admin->get_post_escaped('seo_title')));
 $page_code = intval($admin->get_post('page_code')) ;
 $description = str_replace(array("[[", "]]"), '', htmlspecialchars($admin->add_slashes($admin->get_post('description'))));
 $keywords = str_replace(array("[[", "]]"), '', htmlspecialchars($admin->add_slashes($admin->get_post('keywords'))));
@@ -86,18 +92,24 @@
 // Validate data
 if($page_title == '' || substr($page_title,0,1)=='.')
 {
-	$admin->print_error($MESSAGE['PAGES_BLANK_PAGE_TITLE']);
+	$admin->print_error($MESSAGE['PAGES_BLANK_PAGE_TITLE'],$target_url);
 }
 if($menu_title == '' || substr($menu_title,0,1)=='.')
 {
-	$admin->print_error($MESSAGE['PAGES_BLANK_MENU_TITLE']);
+	$admin->print_error($MESSAGE['PAGES_BLANK_MENU_TITLE'],$target_url);
 }
+if($seo_title == '' || substr($seo_title,0,1)=='.')
+{
+	$admin->print_error($MESSAGE['PAGES_BLANK_SEO_TITLE'],$target_url);
+}
 
 // Get existing perms
-$sql = 'SELECT `parent`,`link`,`position`,`admin_groups`,`admin_users` FROM `'.TABLE_PREFIX.'pages` WHERE `page_id`='.$page_id;
+$sql  = 'SELECT `parent`,`link`,`position`,`admin_groups`,`admin_users`,`menu_title` ';
+$sql .= 'FROM `'.TABLE_PREFIX.'pages` WHERE `page_id`='.$page_id;
+
 $results = $database->query($sql);
 
-$results_array = $results->fetchRow();
+$results_array = $results->fetchRow(MYSQL_ASSOC);
 $old_parent = $results_array['parent'];
 $old_link = $results_array['link'];
 $old_position = $results_array['position'];
@@ -154,10 +166,7 @@
 {
 	$level = level_count($parent)+1;
 	$root_parent = root_parent($parent);
-}
-else {
-//	$level = '0';
-//	$root_parent = '0';
+} else {
 // Work out level
     $level = level_count($page_id);
 // Work out root parent
@@ -164,41 +173,45 @@
     $root_parent = root_parent($page_id);
 }
 
+$link = '/'.page_filename($seo_title);
+
 // Work-out what the link should be
-if($parent == '0')
-{
-	$link = '/'.page_filename($menu_title);
-	// rename menu titles: index && intro to prevent clashes with intro page feature and WB core file /pages/index.php
-	if($link == '/index' || $link == '/intro')
+if($parent == '0') {
+    if($link == '/index' || $link == '/intro')
     {
-		$link .= '_' .$page_id;
-		$filename = WB_PATH.PAGES_DIRECTORY.'/'.page_filename($menu_title).'_'.$page_id .PAGE_EXTENSION;
-	} else {
-		$filename = WB_PATH.PAGES_DIRECTORY.'/'.page_filename($menu_title).PAGE_EXTENSION;
-	}
+    	$link .= '_' .$page_id;
+    	$filename = WB_PATH.PAGES_DIRECTORY.$link .PAGE_EXTENSION;
+
+    } else {
+        $filename = WB_PATH.PAGES_DIRECTORY.$link.PAGE_EXTENSION;
+    }
 } else {
 	$parent_section = '';
 	$parent_titles = array_reverse(get_parent_titles($parent));
+
 	foreach($parent_titles AS $parent_title)
     {
-		$parent_section .= page_filename($parent_title).'/';
+		$parent_section .= '/'.page_filename($parent_title);
 	}
+
 	if($parent_section == '/')
     {
       $parent_section = '';
     }
-	$link = '/'.$parent_section.page_filename($menu_title);
-	$filename = WB_PATH.PAGES_DIRECTORY.'/'.$parent_section.page_filename($menu_title).PAGE_EXTENSION;
+
+	$link = $parent_section.$link;
+    $filename = WB_PATH.PAGES_DIRECTORY.$link.PAGE_EXTENSION;
 }
 
 // Check if a page with same page filename exists
 // $database = new database();
 $sql = 'SELECT `page_id`,`page_title` FROM `'.TABLE_PREFIX.'pages` WHERE `link` = "'.$link.'" AND `page_id` != '.$page_id;
+
 $get_same_page = $database->query($sql);
 
 if($get_same_page->numRows() > 0)
 {
-	$admin->print_error($MESSAGE['PAGES_PAGE_EXISTS']);
+	$admin->print_error($MESSAGE['PAGES_PAGE_EXISTS'], $target_url);
 }
 
 // Update page with new order
@@ -233,8 +246,8 @@
      .     '`language`=\''.$language.'\', ';
 if($admin->ami_group_member('1')) {
 	$sql .= ''
-	     .     '`admin_groups`=\''.$sAdminGroups.'\', '
-	     .     '`admin_users`=\''.$sAdminUsers.'\', ';
+	     . '`admin_groups`=\''.$sAdminGroups.'\', '
+	     . '`admin_users`=\''.$sAdminUsers.'\', ';
 }
 $sql .= ''
      .     '`viewing_groups`=\''.$sViewingGroups.'\', '
@@ -246,6 +259,7 @@
 	$target_url = ADMIN_URL.'/pages/settings.php?page_id='.$page_id;
 	$admin->print_error($database->get_error(), $target_url );
 }
+
 // Clean old order if needed
 if($parent != $old_parent)
 {
@@ -257,9 +271,10 @@
 // Create a new file in the /pages dir if title changed
 if(!is_writable(WB_PATH.PAGES_DIRECTORY.'/'))
 {
-	$admin->print_error($MESSAGE['PAGES_CANNOT_CREATE_ACCESS_FILE']);
+	$admin->print_error($MESSAGE['PAGES_CANNOT_CREATE_ACCESS_FILE'], $target_url);
 } else {
     $old_filename = WB_PATH.PAGES_DIRECTORY.$old_link.PAGE_EXTENSION;
+
 	// First check if we need to create a new file
 	if(($old_link != $link) || (!file_exists($old_filename)))
     {
@@ -269,6 +284,7 @@
         {
 			unlink($old_filename);
 		}
+
 		// Create access file
 		create_access_file($filename,$page_id,$level);
 		// Move a directory for this page
@@ -309,43 +325,30 @@
 	}
 }
 
-// Function to fix page trail of subs
-function fix_page_trail($parent,$root_parent)
-{
-	// Get objects and vars from outside this function
-	global $admin, $template, $database, $TEXT, $MESSAGE;
-	// Get page list from database
-	// $database = new database();
-	$query = "SELECT page_id FROM ".TABLE_PREFIX."pages WHERE parent = '$parent'";
-	$get_pages = $database->query($query);
-	// Insert values into main page list
-	if($get_pages->numRows() > 0)
-    {
-		while($page = $get_pages->fetchRow())
-        {
-			// Fix page trail
+// using standard function by core,
+function fix_page_trail($page_id) {
+    global $database,$admin,$target_url,$MESSAGE;
+    // Work out level
+    $level = level_count($page_id);
+    // Work out root parent
+    $root_parent = root_parent($page_id);
+    // Work out page trail
+    $page_trail = get_page_trail($page_id);
+    // Update page with new level and link
+    $sql  = 'UPDATE `'.TABLE_PREFIX.'pages` SET ';
+    $sql .= '`root_parent` = '.$root_parent.', ';
+    $sql .= '`level` = '.$level.', ';
+    $sql .= '`page_trail` = "'.$page_trail.'" ';
+    $sql .= 'WHERE `page_id` = '.$page_id;
 
-			$database->query("UPDATE ".TABLE_PREFIX."pages SET ".($root_parent != 0 ?"root_parent = '$root_parent', ":"")." page_trail = '".get_page_trail($page['page_id'])."' WHERE page_id = '".$page['page_id']."'");
-			// Run this query on subs
-			fix_page_trail($page['page_id'],$root_parent);
-		}
-	}
+    if($database->query($sql)) {
+    	$admin->print_success($MESSAGE['PAGES_SAVED_SETTINGS'], $target_url );
+    } else {
+    	$admin->print_error($database->get_error(), $target_url );
+    }
 }
 
 // Fix sub-pages page trail
-fix_page_trail($page_id,$root_parent);
+fix_page_trail($page_id);
 
-/* END page "access file" code */
-
-//$pagetree_url = ADMIN_URL.'/pages/index.php';
-//$target_url = ADMIN_URL.'/pages/settings.php?page_id='.$page_id;
-// Check if there is a db error, otherwise say successful
-if($database->is_error())
-{
-	$admin->print_error($database->get_error(), $target_url );
-} else {
-	$admin->print_success($MESSAGE['PAGES_SAVED_SETTINGS'], $target_url );
-}
-
-// Print admin footer
 $admin->print_footer();
Index: branches/2.8.x/wb/admin/pages/languages/EN.php
===================================================================
--- branches/2.8.x/wb/admin/pages/languages/EN.php	(revision 1759)
+++ branches/2.8.x/wb/admin/pages/languages/EN.php	(revision 1760)
@@ -50,6 +50,7 @@
 $TEXT['SECTION_ORGANISATION'] = 'Organisation';
 $TEXT['SECTION_CONTENT']      = 'Content';
 $TEXT['SECTION_SECURITY']     = 'Security';
+$TEXT['SEO_TITLE']            = 'Seo Title';
 $TEXT['PAGE_ICON']            = 'Page image';
 $TEXT['PAGE_ICON_DIR']        = 'Folder Page image';
 $TEXT['MENU_ICON_0']          = 'Menu image normal';
@@ -56,9 +57,9 @@
 $TEXT['MENU_ICON_0_DIR']      = 'Folder Menu image normal';
 $TEXT['MENU_ICON_1']          = 'Menu image hover';
 $TEXT['MENU_ICON_1_DIR']      = 'Folder Menu image hover';
-$TEXT['SEO_TITLE']            = 'Seotitle';
 
 $MESSAGE['PAGES_LAST_MODIFIED'] = 'Last modification by';
+$MESSAGE['PAGES_BLANK_SEO_TITLE'] = 'Please enter a sro title';
 
 
 $HELP['PAGE_IMAGE_DIR']  = '<p>The topical side picture path is<br /> <b>{{icon_dir}}</b>.</p>';
Index: branches/2.8.x/wb/admin/pages/languages/DE.php
===================================================================
--- branches/2.8.x/wb/admin/pages/languages/DE.php	(revision 1759)
+++ branches/2.8.x/wb/admin/pages/languages/DE.php	(revision 1760)
@@ -50,6 +50,7 @@
 $TEXT['SECTION_ORGANISATION'] = 'Organisation';
 $TEXT['SECTION_CONTENT']      = 'Inhalt';
 $TEXT['SECTION_SECURITY']     = 'Sicherheit';
+$TEXT['SEO_TITLE']            = 'Seo Titel';
 $TEXT['PAGE_ICON']            = 'Seitenbild';
 $TEXT['PAGE_ICON_DIR']        = 'Verzeichnis Seitenbilder';
 $TEXT['MENU_ICON_0']          = 'Menübild normal';
@@ -56,8 +57,8 @@
 $TEXT['MENU_ICON_0_DIR']      = 'Verzeichnis Menübild normal';
 $TEXT['MENU_ICON_1']          = 'Menübild hover';
 $TEXT['MENU_ICON_1_DIR']      = 'Verzeichnis Menübild hover';
-$TEXT['SEO_TITLE']            = 'Seotitel';
 $MESSAGE['PAGES_LAST_MODIFIED'] = 'Letze Änderung durch';
+$MESSAGE['PAGES_BLANK_SEO_TITLE'] = 'Bitte geben Sie einen Seo Titel ein';
 
 $HELP['PAGE_IMAGE_DIR']  = '<p>Der aktuelle Seitenbildpfad ist<br /> <b>{{icon_dir}}</b>.</p>';
 $HELP['PAGE_IMAGE_DIR'] .='<p>Als Systemadministrator können Sie das Verzeichnis für Seiten-/Menuebilder unter <i>Optionen</i> <i>Erweiterte Optionen</i> in <i>Servereinstellung</i> ändern.</p>';
Index: branches/2.8.x/wb/admin/pages/add.php
===================================================================
--- branches/2.8.x/wb/admin/pages/add.php	(revision 1759)
+++ branches/2.8.x/wb/admin/pages/add.php	(revision 1760)
@@ -30,8 +30,9 @@
 require_once(WB_PATH.'/framework/functions.php');
 
 // Get values
-$title = $admin->get_post_escaped('title');
-$title = htmlspecialchars($title);
+//$title = $admin->get_post_escaped('title');
+//$title = htmlspecialchars($title);
+$title = str_replace(array("[[", "]]"), '', htmlspecialchars($admin->get_post_escaped('title')));
 $module = preg_replace('/[^a-z0-9_-]/i', "", $admin->get_post('type')); // fix secunia 2010-93-4
 $parent = intval($admin->get_post('parent')); // fix secunia 2010-91-2
 $visibility = $admin->get_post('visibility');
@@ -69,7 +70,7 @@
 // Validate data
 if($title == '' || substr($title,0,1)=='.')
 {
-	$admin->print_error($MESSAGE['PAGES_BLANK_PAGE_TITLE']);
+	$admin->print_error($title.'::'.$MESSAGE['PAGES_BLANK_PAGE_TITLE']);
 }
 
 // Check to see if page created has needed permissions
@@ -111,11 +112,13 @@
 	// rename menu titles: index && intro to prevent clashes with intro page feature and WB core file /pages/index.php
 	if($link == '/index' || $link == '/intro')
     {
-		$link .= '_0';
-		$filename = WB_PATH .PAGES_DIRECTORY .'/' .page_filename($title) .'_0' .PAGE_EXTENSION;
+		$sTmpFile = WB_PATH .PAGES_DIRECTORY .$link.PAGE_EXTENSION;
+		$link .= (file_exists($sTmpFile)) ? '_0' : '';
+		$filename = WB_PATH .PAGES_DIRECTORY .$link .PAGE_EXTENSION;
 	} else {
-		$filename = WB_PATH.PAGES_DIRECTORY.'/'.page_filename($title).PAGE_EXTENSION;
+		$filename = WB_PATH.PAGES_DIRECTORY.$link.PAGE_EXTENSION;
 	}
+
 } else {
 	$parent_section = '';
 	$parent_titles = array_reverse(get_parent_titles($parent));
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1759)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1760)
@@ -51,5 +51,5 @@
 
 // check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
 if(!defined('VERSION')) define('VERSION', '2.8.3');
-if(!defined('REVISION')) define('REVISION', '1759');
+if(!defined('REVISION')) define('REVISION', '1760');
 if(!defined('SP')) define('SP', '');
Index: branches/2.8.x/wb/templates/wb_theme/css/screen.css
===================================================================
--- branches/2.8.x/wb/templates/wb_theme/css/screen.css	(revision 1759)
+++ branches/2.8.x/wb/templates/wb_theme/css/screen.css	(revision 1760)
@@ -5,7 +5,7 @@
 /*  */
 div.main { border :0px none #666666; margin :0px auto 1em auto; min-width :60em; max-width :90em; font-size :1.0em; padding :4px; width : 85%; overflow :hidden; }
 .td { clear :both; font-size :1.0em; margin :0 auto; text-align :center; width :100%; }
-div.main .table { background :url(../images/bgtitle.png) #ffffff repeat-x; margin :0 auto; width :100%; }
+div.main .table { background :url(../images/bgtitle.png) #ffffff repeat-x; margin :0 auto; overflow :auto; width :100%; }
 .wrapper { position :relative; display :block; overflow :auto; width :inherit; }
 .content { padding :10px; text-align :left; overflow :hidden; }
 img { border :none; }
@@ -28,7 +28,7 @@
    table td a:hover { color :#3366ff; text-decoration :underline; }
 /* header horizontal navigation */  
 div.hmenu { background :#486991 url(../images/menu.png) repeat-x center; line-height :32px; margin :0px auto; font-size :1em; float :left; width :100%; }
-   div.hmenu ul { color :#ffffff; margin :0px auto; display :block; padding :0; list-style-position :outside; }
+   div.hmenu ul { color :#ffffff; margin :0px auto; display :block; padding :0 0 0 10px; list-style-position :outside; }
 	   div.hmenu * a { color :#ffffff; text-decoration :none; }
    div.hmenu ul li { color :#ffffff; display :inline; padding :10px 0px; }
    div.hmenu ul li a { color :#ffffff; display :inline; height :2em; padding :7px 5px; font-weight :bold; background :transparent; }
@@ -35,7 +35,7 @@
    div.hmenu ul li a.active,
    div.hmenu ul li a.current { color :#ffffff; background :transparent url(../images/menuo.png) repeat-x center; }
    div.hmenu ul li:hover,
-   div.hmenu ul li a:hover { color :#ffff99; background :transparent url(../images/menuo.png) repeat-x center; }
+   div.hmenu ul li a:hover { color :#fff; background :transparent url(../images/menuo.png) repeat-x center; }
 /* */
 table.footer { margin :1em auto; width :100%; }
 table.footer fieldset { background :#a8bccb; margin :0.5em auto; text-align :center; }
@@ -189,6 +189,7 @@
 table a:link { display :inline; font-weight :bold; padding-top :0; text-decoration :none; vertical-align :baseline; }
 table a:hover { color :#6699ff; }
 a:link { display :inline; font-weight :bold; padding-top :0; text-decoration :none; vertical-align :baseline; }
+a:visited { color :#0066cc; }
 a:hover { color :#6699ff; text-decoration :underline; }
 /**/
 .header_list_actions { text-align :left; width :150px; }
@@ -247,7 +248,7 @@
 div.page-settings-leftcol { float :left; padding :10px 10px 10px 10px; border-right :groove 2px #a8bccb; }
 	div.page-settings-leftcol div { padding :2px 0 3px 0; vertical-align :top; }
 	div.page-settings-leftcol label { width :170px; vertical-align :top; }
-div.page-settings-righttoprow { margin-left :417px; padding :5px 20px 5px 10px; }
+div.page-settings-righttoprow { margin-left :417px; padding :10px; }
 	div.page-settings-righttoprow label { width :110px; vertical-align :top; }
 div.page-settings-centercol { float :left; padding :10px 20px 10px 20px; border-right :groove 2px #a8bccb; }
 div.page-settings-rightcol { float :left; padding :10px 20px 10px 10px; border :none; }
@@ -264,7 +265,6 @@
 div.page_group div { overflow: hidden; }
 div.page-settings p.page_user,
 div.page-settings p.page_group {  } 
-
 /* */
 .header_title, .setting_value input, .setting_value select, .setting_value textarea, .value_input input, .value_input text, .value_input select, .form_submit, .input_full { width :80%; }
 .content_box { text-align :left; }
Index: branches/2.8.x/wb/templates/wb_theme/templates/header.htt
===================================================================
--- branches/2.8.x/wb/templates/wb_theme/templates/header.htt	(revision 1759)
+++ branches/2.8.x/wb/templates/wb_theme/templates/header.htt	(revision 1760)
@@ -34,7 +34,7 @@
 <div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>
 <div class="main">
 
-<table  class="header layout">
+<table class="header layout">
 <tr>
 	<td class="logo">
 		<a href="{ADMIN_URL}" title="{TITLE_START}"><img src="{THEME_URL}/images/logo.png" alt="Logo" /></a>
@@ -54,7 +54,7 @@
 </tr>
 </table>
 
-<div class="table">
+<div class="table rounded shadow">
 
 	<div class="hmenu {LOGIN_DISPLAY_NONE}">
 			<ul>
Index: branches/2.8.x/wb/templates/wb_theme/templates/footer.htt
===================================================================
--- branches/2.8.x/wb/templates/wb_theme/templates/footer.htt	(revision 1759)
+++ branches/2.8.x/wb/templates/wb_theme/templates/footer.htt	(revision 1760)
@@ -16,7 +16,7 @@
 </tbody>
 </table>
 <!-- BEGIN show_debug_block -->
-<div class="mbox dev-info">
+<div class="mbox dev-info rounded shadow">
 	<div style="text-align:left; width: auto;">
 		<span class="">Memory Limit: {FILESIZE}&nbsp;|&nbsp;</span>
 		<span class="">Used Memory: {MEMORY}&nbsp;|&nbsp;</span>
Index: branches/2.8.x/wb/templates/wb_theme/images/home.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: branches/2.8.x/wb/modules/wysiwyg/sql/mod_wysiwyg.sql
===================================================================
--- branches/2.8.x/wb/modules/wysiwyg/sql/mod_wysiwyg.sql	(revision 1759)
+++ branches/2.8.x/wb/modules/wysiwyg/sql/mod_wysiwyg.sql	(revision 1760)
@@ -24,12 +24,11 @@
 
 DROP TABLE IF EXISTS `{TABLE_PREFIX}mod_wysiwyg`;
 CREATE TABLE IF NOT EXISTS `{TABLE_PREFIX}mod_wysiwyg` (
-  `wysiwyg_id` int(11) NOT NULL AUTO_INCREMENT,
   `section_id` int(11) NOT NULL DEFAULT '0',
   `page_id` int(11) NOT NULL DEFAULT '0',
   `content` longtext NOT NULL,
   `text` longtext NOT NULL,
-  PRIMARY KEY (`wysiwyg_id`)
+  PRIMARY KEY (`section_id`)
 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
 
 /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
