Changeset 253
- Timestamp:
- 12/14/2006 02:18:12 AM (4 years ago)
- Files:
-
- 1 modified
-
trunk/actions/usersettings.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/actions/usersettings.php
r248 r253 42 42 if (!defined('PASSWORD_CHANGED')) define('PASSWORD_CHANGED', "Password successfully changed!"); 43 43 if (!defined('ERROR_OLD_PASSWORD_WRONG')) define('ERROR_OLD_PASSWORD_WRONG', "The old password you entered is wrong."); 44 if (!defined('USER_LOGGED_IN_AS_LABEL')) define('USER_LOGGED_IN_AS_LABEL', "Your are logged in as %s"); 44 if (!defined('USER_LOGGED_IN_AS_LABEL')) define('USER_LOGGED_IN_AS_LABEL', "You are logged in as %s"); 45 if (!defined('LABEL_NO_GO_BACK')) define('LABEL_NO_GO_BACK', 'Don\'t go back to %s'); 45 46 if (!defined('USER_EMAIL_LABEL')) define('USER_EMAIL_LABEL', "Your email address:"); 46 47 if (!defined('DOUBLECLICK_LABEL')) define('DOUBLECLICK_LABEL', "Doubleclick editing:"); … … 119 120 { 120 121 $_SESSION['go_back'] = $_SERVER['HTTP_REFERER']; 122 //We save the tag of the referring page, this tag is to be shown in label <Go back to ...>. We must use a session here because if the user 123 //Refresh the page by hitting <Enter> on the address bar, the value would be lost. 124 $_SESSION['go_back_tag'] = $match[1]; 121 125 } 122 126 } … … 369 373 default: 370 374 $this->SetUser($existingUser); 371 if ( isset($_SESSION['go_back']))375 if ((isset($_SESSION['go_back'])) && (!isset($_POST['no_go_back']))) 372 376 { 373 377 $go_back = $_SESSION['go_back']; 374 378 unset($_SESSION['go_back']); 379 unset($_SESSION['go_back_tag']); 375 380 $this->Redirect($go_back); 376 381 } … … 450 455 $this->SetUser($this->LoadUser($name)); 451 456 $params .= 'registered=true'; 457 if ((isset($_SESSION['go_back'])) && (!isset($_POST['no_go_back']))) 458 { 459 $go_back = $_SESSION['go_back']; 460 unset($_SESSION['go_back']); 461 $this->Redirect($go_back); 462 } 452 463 $this->Redirect($url.$params); 453 464 } … … 515 526 <input id="password" <?php echo $password_highlight; ?> type="password" name="password" size="40" /> 516 527 <br /> 528 <?php 529 if (isset($_SESSION['go_back'])) 530 { 531 ?> 532 <label for="no_go_back"><?php printf(LABEL_NO_GO_BACK, $_SESSION['go_back_tag']); ?></label> 533 <input type="checkbox" name="no_go_back" id="no_go_back"<?php if (isset($_POST['no_go_back'])) echo ' checked="checked"';?> /> 534 <br /> 535 <?php 536 } 537 ?> 517 538 <input id="login" type="submit" value="<?php echo LOGIN_BUTTON_LABEL ?>" size="40" /> 518 539 <br /><br />