Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1526)
+++ branches/2.8.x/CHANGELOG	(revision 1527)
@@ -13,6 +13,8 @@
 =========================== add small Features 2.8.2 ==========================
 
 ----------------------------------- Fixes 2.8.2 --------------------------------
+20 Nov-2011 Build 1527 Dietmar Woellbrink (Luisehahne)
+# fix redirect login
 20 Nov-2011 Build 1526 Dietmar Woellbrink (Luisehahne)
 # typofix in BG and RU
 15 Nov-2011 Build 1525 Dietmar Woellbrink (Luisehahne)
Index: branches/2.8.x/wb/account/login_form.php
===================================================================
--- branches/2.8.x/wb/account/login_form.php	(revision 1526)
+++ branches/2.8.x/wb/account/login_form.php	(revision 1527)
@@ -38,8 +38,8 @@
 $page_id = !empty($_SESSION['PAGE_ID']) ? $_SESSION['PAGE_ID'] : 0;
 $_SESSION['PAGE_LINK'] = get_page_link( $page_id );
 if(!file_exists($_SESSION['PAGE_LINK'])) {$_SESSION['PAGE_LINK'] = WB_URL.'/'; }
-$thisApp->redirect_url = $_SESSION['HTTP_REFERER'] = page_link($_SESSION['PAGE_LINK']);
-
+$_SESSION['HTTP_REFERER'] = $_SESSION['PAGE_LINK'];
+$thisApp->redirect_url = (isset($thisApp->redirect_url) ? $thisApp->redirect_url : $_SESSION['PAGE_LINK'])
 ?>
 <div style="margin: 1em auto;">
 	<button type="button" value="cancel" onClick="javascript: window.location = '<?php print $_SESSION['HTTP_REFERER'] ?>';"><?php print $TEXT['CANCEL'] ?></button>
@@ -49,10 +49,10 @@
 <br />
 <br />
 
-<form action="<?php echo WB_URL.'/account/login.php'; ?>" method="post">
-<p style="display:none;"><input type="hidden" name="username_fieldname" value="<?php echo $username_fieldname; ?>" /></p>
-<p style="display:none;"><input type="hidden" name="password_fieldname" value="<?php echo $password_fieldname; ?>" /></p>
-<p style="display:none;"><input type="hidden" name="redirect" value="<?php echo $thisApp->redirect_url;?>" /></p>
+<form class="login-box" action="<?php echo WB_URL.'/account/login.php'; ?>" method="post">
+<input type="hidden" name="username_fieldname" value="<?php echo $username_fieldname; ?>" />
+<input type="hidden" name="password_fieldname" value="<?php echo $password_fieldname; ?>" />
+<input type="hidden" name="redirect" value="<?php echo $thisApp->redirect_url;?>" />
 
 <table cellpadding="5" cellspacing="0" border="0" width="90%">
 <tr>
Index: branches/2.8.x/wb/modules/droplets/example/LoginBox.php
===================================================================
--- branches/2.8.x/wb/modules/droplets/example/LoginBox.php	(revision 1526)
+++ branches/2.8.x/wb/modules/droplets/example/LoginBox.php	(revision 1527)
@@ -2,7 +2,7 @@
 //:Use: [[LoginBox?redirect=url]]
 //:Absolute or relative url possible
 //:Remember to enable frontend login in your website settings.
- 
+
 	global $wb,$page_id,$TEXT, $MENU, $HEADING;
 
 	$return_value = '<div class="login-box">'."\n";
@@ -69,8 +69,8 @@
 
 // Get redirect
 	$redirect_url = '';
+   	$redirect_url = isset($redirect)&&($redirect!='') ? '<input type="hidden" name="url" value="'.$redirect.'" />'."\n" : $redirect_url;
 	$redirect_url = (isset($_SERVER['HTTP_REFERER']) && ($redirect_url=='') ?  '<input type="hidden" name="url" value="'.$_SERVER['HTTP_REFERER'].'" />'."\n"  : $redirect_url );
-   	$redirect_url = isset($redirect)&&($redirect!='') ? '<input type="hidden" name="url" value="'.$redirect.'" />'."\n" : $redirect_url;
 
 	if ( ( FRONTEND_LOGIN == 'enabled') &&
 		    ( VISIBILITY != 'private') &&
