Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1922)
+++ branches/2.8.x/CHANGELOG	(revision 1923)
@@ -11,6 +11,9 @@
 ! = Update/Change
 ===============================================================================
 
+08 Jun-2013 Build 1923 Werner v.d.Decken(DarkViper)
+! syncronize project
+# some small corrections in /admin/
 08 Jun-2013 Build 1922 Werner v.d.Decken(DarkViper)
 # fixed invalid translate addon activation (/admin/preferences/index.php)
 07 Jun-2013 Build 1921 Werner v.d.Decken(DarkViper)
Index: branches/2.8.x/wb/admin/groups/index.php
===================================================================
--- branches/2.8.x/wb/admin/groups/index.php	(revision 1922)
+++ branches/2.8.x/wb/admin/groups/index.php	(revision 1923)
@@ -20,8 +20,6 @@
 	function admin_groups_index()
 	{
 		$database = WbDatabase::getInstance();
-//		$mLang = ModLanguage::getInstance();
-//		$mLang->setLanguage(dirname(__FILE__).'/languages/', LANGUAGE, DEFAULT_LANGUAGE);
 		$mLang = Translate::getinstance();
 		$mLang->enableAddon('admin\groups');
 
@@ -127,7 +125,6 @@
 		}
 		print $output;
 		$admin->print_footer();
-		$mLang->disableAddon();
 	}
 	// start dispatcher maintenance
 	if(!defined('WB_PATH'))
Index: branches/2.8.x/wb/admin/templates/details.php
===================================================================
--- branches/2.8.x/wb/admin/templates/details.php	(revision 1922)
+++ branches/2.8.x/wb/admin/templates/details.php	(revision 1923)
@@ -17,6 +17,8 @@
 
 // Include the config file
 require('../../config.php');
+$mLang = Translate::getinstance();
+$mLang->enableAddon('admin\addons');
 require_once(WB_PATH .'/framework/functions.php');
 require_once(WB_PATH.'/framework/class.admin.php');
 // suppress to print the header, so no new FTAN will be set
@@ -24,7 +26,7 @@
 if( !$admin->checkFTAN() )
 {
 	$admin->print_header();
-	$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS']);
+	$admin->print_error($mLang->MESSAGE_GENERIC_SECURITY_ACCESS);
 }
 
 // After check print the header
@@ -31,7 +33,7 @@
 $admin->print_header();
 // Get template name
 if(!isset($_POST['file']) OR $_POST['file'] == "") {
-	$admin->print_error($MESSAGE['GENERIC_FORGOT_OPTIONS']);
+	$admin->print_error($mLang->MESSAGE_GENERIC_FORGOT_OPTIONS);
 } else {
 	$file = preg_replace('/[^a-z0-9_-]/i', "", $_POST['file']);  // fix secunia 2010-92-2
 }
@@ -38,32 +40,13 @@
 
 // Check if the template exists
 if(!is_dir(WB_PATH.'/templates/'.$file)) {
-	$admin->print_error($MESSAGE['GENERIC_NOT_INSTALLED']);
+	$admin->print_error($mLang->MESSAGE_GENERIC_NOT_INSTALLED);
 }
 
 // Check if the template exists
 if(!is_readable(WB_PATH.'/templates/'.$file)) {
-	$admin->print_error($MESSAGE['ADMIN_INSUFFICIENT_PRIVELLIGES']);
+	$admin->print_error($mLang->MESSAGE_ADMIN_INSUFFICIENT_PRIVELLIGES);
 }
-
-/*
-if(!isset($_POST['file']) OR $_POST['file'] == "") {
-	header("Location: index.php");
-	exit(0);
-} else {
-	$file = preg_replace('/[^a-z0-9_-]/i', "", $_POST['file']);  // fix secunia 2010-92-2
-}
-
-if(!file_exists(WB_PATH.'/templates/'.$file)) {
-	header("Location: index.php");
-	exit(0);
-}
-// Check if the template exists
-if(!is_dir(WB_PATH.'/templates/'.$file)) {
-	$admin->print_error($MESSAGE['GENERIC_NOT_INSTALLED']);
-}
-*/
-
 // Print admin header
 //$admin = new admin('Addons', 'templates_view');
 
@@ -109,12 +92,6 @@
       'LICENSE' => $row['license'],
     )
 );
-
-//$mLang = ModLanguage::getInstance();
-//$mLang->setLanguage(ADMIN_PATH.'/addons/languages/', LANGUAGE, DEFAULT_LANGUAGE);
-$mLang = Translate::getinstance();
-$mLang->enableAddon('admin\addons');
-
 /*-- insert all needed vars from language files ----------------------------------------*/
 $template->set_var($mLang->getLangArray());
 
@@ -122,6 +99,5 @@
 // Parse template object
 $template->parse('main', 'main_block', false);
 $template->pparse('output', 'page');
-
 // Print admin footer
 $admin->print_footer();
Index: branches/2.8.x/wb/admin/templates/index.php
===================================================================
--- branches/2.8.x/wb/admin/templates/index.php	(revision 1922)
+++ branches/2.8.x/wb/admin/templates/index.php	(revision 1923)
@@ -84,5 +84,6 @@
 $template->parse('main', 'main_block', false);
 $template->pparse('output', 'page');
 
+$mLang->disableAddon();
 // Print admin footer
 $admin->print_footer();
Index: branches/2.8.x/wb/admin/pages/settings.php
===================================================================
--- branches/2.8.x/wb/admin/pages/settings.php	(revision 1922)
+++ branches/2.8.x/wb/admin/pages/settings.php	(revision 1923)
@@ -615,6 +615,7 @@
 	$oTpl->parse('main', 'main_block', false);
 	$oTpl->pparse('output', 'page');
 // Print admin footer
+	$mLang->disableAddon();
 	$admin->print_footer();
 
 function p($text,$lang)
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1922)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1923)
@@ -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', '1922');
+if(!defined('REVISION')) define('REVISION', '1923');
 if(!defined('SP')) define('SP', '');
Index: branches/2.8.x/wb/admin/settings/index.php
===================================================================
--- branches/2.8.x/wb/admin/settings/index.php	(revision 1922)
+++ branches/2.8.x/wb/admin/settings/index.php	(revision 1923)
@@ -996,4 +996,5 @@
 $oTpl->pparse('output', 'page');
 //$oTpl->p('page');
 unset($oTpl);
+$mLang->disableAddon();
 $admin->print_footer();
Index: branches/2.8.x/wb/admin/modules/details.php
===================================================================
--- branches/2.8.x/wb/admin/modules/details.php	(revision 1922)
+++ branches/2.8.x/wb/admin/modules/details.php	(revision 1923)
@@ -17,6 +17,8 @@
 
 // Include the config file
 require('../../config.php');
+$mLang = Translate::getinstance();
+$mLang->enableAddon('admin\addons');
 require_once(WB_PATH .'/framework/functions.php');
 require_once(WB_PATH.'/framework/class.admin.php');
 // No print admin header
@@ -24,18 +26,13 @@
 if( !$admin->checkFTAN() )
 {
 	$admin->print_header();
-	$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS']);
+	$admin->print_error($mLang->MESSAGE_GENERIC_SECURITY_ACCESS);
 }
 // After check print the header
 $admin->print_header();
 
-//$mLang = ModLanguage::getInstance();
-//$mLang->setLanguage(ADMIN_PATH.'/addons/languages/', LANGUAGE, DEFAULT_LANGUAGE);
-$mLang = Translate::getinstance();
-$mLang->enableAddon('admin\addons');
-
 if(!isset($_POST['file']) OR $_POST['file'] == "") {
-	$admin->print_error($MESSAGE['GENERIC_FORGOT_OPTIONS']);
+	$admin->print_error($mLang->MESSAGE_GENERIC_FORGOT_OPTIONS);
 } else {
 	$file = preg_replace('/[^a-z0-9_-]/i', "", $_POST['file']);  // fix secunia 2010-92-2
 }
@@ -42,33 +39,13 @@
 
 // Check if the template exists
 if(!is_dir(WB_PATH.'/modules/'.$file)) {
-	$admin->print_error($MESSAGE['GENERIC_NOT_INSTALLED']);
+	$admin->print_error($mLang->MESSAGE_GENERIC_NOT_INSTALLED);
 }
 
 // Check if the template exists
 if(!is_readable(WB_PATH.'/modules/'.$file)) {
-	$admin->print_error($MESSAGE['ADMIN_INSUFFICIENT_PRIVELLIGES']);
+	$admin->print_error($mLang->MESSAGE_ADMIN_INSUFFICIENT_PRIVELLIGES);
 }
-
-/*
-// Get module name
-if(!isset($_POST['file']) OR $_POST['file'] == "")
-{
-	header("Location: index.php");
-	exit(0);
-}
-else
-{
-	$file = preg_replace('/[^a-z0-9_-]/i', "", $_POST['file']);  // fix secunia 2010-92-1
-}
-
-// Check if the module exists
-if(!is_readable(WB_PATH.'/modules/'.$file)) {
-	header("Location: index.php");
-	exit(0);
-}
-*/
-
 // Setup template object, parse vars to it, then parse it
 // Create new template object
 $template = new Template(dirname($admin->correct_theme_source('modules_details.htt')),'keep');
@@ -77,11 +54,13 @@
 $template->set_block('page', 'main_block', 'main');
 
 // Insert values
-$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' AND directory = '$file'");
-if($result->numRows() > 0) {
-	$module = $result->fetchRow();
+$module = false;
+$sql = 'SELECT * FROM `'.TABLE_PREFIX.'addons` '
+     . 'WHERE `type`=\'module\' AND `directory`=\''.$file.'\'';
+if( ($result = $database->query($sql)) ){
+	$module = $result->fetchRow(MYSQL_ASSOC);
 }
-
+if(!$module) { $admin->print_error($mLang->MESSAGE_GENERIC_NOT_INSTALLED); }
 /*-- insert all needed vars from language files ----------------------------------------*/
 $template->set_var($mLang->getLangArray());
 
@@ -147,6 +126,5 @@
 // Parse module object
 $template->parse('main', 'main_block', false);
 $template->pparse('output', 'page');
-
 // Print admin footer
 $admin->print_footer();
Index: branches/2.8.x/wb/framework/class.wb.php
===================================================================
--- branches/2.8.x/wb/framework/class.wb.php	(revision 1922)
+++ branches/2.8.x/wb/framework/class.wb.php	(revision 1923)
@@ -3,8 +3,10 @@
  *
  * @category        framework
  * @package         frontend
- * @author          Ryan Djurovich (2004-2009), WebsiteBaker Project
- * @copyright       2009-2013, WebsiteBaker Org. e.V.
+ * @copyright       WebsiteBaker Org. e.V.
+ * @author          Ryan Djurovich (2004-2009)
+ * @author          Dietmar Wöllbrink (luisehahne)
+ * @author          M.v.d.Decken (DarkViper)
  * @link            http://www.websitebaker.org/
  * @license         http://www.gnu.org/licenses/gpl.html
  * @platform        WebsiteBaker 2.8.x
Index: branches/2.8.x/wb/framework/UpgradeHelper.php
===================================================================
--- branches/2.8.x/wb/framework/UpgradeHelper.php	(revision 1922)
+++ branches/2.8.x/wb/framework/UpgradeHelper.php	(revision 1923)
@@ -34,20 +34,25 @@
  */
 class UpgradeHelper {
 
-	public static function existsAllTables(array $aPackage)
+/**
+ * Compare available tables against a list of tables
+ * @param array list of needed table names without TablePrefix
+ * @return array list of missing tables
+ */
+	public static function existsAllTables(array $aTablesList)
 	{
-		$aPackage = array_flip($aPackage);
+		$aTablesList = array_flip($aTablesList);
 		$oDb = WbDatabase::getInstance();
 		$sPattern = addcslashes ( $oDb->TablePrefix, '%_' );
 		if(($oTables = $oDb->query( 'SHOW TABLES LIKE "'.$sPattern.'%"'))) {
 			while($aTable = $oTables->fetchRow(MYSQL_NUM)) {
 				$sTable =  preg_replace('/^'.preg_quote($oDb->TablePrefix, '/').'/s', '', $aTable[0]);
-				if(isset($aPackage[$sTable])) {
-					unset($aPackage[$sTable]);
+				if(isset($aTablesList[$sTable])) {
+					unset($aTablesList[$sTable]);
 				}
 			}
 		}
-		return array_flip($aPackage);
+		return array_flip($aTablesList);
 	}
 
 
