Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1727)
+++ branches/2.8.x/CHANGELOG	(revision 1728)
@@ -13,6 +13,8 @@
 
 
 
+30 Aug-2012 Build 1728 Dietmar Woellbrink (Luisehahne)
+! change redirect logic for registered pages
 30 Aug-2012 Build 1727 Dietmar Woellbrink (Luisehahne)
 # fixed upgrading group systempermission by upgrading WebsiteBaker
 ! set svn properties /media/upload.php
Index: branches/2.8.x/wb/admin/skel/themes/htt/login.htt
===================================================================
--- branches/2.8.x/wb/admin/skel/themes/htt/login.htt	(nonexistent)
+++ branches/2.8.x/wb/admin/skel/themes/htt/login.htt	(revision 1728)
@@ -0,0 +1,62 @@
+<!-- BEGIN main_block -->
+<!-- BEGIN message_block -->
+{MESSAGE_VALUE}
+<!-- END message_block -->
+
+<hr />
+<form class="login-box" action="{ACTION_URL}" method="post">
+	<input type="hidden" name="action" value="login" />
+	<input type="hidden" name="username_fieldname" value="{USER_FIELDNAME}" />
+	<input type="hidden" name="password_fieldname" value="{PASSWORD_FIELDNAME}" />
+	<input type="hidden" name="redirect" value="{REDIRECT_URL}" />
+
+<table summary="" style="width: 60%; font-size: 1em;">
+		<tr>
+			<td height="10" colspan="2" style="text-align: center;"><h1>{TEXT_LOGIN}</h1></td>
+		</tr>
+		<tr>
+			<td height="40" style="text-align: center;" colspan="2">
+			<strong style="text-align: center;">{THISAPP_MESSAGE_VALUE}</strong>
+			</td>
+		</tr>
+<tr>
+	<td style="width:100px">{TEXT_USERNAME}:</td>
+	<td class="value_input">
+		<input type="text" name="{USER_FIELDNAME}" maxlength="30" style="width:220px;"/>
+    	<script type="text/javascript">
+    	// document.login.{USER_FIELDNAME}.focus();
+    	var ref= document.getElementById("{USER_FIELDNAME}");
+    	if (ref) ref.focus();
+    	</script>
+	</td>
+</tr>
+<tr>
+	<td style="width:100px">{TEXT_PASSWORD}:</td>
+	<td class="value_input">
+		<input type="password" name="{PASSWORD_FIELDNAME}" maxlength="30" style="width:220px;"/>
+	</td>
+</tr>
+<!-- BEGIN show_smart_login_block -->
+<tr>
+	<td>&nbsp;</td>
+	<td>
+		<input type="checkbox" name="remember" id="remember" value="true"/>
+		<label for="remember">{TEXT_REMEMBER_ME}</label>
+	</td>
+</tr>
+<!-- END show_smart_login_block -->
+<tr>
+	<td colspan="2" style="text-align: center;">
+		<input type="submit" name="submit" value="{TEXT_LOGIN}" style="padding: 3px;"  />
+		<input type="reset" name="reset" value="{TEXT_RESET}" style="padding: 3px;"  />
+	<button type="button" value="cancel" onclick="javascript:window.location = '{WB_URL}/';" style="padding: 3px;" >{TEXT_CANCEL}</button>
+	</td>
+</tr>
+<tr>
+	<td colspan="2" style="text-align: center;">
+	<p class="link"><a href="{FORGOT_URL}">{TEXT_FORGOTTEN_DETAILS}</a></p>
+	</td>
+</tr>
+</table>
+</form>
+<!-- END main_block -->
\ No newline at end of file

Property changes on: branches/2.8.x/wb/admin/skel/themes/htt/login.htt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/admin/skel/themes/htt/forgot.htt
===================================================================
--- branches/2.8.x/wb/admin/skel/themes/htt/forgot.htt	(nonexistent)
+++ branches/2.8.x/wb/admin/skel/themes/htt/forgot.htt	(revision 1728)
@@ -0,0 +1,46 @@
+<!-- BEGIN main_block -->
+<!-- BEGIN message_block -->
+{MESSAGE_VALUE}
+<!-- END message_block -->
+
+<hr />
+<form class="forgot-box" action="{ACTION_URL}" method="post">
+	<input type="hidden" name="action" value="forgot" />
+	<input type="hidden" name="url" value="{URL}" />
+
+<table summary="" style="width: 60%; font-size: 1em;">
+<tr>
+	<td height="10" colspan="2" style="text-align: center;"><h1>{MENU_FORGOT}</h1></td>
+</tr>
+<tr>
+	<td height="40" style="text-align: center;" colspan="2">
+	<strong style="text-align: center;">{THISAPP_MESSAGE_VALUE}</strong>
+	</td>
+</tr>
+		<tr>
+			<td height="10" colspan="2">&nbsp;</td>
+		</tr>
+<tr>
+	<td style="width:100px">{TEXT_EMAIL}:</td>
+	<td class="value_input">
+		<input type="text" name="email" maxlength="255" style="width:220px;"/>
+	</td>
+</tr>
+		<tr>
+			<td height="10" colspan="2">&nbsp;</td>
+		</tr>
+<tr>
+	<td colspan="2" style="text-align: center;">
+		<input type="submit" name="submit" value="{TEXT_SEND_DETAILS}" style="padding: 3px;"  />
+		<input type="reset" name="reset" value="{TEXT_RESET}" style="padding: 3px;"  />
+	<button type="button" value="cancel" onclick="javascript:window.location = '{WB_URL}/';" style="padding: 3px;" >{TEXT_CANCEL}</button>
+	</td>
+</tr>
+<tr>
+	<td colspan="2" style="text-align: center;">
+	<p class="link"><a href="{LOGIN_URL}">{TEXT_NEED_TO_LOGIN}</a></p>
+	</td>
+</tr>
+</table>
+</form>
+<!-- END main_block -->
\ No newline at end of file

Property changes on: branches/2.8.x/wb/admin/skel/themes/htt/forgot.htt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1727)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1728)
@@ -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', '1727');
+if(!defined('REVISION')) define('REVISION', '1728');
 if(!defined('SP')) define('SP', '');
Index: branches/2.8.x/wb/account/login_form.php
===================================================================
--- branches/2.8.x/wb/account/login_form.php	(revision 1727)
+++ branches/2.8.x/wb/account/login_form.php	(revision 1728)
@@ -42,6 +42,9 @@
 
 $thisApp->redirect_url = (isset($thisApp->redirect_url) && ($thisApp->redirect_url!='')  ? $thisApp->redirect_url : $_SESSION['HTTP_REFERER'] );
 
+//print '<pre style="text-align: left;"><strong>function '.__FUNCTION__.'( '.''.' );</strong>  basename: '.basename(__FILE__).'  line: '.__LINE__.' -> <br />';
+//print_r( $thisApp->redirect_url ); print '</pre>';
+
 // set template file and assign module and template block
 	$oTpl = new Template(dirname(__FILE__).'/htt','keep');
 	$oTpl->set_file('page', 'login.htt');
Index: branches/2.8.x/wb/account/forgot.php
===================================================================
--- branches/2.8.x/wb/account/forgot.php	(revision 1727)
+++ branches/2.8.x/wb/account/forgot.php	(revision 1728)
@@ -3,9 +3,8 @@
  *
  * @category        frontend
  * @package         account
- * @author          WebsiteBaker Project
- * @copyright       2004-2009, Ryan Djurovich
- * @copyright       2009-2011, Website Baker Org. e.V.
+ * @author          Ryan Djurovich,WebsiteBaker Project
+ * @copyright       2009-2012, WebsiteBaker Org. e.V.
  * @link			http://www.websitebaker2.org/
  * @license         http://www.gnu.org/licenses/gpl.html
  * @platform        WebsiteBaker 2.8.x
Index: branches/2.8.x/wb/account/login.php
===================================================================
--- branches/2.8.x/wb/account/login.php	(revision 1727)
+++ branches/2.8.x/wb/account/login.php	(revision 1728)
@@ -53,12 +53,15 @@
 // Create new login app
 $requestMethod = '_'.strtoupper($_SERVER['REQUEST_METHOD']);
 $redirect  = strip_tags(isset(${$requestMethod}['redirect']) ? ${$requestMethod}['redirect'] : '');
-$redirect = ((isset($_SERVER['HTTP_REFERER']) && empty($redirect)) ?  $_SERVER['HTTP_REFERER'] : $redirect);
+//$redirect = ( (empty($redirect)) ?  $_SERVER['HTTP_REFERER'] : $redirect);
 $_SESSION['HTTP_REFERER'] = str_replace(WB_URL,'',$redirect);
 
 $loginUrl  = WB_URL.'/account/login.php';
 $loginUrl .= (!empty($redirect) ? '?redirect=' .$_SESSION['HTTP_REFERER'] : '');
 
+//print '<pre style="text-align: left;"><strong>function '.__FUNCTION__.'( '.''.' );</strong>  basename: '.basename(__FILE__).'  line: '.__LINE__.' -> <br />';
+//print_r( $redirect ); print '</pre>';
+
 $ThemeUrl  = WB_URL.$wb->correct_theme_source('warning.html');
 // Setup template object, parse vars to it, then parse it
 $ThemePath = realpath(WB_PATH.$wb->correct_theme_source('loginBox.htt'));
Index: branches/2.8.x/wb/account/htt/login.htt
===================================================================
--- branches/2.8.x/wb/account/htt/login.htt	(revision 1727)
+++ branches/2.8.x/wb/account/htt/login.htt	(revision 1728)
@@ -49,7 +49,7 @@
 	<td colspan="2" style="text-align: center;">
 		<input type="submit" name="submit" value="{TEXT_LOGIN}" style="padding: 3px;"  />
 		<input type="reset" name="reset" value="{TEXT_RESET}" style="padding: 3px;"  />
-	<button type="button" value="cancel" onclick="javascript:window.location = '{HTTP_REFERER}';" style="padding: 3px;" >{TEXT_CANCEL}</button>
+	<button type="button" value="cancel" onclick="javascript:window.location = '{WB_URL}/';" style="padding: 3px;" >{TEXT_CANCEL}</button>
 	</td>
 </tr>
 <tr>
Index: branches/2.8.x/wb/account/htt/forgot.htt
===================================================================
--- branches/2.8.x/wb/account/htt/forgot.htt	(revision 1727)
+++ branches/2.8.x/wb/account/htt/forgot.htt	(revision 1728)
@@ -33,7 +33,7 @@
 	<td colspan="2" style="text-align: center;">
 		<input type="submit" name="submit" value="{TEXT_SEND_DETAILS}" style="padding: 3px;"  />
 		<input type="reset" name="reset" value="{TEXT_RESET}" style="padding: 3px;"  />
-	<button type="button" value="cancel" onclick="javascript:window.location = '{HTTP_REFERER}';" style="padding: 3px;" >{TEXT_CANCEL}</button>
+	<button type="button" value="cancel" onclick="javascript:window.location = '{WB_URL}/';" style="padding: 3px;" >{TEXT_CANCEL}</button>
 	</td>
 </tr>
 <tr>
Index: branches/2.8.x/wb/account/forgot_form.php
===================================================================
--- branches/2.8.x/wb/account/forgot_form.php	(revision 1727)
+++ branches/2.8.x/wb/account/forgot_form.php	(revision 1728)
@@ -26,7 +26,12 @@
 // Check if the user has already submitted the form, otherwise show it
 $message = $MESSAGE['FORGOT_PASS_NO_DATA'];
 $errMsg ='';
+
 $redirect_url = (isset($redirect_url) && ($redirect_url!='')  ? $redirect_url : $_SESSION['HTTP_REFERER'] );
+
+//print '<pre style="text-align: left;"><strong>function '.__FUNCTION__.'( '.''.' );</strong>  basename: '.basename(__FILE__).'  line: '.__LINE__.' -> <br />';
+//print_r( $redirect_url ); print '</pre>';
+
 if(isset($_POST['email']) && $_POST['email'] != "" )
 {
 	$email = strip_tags($_POST['email']);
@@ -123,6 +128,7 @@
 		'ACTION_URL' => WB_URL.'/account/forgot.php',
 		'LOGIN_URL' => WB_URL.'/account/login.php',
 		'REDIRECT_URL' => $redirect_url,
+		'URL' => $redirect_url,
 		'WB_URL' => WB_URL,
 		'THEME_URL' => THEME_URL,
 		'HTTP_REFERER' => $_SESSION['HTTP_REFERER'],
Index: branches/2.8.x/wb/framework/class.frontend.php
===================================================================
--- branches/2.8.x/wb/framework/class.frontend.php	(revision 1727)
+++ branches/2.8.x/wb/framework/class.frontend.php	(revision 1728)
@@ -190,10 +190,15 @@
 			// Page keywords
 			$this->page_keywords=$this->page['keywords'];
 			// Page link
+
+            $bCanRedirect = ($this->visibility == 'registered' || $this->visibility == 'privat');
+
 			$this->link=$this->page_link($this->page['link']);
+
 			$_SESSION['PAGE_ID'] = $this->page_id;
-            $bCanRedirect = ($this->visibility == 'registered' || $this->visibility == 'privat');
+
 			$_SESSION['HTTP_REFERER'] = $bCanRedirect != true ? $this->link : WB_URL;
+            $_SESSION['HTTP_REFERER'] = !$this->is_authenticated() ? $this->link : $_SESSION['HTTP_REFERER'];
 
 		// End code to set details as either variables of constants
 		}
