? mantisbt.patch
Index: login_page.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/login_page.php,v
retrieving revision 1.36
diff -u -r1.36 login_page.php
--- login_page.php 12 Apr 2004 21:04:35 -0000 1.36
+++ login_page.php 15 May 2004 02:16:38 -0000
@@ -124,9 +124,9 @@
# Check if the admin directory is available and is readable.
$t_admin_dir = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR;
if ( is_dir( $t_admin_dir ) && is_readable( $t_admin_dir ) ) {
- echo '
';
- echo '
WARNING: Admin directory should be removed.
';
- echo '
';
+ echo '', "\n";
+ echo '
WARNING: Admin directory should be removed.
', "\n";
+ echo '
', "\n";
}
?>
Index: meta_inc.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/meta_inc.php,v
retrieving revision 1.15
diff -u -r1.15 meta_inc.php
--- meta_inc.php 11 Jan 2004 07:16:07 -0000 1.15
+++ meta_inc.php 15 May 2004 02:16:38 -0000
@@ -12,8 +12,8 @@
# prevent caching
$t_content_expire = config_get('content_expire');
?>
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
Index: core/html_api.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/html_api.php,v
retrieving revision 1.93
diff -u -r1.93 html_api.php
--- core/html_api.php 12 Apr 2004 21:04:36 -0000 1.93
+++ core/html_api.php 15 May 2004 02:16:38 -0000
@@ -20,10 +20,10 @@
# html_page_top1
# html_begin
# html_head_begin
- # html_content_type
- # html_title
# html_css
+ # html_content_type
# (html_meta_redirect)
+ # html_title
# html_page_top2
# html_page_top2a
# html_head_end
@@ -60,10 +60,10 @@
function html_page_top1() {
html_begin();
html_head_begin();
- html_content_type();
- html_title();
html_css();
+ html_content_type();
include( config_get( 'meta_include_file' ) );
+ html_title();
}
# --------------------
@@ -135,42 +135,42 @@
# (1) Print the document type and the opening tag
function html_begin() {
# @@@ NOTE make this a configurable global.
- #PRINT '';
- #PRINT '';
+ #echo '', "\n";
+ #echo '', "\n";
- PRINT '';
- PRINT '';
+ echo '', "\n";
+ echo '', "\n";
}
# --------------------
# (2) Begin the section
function html_head_begin() {
- PRINT '';
+ echo string_insert_display_tabs(1); echo '', "\n";
}
# --------------------
# (3) Print the content-type
function html_content_type() {
- PRINT '';
+ echo string_insert_display_tabs(1); echo '', "\n";
}
# --------------------
# (4) Print the window title
function html_title() {
$t_title = config_get( 'window_title' );
- PRINT '' . string_display( $t_title ) . "\n";
+ echo string_insert_display_tabs(1); echo '', string_display( $t_title ), '', "\n";
}
# --------------------
# (5) Print the link to include the css file
function html_css() {
$t_css_url = config_get( 'css_include_file' );
- PRINT '';
+ echo string_insert_display_tabs(1); echo '', "\n";
# fix for NS 4.x css
- PRINT '';
+ echo string_insert_display_tabs(1); echo '', "\n";
}
# --------------------
@@ -188,7 +188,7 @@
$p_time = config_get( 'wait_time' );
}
- PRINT "";
+ echo "\n";
return true;
}
@@ -196,20 +196,20 @@
# --------------------
# (7) End the section
function html_head_end() {
- PRINT '';
+ echo '', "\n";
}
# --------------------
# (8) Begin the section
function html_body_begin() {
- PRINT '';
+ echo '', "\n";
}
# --------------------
# (9) Print the title displayed at the top of the page
function html_header() {
$t_title = config_get( 'page_title' );
- PRINT '' . string_display( $t_title ) . '
';
+ echo '', string_display( $t_title ), '
', "\n";
}
# --------------------
@@ -296,13 +296,13 @@
user_update_last_visit( $t_user_id );
}
- PRINT '
';
- PRINT '
';
+ echo string_insert_display_tabs(1); echo '
', "\n";
+ echo string_insert_display_tabs(1); echo '
', "\n";
if ( ON == config_get( 'show_version' ) ) {
- PRINT 'Mantis ' . config_get( 'mantis_version' ) . '';
+ echo string_insert_display_tabs(1); echo 'Mantis ', config_get( 'mantis_version' ), '', "\n";
}
- PRINT 'Copyright © 2000 - 2004';
- PRINT '' . config_get( 'webmaster_email' ) . '';
+ echo string_insert_display_tabs(1); echo 'Copyright © 2000 - 2004', "\n";
+ echo string_insert_display_tabs(1); echo '', config_get( 'webmaster_email' ), '', "\n";
# print timings
if ( ON == config_get( 'show_timer' ) ) {
@@ -312,20 +312,20 @@
# print db queries that were run
if ( ON == config_get( 'show_queries_count' ) ) {
$t_count = count( $g_queries_array );
- PRINT $t_count.' total queries executed.
';
- PRINT count( array_unique ( $g_queries_array ) ).' unique queries executed.
';
+ echo string_insert_display_tabs(1); echo $t_count, ' total queries executed.
', "\n";
+ echo string_insert_display_tabs(1); echo count( array_unique ( $g_queries_array ) ).' unique queries executed.
', "\n";
if ( ON == config_get( 'show_queries_list' ) ) {
- PRINT '';
+ echo string_insert_display_tabs(1); echo '', "\n";
$t_shown_queries = array();
for ( $i = 0; $i < $t_count; $i++ ) {
if ( in_array( $g_queries_array[$i], $t_shown_queries ) ) {
- PRINT '| '.($i+1).' | '.htmlspecialchars($g_queries_array[$i]).' |
';
+ echo string_insert_display_tabs(1); echo '| ', ($i+1), ' | ', htmlspecialchars($g_queries_array[$i]), ' |
', "\n";
} else {
array_push( $t_shown_queries, $g_queries_array[$i] );
- PRINT '| '.($i+1).' | '.htmlspecialchars($g_queries_array[$i]) . ' |
';
+ echo string_insert_display_tabs(1); echo '| ', ($i+1), ' | ', htmlspecialchars($g_queries_array[$i]), ' |
', "\n";
}
}
- PRINT '
';
+ echo string_insert_display_tabs(1); echo '
', "\n";
}
}
}
@@ -333,13 +333,13 @@
# --------------------
# (14) End the section
function html_body_end() {
- PRINT '';
+ echo '', "\n";
}
# --------------------
# (15) Print the closing tag
function html_end() {
- PRINT '';
+ echo '', "\n";
}
@@ -814,4 +814,4 @@
html_button_bug_delete( $p_bug_id );
PRINT '';
}
-?>
\ No newline at end of file
+?>
Index: core/string_api.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/string_api.php,v
retrieving revision 1.46
diff -u -r1.46 string_api.php
--- core/string_api.php 8 Apr 2004 20:52:50 -0000 1.46
+++ core/string_api.php 15 May 2004 02:16:38 -0000
@@ -373,4 +373,17 @@
function string_get_bug_report_page( $p_user_id = null ) {
return string_get_bug_page( 'report', $p_user_id );
}
+
+ # --------------------
+ # return a string with requested number of tab characters, used mainly to
+ # format (nicely) the html sent to the browser.
+ function string_insert_display_tabs( $n_tabs ) {
+ $string = NULL;
+ for ( $idx = 0; $idx < $n_tabs; $idx++ ) {
+ $string .= "\t";
+ }
+ return $string;
+ }
+
+
?>