Skip to content

Commit

Permalink
Fix #3231: Redirect problem when user clicks on a bug link while not …
Browse files Browse the repository at this point in the history
…logged in.

M core/access_api.php
- (access_denied): Do not echo "access denied" message if user is not logged in and is to be redirected to login screen.
1. It didn't make much sense
2. Sometimes the redirect didn't work because of the message.

Thanks to J.P. Pasnak for the fix.


git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2185 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
vboctor committed Jul 13, 2003
1 parent 008c126 commit dba7e7c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 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.22 2003-04-24 04:00:44 vboctor Exp $
# $Id: access_api.php,v 1.23 2003-07-13 13:29:54 vboctor Exp $
# --------------------------------------------------------

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

print '<center>';
print '<br />'.error_string(ERROR_ACCESS_DENIED).'<br />';
if ( ! auth_is_user_authenticated() ) {
$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>';
print_bracket_link( 'main_page.php', lang_get( 'proceed' ) );
print '</center>';
}
print '</center>';
exit;
}

Expand Down
1 change: 1 addition & 0 deletions doc/ChangeLog
Expand Up @@ -36,6 +36,7 @@ Mantis ChangeLog
* Fix #3186: $t_protocol not set right (PHP 4.3.0/Netscape Enterprise 6.1/Linux installation with Mozilla client).
* Fix #3218: Version vs. Product version confusing (renamed Version to OS Version in advanced pages - English language).
* Fix #3214: Private projects links get replaced by public project links.
* Fix #3231: Redirect problem when user clicks on a bug link while not logged in.
* Languages: Updated Italian, German, Spanish, Slovak, Swedish and Dutch localisations.
* Languages: Synchronised localisation files with English localisation.

Expand Down

0 comments on commit dba7e7c

Please sign in to comment.