Skip to content

Commit 4fc3412

Browse files
committed
Merge branch 'master-2.27'
2 parents c1edaa4 + a58cf17 commit 4fc3412

File tree

3 files changed

+39
-34
lines changed

3 files changed

+39
-34
lines changed

core/layout_api.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,16 @@ function layout_page_begin( $p_active_sidebar_page = null ) {
163163

164164
layout_page_content_begin();
165165

166-
layout_main_content_row_begin();
167-
168166
if( auth_is_user_authenticated() ) {
169167
if( ON == config_get( 'show_project_menu_bar' ) ) {
168+
layout_main_content_row_begin();
170169
print_project_menu_bar();
170+
layout_main_content_row_end();
171171
}
172172
}
173173

174+
layout_main_content_row_begin();
175+
174176
event_signal( 'EVENT_LAYOUT_CONTENT_BEGIN' );
175177
}
176178

css/ace-mantis.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ a:link:after, a:visited:after {
242242

243243
.user-info {
244244
line-height: 33px !important;
245+
max-width: 270px !important;
245246
}
246247

247248
.page-content {

set_project.php

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161
$t_top = $t_project[0];
6262
$t_bottom = $t_project[count( $t_project ) - 1];
6363

64+
$t_redirect_url = config_get_global( 'default_home_page' );
65+
6466
if( ALL_PROJECTS != $t_bottom ) {
6567
project_ensure_exists( $t_bottom );
6668
}
@@ -77,45 +79,45 @@
7779
# for proxies that clear out HTTP_REFERER
7880
if( !is_blank( $c_ref ) ) {
7981
$t_redirect_url = $c_ref;
80-
} else if( !isset( $_SERVER['HTTP_REFERER'] ) || is_blank( $_SERVER['HTTP_REFERER'] ) ) {
81-
$t_redirect_url = config_get_global( 'default_home_page' );
82-
} else {
83-
$t_home_page = config_get_global( 'default_home_page' );
84-
82+
} else if( isset( $_SERVER['HTTP_REFERER'] ) && !is_blank( $_SERVER['HTTP_REFERER'] ) ) {
8583
# Check that referrer matches our address after squashing case (case insensitive compare)
8684
$t_path = rtrim( config_get_global( 'path' ), '/' );
8785
if( preg_match( '@^(' . $t_path . ')/(?:/*([^\?#]*))(.*)?$@', $_SERVER['HTTP_REFERER'], $t_matches ) ) {
8886
$t_referrer_page = $t_matches[2];
8987
$t_param = $t_matches[3];
9088

91-
# if view_all_bug_page, pass on filter
92-
if( strcasecmp( 'view_all_bug_page.php', $t_referrer_page ) == 0 ) {
93-
$t_source_filter_id = filter_db_get_project_current( $t_bottom );
94-
$t_redirect_url = 'view_all_set.php?type=' . FILTER_ACTION_GENERALIZE;
95-
96-
if( $t_source_filter_id !== null ) {
97-
$t_redirect_url = 'view_all_set.php?type=' . FILTER_ACTION_LOAD . '&source_query_id=' . $t_source_filter_id;
98-
}
99-
} else if( stripos( $t_referrer_page, '_page.php' ) !== false ) {
100-
switch( $t_referrer_page ) {
101-
case 'bug_view_page.php':
102-
case 'bug_view_advanced_page.php':
103-
case 'bug_update_page.php':
104-
case 'bug_change_status_page.php':
105-
$t_path = $t_home_page;
106-
break;
107-
default:
108-
$t_path = $t_referrer_page . $t_param;
109-
break;
110-
}
111-
$t_redirect_url = $t_path;
112-
} else if( $t_referrer_page == 'plugin.php' ) {
113-
$t_redirect_url = $t_referrer_page . $t_param; # redirect to same plugin page
114-
} else {
115-
$t_redirect_url = $t_home_page;
89+
switch( $t_referrer_page ) {
90+
case 'view_all_bug_page.php':
91+
$t_source_filter_id = filter_db_get_project_current( $t_bottom );
92+
$t_redirect_url = 'view_all_set.php?' . string_build_query(
93+
( $t_source_filter_id !== null )
94+
? [ 'type' => FILTER_ACTION_LOAD,
95+
'source_query_id' => $t_source_filter_id ]
96+
: [ 'type' => FILTER_ACTION_GENERALIZE ] );
97+
break;
98+
99+
case 'manage_proj_edit_page.php':
100+
case 'manage_proj_page.php':
101+
$t_redirect_url = ( ALL_PROJECTS != $t_bottom )
102+
? 'manage_proj_edit_page.php?'
103+
. string_build_query( [ 'project_id' => $t_bottom ] )
104+
: 'manage_proj_page.php';
105+
break;
106+
107+
case 'bug_view_page.php':
108+
case 'bug_view_advanced_page.php':
109+
case 'bug_update_page.php':
110+
case 'bug_change_status_page.php':
111+
break;
112+
113+
default:
114+
if( stripos( $t_referrer_page, '_page.php' ) !== false
115+
# redirect to same plugin page
116+
|| $t_referrer_page == 'plugin.php' ) {
117+
$t_redirect_url = $t_referrer_page . $t_param;
118+
}
119+
break;
116120
}
117-
} else {
118-
$t_redirect_url = $t_home_page;
119121
}
120122
}
121123

0 commit comments

Comments
 (0)