Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1882)
+++ branches/2.8.x/CHANGELOG	(revision 1883)
@@ -11,6 +11,10 @@
 ! = Update/Change
 ===============================================================================
 
+07 Mar-2013 Build 1883 Dietmar Woellbrink (Luisehahne)
+! groups change languages class to translate class
+! prepare upgrade-script for WB Version 2.8.4 (versioncompare)
+! update Form modul to version 2.9.1
 06 Mar-2013 Build 1882 Werner v.d.Decken(DarkViper)
 # protect magic setter to fix security issue in WbAdapter
 05 Mar-2013 Build 1881 Dietmar Woellbrink (Luisehahne)
Index: branches/2.8.x/wb/upgrade-script.php
===================================================================
--- branches/2.8.x/wb/upgrade-script.php	(revision 1882)
+++ branches/2.8.x/wb/upgrade-script.php	(revision 1883)
@@ -85,6 +85,7 @@
 $DEFAULT_THEME = 'wb_theme';
 
 $stepID = 0;
+$filesRemove = array();
 $aFilesToRemove = array();
 $dirRemove = array(
 /*
@@ -103,6 +104,9 @@
 			'[ADMIN]/preferences/password.php',
 			'[ADMIN]/pages/settings2.php',
 			'[ADMIN]/users/users.php',
+			'[ADMIN]/groups/add.php',
+			'[ADMIN]/groups/groups.php',
+			'[ADMIN]/groups/save.php',
 			'[ADMIN]/skel/themes/htt/groups.htt',
 
 			'[FRAMEWORK]/class.msg_queue.php',
@@ -113,7 +117,7 @@
 	$aFilesToRemove = array_merge($filesRemove['0']);
 
 // deleting files below only from less 2.8.4 stable
-if(version_compare(WB_REVISION, REVISION, '<='))
+if(version_compare(WB_VERSION, '2.8.4', '<'))
 {
 	$filesRemove['1'] = array(
 
@@ -898,42 +902,53 @@
 	echo '<strong>'.implode ('<br />',$msg).'</strong>';
     echo '</div>';
 
-    /* *****************************************************************************
-     * - check for deprecated / never needed files
-     */
-    if(sizeof($aFilesToRemove)) {
-    	echo '<h3>Step '.(++$stepID).': Remove deprecated and old files</h3>';
-    	$searches = array(
-    		'[ADMIN]',
-    		'[MEDIA]',
-    		'[PAGES]',
-    		'[FRAMEWORK]',
-    		'[MODULES]',
-    		'[TEMPLATE]'
-    	);
-    	$replacements = array(
-    		'/'.substr(ADMIN_PATH, strlen(WB_PATH)+1),
-    		MEDIA_DIRECTORY,
-    		PAGES_DIRECTORY,
-    		'/framework',
-    		'/modules',
-    		'/templates'
-    	);
+	/* *****************************************************************************
+	 * - check for deprecated / never needed files
+	 */
+	$iLoaded = sizeof($aFilesToRemove);
+	if($iLoaded) {
+		echo '<h3>Step '.(++$stepID).': Remove deprecated and outdated files</h3>';
+		$iFailed = 0;
+		$iFound = 0;
+		$searches = array(
+			'[ADMIN]',
+			'[MEDIA]',
+			'[PAGES]',
+			'[FRAMEWORK]',
+			'[MODULES]',
+			'[TEMPLATE]'
+		);
+		$replacements = array(
+			'/'.substr(ADMIN_PATH, strlen(WB_PATH)+1),
+			MEDIA_DIRECTORY,
+			PAGES_DIRECTORY,
+			'/framework',
+			'/modules',
+			'/templates'
+		);
 
 		$msg = '';
-    	foreach( $aFilesToRemove as $file )
-    	{
+		echo '<div style="margin-left:2em;">';
+		echo '<h4>Search '.$iLoaded.' deprecated and outdated files</h4>';
+		foreach( $aFilesToRemove as $file )
+		{
 			$file = str_replace($searches, $replacements, $file);
 			if( is_writable(WB_PATH.'/'.$file) ) {
+				$iFound++;
 				// try to unlink file
 				if(!unlink(WB_PATH.$file)) {
-					// save in err-list, if failed
+					$iFailed++;
 				}
 			}
-            if( is_readable(WB_PATH.'/'.$file) ) {
-                $msg .= $file.'<br />';
-            }
-    	}
+			if( is_readable(WB_PATH.'/'.$file) ) {
+				// save in err-list, if failed
+				$msg .= $file.'<br />';
+			}
+		}
+		$iRemove = $iFound-$iFailed;
+		echo '<strong>Remove '.$iRemove.' from '.$iFound.' founded</strong> ';
+		echo ($iFailed == 0) ? $OK : $FAIL;
+		echo '</div>';
 
 		if($msg != '')
 		{
@@ -956,11 +971,14 @@
     }
 
 
-/**********************************************************
- * - check for deprecated / never needed files
- */
-	if(sizeof($dirRemove)) {
-		echo '<h3>Step  '.(++$stepID).': Remove deprecated and old folders</h3>';
+	/**********************************************************
+	 * - check for deprecated / never needed files
+	 */
+	$iLoaded = sizeof($dirRemove);
+	if($iLoaded) {
+		echo '<h3>Step  '.(++$stepID).': Remove deprecated and outdated folders</h3>';
+		$iFailed = 0;
+		$iFound = 0;
 		$searches = array(
 			'[ADMIN]',
 			'[MEDIA]',
@@ -974,19 +992,28 @@
 			'/templates',
 		);
 		$msg = '';
+		echo '<div style="margin-left:2em;">';
+		echo '<h4>Search '.$iLoaded.' deprecated and outdated folders</h4>';
 		foreach( $dirRemove as $dir ) {
 			$dir = str_replace($searches, $replacements, $dir);
 			$dir = WB_PATH.'/'.$dir;
 			if( is_dir( $dir )) {
+				$iFound++;
 			// try to delete dir
 				if(!is_writable( $dir ) || !rm_full_dir($dir)) {
 				// save in err-list, if failed
-                    if( is_readable(WB_PATH.'/'.$file) ) {
-                    	$msg .= str_replace(WB_PATH,'',$dir).'<br />';
-                    }
+					$iFailed++;
 				}
 			}
+			if( is_readable(WB_PATH.'/'.$dir) ) {
+				$msg .= str_replace(WB_PATH,'',$dir).'<br />';
+			}
 		}
+		
+		$iRemove = $iFound-$iFailed;
+		echo '<strong>Remove '.$iRemove.' from '.$iFound.' founded</strong> ';
+		echo ($iFailed == 0) ? $OK : $FAIL;
+		echo '</div>';
 
 		if($msg != '') {
 			$msg = '<br /><br />Following directories are deprecated, outdated or a security risk and
@@ -1004,13 +1031,15 @@
 			</html>";
 			exit;
 		}
+
+
 	}
 
-    /**********************************************************
-     * upgrade modules if newer version is available
-     * $aModuleList list of proofed modules
-     */
-    $aModuleList = array('news','wysiwyg','form');
+	/**********************************************************
+	 * upgrade modules if newer version is available
+	 * $aModuleList list of proofed modules
+	 */
+	$aModuleList = array('news','wysiwyg','form');
 	if(sizeof($aModuleList)) 
 	{
 	    echo '<h3>Step '.(++$stepID).': Upgrade proofed modules</h3>';
@@ -1019,20 +1048,20 @@
 				$currModulVersion = get_modul_version ($sModul, false);
 				$newModulVersion =  get_modul_version ($sModul, true);
 				if((version_compare($currModulVersion, $newModulVersion) <= 0)) {
-	                echo '<div style="margin-left:2em;">';
+					echo '<div style="margin-left:2em;">';
 					echo '<h4>'.'Upgrade module \''.$sModul.'\' version '.$newModulVersion.'</h4>';
 					require(WB_PATH.'/modules/'.$sModul.'/upgrade.php');
-	                echo '</div>';
+					echo '</div>';
 				}
 			}
 		}
 	}
 
-    /**********************************************************
-     * Reformat/rebuild all existing moules access files
-     * $aModuleList list of modules
-     */
-    $aModuleList = array('bakery','topics','news');
+	/**********************************************************
+	 * Reformat/rebuild all existing moules access files
+	 * $aModuleList list of modules
+	 */
+	$aModuleList = array('bakery','topics','news');
 	if(sizeof($aModuleList)) 
 	{
 		echo '<h3>Step '.(++$stepID).': Create/Reorg Accessfiles from modules</h3>';
@@ -1059,9 +1088,9 @@
  */
 
 	echo '<h3>Step '.(++$stepID).' : Reload all addons database entry (no upgrade)</h3><br />';
-    echo '<div style="margin-left:2em;">';
-    $iFound = 0;
-    $iLoaded = 0;
+	echo '<div style="margin-left:2em;">';
+	$iFound = 0;
+	$iLoaded = 0;
 	////delete modules
 	//$database->query("DELETE FROM ".TABLE_PREFIX."addons WHERE type = 'module'");
 	// Load all modules
@@ -1136,7 +1165,7 @@
 	'wb_revision' => REVISION,
 	'wb_sp' => SP
 );
-echo '<br /><span><strong>Set database version number to '.VERSION.' '.SP.' '.' Revision ['.REVISION.'] : </strong></span>';
+echo '<br /><span><strong>Set WebsiteBaker version number to '.VERSION.' '.SP.' '.' Revision ['.REVISION.'] : </strong></span>';
 echo (db_update_key_value( 'settings', $cfg ) ? " $OK<br />" : " $FAIL!<br />");
 echo '</div>';
 
Index: branches/2.8.x/wb/admin/groups/delete.inc.php
===================================================================
--- branches/2.8.x/wb/admin/groups/delete.inc.php	(revision 1882)
+++ branches/2.8.x/wb/admin/groups/delete.inc.php	(revision 1883)
@@ -27,8 +27,9 @@
  */
 	function delete_group($admin, $group_id = 0)
 	{
-		global $MESSAGE;
+//		global $MESSAGE;
 		$database = WbDatabase::getInstance();
+		$mLang = Translate::getInstance();
 	// first check form-tan
 		if($admin->checkFTAN())
 		{
@@ -42,7 +43,7 @@
 				if($database->query($sql) != false)
 				{
 	// remove group from users groups_id
-					msgQueue :: add($MESSAGE['GROUPS_DELETED'],true);
+					msgQueue :: add($mLang->MESSAGE_GROUPS_DELETED,true);
 					$sql = 'SELECT `user_id`, `groups_id`, `home_folder` FROM `'.TABLE_PREFIX.'users` WHERE user_id != 1';
 					if(($res_users = $database->query($sql)) && ($res_users->numRows() > 0) )
 					{
@@ -64,7 +65,7 @@
 				                    $sql_info = mysql_info($database->db_handle);
 									if(preg_match('/matched: *([1-9][0-9]*)/i', $sql_info) != 1)
 									{
-										msgQueue :: add($MESSAGE['RECORD_MODIFIED_FAILED']);
+										msgQueue :: add($mLang->MESSAGE_RECORD_MODIFIED_FAILED );
 									}
 								} else {
 
@@ -75,11 +76,11 @@
                     }
 					// $admin->print_success($msg);
 				} else {
-					msgQueue :: add($MESSAGE['RECORD_MODIFIED_FAILED']);
+					msgQueue :: add($mLang->MESSAGE_RECORD_MODIFIED_FAILED );
 				}
 			}
 		} else {
-			msgQueue :: add($MESSAGE['GENERIC_SECURITY_OFFENSE']);
+			msgQueue :: add($mLang->MESSAGE_GENERIC_SECURITY_OFFENSE );
 		}
 		$admin->print_header();
 		return ;
Index: branches/2.8.x/wb/admin/groups/groups_list.inc.php
===================================================================
--- branches/2.8.x/wb/admin/groups/groups_list.inc.php	(revision 1882)
+++ branches/2.8.x/wb/admin/groups/groups_list.inc.php	(revision 1883)
@@ -25,9 +25,9 @@
  */
 	function show_grouplist($admin)
 	{
-		global $TEXT, $MESSAGE, $MENU, $HEADING;
+//		global $TEXT, $MESSAGE, $MENU, $HEADING;
 		$database = WbDatabase::getInstance();
-		$mLang = ModLanguage::getInstance();
+		$mLang = Translate::getInstance();
 // Create new template object for the modify/remove section
 		$tpl = new Template(dirname($admin->correct_theme_source('groups_list.htt')),'keep');
 		$tpl->set_file('page', 'groups_list.htt');
@@ -141,7 +141,7 @@
 		$tpl->set_var(array(
 				'TEXT_MODIFY'    => ($admin->get_permission('groups_modify') == true) ? $mLang->TEXT_MODIFY : $mLang->TEXT_VIEW,
 				'TEXT_DELETE'    => $mLang->TEXT_DELETE,
-				'CONFIRM_DELETE' => $MESSAGE['GROUPS_CONFIRM_DELETE']
+				'CONFIRM_DELETE' => $mLang->MESSAGE_GROUPS_CONFIRM_DELETE
 				));
 
 	// Parse template object
Index: branches/2.8.x/wb/admin/groups/groups_mask.inc.php
===================================================================
--- branches/2.8.x/wb/admin/groups/groups_mask.inc.php	(revision 1882)
+++ branches/2.8.x/wb/admin/groups/groups_mask.inc.php	(revision 1883)
@@ -39,7 +39,7 @@
 //		global $TEXT, $MESSAGE, $HEADING, $MENU;
 
 		$database = WbDatabase::getInstance();
-		$mLang = ModLanguage::getInstance();
+		$mLang = Translate::getInstance();
 //		$mLang->setLanguage(dirname(__FILE__).'/languages/', LANGUAGE, DEFAULT_LANGUAGE);
 		include_once('upgradePermissions.php');
 		include_once(WB_PATH.'/framework/functions.php');
Index: branches/2.8.x/wb/admin/groups/save.inc.php
===================================================================
--- branches/2.8.x/wb/admin/groups/save.inc.php	(revision 1882)
+++ branches/2.8.x/wb/admin/groups/save.inc.php	(revision 1883)
@@ -33,10 +33,11 @@
  */
 	function save_group($admin, $group_id = 0)
 	{
-		global $TEXT, $MESSAGE, $HEADING, $MENU;
+//		global $TEXT, $MESSAGE, $HEADING, $MENU;
 		include_once('upgradePermissions.php');
 		include_once(WB_PATH.'/framework/functions.php');
 		$database = WbDatabase::getInstance();
+		$mLang = Translate::getInstance();
 	// check for valid group_id
 		$sql = '';
 
@@ -65,12 +66,12 @@
 
 			if($group_name == '')
 			{
-				msgQueue::add($MESSAGE['GROUPS_GROUP_NAME_BLANK']);
+				msgQueue::add($mLang->MESSAGE_GROUPS_GROUP_NAME_BLANK );
 			} elseif($group_name != '') {
 		// check request vars and assign values to record
 				if( $database->get_one($sql) != false )
 				{
-					msgQueue::add($MESSAGE['GROUPS_GROUP_NAME_EXISTS']);
+					msgQueue::add($mLang->MESSAGE_GROUPS_GROUP_NAME_EXISTS );
 				} else {
 					if( $group_id == 0 )
 					{
@@ -93,9 +94,9 @@
 				$sql .= $where;
 				if( $database->query($sql) )
 				{
-	                msgQueue::add($MESSAGE['GROUPS_SAVED'],true);
+	                msgQueue::add($mLang->MESSAGE_GROUPS_SAVED ,true);
 				} else {
-					msgQueue::add($MESSAGE['RECORD_MODIFIED_FAILED']);
+					msgQueue::add($mLang->MESSAGE_RECORD_MODIFIED_FAILED );
 				}
 			}
 		} else {
Index: branches/2.8.x/wb/admin/groups/index.php
===================================================================
--- branches/2.8.x/wb/admin/groups/index.php	(revision 1882)
+++ branches/2.8.x/wb/admin/groups/index.php	(revision 1883)
@@ -20,8 +20,10 @@
 	function admin_groups_index()
 	{
 		$database = WbDatabase::getInstance();
-		$mLang = ModLanguage::getInstance();
-		$mLang->setLanguage(dirname(__FILE__).'/languages/', LANGUAGE, DEFAULT_LANGUAGE);
+//		$mLang = ModLanguage::getInstance();
+//		$mLang->setLanguage(dirname(__FILE__).'/languages/', LANGUAGE, DEFAULT_LANGUAGE);
+		$mLang = Translate::getinstance();
+		$mLang->enableAddon('admin\groups');
 
 		$mod_path = dirname(str_replace('\\', '/', __FILE__));
 		$mod_name = basename($mod_path);
@@ -125,13 +127,18 @@
 		}
 		print $output;
 		$admin->print_footer();
+		$mLang->disableAddon();
 	}
 	// start dispatcher maintenance
 	if(!defined('WB_PATH'))
 	{
-		require('../../config.php');
-		require_once(WB_PATH.'/framework/class.admin.php');
+		$config_file = realpath('../../config.php');
+		if(file_exists($config_file) && !defined('WB_URL'))
+		{
+			require($config_file);
+		}
 	}
+	if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); }
 	admin_groups_index();
 	exit;
 // end of file
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1882)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1883)
@@ -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', '1882');
+if(!defined('REVISION')) define('REVISION', '1883');
 if(!defined('SP')) define('SP', '');
Index: branches/2.8.x/wb/modules/form/info.php
===================================================================
--- branches/2.8.x/wb/modules/form/info.php	(revision 1882)
+++ branches/2.8.x/wb/modules/form/info.php	(revision 1883)
@@ -24,8 +24,8 @@
 $module_directory = 'form';
 $module_name = 'Form';
 $module_function = 'page';
-$module_version = '2.9.0';
-$module_platform = '2.8.3';
+$module_version = '2.9.1';
+$module_platform = '2.8.4';
 $module_author = 'Ryan Djurovich & Rudolph Lartey - additions John Maats - PCWacht, dev-team';
 $module_license = 'GNU General Public License';
 $module_description = 'This module allows you to create customised online forms, such as a feedback form. '.
Index: branches/2.8.x/wb/modules/form/install.php
===================================================================
--- branches/2.8.x/wb/modules/form/install.php	(revision 1882)
+++ branches/2.8.x/wb/modules/form/install.php	(revision 1883)
@@ -20,9 +20,6 @@
 	require_once(dirname(dirname(dirname(__FILE__))).'/framework/globalExceptionHandler.php');
 	throw new IllegalFileException();
 } else {
-	// Create tables
-
+// Create tables
 $database->SqlImport(dirname(__FILE__).'/sql/form284db.sql',TABLE_PREFIX,false);
-
-// remove old version of search (deprecated)
 }
Index: branches/2.8.x/wb/modules/form/frontend.css
===================================================================
--- branches/2.8.x/wb/modules/form/frontend.css	(revision 1882)
+++ branches/2.8.x/wb/modules/form/frontend.css	(revision 1883)
@@ -1,16 +1,18 @@
+.frm-field_table { width :100%; vertical-align :middle; table-layout :auto; border-collapse :separate; border :none; }
+.frm-field_table tbody { font-size : 100%; padding :0.4em 0.2em; }
+.frm-field_table tbody td { border :none; }
+.frm-field_table tbody td.field_heading,
+.frm-field_table tbody td.frm-field_heading { border-bottom :2px solid #666666; color :#666666; font-weight :bold; padding-top :0.5em; }
 .frm-required { color :#ff0000; }
-.frm-field_title { font-size :12px; width :25%; vertical-align :top; white-space :nowrap; text-align :right; }
-.field_heading,
-.frm-field_heading { border-bottom: 1px ridge; font-weight: bold; }
-.frm-textfield { font-size :12px; width :90%; }
-.frm-textarea { font-size :12px; width :100%; height :100px; }
-.frm-field_heading { font-size :12px; font-weight :bold; border-bottom-width :2px; border-bottom-style :solid; border-bottom-color :#666666; padding-top :10px; color :#666666; }
-.frm-select { font-size :12px; width :50%; }
-.frm-select option { font-size :12px; width :95%; }
-.frm-field_checkbox { font-size :11px; cursor :pointer; width :30px; vertical-align :middle; }
-.frm-checkbox_label { font-size :11px; cursor :pointer; width :auto; }
-.frm-radio_label { font-size :11px; cursor :pointer; }
-.frm-email { font-size :12px; width : 90%; }
+.frm-field_title { width :25%; vertical-align :top; white-space :nowrap; text-align :right; }
+.frm-textfield { width :90%; }
+.frm-textarea { width :100%; height :100px; }
+.frm-select { width :50%; }
+.frm-select option { width :95%; }
+.frm-field_checkbox { cursor :pointer; width :2em; vertical-align :middle; }
+.frm-checkbox_label { cursor :pointer; vertical-align :middle; }
+.frm-radio_label { cursor :pointer; }
+.frm-email { width : 90%; }
 /*** Don't remove the class nixhier, this is required for ASP ***/
 .nixhier,
 .frm-nixhier { display :none; }
@@ -18,8 +20,7 @@
 .print-email { font-size :0.8em; color :#000; margin :10px auto; }	
 .frm-warning { background :#ffeeee; border :0.2em #884444 solid; color :#e10000; margin-bottom :1em; padding :0.8em; font-size :1.2em; font-weight :bold; }
 .frm-note { background :#eeffee; border :0.2em #448844 solid; color :#004400; margin-bottom :1em; padding :0.8em; font-size :1.2em; font-weight :bold; }
-.previewPrintTop { text-align :right; font-size :0.9em; }
-.previewPrintTop img { padding-left :16px; }
-fieldset { border :none; }
-.frm-thankyou { font-size :1em; }
-.frm-tbody {  }		
\ No newline at end of file
+.previewPrintTop { text-align :right; }
+.previewPrintTop img { padding-left :1em; }
+.frm-thankyou {  }
+.frm-tbody {  }		
Index: branches/2.8.x/wb/modules/form/add.php
===================================================================
--- branches/2.8.x/wb/modules/form/add.php	(revision 1882)
+++ branches/2.8.x/wb/modules/form/add.php	(revision 1883)
@@ -24,10 +24,6 @@
 }
 /* -------------------------------------------------------- */
 
-// load module language file
-//$lang = (dirname(__FILE__)) . '/languages/' . LANGUAGE . '.php';
-//require_once(!file_exists($lang) ? (dirname(__FILE__)) . '/languages/EN.php' : $lang );
-
 // ------------------------------------
 $table_name = TABLE_PREFIX.'mod_form_settings';
 $field_name = 'perpage_submissions';
@@ -38,7 +34,7 @@
 // ------------------------------------
 
 // Insert an extra rows into the database
-$header = '<table class="frm-field_table" cellpadding=\"2\" cellspacing=\"0\" border=\"0\" summary=\"form\">';
+$header = '<table class="frm-field_table">';
 $field_loop = '<tr>'.PHP_EOL.'<td class=\"frm-field_title\">{TITLE}{REQUIRED}:</td>'.PHP_EOL.'<td>{FIELD}</td>'.PHP_EOL.'</tr>';
 $footer = '<tr>'.PHP_EOL.'<td>&nbsp;</td>'.PHP_EOL.'
 <td>'.PHP_EOL.'
