Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 2075)
+++ branches/2.8.x/CHANGELOG	(revision 2076)
@@ -11,6 +11,9 @@
 ! = Update/Change
 ===============================================================================
 
+06 Jan-2014 Build 2076 Manuela v.d.Decken(DarkViper)
+# some fixes in admin/users
+# some fixes in admin/pages
 06 Jan-2014 Build 2075 Manuela v.d.Decken(DarkViper)
 ! Installer and upgradescript will never start with php below 5.3.2
 # little correction for autoloading PHPMailer in install/save
Index: branches/2.8.x/wb/admin/skel/themes/htt/users.htt
===================================================================
--- branches/2.8.x/wb/admin/skel/themes/htt/users.htt	(revision 2075)
+++ branches/2.8.x/wb/admin/skel/themes/htt/users.htt	(revision 2076)
@@ -35,6 +35,7 @@
     <!-- END list_confirmed_activation_block -->
     </select>
     <input type="submit" name="delete_outdated" style="width: 100px;" value="{TEXT_DELETE}" onclick="return confirm('{CONFIRM_DELETE}');" class="{DISPLAY_DELETE}" />
+    <input type="submit" name="enable_outdated" style="width: 100px;" value="{TEXT_USER_ACTIVATE}" onclick="return confirm('{CONFIRM_DELETE}');" class="{DISPLAY_DELETE}" />
 <!-- END show_confirmed_activation_block -->
 
 </form>
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 2075)
+++ branches/2.8.x/wb/admin/skel/themes/htt/pages_settings.htt	(revision 2076)
@@ -41,10 +41,10 @@
 				<label for="page_title">{TEXT_PAGE_TITLE}:</label>
 				<input type="text" id="page_title" name="page_title" value="{PAGE_TITLE}" />
 			</div>
-			<div class="{PAGE_EXTENDET_HIDE}">
+			<div id="extented" style="{PAGE_ICONDIR_HIDE}">
 				<label for="page_icon" class="overlib"
 					style="background-image: url({THEME_URL}/icons/help_16.png);"
-					{p_page_icon_dir}>{TEXT_PAGE_ICON}: 
+					{p_page_icon_dir}>{TEXT_PAGE_ICON}:
 				</label>
 				<select id="page_icon" name="page_icon">
 					<option value="0">--- {TEXT_NO_SELECTION} ---</option>
@@ -256,8 +256,10 @@
 			<input type="submit" name="submit" value="{TEXT_SAVE}" />
 			<input type="submit" name="back_submit" value="{TEXT_SAVE_BACK}" />
 			<span style="padding-left: 2em;"><input type="reset" name="reset" value="{TEXT_RESET}" />
+		<!-- BEGIN show_extended_input_block -->
 			<input type="submit" value="{TEXT_EXTENDED}" id="{VISIBILITY}_extended" name="extendet_submit" /></span>
+		<!-- END show_extended_input_block -->
 		</div>
 	</div>
 </form>
-<!-- END main_block -->
+<!-- END main_block -->
\ No newline at end of file
Index: branches/2.8.x/wb/admin/pages/settings.php
===================================================================
--- branches/2.8.x/wb/admin/pages/settings.php	(revision 2075)
+++ branches/2.8.x/wb/admin/pages/settings.php	(revision 2076)
@@ -114,7 +114,7 @@
 		{
 			$admin->print_error($MESSAGE['PAGES_INSUFFICIENT_PERMISSIONS']);
 		}
-	}else {
+	} else {
 		$admin->print_header();
 		$admin->print_error($database->get_error());
 	}
@@ -238,13 +238,15 @@
 	}
 
 /*-- collect page-icons for select boxes -----------------------------------------------*/
-  $sAllowedImageTypes = '\.jpg|\.jpeg|\.png|\.gif';
+    $sAllowedImageTypes = '\.jpg|\.jpeg|\.png|\.gif';
 	$aPageIcons = array();
 	$aIcon = array();
 	$sTemplate = ($aCurrentPage['template'] == '' ? DEFAULT_TEMPLATE : $aCurrentPage['template']);
 	$sIconDir = str_replace('\\', '/', ((defined('PAGE_ICON_DIR') && PAGE_ICON_DIR != '') ? PAGE_ICON_DIR : MEDIA_DIRECTORY));
 	$sIconDir = str_replace('/*', '/'.$sTemplate, $sIconDir);
-	$bIconDirHide = ($page_extend==true) ? 'display:block;' : 'display:none;';
+	$bMenuIconDirHide = (($page_extend==true) ? 'display:block;' : 'display:none;');
+	$bPageIconDirHide = (($page_extend==true) ? 'display:block;' : 'display:none;');
+//	$bPageIconDirHide = (($page_extend==true)||($admin->get_permission('media_view') == true) ? 'display:block;' : 'display:none;');
 
 //	$oTpl->set_var('ICON_DIR', WB_REL.$sIconDir);
 	$sHelp = replaceVars($mLang->HELP_PAGE_IMAGE_DIR, array('icon_dir'=>WB_REL.$sIconDir ) );
@@ -254,7 +256,8 @@
 	$sAccesFile = (($database->get_one($sql)));
 	$sFilename = replaceVars($mLang->HELP_SEO_TITLE, array('filename'=>PAGES_DIRECTORY.$sAccesFile.PAGE_EXTENSION ) );
 
-	$oTpl->set_var('PAGE_EXTENDET_HIDE',  $bIconDirHide);
+	$oTpl->set_var('PAGE_ICONDIR_HIDE',  $bPageIconDirHide);
+	$oTpl->set_var('PAGE_EXTENDET_HIDE', $bMenuIconDirHide);
 	$oTpl->set_var('p_page_icon_dir',  p($sHelp,$mLang->TEXT_PAGE_ICON_DIR));
 	$oTpl->set_var('p_menu_icon0_dir', p($sHelp,$mLang->TEXT_MENU_ICON_0_DIR));
 	$oTpl->set_var('p_menu_icon1_dir', p($sHelp,$mLang->TEXT_MENU_ICON_1_DIR));
@@ -495,7 +498,7 @@
 		$iLastEntryLevel = 0;
 		$bSkipChildren = false;
 	// loop through all items
-		while (list(, $aPage) = each($aLangCodePagesList)) 
+		while (list(, $aPage) = each($aLangCodePagesList))
 		{
 		// skip child pages where current user has no rights for
 			if($bSkipChildren && ($aPage['level'] > $iLastEntryLevel)) { continue; }
@@ -515,11 +518,11 @@
 			    && $aCurrentPage['page_code'] != 0
 				&& !$bPageCodeIsSelected
 			  )
-			{ // 
+			{ //
 				$aTplItemData['PAGE_CODE_SELECTED'] = $sSelected;
 				$bPageCodeIsSelected = true;
 			} elseif(!$aPage['iswriteable'])
-			{ // 
+			{ //
 				$aTplItemData['PAGE_CODE_SELECTED'] = $sDisabled.' class="disabled"';
 				$bSkipChildren = true;
 			} else {
@@ -634,6 +637,13 @@
 	$oTpl->set_var('SELF_SELECTED',  ($aCurrentPage['target'] == '_self'  ? $sSelected : ''));
 	$oTpl->set_var('BLANK_SELECTED', ($aCurrentPage['target'] == '_blank' ? $sSelected : ''));
 
+/*-- show_extended_input_block ---------------------------------------------------------*/
+	$oTpl->set_block('main_block', 'show_extended_input_block', 'extended_input');
+	if($admin->get_permission('settings_advanced') == true) {
+		$oTpl->parse('extended_input', 'show_extended_input_block', true);
+	} else {
+		$oTpl->parse('extended_input', '', true);
+	}
 /*-- insert all needed vars from language files ----------------------------------------*/
 	$oTpl->set_var($mLang->getLangArray());
 /*-- finalize the page -----------------------------------------------------------------*/
@@ -686,4 +696,4 @@
 		}
 	}
 	return $subject;
-}
+}
\ No newline at end of file
Index: branches/2.8.x/wb/admin/pages/sections.php
===================================================================
--- branches/2.8.x/wb/admin/pages/sections.php	(revision 2075)
+++ branches/2.8.x/wb/admin/pages/sections.php	(revision 2076)
@@ -35,14 +35,13 @@
 $debug = true; // to show position
 If(!defined('DEBUG')) { define('DEBUG',$debug);}
 // Create new admin object
-if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); }
+// if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); }
 $admin = new admin('Pages', 'pages_view', false);
-
 // Include the WB functions file
 if(!function_exists('directory_list')) { require(WB_PATH.'/framework/functions.php'); }
 $mLang = Translate::getinstance();
 $mLang->enableAddon('admin\pages');
-
+$oDb = WbDatabase::getInstance();
 $action = 'show';
 // Get page id
 $requestMethod = '_'.strtoupper($_SERVER['REQUEST_METHOD']);
@@ -64,35 +63,35 @@
         if($admin->get_permission('pages_delete') == false)
         {
 			$admin->print_header();
-			$admin->print_error($module.' '.strtolower($MESSAGE['PAGES_INSUFFICIENT_PERMISSIONS']),$backlink);
+			$admin->print_error($module.' '.mb_strtolower($mLang->MESSAGE_PAGES_INSUFFICIENT_PERMISSIONS, 'UTF-8'), $backlink);
         }
 
 		if( ( !($section_id = intval($admin->checkIDKEY('section_id', 0, $_SERVER['REQUEST_METHOD'])) )) )
 		{
 			if($admin_header) { $admin->print_header(); }
-			$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'],$backlink);
+			$admin->print_error($mlang->MESSAGE_GENERIC_SECURITY_ACCESS,$backlink);
 		}
 
 		$action = 'show';
-	    $sql  = 'SELECT `module` FROM `'.TABLE_PREFIX.'sections` ';
-	    $sql .= 'WHERE `section_id` ='.$section_id;
-        if( ( ($modulname = $database->get_one($sql)) == $module) && ($section_id > 0 ) ) {
+	    $sql = 'SELECT `module` FROM `'.$oDb->TablePrefix.'sections` '
+	         . 'WHERE `section_id` ='.$section_id;
+        if ((($modulname = $oDb->getOne($sql)) == $module) && ($section_id > 0 ) ) {
 			// Include the modules delete file if it exists
 			if(file_exists(WB_PATH.'/modules/'.$modulname.'/delete.php'))
 		    {
 				require(WB_PATH.'/modules/'.$modulname.'/delete.php');
 			}
-		    $sql  = 'DELETE FROM `'.TABLE_PREFIX.'sections` ';
-		    $sql .= 'WHERE `section_id` ='.(int)$section_id.' LIMIT 1';
-			if( !$database->query($sql) ) {
+		    $sql = 'DELETE FROM `'.$oDb->TablePrefix.'sections` '
+		         . 'WHERE `section_id` ='.(int)$section_id.' LIMIT 1';
+			if (!$oDb->doQuery($sql)) {
 				if($admin_header) { $admin->print_header(); }
-				$admin->print_error($database->get_error(),$backlink);
-			}  else {
+				$admin->print_error($oDb->get_error(),$backlink);
+			} else {
 				require_once(WB_PATH.'/framework/class.order.php');
-				$order = new order(TABLE_PREFIX.'sections', 'position', 'section_id', 'page_id');
+				$order = new order($oDb->TablePrefix.'sections', 'position', 'section_id', 'page_id');
 				$order->clean($page_id);
-				$format = $mLang->TEXT_SECTION.' %d  %s %s '.strtolower( $mLang->TEXT_DELETED);
-				$message = sprintf ($format,$section_id,strtoupper($modulname),strtolower($mLang->TEXT_SUCCESS));
+				$format = $mLang->TEXT_SECTION.' %d  %s %s '.mb_strtolower($mLang->TEXT_DELETED, 'UTF-8');
+				$message = sprintf ($format,$section_id, mb_strtoupper($modulname, 'UTF-8'),mb_strtolower($mLang->TEXT_SUCCESS, 'UTF-8'));
 				if($admin_header) { $admin->print_header(); }
 				$admin_header = false;
 				unset($_POST);
@@ -100,7 +99,7 @@
 			}
         } else {
 			if($admin_header) { $admin->print_header(); }
-			$admin->print_error($module.' '.strtolower($mLang->TEXT_NOT_FOUND),$backlink);
+			$admin->print_error($module.' '.mb_strtolower($mLang->TEXT_NOT_FOUND, 'UTF-8'),$backlink);
         }
 
 		break;
@@ -108,39 +107,39 @@
         if($admin->get_permission('pages_add') == false)
         {
 			$admin->print_header();
-			$admin->print_error($module.' '.strtolower($MESSAGE['PAGES_INSUFFICIENT_PERMISSIONS']),$backlink);
+			$admin->print_error($module.' '.mb_strtolower($mLang->MESSAGE_PAGES_INSUFFICIENT_PERMISSIONS, 'UTF-8'),$backlink);
         }
 		if (!$admin->checkFTAN())
 		{
 			$admin->print_header();
-			$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'],$backlink);
+			$admin->print_error($mLang->MESSAGE_GENERIC_SECURITY_ACCESS,$backlink);
 		}
 		$action = 'show';
 		$module = preg_replace('/\W/', '', $module );  // fix secunia 2010-91-4
 		require_once(WB_PATH.'/framework/class.order.php');
 		// Get new order
-		$order = new order(TABLE_PREFIX.'sections', 'position', 'section_id', 'page_id');
+		$order = new order($oDb->TablePrefix.'sections', 'position', 'section_id', 'page_id');
 		$position = $order->get_new($page_id);
 		// Insert module into DB
-	    $sql  = 'INSERT INTO `'.TABLE_PREFIX.'sections` SET ';
-	    $sql .= '`page_id` = '.(int)$page_id.', ';
-	    $sql .= '`module` = \''.$module.'\', ';
-	    $sql .= '`position` = '.(int)$position.', ';
-	    $sql .= '`block` = \'1\', ';
-        $sql .= '`publ_start` = \'0\',';
-        $sql .= '`publ_end` = \'0\' ';
+	    $sql  = 'INSERT INTO `'.$oDb->TablePrefix.'sections` '
+              . 'SET `page_id` = '.(int)$page_id.', '
+              .     '`module` = \''.$module.'\', '
+	          .     '`position` = '.(int)$position.', '
+	          .     '`block` = \'1\', '
+              .     '`publ_start` = \'0\', '
+              .     '`publ_end` = \'0\'';
 
-        if($database->query($sql)) {
+        if($oDb->doQuery($sql)) {
 			// Get the section id
-			$section_id = $database->get_one("SELECT LAST_INSERT_ID()");
+			$section_id = $oDb->getOne('SELECT LAST_INSERT_ID()');
 			// Include the selected modules add file if it exists
 			if(file_exists(WB_PATH.'/modules/'.$module.'/add.php'))
 		    {
 				require(WB_PATH.'/modules/'.$module.'/add.php');
 			}
-        } elseif ($database->is_error())  {
+        } elseif ($oDb->is_error())  {
 			if($admin_header) { $admin->print_header(); }
-			$admin->print_error($database->get_error());
+			$admin->print_error($oDb->get_error());
 		}
 		break;
 	default:
@@ -152,41 +151,44 @@
 
 		if($admin_header) { $admin->print_header(); }
 		// Get perms
-		$sql  = 'SELECT `admin_groups`,`admin_users` FROM `'.TABLE_PREFIX.'pages` ';
-		$sql .= 'WHERE `page_id` = '.$page_id;
-		$results = $database->query($sql);
-
-		$results_array = $results->fetchRow();
-		$old_admin_groups = explode(',', $results_array['admin_groups']);
-		$old_admin_users = explode(',', $results_array['admin_users']);
-		$in_old_group = FALSE;
-		foreach($admin->get_groups_id() as $cur_gid)
-		{
-			if (in_array($cur_gid, $old_admin_groups))
-		    {
-				$in_old_group = TRUE;
-			}
-		}
-		if((!$in_old_group) && !is_numeric(array_search($admin->get_user_id(), $old_admin_users)))
-		{
+		$sql  = 'SELECT `admin_groups`,`admin_users` FROM `'.$oDb->TablePrefix.'pages` '
+		      . 'WHERE `page_id` = '.$page_id;
+		$oPage = $oDb->doQuery($sql);
+		$aPageRights = $oPage->fetchRow(MYSQL_ASSOC);
+    // Get user permisions
+        if (!$admin->ami_group_member($aPageRights['admin_groups']) && !$admin->is_group_match($admin->get_user_id(), $aPageRights['admin_users'])) {
 			$admin->print_header();
-			$admin->print_error($MESSAGE['PAGES_INSUFFICIENT_PERMISSIONS']);
-		}
-
+			$admin->print_error($mLang->MESSAGE_PAGES_INSUFFICIENT_PERMISSIONS);
+        }
+//		$old_admin_groups = explode(',', $results_array['admin_groups']);
+//		$old_admin_users = explode(',', $results_array['admin_users']);
+//		$in_old_group = FALSE;
+//		foreach($admin->get_groups_id() as $cur_gid)
+//		{
+//			if (in_array($cur_gid, $old_admin_groups))
+//		    {
+//				$in_old_group = TRUE;
+//			}
+//		}
+//		if((!$in_old_group) && !is_numeric(array_search($admin->get_user_id(), $old_admin_users)))
+//		{
+//			$admin->print_header();
+//			$admin->print_error($mLang->MESSAGE_PAGES_INSUFFICIENT_PERMISSIONS);
+//		}
 		// Get page details
-		$sql  = 'SELECT * FROM `'.TABLE_PREFIX.'pages` ';
+		$sql  = 'SELECT * FROM `'.$oDb->TablePrefix.'pages` ';
 		$sql .= 'WHERE `page_id` = '.$page_id;
-		$results = $database->query($sql);
+		$results = $oDb->doQuery($sql);
 
-		if($database->is_error())
+		if($oDb->is_error())
 		{
 			// $admin->print_header();
-			$admin->print_error($database->get_error());
+			$admin->print_error($oDb->get_error());
 		}
 		if($results->numRows() == 0)
 		{
 			// $admin->print_header();
-			$admin->print_error($MESSAGE['PAGES_NOT_FOUND']);
+			$admin->print_error($mLang->MESSAGE_PAGES_NOT_FOUND);
 		}
 		$results_array = $results->fetchRow();
 
@@ -215,21 +217,21 @@
 		{
 			require($template_location);
 		}
- // check block settings from template/info.php
-	if(isset($block) && is_array($block) && sizeof($block) > 0) {
-		if(isset($block[0])) {
-		throw new AppException('Invalid index 0 for $block[] in '.str_replace(WB_PATH,'',$template_location).'. '
-		                     . 'The list must start with $block[1]. Please correct it!');
-		}
-		foreach($block as $iIndex=>$sBlockTitle) {
-			if(trim($sBlockTitle) == '' ) {
-			 $block[$iIndex] = $mLang->TEXT_BLOCK.'_'.$iIndex;
-			}
-		}
-	}else {
-		// Make our own menu list
-		$block = array(1, $mLang->TEXT_MAIN);
-	}
+    // check block settings from template/info.php
+       if(isset($block) && is_array($block) && sizeof($block) > 0) {
+           if(isset($block[0])) {
+           throw new AppException('Invalid index 0 for $block[] in '.str_replace(WB_PATH,'',$template_location).'. '
+                                . 'The list must start with $block[1]. Please correct it!');
+           }
+           foreach($block as $iIndex=>$sBlockTitle) {
+               if(trim($sBlockTitle) == '' ) {
+                $block[$iIndex] = $mLang->TEXT_BLOCK.'_'.$iIndex;
+               }
+           }
+       }else {
+           // Make our own menu list
+           $block = array(1 => $mLang->TEXT_MAIN);
+       }
 		/*-- load css files with jquery --*/
 		// include jscalendar-setup
 		$jscal_use_time = true; // whether to use a clock, too
@@ -257,8 +259,8 @@
 						'MENU_TITLE' => ($results_array['menu_title']),
 						'TEXT_CURRENT_PAGE' => $mLang->TEXT_CURRENT_PAGE,
 						'TEXT_LAST_MODIFIED' => $mLang->TEXT_LAST_UPDATED_BY,
-						'HEADING_MANAGE_SECTIONS' => $HEADING['MANAGE_SECTIONS'],
-						'HEADING_MODIFY_PAGE' => $HEADING['MODIFY_PAGE'],
+						'HEADING_MANAGE_SECTIONS' => $mLang->HEADING_MANAGE_SECTIONS,
+						'HEADING_MODIFY_PAGE' => $mLang->HEADING_MODIFY_PAGE,
 						'TEXT_CHANGE_SETTINGS' => $mLang->TEXT_CHANGE_SETTINGS,
 						'TEXT_ADD_SECTION' => $mLang->TEXT_ADD_SECTION,
 						'TEXT_SECTION' => $mLang->TEXT_SECTION,
@@ -265,7 +267,7 @@
 						'TEXT_ID' => 'ID',
 						'TEXT_TYPE' => $mLang->TEXT_TYPE,
 						'TEXT_BLOCK' => $mLang->TEXT_BLOCK,
-						'TEXT_PUBL_START_DATE' => $TEXT{'PUBL_START_DATE'},
+						'TEXT_PUBL_START_DATE' => $mLang->TEXT_PUBL_START_DATE,
 						'TEXT_PUBL_END_DATE' => $mLang->TEXT_PUBL_END_DATE,
 						'TEXT_ACTIONS' => $mLang->TEXT_ACTIONS,
 						'MODIFIED_BY'          => $user['display_name'],
@@ -320,201 +322,175 @@
 					);
 // setting trash only if more than one section exists
 		$tpl->set_block('section_block', 'delete_block', 'delete');
-		if( $bSectionCanDelete = ($database->get_one('SELECT COUNT(*) FROM `'.TABLE_PREFIX.'sections` WHERE `page_id`='.$page_id))!=1 ) {
+        $sql = 'SELECT COUNT(*) FROM `'.$oDb->TablePrefix.'sections` '
+             . 'WHERE `page_id`='.$page_id;
+		$bSectionCanDelete = ($oDb->getOne($sql) > 1);
+		$sql = 'SELECT `section_id`,`module`,`position`,`block`,`publ_start`,`publ_end` '
+		     . 'FROM `'.$oDb->TablePrefix.'sections` '
+		     . 'WHERE `page_id` = '.$page_id.' '
+		     . 'ORDER BY `position` ASC';
+		$query_sections = $oDb->doQuery($sql);
+        $num_sections = $query_sections->numRows();
+        while ($section = $query_sections->fetchRow(MYSQL_ASSOC)) {
+            if (!is_numeric(array_search($section['module'], $module_permissions))) {
+                // Get the modules real name
+                $sql = 'SELECT `name` FROM `'.$oDb->TablePrefix.'addons` '
+                     . 'WHERE `directory` = "'.$section['module'].'"';
+                if (!$oDb->getOne($sql) || !file_exists(WB_PATH.'/modules/'.$section['module'])) {
+                    $edit_page = '<span class="module_disabled">'.$section['module'].'</span>';
+                } else {
+                    $edit_page = '';
+                }
+                $sSectionIdPrefix = ( defined( 'SEC_ANCHOR' ) && ( SEC_ANCHOR != '' )  ? SEC_ANCHOR : 'Sec');
+                $edit_page_0 = '<a id="sid'.$section['section_id'].'" href="'.ADMIN_URL.'/pages/modify.php?page_id='.$results_array['page_id'];
+                $edit_page_1  = ($sSectionIdPrefix!='') ? '#'.$sSectionIdPrefix.$section['section_id'].'">' : '">';
+                $edit_page_1 .= $section['module'].'</a>';
+                if (SECTION_BLOCKS) {
+                    if ($edit_page == '') {
+                        if (defined('EDIT_ONE_SECTION') && EDIT_ONE_SECTION) {
+                            $edit_page = $edit_page_0.'&amp;wysiwyg='.$section['section_id'].$edit_page_1;
+                        } else {
+                            $edit_page = $edit_page_0.$edit_page_1;
+                        }
+                    }
+                    $input_attribute = 'input_normal';
+                    $tpl->set_var(array(
+                            'STYLE_DISPLAY_SECTION_BLOCK' => ' style="visibility:visible;"',
+                            'NAME_SIZE' => 300,
+                            'INPUT_ATTRIBUTE' => $input_attribute,
+                            'VAR_SECTION_ID' => $section['section_id'],
+                            'VAR_SECTION_IDKEY' => $admin->getIDKEY($section['section_id']),
+                            // 'VAR_SECTION_IDKEY' => $section['section_id'],
+                            'VAR_POSITION' => $section['position'],
+                            'LINK_MODIFY_URL_VAR_MODUL_NAME' => $edit_page,
+                            'SELECT' => '',
+                            'SET_NONE_DISPLAY_OPTION' => ''
+                            )
+                        );
+                    // Add block options to the section_list
+                    $tpl->clear_var('block_list');
+                    foreach ($block AS $number => $name) {
+                        $tpl->set_var('NAME', htmlentities(strip_tags($name)));
+                        $tpl->set_var('VALUE', $number);
+                        $tpl->set_var('SIZE', 1);
+                        if ($section['block'] == $number) {
+                            $tpl->set_var('SELECTED', ' selected="selected"');
+                        } else {
+                            $tpl->set_var('SELECTED', '');
+                        }
+                        $tpl->parse('block_list', 'block_block', true);
+                    }
+                } else {
+                    if ($edit_page == '') {
+                        $edit_page = $edit_page_0.'#wb_'.$edit_page_1;
+                    }
+                    $input_attribute = 'input_normal';
+                    reset($block);
+                    $tpl->set_var(array(
+                            'STYLE_DISPLAY_SECTION_BLOCK' => ' style="visibility:hidden;"',
+                            'NAME_SIZE' => 300,
+                            'INPUT_ATTRIBUTE' => $input_attribute,
+                            'VAR_SECTION_ID' => $section['section_id'],
+                            'VAR_SECTION_IDKEY' => $admin->getIDKEY($section['section_id']),
+                            // 'VAR_SECTION_IDKEY' => $section['section_id'],
+                            'VAR_POSITION' => $section['position'],
+                            'LINK_MODIFY_URL_VAR_MODUL_NAME' => $edit_page,
+                            'NAME' => htmlentities(strip_tags(key($block))),
+                            'VALUE' => 1,
+                            'SET_NONE_DISPLAY_OPTION' => '<option>&nbsp;</option>'
+                            )
+                        );
+                }
+                // Insert icon and images
+                $tpl->set_var(array(
+                            'CLOCK_16_PNG' => 'clock_16.png',
+                            'CLOCK_DEL_16_PNG' => 'clock_del_16.png',
+                            'DELETE_16_PNG' => 'delete_16.png'
+                            )
+                        );
+                // set calendar start values
+                if ($section['publ_start']==0) {
+                    $tpl->set_var('VALUE_PUBL_START', '');
+                } else {
+                    $tpl->set_var('VALUE_PUBL_START', date($jscal_format, $section['publ_start']+TIMEZONE));
+                }
+                // set calendar start values
+                if ($section['publ_end']==0) {
+                    $tpl->set_var('VALUE_PUBL_END', '');
+                } else {
+                    $tpl->set_var('VALUE_PUBL_END', date($jscal_format, $section['publ_end']+TIMEZONE));
+                }
+                // Insert icons up and down
+                if ($section['position'] != 1 ) {
+                    $tpl->set_var(
+                                'VAR_MOVE_UP_URL',
+                                '<a href="'.ADMIN_URL.'/pages/move_up.php?page_id='.$page_id.'&amp;section_id='.$section['section_id'].'">
+                                <img src="'.THEME_URL.'/images/up_16.png" alt="{TEXT_MOVE_UP}" />
+                                </a>' );
+                } else {
+                    $tpl->set_var(array(
+                                'VAR_MOVE_UP_URL' => ''
+                                )
+                            );
+                }
+                if ($section['position'] != $num_sections ) {
+                    $tpl->set_var(
+                                'VAR_MOVE_DOWN_URL',
+                                '<a href="'.ADMIN_URL.'/pages/move_down.php?page_id='.$page_id.'&amp;section_id='.$section['section_id'].'">
+                                <img src="'.THEME_URL.'/images/down_16.png" alt="{TEXT_MOVE_DOWN}" />
+                                </a>' );
+                } else {
+                    $tpl->set_var(array(
+                                'VAR_MOVE_DOWN_URL' => ''
+                                )
+                            );
+                }
+            } else { continue; }
+            $tpl->set_var(array(
+                            'DISPLAY_DEBUG' => ' style="visibility:visible;"',
+                            'TEXT_SID' => 'SID',
+                            'DEBUG_COLSPAN_SIZE' => 9
+                            )
+                        );
+            if ($debug) {
+                $tpl->set_var(array(
+                                'DISPLAY_DEBUG' => ' style="visibility:visible;"',
+                                'TEXT_PID' => 'PID',
+                                'TEXT_SID' => 'SID',
+                                'POSITION' => $section['position']
+                                )
+                            );
+            } else {
+                $tpl->set_var(array(
+                                'DISPLAY_DEBUG' => ' style="display:none;"',
+                                'TEXT_PID' => '',
+                                'POSITION' => ''
+                                )
+                            );
+            }
+            if ($bSectionCanDelete) {
+                $tpl->parse('delete', 'delete_block', false);
+            } else {
+                $tpl->parse('delete', '', false);
+            }
+            $tpl->parse('section_list', 'section_block', true);
 		}
 
-		$sql  = 'SELECT `section_id`,`module`,`position`,`block`,`publ_start`,`publ_end` ';
-		$sql .= 'FROM `'.TABLE_PREFIX.'sections` ';
-		$sql .= 'WHERE `page_id` = '.$page_id.' ';
-		$sql .= 'ORDER BY `position` ASC';
-		$query_sections = $database->query($sql);
-
-		if($query_sections->numRows() > 0)
-		{
-			$num_sections = $query_sections->numRows();
-			while($section = $query_sections->fetchRow(MYSQL_ASSOC))
-		    {
-				if(!is_numeric(array_search($section['module'], $module_permissions)))
-		        {
-					// Get the modules real name
-		            $sql = 'SELECT `name` FROM `'.TABLE_PREFIX.'addons` ';
-		            $sql .= 'WHERE `directory` = "'.$section['module'].'"';
-		            if(!$database->get_one($sql) || !file_exists(WB_PATH.'/modules/'.$section['module']))
-					{
-						$edit_page = '<span class="module_disabled">'.$section['module'].'</span>';
-					}else
-					{
-						$edit_page = '';
-					}
-					$sSectionIdPrefix = ( defined( 'SEC_ANCHOR' ) && ( SEC_ANCHOR != '' )  ? SEC_ANCHOR : 'Sec');
-					$edit_page_0 = '<a id="sid'.$section['section_id'].'" href="'.ADMIN_URL.'/pages/modify.php?page_id='.$results_array['page_id'];
-					$edit_page_1  = ($sSectionIdPrefix!='') ? '#'.$sSectionIdPrefix.$section['section_id'].'">' : '">';
-					$edit_page_1 .= $section['module'].'</a>';
-					if(SECTION_BLOCKS)
-		            {
-						if($edit_page == '')
-						{
-							if(defined('EDIT_ONE_SECTION') && EDIT_ONE_SECTION)
-							{
-								$edit_page = $edit_page_0.'&amp;wysiwyg='.$section['section_id'].$edit_page_1;
-							} else {
-								$edit_page = $edit_page_0.$edit_page_1;
-							}
-						}
-						$input_attribute = 'input_normal';
-						$tpl->set_var(array(
-								'STYLE_DISPLAY_SECTION_BLOCK' => ' style="visibility:visible;"',
-								'NAME_SIZE' => 300,
-								'INPUT_ATTRIBUTE' => $input_attribute,
-								'VAR_SECTION_ID' => $section['section_id'],
-								'VAR_SECTION_IDKEY' => $admin->getIDKEY($section['section_id']),
-								// 'VAR_SECTION_IDKEY' => $section['section_id'],
-								'VAR_POSITION' => $section['position'],
-								'LINK_MODIFY_URL_VAR_MODUL_NAME' => $edit_page,
-								'SELECT' => '',
-								'SET_NONE_DISPLAY_OPTION' => ''
-								)
-							);
-						// Add block options to the section_list
-						$tpl->clear_var('block_list');
-						foreach($block AS $number => $name)
-		                {
-							$tpl->set_var('NAME', htmlentities(strip_tags($name)));
-							$tpl->set_var('VALUE', $number);
-							$tpl->set_var('SIZE', 1);
-							if($section['block'] == $number)
-		                    {
-								$tpl->set_var('SELECTED', ' selected="selected"');
-							} else {
-								$tpl->set_var('SELECTED', '');
-							}
-							$tpl->parse('block_list', 'block_block', true);
-						}
-					} else {
-						if($edit_page == '')
-						{
-							$edit_page = $edit_page_0.'#wb_'.$edit_page_1;
-						}
-						$input_attribute = 'input_normal';
-						$tpl->set_var(array(
-								'STYLE_DISPLAY_SECTION_BLOCK' => ' style="visibility:hidden;"',
-								'NAME_SIZE' => 300,
-								'INPUT_ATTRIBUTE' => $input_attribute,
-								'VAR_SECTION_ID' => $section['section_id'],
-								'VAR_SECTION_IDKEY' => $admin->getIDKEY($section['section_id']),
-								// 'VAR_SECTION_IDKEY' => $section['section_id'],
-								'VAR_POSITION' => $section['position'],
-								'LINK_MODIFY_URL_VAR_MODUL_NAME' => $edit_page,
-								'NAME' => htmlentities(strip_tags($block[1])),
-								'VALUE' => 1,
-								'SET_NONE_DISPLAY_OPTION' => '<option>&nbsp;</option>'
-								)
-							);
-					}
-					// Insert icon and images
-					$tpl->set_var(array(
-								'CLOCK_16_PNG' => 'clock_16.png',
-								'CLOCK_DEL_16_PNG' => 'clock_del_16.png',
-								'DELETE_16_PNG' => 'delete_16.png'
-								)
-							);
-					// set calendar start values
-					if($section['publ_start']==0)
-		            {
-						$tpl->set_var('VALUE_PUBL_START', '');
-					} else {
-						$tpl->set_var('VALUE_PUBL_START', date($jscal_format, $section['publ_start']+TIMEZONE));
-					}
-					// set calendar start values
-					if($section['publ_end']==0)
-		            {
-						$tpl->set_var('VALUE_PUBL_END', '');
-					} else {
-						$tpl->set_var('VALUE_PUBL_END', date($jscal_format, $section['publ_end']+TIMEZONE));
-					}
-					// Insert icons up and down
-					if($section['position'] != 1 )
-		            {
-						$tpl->set_var(
-									'VAR_MOVE_UP_URL',
-									'<a href="'.ADMIN_URL.'/pages/move_up.php?page_id='.$page_id.'&amp;section_id='.$section['section_id'].'">
-									<img src="'.THEME_URL.'/images/up_16.png" alt="{TEXT_MOVE_UP}" />
-									</a>' );
-					} else {
-						$tpl->set_var(array(
-									'VAR_MOVE_UP_URL' => ''
-									)
-								);
-					}
-					if($section['position'] != $num_sections ) {
-						$tpl->set_var(
-									'VAR_MOVE_DOWN_URL',
-									'<a href="'.ADMIN_URL.'/pages/move_down.php?page_id='.$page_id.'&amp;section_id='.$section['section_id'].'">
-									<img src="'.THEME_URL.'/images/down_16.png" alt="{TEXT_MOVE_DOWN}" />
-									</a>' );
-					} else {
-						$tpl->set_var(array(
-									'VAR_MOVE_DOWN_URL' => ''
-									)
-								);
-					}
-
-				} else {
-				  continue;
-				}
-
-					$tpl->set_var(array(
-									'DISPLAY_DEBUG' => ' style="visibility:visible;"',
-									'TEXT_SID' => 'SID',
-									'DEBUG_COLSPAN_SIZE' => 9
-									)
-								);
-				if($debug)
-		        {
-					$tpl->set_var(array(
-									'DISPLAY_DEBUG' => ' style="visibility:visible;"',
-									'TEXT_PID' => 'PID',
-									'TEXT_SID' => 'SID',
-									'POSITION' => $section['position']
-									)
-								);
-				} else {
-					$tpl->set_var(array(
-									'DISPLAY_DEBUG' => ' style="display:none;"',
-									'TEXT_PID' => '',
-									'POSITION' => ''
-									)
-								);
-				}
-				if($bSectionCanDelete) {
-					$tpl->parse('delete', 'delete_block', false);
-				} else {
-					$tpl->parse('delete', '', false);
-				} 
-				$tpl->parse('section_list', 'section_block', true);
-			}
-
-		}
-
 		// now add the calendars -- remember to to set the range to [1970, 2037] if the date is used as timestamp!
 		// the loop is simply a copy from above.
-		$sql  = 'SELECT `section_id`,`module` FROM `'.TABLE_PREFIX.'sections` ';
-		$sql .= 'WHERE page_id = '.$page_id.' ';
-		$sql .= 'ORDER BY `position` ASC';
-		$query_sections = $database->query($sql);
+		$sql = 'SELECT `section_id`,`module` FROM `'.$oDb->TablePrefix.'sections` '
+		     . 'WHERE page_id = '.$page_id.' '
+		     . 'ORDER BY `position` ASC';
+		$query_sections = $oDb->doQuery($sql);
 
-		if($query_sections->numRows() > 0)
-		{
+		if ($query_sections->numRows() > 0) {
 			$num_sections = $query_sections->numRows();
-			while($section = $query_sections->fetchRow())
-		    {
+			while ($section = $query_sections->fetchRow()) {
 				// Get the modules real name
-		        $sql  = 'SELECT `name` FROM `'.TABLE_PREFIX.'addons` ';
-		        $sql .= 'WHERE `directory` = "'.$section['module'].'"';
-		        $module_name = $database->get_one($sql);
-
-				if(!is_numeric(array_search($section['module'], $module_permissions)))
-		        {
+		        $sql = 'SELECT `name` FROM `'.$oDb->TablePrefix.'addons` '
+		             . 'WHERE `directory` = "'.$section['module'].'"';
+		        $module_name = $oDb->getOne($sql);
+				if (!is_numeric(array_search($section['module'], $module_permissions))) {
 					$tpl->set_var(array(
 								'jscal_ifformat' => $jscal_ifformat,
 								'jscal_firstday' => $jscal_firstday,
@@ -525,13 +501,13 @@
 								'trigger_end' => 'trigger_stop'.$section['section_id']
 								)
 							);
-					if(isset($jscal_use_time) && $jscal_use_time==TRUE) {
+					if (isset($jscal_use_time) && $jscal_use_time==TRUE) {
 						$tpl->set_var(array(
 								'showsTime' => "true",
 								'timeFormat' => "24"
 								)
 							);
-					}  else {
+					} else {
 						$tpl->set_var(array(
 								'showsTime' => "false",
 								'timeFormat' => "24"
@@ -544,31 +520,25 @@
 		}
 
 		// Work-out if we should show the "Add Section" form
-		$sql  = 'SELECT `section_id` FROM `'.TABLE_PREFIX.'sections` ';
-		$sql .= 'WHERE `page_id` = '.$page_id.' AND `module` = "menu_link"';
-		$query_sections = $database->query($sql);
+		$sql = 'SELECT `section_id` FROM `'.$oDb->TablePrefix.'sections` '
+		     . 'WHERE `page_id` = '.$page_id.' AND `module` = "menu_link"';
+		$query_sections = $oDb->doQuery($sql);
 		$tpl->set_var('TEXT_PLEASE_SELECT', $mLang->TEXT_NONE);
-		if($query_sections->numRows() == 0)
-		{
+		if ($query_sections->numRows() == 0) {
 			$tpl->set_var('TEXT_PLEASE_SELECT', $mLang->TEXT_PLEASE_SELECT);
 			// Modules list
-		    $sql  = 'SELECT `name`,`directory`,`type` FROM `'.TABLE_PREFIX.'addons` ';
-		    $sql .= 'WHERE `type` = "module" AND `function` = "page" AND `directory` != "menu_link" ';
-		    $sql .= 'ORDER BY `name`';
-		    $result = $database->query($sql);
-		// if(DEBUG && $database->is_error()) { $admin->print_error($database->get_error()); }
-
-			if($result->numRows() > 0)
-		    {
-				while ($module = $result->fetchRow())
-		        {
+		    $sql = 'SELECT `name`,`directory`,`type` FROM `'.$oDb->TablePrefix.'addons` '
+		         . 'WHERE `type` = "module" AND `function` = "page" AND `directory` != "menu_link" '
+		         . 'ORDER BY `name`';
+		    $result = $oDb->doQuery($sql);
+		// if(DEBUG && $oDb->is_error()) { $admin->print_error($oDb->get_error()); }
+			if ($result->numRows() > 0) {
+				while ($module = $result->fetchRow()) {
 					// Check if user is allowed to use this module   echo  $module['directory'],'<br />';
-					if(!is_numeric(array_search($module['directory'], $module_permissions)))
-		            {
+					if (!is_numeric(array_search($module['directory'], $module_permissions))) {
 						$tpl->set_var('VALUE', $module['directory']);
 						$tpl->set_var('NAME', $module['name']);
-						if($module['directory'] == 'wysiwyg')
-		                {
+						if ($module['directory'] == 'wysiwyg') {
 							$tpl->set_var('SELECTED', ' selected="selected"');
 						} else {
 							$tpl->set_var('SELECTED', '');
@@ -582,12 +552,12 @@
 		}
 		// Insert language text and messages
 		$tpl->set_var(array(
-							'TEXT_MANAGE_SECTIONS' => $HEADING['MANAGE_SECTIONS'],
+							'TEXT_MANAGE_SECTIONS' => $mLang->HEADING_MANAGE_SECTIONS,
 							'TEXT_ARE_YOU_SURE' => $mLang->TEXT_ARE_YOU_SURE,
 							'TEXT_TYPE' => $mLang->TEXT_TYPE,
 							'TEXT_ADD' => $mLang->TEXT_ADD,
 							'TEXT_SAVE' =>  $mLang->TEXT_SAVE,
-							'TEXTLINK_MODIFY_PAGE' => $HEADING['MODIFY_PAGE'],
+							'TEXTLINK_MODIFY_PAGE' => $mLang->HEADING_MODIFY_PAGE,
 							'TEXT_CALENDAR' => $mLang->TEXT_CALENDAR,
 							'TEXT_DELETE_DATE' => $mLang->TEXT_DELETE_DATE,
 							'TEXT_ADD_SECTION' => $mLang->TEXT_ADD_SECTION,
@@ -598,12 +568,10 @@
 		$tpl->parse('main', 'main_block', false);
 		$tpl->pparse('output', 'page');
 		// include the required file for Javascript admin
-		if(file_exists(WB_PATH.'/modules/jsadmin/jsadmin_backend_include.php'))
-		{
+		if(file_exists(WB_PATH.'/modules/jsadmin/jsadmin_backend_include.php')) {
 			include(WB_PATH.'/modules/jsadmin/jsadmin_backend_include.php');
 		}
 		break;
 endswitch;
-
 // Print admin footer
 $admin->print_footer();
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 2075)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 2076)
@@ -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', '2075');
+if(!defined('REVISION')) define('REVISION', '2076');
 if(!defined('SP')) define('SP', '');
Index: branches/2.8.x/wb/admin/users/user_list.php
===================================================================
--- branches/2.8.x/wb/admin/users/user_list.php	(revision 2075)
+++ branches/2.8.x/wb/admin/users/user_list.php	(revision 2076)
@@ -137,7 +137,12 @@
         $oTpl->set_block('main_block', 'show_confirmed_activation_block', 'show_confirmed_activation');
         if($admin->ami_group_member('1')) {
                 $oTpl->set_block('show_confirmed_activation_block', 'list_confirmed_activation_block', 'list_confirmed_activation');
-            	$oTpl->set_var('DISPLAY_WAITING_ACTIVATION', $mLang->MESSAGE_USERS_WAITING_ACTIVATION);
+                $oTpl->set_var(array(
+                		'DISPLAY_WAITING_ACTIVATION' => $mLang->MESSAGE_USERS_WAITING_ACTIVATION,
+                		'TEXT_USER_ACTIVATE' => $mLang->TEXT_ACTIVATE,
+                		'TEXT_USER_DELETE' => (($iUserStatus == 1) ? $mLang->TEXT_DEACTIVE : $mLang->TEXT_DELETE),
+                		)
+                );
         		$sql  = 'SELECT * FROM `'.TABLE_PREFIX.'users` ';
         		$sql .= 'WHERE `confirm_timeout` != 0 ';
                 $sql .=   'AND `active` = 0 ';
@@ -309,4 +314,4 @@
 
         return $output;
 
-    }
+    }
\ No newline at end of file
Index: branches/2.8.x/wb/admin/users/delete.php
===================================================================
--- branches/2.8.x/wb/admin/users/delete.php	(revision 2075)
+++ branches/2.8.x/wb/admin/users/delete.php	(revision 2076)
@@ -32,7 +32,8 @@
 
     $action = 'default';
     $action = (isset($aActionRequest['delete']) ? 'delete' : $action );
-    $action = (isset($aActionRequest['delete_outdated']) ? 'delete_outdated' : $action );
+    $action = (isset($aActionRequest['delete_outdated']) ? 'delete_outdated'   : $action );
+    $action = (isset($aActionRequest['enable_outdated']) ? 'enable_outdated' : $action );
 
 	switch($action) :
 		case 'delete': // delete the user
@@ -42,7 +43,7 @@
     		    } else {
     		        $aUserID = $aActionRequest['user_id'];
     		    }
-    	    } 
+    	    }
     		break;
 		case 'delete_outdated': // delete Users awaiting activation
             if(isset($aActionRequest['activation_user_id'])) {
@@ -53,12 +54,21 @@
         	    }
             }
     		break;
+		case 'enable_outdated': // enable Users awaiting activation
+            if(isset($aActionRequest['activation_user_id'])) {
+        		if(!is_array($aActionRequest['activation_user_id'])) {
+        	        $aUserID[] = $aActionRequest['activation_user_id'];
+        	    } else {
+        	        $aUserID = $aActionRequest['activation_user_id'];
+        	    }
+            }
+    		break;
 		default: // show userlist with empty modify mask
 	endswitch; // end of switch
-    
+
 //    if(isset($aActionRequest['activation_user_id'])) {
 //		if(!is_array($aActionRequest['activation_user_id'])) {
-//	
+//
 //	        $aUserID[] = $aActionRequest['activation_user_id'];
 //	    } else {
 //	        $aUserID = $aActionRequest['activation_user_id'];
@@ -66,15 +76,15 @@
 //    } else {
 //	    if(isset($aActionRequest['user_id'])) {
 //			if(!is_array($aActionRequest['user_id'])) {
-//		
+//
 //		        $aUserID[] = $aActionRequest['user_id'];
 //		    } else {
 //		        $aUserID = $aActionRequest['user_id'];
 //		    }
-//	    } 
-//    } 
-    
+//	    }
+//    }
 
+
     foreach ( $aUserID AS $key => $value)
     {
         switch ($_SERVER['REQUEST_METHOD']) :
@@ -101,34 +111,55 @@
 
 		if( ($msg = msgQueue::getError()) == '')
 		{
-			$sql  = 'SELECT `active` FROM `'.TABLE_PREFIX.'users` '.
-                    'WHERE `user_id` = '.$user_id;
-            if( ($iDeleteUser = $database->get_one($sql)) != null ) {
-                if($iDeleteUser) {
-    				// Deactivate the user
-        			$sql  = 'UPDATE `'.TABLE_PREFIX.'users` SET '.
-                            '`active` = 0 '.
-                            'WHERE `user_id` = '.$user_id;
-                    if( $database->query($sql) ) {
-                        msgQueue::add($mLang->TEXT_USERS_MARKED_DELETED, true);
+
+    	switch($action) :
+    		case 'enable_outdated': // enable Users awaiting activation
+    			$sql  = 'SELECT `display_name` FROM `'.TABLE_PREFIX.'users` '.
+                        'WHERE `user_id` = '.$user_id;
+                if( ($sDisplayUser = $database->getOne($sql)) != null ) {
+            		$sql = 'UPDATE `'.TABLE_PREFIX.'users` '
+            		     . 'SET `active`=1, '
+            		     .     '`confirm_code`=\'\', '
+            		     .     '`confirm_timeout`=0 '
+            		     . 'WHERE `user_id`='.$user_id;
+            		if($database->query($sql)) {
+                        msgQueue::add($mLang->MESSAGE_USERS_ADDED.' ('.$sDisplayUser.')', true);
+                        $bRetVal = true;
+                    } else {
+                        msgQueue::add($mLang->TEXT_ENABLE.$mLang->MESSAGE_GENERIC_NOT_COMPARE.' ('.$sDisplayUser.')');
                     }
-                } else {
+                }
+        		break;
+    		default: // show userlist with empty modify mask
+    			$sql  = 'SELECT `active` FROM `'.TABLE_PREFIX.'users` '.
+                        'WHERE `user_id` = '.$user_id;
+                if( ($iDeleteUser = $database->get_one($sql)) != null ) {
+                    if($iDeleteUser) {
+        				// Deactivate the user
+            			$sql  = 'UPDATE `'.TABLE_PREFIX.'users` SET '.
+                                '`active` = 0 '.
+                                'WHERE `user_id` = '.$user_id;
+                        if( $database->query($sql) ) {
+                            msgQueue::add($mLang->TEXT_USERS_MARKED_DELETED, true);
+                        }
+                    } else {
 
 
-        			$sql  = 'DELETE FROM `'.TABLE_PREFIX.'users` '.
-                            'WHERE `user_id` = '.$user_id;
-                    if( $database->query($sql) ) {
-                        msgQueue::add($mLang->MESSAGE_USERS_DELETED, true);
+            			$sql  = 'DELETE FROM `'.TABLE_PREFIX.'users` '.
+                                'WHERE `user_id` = '.$user_id;
+                        if( $database->query($sql) ) {
+                            msgQueue::add($mLang->MESSAGE_USERS_DELETED, true);
+                        }
                     }
+                    $bRetVal = true;
                 }
-                $bRetVal = true;
-            }
-            if($database->is_error()) {
-                msgQueue::add( implode('<br />',explode(';',$database->get_error())) );
-                $bRetVal = false;
-           }
-		}
-    }
+                if($database->is_error()) {
+                    msgQueue::add( implode('<br />',explode(';',$database->get_error())) );
+                    $bRetVal = false;
+               }
+    	endswitch; // end of switch
+		} // getError
+    } // foreach users
     if(isset($aActionRequest['clearmsg'])) { msgQueue::clear();  }
     return $bRetVal;
 }
@@ -137,4 +168,4 @@
     $requestMethod = '_'.strtoupper($_SERVER['REQUEST_METHOD']);
     $aActionRequest = (isset(${$requestMethod})) ? ${$requestMethod} : null;
     $aActionRequest['clearmsg'] = true;
-}
+}
\ No newline at end of file
Index: branches/2.8.x/wb/admin/users/index.php
===================================================================
--- branches/2.8.x/wb/admin/users/index.php	(revision 2075)
+++ branches/2.8.x/wb/admin/users/index.php	(revision 2076)
@@ -49,10 +49,12 @@
         $action = (isset($aActionRequest['modify']) ? 'modify' : $action );
         $action = (isset($aActionRequest['delete']) ? 'delete' : $action );
         $action = (isset($aActionRequest['delete_outdated']) ? 'delete_outdated' : $action );
+        $action = (isset($aActionRequest['enable_outdated']) ? 'enable_outdated' : $action );
 
 		switch($action) :
 			case 'delete': // delete the user
 			case 'delete_outdated': // delete Users awaiting activation
+			case 'enable_outdated': // enable Users awaiting activation
     			$admin = new admin('Access', 'users_delete',false);
 				include($sAdminPath.'/delete.php');
     			delete_user($admin,$aActionRequest);
@@ -185,4 +187,4 @@
 
 	admin_users_index($aActionRequest);
 	exit;
-// end of file
+// end of file
\ No newline at end of file
