From bb5ef59c93feb7ffbd85280fdc4ccbaffd8d04d2 Mon Sep 17 00:00:00 2001 From: Julian Fitzell Date: Sun, 27 Oct 2002 23:35:40 +0000 Subject: [PATCH] rough cleanup (basically removed $s_ and $g_ variable references) git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@1596 f5dc347c-c33d-0410-90a0-b07cc1902cb9 --- bug_update.php | 20 +++--- bug_update_advanced_page.php | 94 ++++++++++++------------ bug_update_page.php | 72 +++++++++---------- bug_view_advanced_page.php | 134 +++++++++++++++++++---------------- bug_view_inc.php | 46 ++++++------ bug_view_page.php | 126 +++++++++++++++++--------------- bug_vote_add.php | 9 ++- 7 files changed, 264 insertions(+), 237 deletions(-) diff --git a/bug_update.php b/bug_update.php index 7bf5a612af..aed16e968b 100644 --- a/bug_update.php +++ b/bug_update.php @@ -6,11 +6,7 @@ # See the README and LICENSE files for details # -------------------------------------------------------- - # $Revision: 1.36 $ - # $Author: jfitzell $ - # $Date: 2002-10-20 23:59:48 $ - # - # $Id: bug_update.php,v 1.36 2002-10-20 23:59:48 jfitzell Exp $ + # $Id: bug_update.php,v 1.37 2002-10-27 23:35:40 jfitzell Exp $ # -------------------------------------------------------- ?> " /> - + - + - + - + - + - + - + @@ -134,7 +134,7 @@ - + - + @@ -166,7 +166,7 @@ - + - + - + @@ -188,7 +188,7 @@ - + - + - + @@ -210,7 +210,7 @@ - + @@ -229,7 +229,7 @@ - + @@ -253,7 +253,7 @@   - + @@ -264,7 +264,7 @@   - + @@ -277,7 +277,7 @@ - + @@ -285,7 +285,7 @@ - + @@ -293,7 +293,7 @@ - + @@ -301,7 +301,7 @@ - + @@ -314,16 +314,16 @@ - + - + - + @@ -332,7 +332,7 @@ - + diff --git a/bug_update_page.php b/bug_update_page.php index a22a420b7d..7468b9da3f 100644 --- a/bug_update_page.php +++ b/bug_update_page.php @@ -6,11 +6,7 @@ # See the README and LICENSE files for details # -------------------------------------------------------- - # $Revision: 1.33 $ - # $Author: jfitzell $ - # $Date: 2002-10-20 23:59:48 $ - # - # $Id: bug_update_page.php,v 1.33 2002-10-20 23:59:48 jfitzell Exp $ + # $Id: bug_update_page.php,v 1.34 2002-10-27 23:35:40 jfitzell Exp $ # -------------------------------------------------------- ?> " /> - + - + - + - + - + - + - + @@ -131,7 +131,7 @@ - + - + @@ -163,7 +163,7 @@ - + - + @@ -182,7 +182,7 @@ - + - + @@ -206,7 +206,7 @@ - + @@ -214,7 +214,7 @@ - + @@ -222,7 +222,7 @@ - + @@ -235,16 +235,16 @@ - + - + - + @@ -253,7 +253,7 @@ - + diff --git a/bug_view_advanced_page.php b/bug_view_advanced_page.php index 374bf62f76..d4f1465306 100644 --- a/bug_view_advanced_page.php +++ b/bug_view_advanced_page.php @@ -4,6 +4,10 @@ # Copyright (C) 2002 Mantis Team - mantisbt-dev@lists.sourceforge.net # This program is distributed under the terms and conditions of the GPL # See the README and LICENSE files for details + + # -------------------------------------------------------- + # $Id: bug_view_advanced_page.php,v 1.7 2002-10-27 23:35:40 jfitzell Exp $ + # -------------------------------------------------------- ?> @@ -17,7 +21,7 @@ $f_check = gpc_get_string( 'f_check', '' ); $f_history = gpc_get_bool( 'f_history' ); - if ( SIMPLE_ONLY == $g_show_view ) { + if ( SIMPLE_ONLY == config_get( 'show_view' ) ) { $t_simple_url = 'bug_view_page.php?f_bug_id=' . $f_bug_id; if ( !empty( $f_check ) ) { @@ -40,9 +44,11 @@ $c_bug_id = (integer)$f_bug_id; - $query = "SELECT *, UNIX_TIMESTAMP(date_submitted) as date_submitted, - UNIX_TIMESTAMP(last_updated) as last_updated - FROM $g_mantis_bug_table + $t_bug_table = config_get( 'mantis_bug_table' ); + + $query = "SELECT *, UNIX_TIMESTAMP(date_submitted) as date_submitted, + UNIX_TIMESTAMP(last_updated) as last_updated + FROM $t_bug_table WHERE id='$c_bug_id'"; $result = db_query( $query ); @@ -60,8 +66,10 @@ access_bug_check( $f_bug_id, $v_view_state ); } - $query = "SELECT * - FROM $g_mantis_bug_text_table + $t_bug_text_table = config_get( 'mantis_bug_text_table' ); + + $query = "SELECT * + FROM $t_bug_text_table WHERE id='$v_bug_text_id'"; $result = db_query( $query ); $row = db_fetch_array( $result ); @@ -91,17 +99,17 @@ @@ -161,13 +169,13 @@ 0 ) { $query = "SELECT description - FROM $g_mantis_user_profile_table + FROM $t_user_profile_table WHERE id='$v_profile_id'"; $result = db_query( $query ); $t_profile_description = ''; @@ -338,7 +348,7 @@
- - + + - + - - + + - - + +
- + - + - + - + - + - +
- + - + @@ -178,7 +186,7 @@
- + @@ -186,19 +194,19 @@
- + - + - + @@ -206,19 +214,19 @@
- + - + - + @@ -226,7 +234,7 @@
- + @@ -235,7 +243,7 @@ - + @@ -243,7 +251,7 @@
- + @@ -252,7 +260,7 @@ - + @@ -263,7 +271,7 @@   - + @@ -274,7 +282,7 @@   - + @@ -287,7 +295,7 @@
- + @@ -295,7 +303,7 @@
- + @@ -303,7 +311,7 @@
- + @@ -311,17 +319,19 @@
- +
- + @@ -351,14 +361,14 @@ $t_show_attachments = true; } else { $t_user_id = current_user_get_field ( 'id' ); - $t_show_attachments = ( ( $v_reporter_id == $t_user_id ) || access_level_check_greater_or_equal( $g_view_attachments_threshold ) ); + $t_show_attachments = ( ( $v_reporter_id == $t_user_id ) || access_level_check_greater_or_equal( config_get( 'view_attachments_threshold' ) ) ); } if ( $t_show_attachments ) { ?>
- + @@ -370,12 +380,12 @@ - + - + @@ -398,11 +408,11 @@ } # ASSIGN form END ?> - += RESOLVED ) && - ( access_level_check_greater_or_equal( $g_reopen_bug_threshold ) || + ( access_level_check_greater_or_equal( config_get( 'reopen_bug_threshold' ) ) || ( $v_reporter_id == $t_user_id && ON == config_get( 'allow_reporter_reopen' ) ) ) ) { ?> - - + - + @@ -99,7 +99,7 @@
- +
- +
- +
- +
- +
- +
- +
- +
- +
- + - + - + - + - + - +
- + @@ -107,7 +107,7 @@
- + @@ -115,13 +115,13 @@
- + - + @@ -132,13 +132,13 @@
- + - + @@ -154,7 +154,7 @@
- + @@ -162,7 +162,7 @@
- + @@ -170,7 +170,7 @@
- + diff --git a/bug_view_page.php b/bug_view_page.php index fcd69f4288..4246a1f48d 100644 --- a/bug_view_page.php +++ b/bug_view_page.php @@ -4,6 +4,10 @@ # Copyright (C) 2002 Mantis Team - mantisbt-dev@lists.sourceforge.net # This program is distributed under the terms and conditions of the GPL # See the README and LICENSE files for details + + # -------------------------------------------------------- + # $Id: bug_view_page.php,v 1.7 2002-10-27 23:35:40 jfitzell Exp $ + # -------------------------------------------------------- ?> @@ -11,7 +15,7 @@ $f_bug_id = gpc_get_int( 'f_bug_id' ); $f_bug_id = bug_format_id( $f_bug_id ); - if ( ADVANCED_ONLY == $g_show_view ) { + if ( ADVANCED_ONLY == config_get( 'show_view' ) ) { print_header_redirect ( 'bug_view_advanced_page.php?f_bug_id='.$f_bug_id ); } @@ -20,9 +24,11 @@ $c_bug_id = (integer)$f_bug_id; project_access_check( $f_bug_id ); - $query = "SELECT *, UNIX_TIMESTAMP(date_submitted) as date_submitted, - UNIX_TIMESTAMP(last_updated) as last_updated - FROM $g_mantis_bug_table + $t_bug_table = config_get( 'mantis_bug_table' ); + + $query = "SELECT *, UNIX_TIMESTAMP(date_submitted) as date_submitted, + UNIX_TIMESTAMP(last_updated) as last_updated + FROM $t_bug_table WHERE id='$c_bug_id'"; $result = db_query( $query ); @@ -38,8 +44,10 @@ # if bug is private, make sure user can view private bugs access_bug_check( $f_bug_id, $v_view_state ); - $query = "SELECT * - FROM $g_mantis_bug_text_table + $t_bug_text_table = config_get( 'mantis_bug_text_table' ); + + $query = "SELECT * + FROM $t_bug_text_table WHERE id='$v_bug_text_id'"; $result = db_query( $query ); $row = db_fetch_array( $result ); @@ -63,35 +71,35 @@ @@ -121,13 +129,13 @@
- - + + - - + + - - + +
- + - + - + - + - + - +
- + - + @@ -138,7 +146,7 @@
- + @@ -146,13 +154,13 @@
- + - + @@ -163,13 +171,13 @@
- + - + @@ -185,7 +193,7 @@
- + @@ -193,7 +201,7 @@
- + @@ -201,7 +209,7 @@
- + @@ -209,13 +217,13 @@
- + @@ -224,7 +232,7 @@
- + "; @@ -257,13 +265,13 @@ $t_bug_link = string_get_bug_view_link( $v2_source_bug_id ); switch ( $v2_relationship_type ) { - case BUG_DUPLICATE: $t_description = str_replace( '%id', $t_bug_link, $s_has_duplicate ); + case BUG_DUPLICATE: $t_description = str_replace( '%id', $t_bug_link, lang_get( 'has_duplicate' ) ); break; - case BUG_RELATED: $t_description = str_replace( '%id', $t_bug_link, $s_related_to ); + case BUG_RELATED: $t_description = str_replace( '%id', $t_bug_link, lang_get( 'related_to' ) ); break; - case BUG_DEPENDANT: $t_description = str_replace( '%id', $t_bug_link, $s_blocks ); + case BUG_DEPENDANT: $t_description = str_replace( '%id', $t_bug_link, lang_get( 'blocks' ) ); break; - default: $t_description = str_replace( '%id', $t_bug_link, $s_has_duplicate ); + default: $t_description = str_replace( '%id', $t_bug_link, lang_get( 'has_duplicate' ) ); } PRINT "$t_description
"; @@ -276,12 +284,12 @@ - + - + @@ -304,11 +312,11 @@ } # ASSIGN form END ?> - += RESOLVED ) && - ( access_level_check_greater_or_equal( $g_reopen_bug_threshold ) || + ( access_level_check_greater_or_equal( config_get( 'reopen_bug_threshold' ) ) || ( $v_reporter_id == $t_user_id && ON == config_get( 'allow_reporter_reopen' ) ) ) ) { ?> - - + - + diff --git a/bug_vote_add.php b/bug_vote_add.php index 5546e125a9..703785d2e9 100644 --- a/bug_vote_add.php +++ b/bug_vote_add.php @@ -4,6 +4,10 @@ # Copyright (C) 2002 Mantis Team - mantisbt-dev@lists.sourceforge.net # This program is distributed under the terms and conditions of the GPL # See the README and LICENSE files for details + + # -------------------------------------------------------- + # $Id: bug_vote_add.php,v 1.14 2002-10-27 23:35:40 jfitzell Exp $ + # -------------------------------------------------------- ?> @@ -16,7 +20,10 @@ # increase vote count and update in table $f_vote++; - $query = "UPDATE $g_mantis_bug_table + + $t_bug_table = config_get( 'mantis_bug_table' ); + + $query = "UPDATE $t_bug_table SET votes=$c_vote WHERE id='$c_bug_id'"; $result = db_query($query);
- +
- +
- +
- +
- +
- +
- +
- +