Navigation Menu

Skip to content

Commit

Permalink
Fix: 0003948: Will not jump to bug when following link in mail
Browse files Browse the repository at this point in the history
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2768 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
mantis committed Jul 27, 2004
1 parent 5c25c1d commit fe7893a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
17 changes: 8 additions & 9 deletions core/access_api.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: access_api.php,v 1.29 2004-07-24 13:26:18 vboctor Exp $
# $Id: access_api.php,v 1.30 2004-07-27 14:24:57 prichards Exp $
# --------------------------------------------------------

$t_core_dir = dirname( __FILE__ ).DIRECTORY_SEPARATOR;
Expand All @@ -30,17 +30,16 @@ function access_denied() {
}

if ( !auth_is_user_authenticated() ) {
if ( isset( $_SERVER['REQUEST_URI'] ) ) {
$p_return_page = string_url( $_SERVER['REQUEST_URI'] );
print_header_redirect( 'login_page.php?return=' . $p_return_page );
} else {
print_header_redirect( 'login_page.php' );
if ( !isset( $_SERVER['REQUEST_URI'] ) ) {
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'].'?'.$_SERVER['QUERY_STRING'];
}
$p_return_page = string_url( $_SERVER['REQUEST_URI'] );
print_header_redirect( 'login_page.php?return=' . $p_return_page );
} else {
PRINT '<center>';
PRINT '<p>'.error_string(ERROR_ACCESS_DENIED).'</p>';
echo '<center>';
echo '<p>'.error_string(ERROR_ACCESS_DENIED).'</p>';
print_bracket_link( 'main_page.php', lang_get( 'proceed' ) );
PRINT '</center>';
echo '</center>';
}
exit;
}
Expand Down
7 changes: 5 additions & 2 deletions core/authentication_api.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: authentication_api.php,v 1.41 2004-07-11 07:09:52 vboctor Exp $
# $Id: authentication_api.php,v 1.42 2004-07-27 14:24:57 prichards Exp $
# --------------------------------------------------------

### Authentication API ###
Expand Down Expand Up @@ -34,7 +34,10 @@ function auth_ensure_user_authenticated( $p_return_page = '' ) {
print_header_redirect( 'logout_page.php' );
}
} else { # not logged in
if ( is_blank( $p_return_page ) && isset( $_SERVER['REQUEST_URI'] ) ) {
if ( is_blank( $p_return_page ) ) {
if (!isset($_SERVER['REQUEST_URI'])) {
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING'];
}
$p_return_page = $_SERVER['REQUEST_URI'];
}
$p_return_page = string_url( $p_return_page );
Expand Down

0 comments on commit fe7893a

Please sign in to comment.