diff --git a/ChangeLog b/ChangeLog
index 16c4a2c69a..b153c643aa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,10 @@ To Do:
12.XX.2000 - 0.12.1
* Fixed bug in vote adding with inccorect variable name.
+ * Fixed bug where bugnote text not properl deleted when bug deleted
+ * Uncluttered large portions of code
+ * Fixed another problem with the date created being updated improperly when
+ dealing with bugnotes.
12.20.2000 - 0.12.0
diff --git a/account_delete.php3 b/account_delete.php3
index 95f60f0b5d..08d4d61805 100644
--- a/account_delete.php3
+++ b/account_delete.php3
@@ -60,19 +60,22 @@
}
### FAILURE
else {
- PRINT "ERROR!!! An error has occured. Email the administrator with this query:
";
+ PRINT "$s_sql_error_detected \">administrator
";
echo $query;
}
?>
- if ( $f_protected=="on" ) { ?>
- echo $s_go_back ?>
- } else { ?>
- echo $s_proceed ?>
- } ?>
+
+ if ( $f_protected=="on" ) {
+ PRINT "$s_go_back ";
+ }
+ else {
+ PRINT "$s_proceed ";
+ }
+?>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/account_delete_page.php3 b/account_delete_page.php3
index 7f99ac3615..2c09603f44 100644
--- a/account_delete_page.php3
+++ b/account_delete_page.php3
@@ -30,12 +30,12 @@
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/account_page.php3 b/account_page.php3
index 1e091c2890..e3300bb1c2 100644
--- a/account_page.php3
+++ b/account_page.php3
@@ -116,6 +116,6 @@
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/account_prefs_page.php3 b/account_prefs_page.php3
index 6f09b00e5f..e8d822a774 100644
--- a/account_prefs_page.php3
+++ b/account_prefs_page.php3
@@ -18,11 +18,7 @@
db_mysql_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );
### grab the user id
- $query = "SELECT id
- FROM $g_mantis_user_table
- WHERE cookie_string='$g_string_cookie_val'";
- $result = db_mysql_query($query);
- $u_id = mysql_result( $result, 0 );
+ $u_id = get_current_user_id();
### Grab the data
$query = "SELECT *
@@ -64,9 +60,9 @@
>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/account_prefs_update.php3 b/account_prefs_update.php3
index fb1d17cb07..03cc0568be 100644
--- a/account_prefs_update.php3
+++ b/account_prefs_update.php3
@@ -25,16 +25,15 @@
WHERE id='$f_id'";
$result = mysql_query( $query );
}
- else {
- echo "ERROR: invalid action";
- }
?>
print_html_top() ?>
print_head_top() ?>
print_title( $g_window_title ) ?>
print_css( $g_css_include_file ) ?>
- print_meta_redirect( $g_account_prefs_page, $g_wait_time );
+ if ( $result ) {
+ print_meta_redirect( $g_account_prefs_page, $g_wait_time );
+ }
?>
include( $g_meta_include_file ) ?>
print_head_bottom() ?>
@@ -45,11 +44,20 @@
- echo $s_prefs_updated ?>
-
+
+ ### SUCCESS
+ if ( $result ) {
+ PRINT "$s_prefs_updated
";
+ }
+ ### FAILURE
+ else {
+ PRINT "$s_sql_error_detected \">administrator
";
+ echo $query;
+ }
+?>
echo $s_proceed ?>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/account_profile_add.php3 b/account_profile_add.php3
index 841415bc1a..ad0da22f91 100644
--- a/account_profile_add.php3
+++ b/account_profile_add.php3
@@ -55,13 +55,13 @@
}
### FAILURE
else {
- PRINT "ERROR DETECTED: Report this sql statement to \">administrator ";
+ PRINT "$s_sql_error_detected \">administrator
";
}
?>
echo $s_proceed ?>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/account_profile_delete.php3 b/account_profile_delete.php3
index 9647cd8e6a..c80325e277 100644
--- a/account_profile_delete.php3
+++ b/account_profile_delete.php3
@@ -45,13 +45,13 @@
PRINT "$s_profile_deleted
";
}
else {
- PRINT "ERROR DETECTED: Report this sql statement to \">administrator
";
+ PRINT "$s_sql_error_detected \">administrator
";
}
?>
echo $s_proceed ?>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/account_profile_edit_page.php3 b/account_profile_edit_page.php3
index 37566c2823..f40ce4a4b0 100644
--- a/account_profile_edit_page.php3
+++ b/account_profile_edit_page.php3
@@ -60,7 +60,7 @@
>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/account_profile_make_default.php3 b/account_profile_make_default.php3
index 42b486c26b..c704c63fe1 100644
--- a/account_profile_make_default.php3
+++ b/account_profile_make_default.php3
@@ -53,13 +53,13 @@
}
### FAILURE
else {
- PRINT "ERROR DETECTED: Report this sql statement to \">administrator ";
+ PRINT "$s_sql_error_detected \">administrator
";
}
?>
echo $s_proceed ?>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/account_profile_manage_page.php3 b/account_profile_manage_page.php3
index 573eacced3..2f1affa7ab 100644
--- a/account_profile_manage_page.php3
+++ b/account_profile_manage_page.php3
@@ -14,13 +14,6 @@
header( "Location: $g_logout_page" );
exit;
}
-
- ### Get user information and prefix with u_
- $query = "SELECT id
- FROM $g_mantis_user_table
- WHERE cookie_string='$g_string_cookie_val'";
- $result = db_mysql_query($query);
- $u_id = mysql_result( $result, 0 );
?>
print_html_top() ?>
print_head_top() ?>
@@ -41,7 +34,7 @@
>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/bug_update_page.php3 b/bug_update_page.php3
index 897837a547..a524c80a98 100644
--- a/bug_update_page.php3
+++ b/bug_update_page.php3
@@ -208,6 +208,6 @@
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/bug_vote_add.php3 b/bug_vote_add.php3
index df64cfcf1b..ed85e08400 100644
--- a/bug_vote_add.php3
+++ b/bug_vote_add.php3
@@ -41,7 +41,7 @@
}
### FAILURE
else {
- PRINT "ERROR DETECTED: Report this sql statement to \">administrator ";
+ PRINT "$s_sql_error_detected \">administrator
";
echo $query;
}
?>
@@ -49,6 +49,6 @@
echo $s_proceed ?>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/bugnote_add.php3 b/bugnote_add.php3
index 244d39ca8f..ef0c0a8d69 100644
--- a/bugnote_add.php3
+++ b/bugnote_add.php3
@@ -10,13 +10,7 @@
db_mysql_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );
### get user information
- $query = "SELECT id
- FROM $g_mantis_user_table
- WHERE cookie_string='$g_string_cookie_val'";
- $result = mysql_query($query);
- if ( $result ) {
- $u_id = mysql_result( $result, "id" );
- }
+ $u_id = get_current_user_id();
$f_bugnote_text = string_safe( $f_bugnote_text );
### insert bugnote text
@@ -28,7 +22,7 @@
$result = mysql_query( $query );
### retrieve bugnote text id number
- ### NOTE: this is not guarranteed to be the correct one.
+ ### NOTE: this is guarranteed to be the correct one.
### The value LAST_INSERT_ID is stored on a per connection basis.
$query = "select LAST_INSERT_ID()";
@@ -45,10 +39,17 @@
( null, '$f_bug_id', '$u_id','$t_bugnote_text_id',NOW(), NOW() )";
$result = mysql_query( $query );
- ### set last updated
+ ### get date submitted (weird bug in mysql)
+ $query = "SELECT date_submitted
+ FROM $g_mantis_bug_table
+ WHERE id='$f_id'";
+ $result = mysql_query( $query );
+ $t_date_submitted = mysql_result( $result, 0 );
+
+ ### update bug last updated
$query = "UPDATE $g_mantis_bug_table
- SET last_updated=NOW()
- WHERE id='$f_bug_id'";
+ SET date_submitted='$t_date_submitted', last_updated=NOW()
+ WHERE id='$f_id'";
$result = mysql_query($query);
?>
print_html_top() ?>
@@ -81,7 +82,7 @@
}
### OK!!!
else {
- PRINT "ERROR DETECTED: Report this sql statement to \">administrator
";
+ PRINT "$s_sql_error_detected \">administrator
";
PRINT $query;
}
?>
@@ -93,6 +94,6 @@
} ?>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/bugnote_add_inc.php b/bugnote_add_inc.php
index 2928391b88..5f0be00b4c 100644
--- a/bugnote_add_inc.php
+++ b/bugnote_add_inc.php
@@ -6,6 +6,7 @@
?>
db_mysql_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );
+
### check access level
if ( access_level_check_greater_or_equal( "reporter" ) ) {
?>
diff --git a/bugnote_add_page.php3 b/bugnote_add_page.php3
index b731c8de10..e59cf3818c 100644
--- a/bugnote_add_page.php3
+++ b/bugnote_add_page.php3
@@ -58,6 +58,6 @@
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/bugnote_delete.php3 b/bugnote_delete.php3
index 7181b77d02..9e32c31749 100644
--- a/bugnote_delete.php3
+++ b/bugnote_delete.php3
@@ -15,7 +15,18 @@
WHERE id='$f_bug_id'";
$result = mysql_query($query);
- #header( "Location: $g_view_bug_page?f_id=$f_id" );
+ ### get date submitted (weird bug in mysql)
+ $query = "SELECT date_submitted
+ FROM $g_mantis_bug_table
+ WHERE id='$f_id'";
+ $result = mysql_query( $query );
+ $t_date_submitted = mysql_result( $result, 0 );
+
+ ### update bug last updated
+ $query = "UPDATE $g_mantis_bug_table
+ SET date_submitted='$t_date_submitted', last_updated=NOW()
+ WHERE id='$f_id'";
+ $result = mysql_query($query);
?>
print_html_top() ?>
print_head_top() ?>
@@ -47,7 +58,7 @@
}
### FAILURE
else {
- PRINT "ERROR DETECTED: Report this sql statement to \">administrator
";
+ PRINT "$s_sql_error_detected \">administrator
";
echo $query;
}
?>
@@ -60,6 +71,6 @@
} ?>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/bugnote_inc.php b/bugnote_inc.php
index 71a32808a1..94505ce9cb 100644
--- a/bugnote_inc.php
+++ b/bugnote_inc.php
@@ -8,11 +8,7 @@
db_mysql_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );
### grab the user id currently logged in
- $query = "SELECT id
- FROM $g_mantis_user_table
- WHERE cookie_string='$g_string_cookie_val'";
- $result = db_mysql_query( $query );
- $t_user_id = mysql_result( $result, 0);
+ $t_user_id = get_current_user_id();
### get the bugnote data
$query = "SELECT *
@@ -56,14 +52,6 @@
WHERE id='$v3_bugnote_text_id'";
$result2 = db_mysql_query($query);
$v3_note = mysql_result( $result2, 0);
-
- ### grab the bugnote posters username and email and prefix with v5_
- $query = "SELECT username, email
- FROM $g_mantis_user_table
- WHERE id='$v3_reporter_id'";
- $result3 = db_mysql_query($query);
- $row3 = mysql_fetch_array( $result3 );
- extract( $row3, EXTR_PREFIX_ALL, "v5" );
?>
>
>
@@ -74,7 +62,7 @@
>
align=center colspan=2>
- echo $v5_username ?>
+ print_user( $v3_reporter_id ) ?>
@@ -84,10 +72,11 @@
>
### check access level
+ ### only admins and the bugnote creator can delete this bug
if (( access_level_check_greater_or_equal( "administrator" ) )||
( $v3_reporter_id==$t_user_id )) {
?>
- Delete
+ echo $s_delete ?>
} ?>
diff --git a/config_inc.php b/config_inc.php
index 3e09d09eb1..55b969809a 100644
--- a/config_inc.php
+++ b/config_inc.php
@@ -82,7 +82,7 @@
#--------------------
# css
- $g_css_include_file = "css_inc.php";
+ $g_css_include_file = "css_inc.php";
#--------------------
#--------------------
@@ -188,6 +188,7 @@
$g_login_error_page = "login_error_page".$g_php;
$g_login_success_page = "index".$g_php;
$g_logout_page = "logout_page".$g_php;
+ $g_logout_redirect_page = ".";
# debug only
$g_show_source_page = "show_source_page".$g_php;
diff --git a/core_API.php b/core_API.php
index 7593d41aae..7a372439d9 100644
--- a/core_API.php
+++ b/core_API.php
@@ -74,7 +74,7 @@ function print_css( $p_css="" ) {
}
}
#--------------------
- function print_meta_redirect( $p_url, $p_time=0 ) {
+ function print_meta_redirect( $p_url, $p_time ) {
PRINT " ";
}
#--------------------
@@ -90,11 +90,10 @@ function print_header( $p_title="Mantis" ) {
PRINT "
$p_title ";
}
#--------------------
- function print_footer() {
+ function print_footer( $p_file ) {
global $g_string_cookie_val, $g_webmaster_email, $g_show_source;
- global $DOCUMENT_ROOT, $PHP_SELF;
- print_source_link();
+ print_source_link( $p_file );
PRINT " ";
print_mantis_version();
@@ -110,6 +109,10 @@ function print_html_bottom() {
PRINT "";
}
#--------------------
+ ############################
+ # HTML Appearance Helper API
+ ############################
+ #--------------------
# prints the user that is logged in and the date/time
function print_login_info() {
global $g_mantis_user_table, $g_string_cookie_val;
@@ -149,21 +152,21 @@ function print_menu( $p_menu_file="" ) {
}
#--------------------
### checks to see whether we need to be displaying the source link
- function print_source_link() {
- global $g_show_source, $g_show_source_page, $PHP_SELF;
+ function print_source_link( $p_file ) {
+ global $g_show_source, $g_show_source_page;
if ( $g_show_source==1 ) {
if ( access_level_check_greater_or_equal( "administrator" ) ) {
PRINT "";
PRINT "
";
}
}
else if ( $g_show_source==2 ) {
PRINT "";
PRINT "
";
}
}
@@ -177,6 +180,10 @@ function print_mantis_version() {
}
}
#--------------------
+ ##########################
+ # Option List Printing API
+ ##########################
+ #--------------------
function print_handler_option_list( $p_handler_id ) {
global $g_mantis_user_table;
@@ -222,6 +229,49 @@ function print_duplicate_id_option_list( $p_duplicate_id ) {
}
}
#--------------------
+ ### Get current headlines and id prefix with v_
+ function print_news_item_option_list() {
+ global $g_mantis_news_table;
+
+ $query = "SELECT id, headline
+ FROM $g_mantis_news_table
+ ORDER BY id DESC";
+ $result = db_mysql_query( $query );
+ $news_count = mysql_num_rows( $result );
+
+ for ($i=0;$i<$news_count;$i++) {
+ $row = mysql_fetch_array( $result );
+ extract( $row, EXTR_PREFIX_ALL, "v" );
+ $v_headline = string_unsafe( $v_headline );
+ $v_headline = htmlspecialchars( $v_headline );
+
+ PRINT "$v_headline";
+ }
+ }
+ #--------------------
+ ### Used for update pages
+ function print_field_option_list( $p_list, $p_item="" ) {
+ global $g_mantis_bug_table;
+
+ $t_category_string = get_enum_string( $p_list );
+ $t_str = $t_category_string.",";
+ $entry_count = get_list_item_count($t_str)-1;
+ for ($i=0;$i<$entry_count;$i++) {
+ $t_s = substr( $t_str, 1, strpos($t_str, ",")-2 );
+ $t_str = substr( $t_str, strpos($t_str, ",")+1, strlen($t_str) );
+ if ( $p_item==$t_s ) {
+ PRINT " $t_s";
+ }
+ else {
+ PRINT " $t_s";
+ }
+ } ### end for
+ }
+ #--------------------
+ ######################
+ # Print API
+ ######################
+ #--------------------
function print_user( $p_user_id ) {
global $g_mantis_user_table;
@@ -257,10 +307,39 @@ function print_duplicate_id( $p_duplicate_id ) {
}
}
#--------------------
+ # prints the profiles given the user id
+ function print_profile_option_list( $p_id ) {
+ global $g_mantis_user_profile_table;
+
+ ### Get profiles
+ $query = "SELECT id, platform, os, os_build, default_profile
+ FROM $g_mantis_user_profile_table
+ WHERE user_id='$p_id'
+ ORDER BY id DESC";
+ $result = db_mysql_query( $query );
+ $profile_count = mysql_num_rows( $result );
+
+ PRINT " ";
+ for ($i=0;$i<$profile_count;$i++) {
+ ### prefix data with v_
+ $row = mysql_fetch_array( $result );
+ extract( $row, EXTR_PREFIX_ALL, "v" );
+ $v_platform = string_unsafe( $v_platform );
+ $v_os = string_unsafe( $v_os );
+ $v_os_build = string_unsafe( $v_os_build );
+
+ if ( $v_default_profile=="on" ) {
+ PRINT " $v_platform $v_os $v_os_build";
+ }
+ else {
+ PRINT " $v_platform $v_os $v_os_build";
+ }
+ }
+ }
#--------------------
- ####################
+ #####################
# String printing API
- ####################
+ #####################
#--------------------
function get_enum_string( $p_field_name ) {
global $g_mantis_bug_table;
@@ -285,25 +364,6 @@ function get_list_item_count( $t_enum_string, $p_delim_char="," ) {
return count(explode($p_delim_char,$t_enum_string));
}
#--------------------
- ### Used for update pages
- function print_field_option_list( $p_list, $p_item="" ) {
- global $g_mantis_bug_table;
-
- $t_category_string = get_enum_string( $p_list );
- $t_str = $t_category_string.",";
- $entry_count = get_list_item_count($t_str)-1;
- for ($i=0;$i<$entry_count;$i++) {
- $t_s = substr( $t_str, 1, strpos($t_str, ",")-2 );
- $t_str = substr( $t_str, strpos($t_str, ",")+1, strlen($t_str) );
- if ( $p_item==$t_s ) {
- PRINT " $t_s";
- }
- else {
- PRINT " $t_s";
- }
- } ### end for
- }
- #--------------------
### Used in summary reports
function print_bug_enum_summary( $p_enum, $p_status="" ) {
global $g_mantis_bug_table, $g_primary_color_light, $g_primary_color_dark;
@@ -378,36 +438,8 @@ function print_bug_date_summary( $p_date_array ) {
} ### end for
}
#--------------------
- # prints the profiles given the user id
- function print_profile_option_list( $p_id ) {
- global $g_mantis_user_profile_table;
-
- ### Get profiles
- $query = "SELECT id, platform, os, os_build, default_profile
- FROM $g_mantis_user_profile_table
- WHERE user_id='$p_id'
- ORDER BY id DESC";
- $result = db_mysql_query( $query );
- $profile_count = mysql_num_rows( $result );
-
- PRINT " ";
- for ($i=0;$i<$profile_count;$i++) {
- ### prefix data with v_
- $row = mysql_fetch_array( $result );
- extract( $row, EXTR_PREFIX_ALL, "v" );
- $v_platform = string_unsafe( $v_platform );
- $v_os = string_unsafe( $v_os );
- $v_os_build = string_unsafe( $v_os_build );
-
- if ( $v_default_profile=="on" ) {
- PRINT " $v_platform $v_os $v_os_build";
- }
- else {
- PRINT " $v_platform $v_os $v_os_build";
- }
- }
- }
- #--------------------
+ ### prints a link to a bug given an ID
+ ### it accounts for the user preference
function print_bug_link( $p_id ) {
global $g_mantis_user_pref_table, $g_view_bug_page, $g_view_bug_advanced_page;
@@ -419,7 +451,8 @@ function print_bug_link( $p_id ) {
}
}
#--------------------
- function print_formatted_status( $p_status, $p_severity ) {
+ ### formats the severity given the status
+ function print_formatted_severity( $p_status, $p_severity ) {
if ( ( ( $p_severity=="major" ) ||
( $p_severity=="crash" ) ||
( $p_severity=="block" ) )&&
@@ -611,7 +644,6 @@ function get_current_user_profile_field( $p_field_name ) {
FROM $g_mantis_user_pref_table
WHERE user_id='$t_id'";
$result = db_mysql_query( $query );
-
return mysql_result( $result, 0 );
}
else {
diff --git a/documentation_page.php3 b/documentation_page.php3
index 7f57523522..9aba240eee 100644
--- a/documentation_page.php3
+++ b/documentation_page.php3
@@ -36,6 +36,6 @@
[ CONFIGURATION ]
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/index.php3 b/index.php3
index 2b8cbb5b3b..7e7e0443d0 100644
--- a/index.php3
+++ b/index.php3
@@ -14,7 +14,7 @@
print_head_top() ?>
print_title( $g_window_title ) ?>
print_css( $g_css_include_file ) ?>
- print_meta_redirect( $g_login_page, $p_time=0 ) ?>
+ print_meta_redirect( $g_login_page, $g_wait_time ) ?>
print_head_bottom() ?>
print_body_top() ?>
print_header( $g_page_title ) ?>
@@ -23,6 +23,6 @@
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/login_error_page.php3 b/login_error_page.php3
index 7d75a7bc24..c779ac60ae 100644
--- a/login_error_page.php3
+++ b/login_error_page.php3
@@ -66,6 +66,6 @@
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/login_page.php3 b/login_page.php3
index 5c57363dd9..562871c68a 100644
--- a/login_page.php3
+++ b/login_page.php3
@@ -61,6 +61,6 @@
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/logout_page.php3 b/logout_page.php3
index 424727e959..f704f39790 100644
--- a/logout_page.php3
+++ b/logout_page.php3
@@ -13,7 +13,7 @@
print_head_top() ?>
print_title( $g_window_title ) ?>
print_css( $g_css_include_file ) ?>
- print_meta_redirect( $g_index, $p_time=1 ) ?>
+ print_meta_redirect( $g_logout_redirect_page, $g_wait_time ) ?>
include( $g_meta_include_file ) ?>
print_head_bottom() ?>
print_body_top() ?>
@@ -32,7 +32,7 @@
>
- echo $s_redirecting ?> echo $s_here ?>
+ echo $s_redirecting ?> echo $s_here ?>
@@ -41,6 +41,6 @@
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/main_page.php3 b/main_page.php3
index 3ca9683be2..25893e0975 100644
--- a/main_page.php3
+++ b/main_page.php3
@@ -71,7 +71,7 @@
>
- echo $v_body ?>
+ echo $v_body ?>
@@ -81,21 +81,21 @@
}
?>
+
+
$f_offset_next = $f_offset + $g_news_view_limit;
$f_offset_prev = $f_offset - $g_news_view_limit;
- PRINT "
";
- PRINT "
";
if ( $f_offset_prev >= 0) {
PRINT "[
$s_newer_news ]";
}
if ( $news_count==$g_news_view_limit ) {
PRINT " [
$s_older_news ]";
}
- PRINT "
";
?>
+
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/manage_category_page.php3 b/manage_category_page.php3
index edee03671f..3fa88911dc 100644
--- a/manage_category_page.php3
+++ b/manage_category_page.php3
@@ -59,6 +59,6 @@
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/manage_category_update.php3 b/manage_category_update.php3
index 7bab1d4f88..bdec2a01a1 100644
--- a/manage_category_update.php3
+++ b/manage_category_update.php3
@@ -47,7 +47,7 @@
PRINT "$s_categories_updated";
}
else {
- PRINT "ERROR DETECTED: Report this sql statement to \">administrator
";
+ PRINT "$s_sql_error_detected \">administrator
";
echo $query;
}
?>
@@ -55,6 +55,6 @@
echo $s_proceed ?>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/manage_create_new_user.php3 b/manage_create_new_user.php3
index 0ea7ec76bd..6d208da315 100644
--- a/manage_create_new_user.php3
+++ b/manage_create_new_user.php3
@@ -51,7 +51,7 @@
PRINT "$s_created_user_part1 $f_username $s_created_user_part2 $f_access_level
";
}
else {
- PRINT "ERROR DETECTED: Report this sql statement to \">administrator
";
+ PRINT "$s_sql_error_detected \">administrator
";
echo $query;
}
?>
@@ -59,6 +59,6 @@
$s_proceed ?>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/manage_create_user_page.php3 b/manage_create_user_page.php3
index e8704590d7..c8357b5d28 100644
--- a/manage_create_user_page.php3
+++ b/manage_create_user_page.php3
@@ -113,6 +113,6 @@
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/manage_page.php3 b/manage_page.php3
index 967f2a8c6e..5569263620 100644
--- a/manage_page.php3
+++ b/manage_page.php3
@@ -168,6 +168,6 @@
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/manage_product_versions_page.php3 b/manage_product_versions_page.php3
index b980279c30..7907ebed15 100644
--- a/manage_product_versions_page.php3
+++ b/manage_product_versions_page.php3
@@ -59,6 +59,6 @@
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/manage_product_versions_update.php3 b/manage_product_versions_update.php3
index bd0ee71767..df8feea29c 100644
--- a/manage_product_versions_update.php3
+++ b/manage_product_versions_update.php3
@@ -47,7 +47,7 @@
PRINT "$s_product_version_updated
";
}
else {
- PRINT "ERROR DETECTED: Report this sql statement to \">administrator
";
+ PRINT "$s_sql_error_detected \">administrator
";
echo $query;
}
?>
@@ -55,6 +55,6 @@
echo $s_proceed ?>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/manage_user_delete.php3 b/manage_user_delete.php3
index 0b986f28cc..7fc72b417e 100644
--- a/manage_user_delete.php3
+++ b/manage_user_delete.php3
@@ -63,7 +63,7 @@
PRINT "$s_account_deleted
";
}
else {
- PRINT "ERROR DETECTED: Report this sql statement to \">administrator
";
+ PRINT "$s_sql_error_detected \">administrator
";
echo $query;
}
?>
@@ -71,6 +71,6 @@
echo $s_proceed ?>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/manage_user_delete_page.php3 b/manage_user_delete_page.php3
index d0047a7daf..c3c723aa42 100644
--- a/manage_user_delete_page.php3
+++ b/manage_user_delete_page.php3
@@ -36,6 +36,6 @@
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/manage_user_page.php3 b/manage_user_page.php3
index cc97309874..f245fe4e9d 100644
--- a/manage_user_page.php3
+++ b/manage_user_page.php3
@@ -125,6 +125,6 @@
echo $s_reset_password_msg ?>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/manage_user_reset.php3 b/manage_user_reset.php3
index 1bf61d7465..f1be90b2db 100644
--- a/manage_user_reset.php3
+++ b/manage_user_reset.php3
@@ -50,7 +50,7 @@
PRINT "$s_account_reset";
}
else {
- PRINT "ERROR DETECTED: Report this sql statement to \">administrator
";
+ PRINT "$s_sql_error_detected \">administrator
";
echo $query;
}
?>
@@ -58,6 +58,6 @@
echo $s_proceed ?>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/manage_user_update.php3 b/manage_user_update.php3
index df220f2436..f3359fe3b8 100644
--- a/manage_user_update.php3
+++ b/manage_user_update.php3
@@ -16,14 +16,14 @@
}
### update action
+ ### administrator is not allowed to change access level or enabled
+ ### this is to prevent screwing your own account
if ( $f_protected=="on" ) {
$query = "UPDATE $g_mantis_user_table
SET username='$f_username', email='$f_email',
protected='$f_protected'
WHERE id='$f_id'";
}
- ### administrator is not allowed to change access level or enabled
- ### this is to prevent screwing your own account
else {
$query = "UPDATE $g_mantis_user_table
SET username='$f_username', email='$f_email',
@@ -61,7 +61,7 @@
PRINT "$s_manage_user_updated
";
}
else {
- PRINT "ERROR DETECTED: Report this sql statement to \">administrator
";
+ PRINT "$s_sql_error_detected \">administrator
";
echo $query;
}
?>
@@ -69,6 +69,6 @@
echo $s_proceed ?>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/mysql_error_page.php3 b/mysql_error_page.php3
index bfbb4f7450..2a241ea912 100644
--- a/mysql_error_page.php3
+++ b/mysql_error_page.php3
@@ -32,6 +32,6 @@ There was a sql error. Please report this to your administrator or the author o
?>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/news_add.php3 b/news_add.php3
index b05b2522c3..af4583e687 100644
--- a/news_add.php3
+++ b/news_add.php3
@@ -63,7 +63,7 @@
>
- echo $t_body ?>
+ echo $t_body ?>
@@ -73,13 +73,13 @@
}
### FAILURE
else {
- PRINT "ERROR DETECTED: Report this sql statement to \">administrator ";
+ PRINT "$s_sql_error_detected \">administrator
";
}
?>
echo $s_proceed ?>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/news_delete.php3 b/news_delete.php3
index 11e2158a29..c9dd3f68b7 100644
--- a/news_delete.php3
+++ b/news_delete.php3
@@ -45,13 +45,13 @@
PRINT "$s_news_deleted
";
}
else {
- PRINT "ERROR DETECTED: Report this sql statement to \">administrator
";
+ PRINT "$s_sql_error_detected \">administrator
";
}
?>
echo $s_proceed ?>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/news_delete_page.php3 b/news_delete_page.php3
index 13856b5695..b08a4cb4a6 100644
--- a/news_delete_page.php3
+++ b/news_delete_page.php3
@@ -35,6 +35,6 @@
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/news_edit_page.php3 b/news_edit_page.php3
index f2211cb058..ac8ced0e9b 100644
--- a/news_edit_page.php3
+++ b/news_edit_page.php3
@@ -53,7 +53,8 @@
>
-
+
+
>
echo $s_edit_news_title ?>
@@ -87,6 +88,6 @@
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/news_menu_page.php3 b/news_menu_page.php3
index df00540347..ec0e715e59 100644
--- a/news_menu_page.php3
+++ b/news_menu_page.php3
@@ -14,16 +14,6 @@
header( "Location: $g_logout_page" );
exit;
}
-
- ### Get user information and prefix with u_
- $query = "SELECT *
- FROM $g_mantis_user_table
- WHERE cookie_string='$g_string_cookie_val'";
- $result = db_mysql_query($query);
- $row = mysql_fetch_array($result);
- if ( $row ) {
- extract( $row, EXTR_PREFIX_ALL, "u" );
- }
?>
print_html_top() ?>
print_head_top() ?>
@@ -44,7 +34,7 @@
>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/news_update.php3 b/news_update.php3
index 56b9e0aabc..37f31f2df9 100644
--- a/news_update.php3
+++ b/news_update.php3
@@ -18,9 +18,11 @@
### " character poses problem when editting so let's just convert them
$f_headline = string_safe( str_replace( "\"", "'", $f_headline ) );
$f_body = string_safe( $f_body );
+
### Update entry
$query = "UPDATE $g_mantis_news_table
- SET headline='$f_headline', body='$f_body', last_modified=NOW()
+ SET headline='$f_headline', body='$f_body',
+ date_posted='$f_date_posted', last_modified=NOW()
WHERE id='$f_id'";
$result = mysql_query( $query );
?>
@@ -32,7 +34,7 @@
if ( $result ) {
print_meta_redirect( $g_news_menu_page, $g_wait_time );
}
- ?>
+?>
include( $g_meta_include_file ) ?>
print_head_bottom() ?>
print_body_top() ?>
@@ -48,13 +50,13 @@
PRINT "$s_news_updated";
}
else {
- PRINT "ERROR DETECTED: Report this sql statement to \">administrator
";
+ PRINT "$s_sql_error_detected \">administrator
";
}
?>
echo $s_proceed ?>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/report_add.php3 b/report_add.php3
index bf479caf97..c6de46e59f 100644
--- a/report_add.php3
+++ b/report_add.php3
@@ -73,7 +73,7 @@
$result = mysql_query( $query );
### Get the id of the text information we just inserted
- ### NOTE: this is not guarranteed to be the correct one.
+ ### NOTE: this is guarranteed to be the correct one.
### The value LAST_INSERT_ID is stored on a per connection basis.
$query = "select LAST_INSERT_ID()";
@@ -142,7 +142,7 @@
}
### MYSQL ERROR
else if ( !$result ) {
- PRINT "ERROR DETECTED: Report this sql statement to \">administrator
";
+ PRINT "$s_sql_error_detected \">administrator
";
PRINT $query;
}
### OK!!!
@@ -154,6 +154,6 @@
echo $s_proceed ?>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/report_bug_advanced_page.php3 b/report_bug_advanced_page.php3
index 5a0668d5d5..12d640a1f5 100644
--- a/report_bug_advanced_page.php3
+++ b/report_bug_advanced_page.php3
@@ -30,7 +30,7 @@
@@ -42,13 +42,13 @@
>
- Enter Report Details
+ echo $s_enter_report_details ?>
>
- Category:
- size=-1>[*required*]
+ echo $s_category ?>:
+ size=-1>[* echo $s_required ?>*]
@@ -59,8 +59,8 @@
>
- Reproducibility:
- size=-1>[*required*]
+ echo $s_reproducibility ?>:
+ size=-1>[* echo $s_required ?>*]
@@ -71,8 +71,8 @@
>
- Severity:
- size=-1>[*required*]
+ echo $s_severity ?>:
+ size=-1>[* echo $s_required ?>*]
@@ -87,7 +87,7 @@
>
- Select Profile:
+ echo $s_select_profile ?>:
@@ -97,12 +97,12 @@
>
- OR Fill in
+ echo $s_or_fill_in ?>
>
- Platform:
+ echo $s_platform ?>:
@@ -110,7 +110,7 @@
>
- OS:
+ echo $s_os ?>:
@@ -118,7 +118,7 @@
>
- OS Version/Build:
+ echo $s_os_version ?>:
@@ -130,7 +130,7 @@
>
- Product Version
+ echo $s_product_version ?>
@@ -140,7 +140,7 @@
>
- Product Build
+ echo $s_product_build ?>
@@ -148,8 +148,8 @@
>
- Summary:
- size=-1>[*required*]
+ echo $s_summary ?>:
+ size=-1>[* echo $s_required ?>*]
@@ -157,8 +157,8 @@
>
- Description:
- size=-1>[*required*]
+ echo $s_description ?>:
+ size=-1>[* echo $s_required ?>*]
@@ -166,7 +166,7 @@
>
- Steps to Reproduce:
+ echo $s_steps_to_reproduce ?>:
@@ -174,7 +174,7 @@
>
- Additional Information:
+ echo $s_additional_information ?>:
@@ -182,7 +182,7 @@
-
+
@@ -192,6 +192,6 @@
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
diff --git a/report_bug_page.php3 b/report_bug_page.php3
index 2c8ce8541b..60421d748a 100644
--- a/report_bug_page.php3
+++ b/report_bug_page.php3
@@ -26,7 +26,7 @@
?>
}
@@ -41,13 +41,13 @@
>
- Enter Report Details
+ echo $s_enter_report_details_title ?>
>
- Category:
- size=-1>[*required*]
+ echo $s_category ?>:
+ size=-1>[* echo $s_required ?>*]
@@ -58,8 +58,8 @@
>
- Reproducibility:
- size=-1>[*required*]
+ echo $s_reproducibility ?>:
+ size=-1>[* echo $s_required ?>*]
@@ -70,8 +70,8 @@
>
- Severity:
- size=-1>[*required*]
+ echo $s_severity ?>:
+ size=-1>[* echo $s_required ?>*]
@@ -82,8 +82,8 @@
>
- Summary:
- size=-1>[*required*]
+ echo $s_summary ?>:
+ size=-1>[* echo $s_required ?>*]
@@ -91,8 +91,8 @@
>
- Description:
- size=-1>[*required*]
+ echo $s_description ?>:
+ size=-1>[* echo $s_required ?>*]
@@ -100,7 +100,7 @@
>
- Additional Information:
+ echo $s_additional_information ?>:
@@ -108,7 +108,7 @@
-
+
@@ -118,6 +118,6 @@
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
diff --git a/show_source_page.php3 b/show_source_page.php3
index 8b54de374e..5b364d36c8 100644
--- a/show_source_page.php3
+++ b/show_source_page.php3
@@ -52,6 +52,6 @@
?>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/strings_english.php b/strings_english.php
index efda0c6fa8..f5744eeebb 100644
--- a/strings_english.php
+++ b/strings_english.php
@@ -7,13 +7,14 @@
# This file is to aid in localization
- ### account_delete_page.php3
- $s_confirm_delete = "Are you sure you wish to delete your account?";
-
### account_delete.php3
$s_account_protected = "Account protected. Cannot change settings...";
$s_account_removed = "Your account has been removed...";
+ ### account_delete_page.php3
+ $s_confirm_delete = "Are you sure you wish to delete your account?";
+ $s_delete_account_button = "Delete Account";
+
### account_page.php3
$s_manage_profiles_link = "Manage Profiles";
$s_change_preferences_link = "Change Preferences";
@@ -134,6 +135,7 @@
### bugnote_inc.php
$s_no_bugnotes = "There are no notes attached to this bug.";
+ $s_delete = "Delete";
### index.php3
$s_click_to_login = "Click here to login";
@@ -267,7 +269,19 @@
$s_submission_thanks = "Thank you for your submission.";
### report_bug_advanced_page.php3
+ $s_simple_report_link = "Simple Report";
+ $s_select_profile = "Select Profile";
+ $s_or_fill_in = "OR Fill In";
+ $s_steps_to_reproduce = "Steps To Reproduce";
+
### report_bug_page.php3
+ $s_advanced_report_link = "Advanced Report";
+ $s_enter_report_details_title = "Enter Report Details";
+ $s_category = "Category";
+ $s_required = "required";
+ $s_additional_information = "Additional Information";
+ $s_submit_report_button = "Submit Report";
+
### show_source_page.php3
$s_show_source_for = "Showing source for";
$s_not_supported_part1 = "This version";
@@ -296,4 +310,5 @@
### General Strings
$s_go_back = "Go Back";
$s_proceed = "Click here to proceed";
+ $s_sql_error_detected = "$s_sql_error_detected";
?>
\ No newline at end of file
diff --git a/summary_page.php3 b/summary_page.php3
index 28ac2ba275..60f8c92344 100644
--- a/summary_page.php3
+++ b/summary_page.php3
@@ -191,6 +191,6 @@
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/view_bug_advanced_page.php3 b/view_bug_advanced_page.php3
index 2e23980789..c0026d2715 100644
--- a/view_bug_advanced_page.php3
+++ b/view_bug_advanced_page.php3
@@ -310,8 +310,6 @@
PRINT "";
if ( $v_status=="resolved" ) {
- include( $g_bugnote_include_file );
- PRINT "
";
PRINT "
";
PRINT "
";
PRINT " ";
@@ -323,6 +321,6 @@
}
?>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/view_bug_all_page.php3 b/view_bug_all_page.php3
index 1dff28d6fe..cfcb32e864 100644
--- a/view_bug_all_page.php3
+++ b/view_bug_all_page.php3
@@ -95,6 +95,7 @@
print_menu( $g_menu_include_file ) ?>
+
- print_formatted_status( $v_status, $v_severity ) ?>
+ print_formatted_severity( $v_status, $v_severity ) ?>
echo $v_status ?>
@@ -278,6 +279,6 @@
} ?>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/view_bug_page.php3 b/view_bug_page.php3
index 382dd3f1b5..74d6a01162 100644
--- a/view_bug_page.php3
+++ b/view_bug_page.php3
@@ -214,6 +214,6 @@
}
?>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/view_user_assigned_bug_page.php3 b/view_user_assigned_bug_page.php3
index df2aeb9eca..c34e62e512 100644
--- a/view_user_assigned_bug_page.php3
+++ b/view_user_assigned_bug_page.php3
@@ -244,7 +244,7 @@
echo $v_category ?>
- print_formatted_status( $v_status, $v_severity ) ?>
+ print_formatted_severity( $v_status, $v_severity ) ?>
echo $v_status ?>
@@ -291,6 +291,6 @@
} ?>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file
diff --git a/view_user_reported_bug_page.php3 b/view_user_reported_bug_page.php3
index 996bfde8ee..4f983fe01c 100644
--- a/view_user_reported_bug_page.php3
+++ b/view_user_reported_bug_page.php3
@@ -243,7 +243,7 @@
echo $v_category ?>
- print_formatted_status( $v_status, $v_severity ) ?>
+ print_formatted_severity( $v_status, $v_severity ) ?>
echo $v_status ?>
@@ -290,6 +290,6 @@
} ?>
- print_footer() ?>
+ print_footer(__FILE__) ?>
print_body_bottom() ?>
print_html_bottom() ?>
\ No newline at end of file