Hi. How i can add support to login.php for this urls?
http://domain.abc/login.php?username=an ... oject_id=9
Thanks
project_id support for login.php
Moderators: Developer, Contributor
-
- Posts: 66
- Joined: 08 Jan 2019, 07:14
project_id support for login.php
Mantis version: 2.23.0, OS: Windows, PHP: 7.3, Charset (PHP, Database): UTF-8, and: little, bad english
Re: project_id support for login.php
an anonymous user does not need to login so you can use something like:
https://domain.abc/view_all_bug_page.php?project_id=1
https://domain.abc/view_all_bug_page.php?project_id=1
-
- Posts: 66
- Joined: 08 Jan 2019, 07:14
Re: project_id support for login.php
Yes i know but this solution have a problem: https://www.mantisbt.org/bugs/view.php?id=25184cas wrote: ↑20 Jan 2019, 09:53 an anonymous user does not need to login so you can use something like:
https://domain.abc/view_all_bug_page.php?project_id=1
And the fix in the next release is not scheduled: https://www.mantisbt.org/bugs/roadmap_p ... ion_id=339
so solving the problem it will take a while so I"m looking for a way to solve it from my side.
EDIT:
I replaced in login.php text:
Code: Select all
print_header_redirect( $t_redirect_url );
Code: Select all
if( isset( $_GET['project_id'] ) ) {
if( $_GET['action'] == "add" ) {
print_header_redirect( 'bug_report_page.php?project_id=' . $_GET['project_id'] );
} elseif ( $_GET['action'] == "view" ) {
print_header_redirect( 'view_all_bug_page.php?project_id=' . $_GET['project_id'] );
} else {
print_header_redirect( 'view_all_bug_page.php?project_id=' . $_GET['project_id'] );
}
} else {
print_header_redirect( $t_redirect_url );
}
Code: Select all
https://domain.abc/login.php?username=anonymous&perm_login=false&action=add&project_id=1
https://domain.abc/login.php?username=anonymous&perm_login=false&action=view&project_id=1
https://domain.abc/login.php?username=anonymous&perm_login=false&project_id=1
Please moderators moving this thread to Customizations section.
Mantis version: 2.23.0, OS: Windows, PHP: 7.3, Charset (PHP, Database): UTF-8, and: little, bad english