Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1291)
+++ branches/2.8.x/CHANGELOG	(revision 1292)
@@ -12,6 +12,10 @@
  
 ------------------------------------- 2.8.1 -------------------------------------
 19-Feb-2010 Dietmar Woellbrink (Luisehahne)
+!	insert $wb->preprocess($output), preprocess no longer needed in modules
+!	little modifaction in upgrade-script.php in function check_wb_tables
+!	updated module wysiwyg, set to module version 2.8
+19-Feb-2010 Dietmar Woellbrink (Luisehahne)
 !	recoded function extract_permission in /framework/functions.php
 !	change URL_HELP to http://www.websitebaker2.org/  in /framework/class.admin.php
 !	recoded function preprocess in /framework/class.frontend.php
Index: branches/2.8.x/wb/upgrade-script.php
===================================================================
--- branches/2.8.x/wb/upgrade-script.php	(revision 1291)
+++ branches/2.8.x/wb/upgrade-script.php	(revision 1292)
@@ -76,7 +76,12 @@
 function check_wb_tables()
 {
     global $database,$table_list;
-        $get_result = $database->query( "SHOW TABLES FROM ".DB_NAME);
+
+ // if prefix inludes '_' or '%'
+ $search_for = addcslashes ( TABLE_PREFIX, '%_' );
+ $get_result = $database->query( 'SHOW TABLES LIKE "'.$search_for.'%"');
+
+        // $get_result = $database->query( "SHOW TABLES FROM ".DB_NAME);
         $all_tables = array();
         if($get_result->numRows() > 0)
         {
@@ -288,14 +293,14 @@
     else
     {
         status_msg('<strong>WARNING:</strong><br />can\'t run Upgrade, missing tables', 'warning', 'div');
-    	echo '<h4>Install missing tables, you can install them in backend->addons->modules->advanced. Then again run upgrade-script.php</h4>';
+    	echo '<h4>Missing required tables. You can install them in backend->addons->modules->advanced. Then again run upgrade-script.php</h4>';
         $result = array_diff ( $table_list, $all_tables );
-        echo '<h4 class="warning">';
+        echo '<h4 class="warning"><br />';
         while ( list ( $key, $val ) = each ( $result ) )
         {
             echo TABLE_PREFIX.$val.' '.$FAIL.'<br>';
         }
-        echo '</h4>';
+        echo '<br /></h4>';
     	echo '<br /><form action="'. $_SERVER['PHP_SELF'] .'">';
     	echo '<input type="submit" value="kick me back" style="float:left;" />';
     	echo '</form>';
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1291)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1292)
@@ -52,6 +52,6 @@
 
 // check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
 if(!defined('VERSION')) define('VERSION', '2.8.x');
-if(!defined('REVISION')) define('REVISION', '1291');
+if(!defined('REVISION')) define('REVISION', '1292');
 
 ?>
\ No newline at end of file
Index: branches/2.8.x/wb/index.php
===================================================================
--- branches/2.8.x/wb/index.php	(revision 1291)
+++ branches/2.8.x/wb/index.php	(revision 1292)
@@ -1,111 +1,148 @@
-<?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
-
-*/
-
-$starttime = array_sum(explode(" ",microtime()));
-
-// Include config file
-require_once(dirname(__FILE__).'/config.php');
-
-// Check if the config file has been set-up
-if(!defined('WB_PATH')) {
-	header("Location: install/index.php");
-	exit(0);
-}
-
-require_once(WB_PATH.'/framework/class.frontend.php');
-// Create new frontend object
-$wb = new frontend();
-
-// Figure out which page to display
-// Stop processing if intro page was shown
-$wb->page_select() or die();
-
-// Collect info about the currently viewed page
-// and check permissions
-$wb->get_page_details();
-
-// Collect general website settings
-$wb->get_website_settings();
-
-// Load functions available to templates, modules and code sections
-// also, set some aliases for backward compatibility
-require(WB_PATH.'/framework/frontend.functions.php');
-
-// redirect menu-link
-$this_page_id = PAGE_ID;
-if(version_compare(phpversion(), '4.3', '>=')) $php43 = TRUE; else $php43 = FALSE;
-$query_this_module = $database->query("SELECT module, block FROM ".TABLE_PREFIX."sections WHERE page_id = '$this_page_id' AND module = 'menu_link'");
-if($query_this_module->numRows() == 1) { // This is a menu_link. Get link of target-page and redirect
-	// get target_page_id
-	$table = TABLE_PREFIX.'mod_menu_link';
-	$query_tpid = $database->query("SELECT * FROM $table WHERE page_id = '$this_page_id'");
-	if($query_tpid->numRows() == 1) {
-		$res=$query_tpid->fetchRow();
-		$target_page_id = $res['target_page_id'];
-		$r_type = $res['redirect_type'];
-		$anchor = $res['anchor'];
-		$extern = $res['extern'];
-		if($anchor != '0') $anchor = ''.$anchor;
-		else $anchor = FALSE;
-		// set redirect-type
-		if($r_type=='301') {
-			if($php43) @header('HTTP/1.1 301 Moved Permanently', TRUE, 301);
-			else @header('HTTP/1.1 301 Moved Permanently');
-		}
-		if($target_page_id == -1) {
-			if($extern!='') {
-				header("Location: $extern".($anchor?'#'.$anchor:''));
-			}
-		} else {
-			// get link of target-page
-			$table = TABLE_PREFIX.'pages';
-			$query_link = $database->query("SELECT link FROM $table WHERE page_id = '$target_page_id'");
-			if($query_link->numRows() == 1) {
-				$res=$query_link->fetchRow();
-				$target_page_link = $res['link'];
-				header('Location: '.WB_URL.PAGES_DIRECTORY.$target_page_link.PAGE_EXTENSION.($anchor?'#'.$anchor:''));
-				exit;
-			}
-		}
-	}
-}
-
-// Backwards compatible Frontend filter support
-// include the output filter module routines
-if(file_exists(WB_PATH .'/modules/output_filter/filter-routines.php')) {@require_once(WB_PATH .'/modules/output_filter/filter-routines.php');}
-// Load Droplet engine
-if(file_exists(WB_PATH .'/modules/droplets/droplets.php')) { @require_once(WB_PATH .'/modules/droplets/droplets.php'); }
-
-//Get pagecontent in buffer for Droplets and/or Filter operations
-ob_start();
-require(WB_PATH.'/templates/'.TEMPLATE.'/index.php');
-$output = ob_get_contents();
-if (ob_get_length() > 0) ob_end_clean();
-
-if(function_exists('evalDroplets')) { $output = evalDroplets($output); }
-if(function_exists('filter_frontend_output')) { $output = filter_frontend_output($output); }
-echo $output;
-
-?>
+<?php
+/**
+ *
+ * @category        frontend
+ * @package         page
+ * @author          WebsiteBaker Project
+ * @copyright       2004-2009, Ryan Djurovich
+ * @copyright       2009-2010, Website Baker Org. e.V.
+ * @link			http://www.websitebaker2.org/
+ * @license         http://www.gnu.org/licenses/gpl.html
+ * @platform        WebsiteBaker 2.8.x
+ * @requirements    PHP 4.4.9 and higher
+ * @version         $Id$
+ * @filesource		$HeadURL$
+ * @lastmodified    $Date$
+ *
+ */
+
+$starttime = array_sum(explode(" ",microtime()));
+
+define('DEBUG', false);
+// Include config file
+$config_file = dirname(__FILE__).'/config.php';
+if(file_exists($config_file))
+{
+	require_once($config_file);
+}
+
+// Check if the config file has been set-up
+if(!defined('WB_PATH'))
+{
+/*
+ * Anmerkung:  HTTP/1.1 verlangt einen absoluten URI inklusive dem Schema,
+ * Hostnamen und absoluten Pfad als Argument von Location:, manche aber nicht alle
+ * Clients akzeptieren jedoch auch relative URIs.
+ */
+	$host       = $_SERVER['HTTP_HOST'];
+	$uri        = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
+	$file       = 'install/index.php';
+	$target_url = 'http://'.$host.$uri.'/'.$file;
+	header('Location: '.$target_url);
+	exit;	// make sure that subsequent code will not be executed
+}
+
+require_once(WB_PATH.'/framework/class.frontend.php');
+// Create new frontend object
+$wb = new frontend();
+
+// Figure out which page to display
+// Stop processing if intro page was shown
+$wb->page_select() or die();
+
+// Collect info about the currently viewed page
+// and check permissions
+$wb->get_page_details();
+
+// Collect general website settings
+$wb->get_website_settings();
+
+// Load functions available to templates, modules and code sections
+// also, set some aliases for backward compatibility
+require(WB_PATH.'/framework/frontend.functions.php');
+
+// redirect menu-link
+$this_page_id = PAGE_ID;
+
+$php43 = version_compare(phpversion(), '4.3', '>=');
+
+$sql  = 'SELECT `module`, `block` FROM `'.TABLE_PREFIX.'sections` ';
+$sql .= 'WHERE `page_id` = '.(int)$this_page_id.' AND `module` = "menu_link"';
+$query_this_module = $database->query($sql);
+if($query_this_module->numRows() == 1)  // This is a menu_link. Get link of target-page and redirect
+{
+	// get target_page_id
+	$sql  = 'SELECT * FROM `'.TABLE_PREFIX.'mod_menu_link` WHERE `page_id` = '.(int)$this_page_id;
+	$query_tpid = $database->query($sql);
+	if($query_tpid->numRows() == 1)
+	{
+		$res = $query_tpid->fetchRow();
+		$target_page_id = $res['target_page_id'];
+		$redirect_type = $res['redirect_type'];
+		$anchor = ($res['anchor'] != '0' ? '#'.(string)$res['anchor'] : '');
+		$extern = $res['extern'];
+		// set redirect-type
+		if($redirect_type == 301)
+		{
+			if($php43)
+			{
+				@header('HTTP/1.1 301 Moved Permanently', TRUE, 301);
+			}
+			else
+			{
+				@header('HTTP/1.1 301 Moved Permanently');
+			}
+		}
+		if($target_page_id == -1)
+		{
+			if($extern != '')
+			{
+				$target_url = $extern.$anchor;
+				header('Location: '.$target_url);
+				exit;
+			}
+		}
+		else
+		{
+			// get link of target-page
+			$sql  = 'SELECT `link` FROM `'.TABLE_PREFIX.'pages` WHERE `page_id` = '.$target_page_id;
+			$target_page_link = $database->get_one($sql);
+			if($target_page_link != null)
+			{
+				$target_url = WB_URL.PAGES_DIRECTORY.$target_page_link.PAGE_EXTENSION.$anchor;
+				header('Location: '.$target_url);
+				exit;
+			}
+		}
+	}
+}
+//Get pagecontent in buffer for Droplets and/or Filter operations
+ob_start();
+require(WB_PATH.'/templates/'.TEMPLATE.'/index.php');
+$output = ob_get_contents();
+if(ob_get_length() > 0) { ob_end_clean(); }
+
+// wb->preprocess() -- replace all [wblink123] with real, internal links
+$wb->preprocess($output);
+// Load Droplet engine and process
+if(file_exists(WB_PATH .'/modules/droplets/droplets.php'))
+{
+    include_once(WB_PATH .'/modules/droplets/droplets.php');
+    if(function_exists('evalDroplets'))
+    {
+		$output = evalDroplets($output);
+    }
+}
+// Load backwards compatible frontend filter support and process
+if(file_exists(WB_PATH .'/modules/output_filter/filter-routines.php'))
+{
+    include_once(WB_PATH .'/modules/output_filter/filter-routines.php');
+    if(function_exists('filter_frontend_output'))
+    {
+        $output = filter_frontend_output($output);
+    }
+}
+echo $output;
+// end of wb-script
+exit;
+?>
\ No newline at end of file

Property changes on: branches/2.8.x/wb/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/modules/wysiwyg/view.php
===================================================================
--- branches/2.8.x/wb/modules/wysiwyg/view.php	(revision 1291)
+++ branches/2.8.x/wb/modules/wysiwyg/view.php	(revision 1292)
@@ -1,35 +1,26 @@
-<?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
-
-*/
-
-// Get content
-$get_content = $database->query("SELECT content FROM ".TABLE_PREFIX."mod_wysiwyg WHERE section_id = '$section_id'");
-$fetch_content = $get_content->fetchRow();
-$content = ($fetch_content['content']);
-
-$wb->preprocess($content);
-
-echo $content;
-
+<?php
+/**
+ *
+ * @category        modules
+ * @package         wysiwyg
+ * @author          WebsiteBaker Project
+ * @copyright       2004-2009, Ryan Djurovich
+ * @copyright       2009-2010, Website Baker Org. e.V.
+ * @link			http://www.websitebaker2.org/
+ * @license         http://www.gnu.org/licenses/gpl.html
+ * @platform        WebsiteBaker 2.8.x
+ * @requirements    PHP 4.4.9 and higher
+ * @version         $Id$
+ * @filesource		$HeadURL$
+ * @lastmodified    $Date$
+ *
+ */
+
+// Get content
+$get_content = $database->query("SELECT content FROM ".TABLE_PREFIX."mod_wysiwyg WHERE section_id = '$section_id'");
+$fetch_content = $get_content->fetchRow();
+$content = ($fetch_content['content']);
+
+echo $content;
+
 ?>
\ No newline at end of file

Property changes on: branches/2.8.x/wb/modules/wysiwyg/view.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/modules/wysiwyg/info.php
===================================================================
--- branches/2.8.x/wb/modules/wysiwyg/info.php	(revision 1291)
+++ branches/2.8.x/wb/modules/wysiwyg/info.php	(revision 1292)
@@ -1,35 +1,28 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2009, Ryan Djurovich
-
- Website Baker is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-$module_directory = 'wysiwyg';
-$module_name = 'WYSIWYG';
-$module_function = 'page';
-$module_version = '2.7';
-$module_platform = '2.7 | 2.8.x';
-$module_author = 'Ryan Djurovich';
-$module_license = 'GNU General Public License';
-$module_description = 'This module allows you to edit the contents of a page using a graphical editor';
-
+<?php
+/**
+ *
+ * @category        modules
+ * @package         wysiwyg
+ * @author          WebsiteBaker Project
+ * @copyright       2004-2009, Ryan Djurovich
+ * @copyright       2009-2010, Website Baker Org. e.V.
+ * @link			http://www.websitebaker2.org/
+ * @license         http://www.gnu.org/licenses/gpl.html
+ * @platform        WebsiteBaker 2.8.x
+ * @requirements    PHP 4.4.9 and higher
+ * @version         $Id$
+ * @filesource		$HeadURL$
+ * @lastmodified    $Date$
+ *
+ */
+
+$module_directory = 'wysiwyg';
+$module_name = 'WYSIWYG';
+$module_function = 'page';
+$module_version = '2.8';
+$module_platform = '2.7 | 2.8.x';
+$module_author = 'Ryan Djurovich';
+$module_license = 'GNU General Public License';
+$module_description = 'This module allows you to edit the contents of a page using a graphical editor';
+
 ?>
\ No newline at end of file

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