Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 2121)
+++ branches/2.8.x/CHANGELOG	(revision 2122)
@@ -11,6 +11,8 @@
 ! = Update/Change
 ===============================================================================
 
+18 Mar-2015 Build 2122 Manuela v.d.Decken(DarkViper)
+! /index.php adapted for WB-2.8.4
 16 Mar-2015 Build 2121 Manuela v.d.Decken(DarkViper)
 ! SqlImport::setDefaultCollation() requesting charsets modified
 ! framework/initialize  some fixes and modifications
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 2121)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 2122)
@@ -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.4');
-if(!defined('REVISION')) define('REVISION', '2121');
+if(!defined('REVISION')) define('REVISION', '2122');
 if(!defined('SP')) define('SP', '');
Index: branches/2.8.x/wb/index.php
===================================================================
--- branches/2.8.x/wb/index.php	(revision 2121)
+++ branches/2.8.x/wb/index.php	(revision 2122)
@@ -4,13 +4,13 @@
  * @category        Core
  * @package         Core_sys
  * @author          WebsiteBaker Project
- * @copyright       2009-, WebsiteBaker Org. e.V.
- * @link			http://www.websitebaker2.org/
+ * @copyright      2009-, WebsiteBaker Org. e.V.
+ * @link            http://websitebaker.org/
  * @license         http://www.gnu.org/licenses/gpl.html
  * @platform        WebsiteBaker 2.8.x
  * @requirements    PHP 5.2.2 and higher
  * @version         $Id$
- * @filesource		$HeadURL$
+ * @filesource      $HeadURL$
  * @lastmodified    $Date$
  *
  */
@@ -19,78 +19,115 @@
 if (isset($iPageId)) { $page_id = $iPageId; }
 if (isset($page_id) && !isset($iPageId)) { $iPageId = $page_id; }
 // Include config file
-$config_file = dirname(__FILE__).'/config.php';
-if(file_exists($config_file) && !defined('WB_URL'))
-{
-	require_once($config_file);
+$sStartUpFile = __DIR__.'/framework/initialize.php';
+if (file_exists($sStartUpFile) && !defined('SYSTEM_RUN')) {
+    require($sStartUpFile);
 }
+/* ******************************************** */
 // Check if the config file has been set-up
-if(!defined('TABLE_PREFIX'))
-{
+if (!defined('SYSTEM_RUN') || SYSTEM_RUN == false) {
 /*
  * Remark:  HTTP/1.1 requires a qualified URI incl. the scheme, name
  * of the host and absolute path as the argument of location. Some, but
  * not all clients will accept relative URIs also.
  */
-	$host       = $_SERVER['HTTP_HOST'];
-	$uri        = rtrim(dirname($_SERVER['SCRIPT_NAME']), '/\\');
-	$file       = 'install/index.php';
-	$target_url = 'http://'.$host.$uri.'/'.$file;
-	$sResponse  = $_SERVER['SERVER_PROTOCOL'].' 307 Temporary Redirect';
-	header($sResponse);
-	header('Location: '.$target_url);
-	exit;	// make sure that subsequent code will not be executed
+    $host       = $_SERVER['HTTP_HOST'];
+    $uri        = rtrim(dirname($_SERVER['SCRIPT_NAME']), '/\\');
+    $file       = 'install/index.php';
+    $target_url = 'http://'.$host.$uri.'/'.$file;
+    $sResponse  = $_SERVER['SERVER_PROTOCOL'].' 307 Temporary Redirect';
+    header($sResponse);
+    header('Location: '.$target_url);
+    exit; // make sure that subsequent code will not be executed
 }
-
-//require_once(WB_PATH.'/framework/class.frontend.php');
-
-if(!class_exists('frontend', false)){ include(WB_PATH.'/framework/class.frontend.php'); }
-
+/* ******************************************** */
+// dispatch RSS requests *** mandatory argument:  ?rss=$iSectionId
+if (($iRssSectionId = intval((@$_GET['rss'] ?: 0))) && defined('SYSTEM_RUN')) {
+    $sql = 'SELECT `module` FROM `'.$oDb-TablePrefix.'sections` '
+         . 'WHERE `section_id`='.$iRssSectionId;
+    if (($sRssAddon = $oDb->getOne($sql))) {
+        $sRssClass = 'm_'.$sRssAddon.'_RssFeeder';
+        if (class_exist($sRssClass)) {
+            $oRss = new $sRssClass(WbAdapter::getInstance(), $iRssSectionId);
+            $oRss->setTemplate();
+            $oRss->doExecute();
+            exit;
+        }
+    }
+    RssFeederAbstract::sendRssError();
+    exit;
+}
+/* ******************************************** */
 // Create new frontend object
 if (!isset($wb) || !($wb instanceof frontend)) {
     $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');
+require($oReg->AppPath.'framework/frontend.functions.php');
 // reload all of the already defined global constants
-WbAdaptor::getInstance()->getWbConstants();
-// redirect menu-link
-/**
- *
- * Removed the extra handling of menu links in index.php
- * Moved it to the view.php of module menu links.
- * Now the extra functionality of this module is seperated from the
- * core and you can uninstall it if you like.
- * Freeing the core from unnecessary code.
- *
- *
- */
+$oReg->getWbConstants();
 
-ob_start();
-require(WB_PATH.'/templates/'.TEMPLATE.'/index.php');
-$output = ob_get_contents();
-if(ob_get_length() > 0) { ob_end_clean(); }
+// load and run template file
+$output = '';
+if (is_readable($oReg->TemplatePath.'index.php')) {
+//    EventDispatcher::getInstance()->triggerEvent('beforeTemplateStart', 'core');
+// load new Template-Code-Class if available
+    if (is_readable($oReg->TemplatePath.'TemplateCode.php')) {
+        require($oReg->TemplatePath.'TemplateCode.php');
+        if (class_exist('TemplateCode', false)) {
+            $oTpl = new TemplateCode($oReg);
+            if(!$oTpl instanceof TemplateCodeAbstract) {
+            // quit if TemplateCode does not implement the correct interface
+                throw new AppException('TemplateCode does not extends TemplateCodeAbstract!');
+            }
+        }
+    }
+// activate language files of the template if it's exists
+    $oTrans->enableTemplate(str_replace('/', '\\', rtrim($oReg->TemplateDir, '/')));
+    ob_start();
+    // run the template
+        require($oReg->TemplatePath.'index.php');
+    // catch the output of the template
+    $output = ob_get_clean();
+} else {
+    throw new AppException('['.$oReg->TemplateDir.'] is not a readable, valid template!!');
+}
 // execute frontend output filters
-	if(file_exists(WB_PATH .'/modules/output_filter/index.php')) {
-		include_once(WB_PATH .'/modules/output_filter/index.php');
-		if(function_exists('executeFrontendOutputFilter')) {
-			$output = executeFrontendOutputFilter($output);
-		}
-	}
-// now send complete page to the browser
+if(file_exists($oReg->AppPath .'modules/OutputFilter/index.php')) {
+    include_once($oReg->AppPath .'modules/OutputFilter/index.php');
+    if(function_exists('executeFrontendOutputFilter')) {
+        $output = executeFrontendOutputFilter($output);
+    }
+}
+/* *** trigger event to replace overcomming outputFilter ****************************** */
+//if (($oEvent = EventDispatcher::getInstance())) {
+//    $oEvent->triggerEvent('beforeContentSend', 'core', $output);
+//    $output = $oEvent->getInfo();
+//}
+/* ************************************************************************************ */
+// check if headers already sent
+$sFile = $sLine = '';
+if (headers_sent($sFile, $sLine)) {
+    $sMsg = 'headers already sent in '.$sFile.' in Line '.$sLine.'!! '.PHP_EOL
+          . 'it is not possible to set the right charset for your site!';
+    throw new RuntimeException($sMsg);
+}
+// send header to fix IE-Charset-bug which ignores <meta charset="xx">
+// -- prepared to send the header-buffer (including Cookies) in future --//
+header('Content-Type: text/html; charset='.$oReg->DefaultCharset);
+flush();
+// now send the complete content to the browser
 echo $output;
+flush();
+//if (($oEvent = EventDispatcher::getInstance()->triggerEvent('afterContentSend', 'core'))) {
 // end of wb-script
 exit;
